/* Hoskinson Consulting — coming soon (Chambers direction) */

@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/bodoni-moda-latin.woff2') format('woff2');
}

:root {
  --paper: #f7f5f0;
  --ink: #17140f;
  --ink-faint: #6a655c;
  --oxblood: #7c1f2a;
  --rule: rgba(23, 20, 15, .2);
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', 'Times New Roman', serif;
  --plate-inset: clamp(10px, 2.2vmin, 26px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; background: var(--paper); }
body {
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html.is-locked, html.is-locked body { overflow: hidden; }
::selection { background: #e3d9c7; color: var(--ink); }

button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--oxblood); outline-offset: 4px; }

/* ── Surface ─────────────────────────────────────────────── */

/* the mark sits a little above the middle, in the optical centre */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  overflow: hidden;
}
.page::before, .page::after { content: ''; flex: 1 1 0; }
.page::after { padding: 40px 0 max(6vh, 28px); }

.mark { flex: none; text-align: center; }

/* the one thing on the page that asks to be pressed */
.dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.dot:focus-visible { outline-offset: -6px; }
.dot-core {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--oxblood);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
/* now and then, something taps on it from underneath */
.dot.is-twitching .dot-core { animation: hcTap 1.2s ease-out; }
.dot.is-twitching .dot-ring { animation: hcRingTwice 1.2s ease-out; }
.dot:hover .dot-core, .dot:focus-visible .dot-core {
  transform: scale(1.6);
  animation: hcWobble 1.9s ease-in-out infinite;
}
.dot:active .dot-core { transform: scale(1.2); animation: none; transition-duration: .08s; }

.dot-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 1px solid var(--oxblood);
  opacity: 0;
  transform: scale(.125);
  pointer-events: none;
}

.wordmark {
  margin: 0;
  font-weight: 400;
  font-size: clamp(20px, 3.2vw, 38px);
  font-variation-settings: 'opsz' 24;
  letter-spacing: .34em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark span { display: inline-block; padding-left: .34em; }
.wordmark span + span { padding-left: 0; }

.rule { width: 112px; height: 1px; background: var(--rule); margin: 36px auto; }

.soon {
  margin: 0;
  font-size: 11px;
  letter-spacing: .44em;
  text-indent: .44em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (max-width: 719px) {
  .wordmark { font-size: min(7.2vw, 32px); letter-spacing: .3em; line-height: 1.55; white-space: normal; }
  .wordmark span, .wordmark span + span { display: block; padding-left: .3em; }
  .rule { margin: 30px auto; }
  .page::after { padding: 58px 0 max(4vh, 20px); }
}

/* the paper and the name shudder before he comes up: a rumble that builds, then keeps shaking until he rises */
.page.is-trembling { animation: hcQuakeIn .75s linear, hcQuake .3s linear .75s infinite; }
.page.is-trembling .wordmark span { animation: hcJitter .09s steps(2, end) infinite; }
.page.is-trembling .wordmark span + span { animation-delay: -.05s; }
.page.is-trembling .dot-core { animation: hcThrob .3s ease-in-out infinite; }
.page.is-trembling .dot-ring { animation: hcRing .6s cubic-bezier(.1, .7, .3, 1) infinite; }

/* ── Reveal ──────────────────────────────────────────────── */

.reveal {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background:
    radial-gradient(110% 85% at 50% 44%, rgba(251, 248, 241, .95) 0%, rgba(247, 243, 233, .6) 46%, rgba(234, 225, 207, 0) 100%),
    linear-gradient(180deg, #f1ebdf 0%, #ece4d4 100%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
.reveal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .3s ease, visibility 0s;
}

/* a plate pulled on warm paper leaves a faint plate mark */
.reveal-plate {
  position: absolute;
  inset: var(--plate-inset);
  border: 1px solid rgba(29, 24, 18, .1);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .55), 1px 1px 0 rgba(255, 255, 255, .45);
  pointer-events: none;
}
.reveal-stage { position: absolute; inset: var(--plate-inset); }
.reveal-stage.is-over { cursor: pointer; }
.reveal-stage hc-beast { width: 100%; height: 100%; }

.reveal-close {
  position: absolute;
  top: max(calc(var(--plate-inset) + 10px), env(safe-area-inset-top));
  right: max(calc(var(--plate-inset) + 10px), env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(23, 20, 15, .16);
  border-radius: 50%;
  background: rgba(246, 242, 233, .9);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
}
.reveal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.reveal-close:hover { border-color: rgba(23, 20, 15, .42); transform: rotate(90deg); }
.reveal-close:focus-visible { outline-offset: 3px; }

/* ── Motion ──────────────────────────────────────────────── */

@keyframes hcWobble {
  0%, 40%, 100% { transform: scale(1.6); }
  6% { transform: translate(-.5px, 0) scale(1.8, 1.42); }
  13% { transform: translate(.5px, -.3px) scale(1.42, 1.8); }
  20% { transform: translate(-.3px, 0) scale(1.72, 1.5); }
  27% { transform: translate(.2px, 0) scale(1.52, 1.68); }
  34% { transform: scale(1.62); }
}
@keyframes hcTap {
  0%, 100% { transform: translateY(0) scale(1); }
  7% { transform: translateY(-2px) scale(1.5, 2); }
  16% { transform: translateY(0) scale(1.2, .9); }
  24% { transform: translateY(0) scale(1); }
  32% { transform: translateY(-2.5px) scale(1.6, 2.1); }
  42% { transform: translateY(0) scale(1.25, .85); }
  52% { transform: translateY(0) scale(1); }
}
@keyframes hcRingTwice {
  0%, 4% { opacity: 0; transform: scale(.125); }
  8% { opacity: .55; transform: scale(.16); }
  28% { opacity: 0; transform: scale(.62); }
  33% { opacity: .55; transform: scale(.16); }
  60%, 100% { opacity: 0; transform: scale(.75); }
}
@keyframes hcRing { 0% { opacity: .65; transform: scale(.125); } 100% { opacity: 0; transform: scale(1); } }
@keyframes hcThrob { 0%, 100% { transform: scale(1.4); } 50% { transform: scale(2.1); } }
@keyframes hcQuakeIn {
  0% { transform: translate(0, 0) rotate(0); }
  8% { transform: translate(-.8px, .4px) rotate(-.05deg); }
  16% { transform: translate(1.2px, -.6px) rotate(.08deg); }
  26% { transform: translate(-2px, 1px) rotate(-.12deg); }
  36% { transform: translate(2.6px, -.8px) rotate(.16deg); }
  46% { transform: translate(-3.2px, 1.6px) rotate(-.22deg); }
  56% { transform: translate(3.6px, -1.2px) rotate(.26deg); }
  66% { transform: translate(-4.2px, 2px) rotate(-.3deg); }
  76% { transform: translate(4.6px, -1.8px) rotate(.34deg); }
  88% { transform: translate(-5px, 2.4px) rotate(-.38deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
@keyframes hcQuake {
  0% { transform: translate(0, 0) rotate(0); }
  12% { transform: translate(-5px, 2px) rotate(-.4deg); }
  25% { transform: translate(4.4px, -2.6px) rotate(.34deg); }
  37% { transform: translate(-3px, -1.6px) rotate(.22deg); }
  50% { transform: translate(5.4px, 1.8px) rotate(-.36deg); }
  62% { transform: translate(-4.6px, 1.2px) rotate(.4deg); }
  75% { transform: translate(3px, -2.4px) rotate(-.24deg); }
  87% { transform: translate(-5.2px, .8px) rotate(.3deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
@keyframes hcJitter {
  0% { transform: translate(1.2px, -.8px); }
  100% { transform: translate(-1.2px, 1px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
