/* Hero: centred, the mark on top. The loader's K
   lands in .hero2-mark (js/stage.js) and scrolls away with the page. */
.hero2 { display: none; }
.v2 .hero { display: none; }
.v2 .hero2 {
  --mark: 64px;   /* signs the page, the title speaks: smaller than the title's two black lines */
  --mark-air: calc(var(--mark) * 0.215);   /* empty band above and below the glyph in its box */
  /* one rhythm, measured on the ink: seen gaps on the 8 grid: mark → title 32 · title → line 24 · line → actions 48 (phone 32/24/32).
     Mark and title read as one group, the line and the actions as the next.
     The CSS numbers are off-grid on purpose: they absorb the glyph's own air
     (the mark's box, the title's descenders), so what the eye measures is on-grid */
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin-top: 112px;
}
.hero2-mark { width: var(--mark); height: var(--mark); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }   /* a click flips it through the Ks (js/stage.js) */
.hero2-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero2-title {
  margin-top: calc(var(--space-4) - var(--mark-air)); max-width: 900px;
  font-size: var(--hero-title); line-height: var(--hero-title-lh); letter-spacing: var(--hero-title-ls); font-weight: 500;
  text-wrap: balance;
}
.hero2-sub {
  margin-top: calc(var(--space-3) + var(--title-size, var(--hero-title)) * 0.21); max-width: 600px;   /* + the title's descenders */
  font-size: var(--body); line-height: var(--body-lh); letter-spacing: var(--body-ls);
  color: var(--muted); text-wrap: balance;
}

/* The name is the way to "About me": ink, a little bolder, a waving hand in
   front of it (lab/hero-name.html, C3). The face stays on the call only.
   The hand waves once the page is in, and again on hover. */
.hero2-name { color: var(--ink); font-weight: 500; white-space: nowrap; }
.hero2-wave {
  display: inline-flex; align-items: center; justify-content: center; width: 1.3em; height: 1.3em; margin-right: 6px;
  vertical-align: middle; position: relative; top: -0.1em;   /* middle = the x-height's centre; lifted to the caps' */
}
.hero2-wave i { display: block; font-style: normal; font-size: 1.05em; line-height: 1; transform-origin: 70% 80%; }
.revealed .hero2-wave i { animation: hero2-wave 1.2s ease-in-out 1.2s; }
.hero2-name:hover .hero2-wave i { animation: hero2-wave-again 1.2s ease-in-out; }   /* another name, or it would not replay */
@keyframes hero2-wave {
  0%, 100% { transform: rotate(0); } 14% { transform: rotate(16deg); } 28% { transform: rotate(-8deg); }
  42% { transform: rotate(14deg); } 56% { transform: rotate(-4deg); } 70% { transform: rotate(9deg); } 84% { transform: rotate(0); }
}
@keyframes hero2-wave-again {
  0%, 100% { transform: rotate(0); } 14% { transform: rotate(16deg); } 28% { transform: rotate(-8deg); }
  42% { transform: rotate(14deg); } 56% { transform: rotate(-4deg); } 70% { transform: rotate(9deg); } 84% { transform: rotate(0); }
}
/* The name itself: a light runs across the letters (with the wave, and on
   hover), and on hover a line draws in under it from the left. */
.hero2-nm {
  position: relative;
  background: linear-gradient(100deg, var(--ink) 40%, #a8a8a8 50%, var(--ink) 60%) 100% 0 / 260% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero2-nm::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.12em; height: 1.5px; border-radius: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: right center;
  transition: transform 0.45s var(--ease-out);
}
.hero2-name:hover .hero2-nm::after { transform: scaleX(1); transform-origin: left center; }
.revealed .hero2-nm { animation: hero2-sheen 1.1s ease-in-out 1.35s; }
.hero2-name:hover .hero2-nm { animation: hero2-sheen-again 0.9s ease-in-out; }
@keyframes hero2-sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes hero2-sheen-again { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero2-wave i, .hero2-nm { animation: none !important; }
  .hero2-nm::after { transition: none; }
}

/* The call, with a face (lab/button.html, variant 2), grey in the hero:
   a shade darker than the page, so the title stays the loudest thing
   (lab/hero-cta.html, B2). The footer keeps it black. */
.hero2-actions { margin-top: calc(var(--space-6) + 4px); /* the line's descenders */ display: flex; justify-content: center; }
.hero2-actions .cta-face { margin-top: 0; background: #e2e2e2; color: var(--ink); }
.hero2-actions .cta-face small { color: var(--muted); }
.hero2-actions .cta-face-img::after { border-color: #e2e2e2; }
.hero2-actions .cta-face:hover { box-shadow: none; }

/* On hover it lights up like glass (lab/call-hover.html, N4): a white light
   comes up from the face's side, a soft spot follows the pointer, and the
   rim is brighter on the pointer's side (--mx / --my from js/stage.js). The
   arrow turns into a calendar. No lift: it stays on the page. */
.cta-ring { position: relative; display: inline-block; }
.cta-ring .cta-face { position: relative; isolation: isolate; overflow: hidden; transition: box-shadow 0.4s ease, transform 0.2s var(--ease-out); }
.cta-ring .cta-face > :not(.cta-glow):not(.cta-spot):not(.cta-rim) { position: relative; z-index: 1; }
.cta-glow, .cta-spot, .cta-rim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; }
.cta-glow, .cta-spot { z-index: 0; }
.cta-glow { background: radial-gradient(130px 90px at 32px 50%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%); }
.cta-spot { background: radial-gradient(90px 70px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%); }
.cta-rim {
  z-index: 2; padding: 1.2px;
  background: radial-gradient(120px 80px at var(--mx, 50%) var(--my, 0%), #fff, rgba(255, 255, 255, 0.25) 60%, rgba(255, 255, 255, 0.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.cta-ico { position: relative; flex: none; width: 20px; height: 20px; margin-left: 8px; }   /* about the text's size, as Apple sizes symbols next to text */
.cta-ico svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.25s ease, transform 0.4s var(--ease-out); }
.cta-ico-arrow { width: 18px !important; height: 18px !important; inset: 1px !important; }
.cta-ico-cal { width: 24px !important; height: 24px !important; inset: -2px !important;   /* the arrow 20, the calendar on hover 24 (lab/cta-icon.html) */ opacity: 0; transform: rotate(-30deg) scale(0.6); }
/* The glass lights up on a real hover (a mouse) or keyboard focus, never on
   a touch: a long press on a phone would otherwise hold it lit, and iOS
   draws its own press highlight over it. Touch just presses (scale). */
@media (hover: hover) {
  .cta-ring:hover .cta-face { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
  .cta-ring:hover :is(.cta-glow, .cta-spot, .cta-rim) { opacity: 1; }
  .cta-ring:hover .cta-ico-arrow { opacity: 0; transform: translateX(6px); }
  .cta-ring:hover .cta-ico-cal { opacity: 1; transform: none; }
  .contact-call:hover .cta-face { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
}
.cta-ring:has(:focus-visible) .cta-face { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.cta-ring:has(:focus-visible) :is(.cta-glow, .cta-spot, .cta-rim) { opacity: 1; }
.cta-ring:has(:focus-visible) .cta-ico-arrow { opacity: 0; transform: translateX(6px); }
.cta-ring:has(:focus-visible) .cta-ico-cal { opacity: 1; transform: none; }
.contact-call:has(:focus-visible) .cta-face { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
/* no iOS press grey, no long-press callout / image preview on the call */
.cta-face, .cta-face * { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cta-face img { pointer-events: none; -webkit-user-drag: none; }
/* The footer's call stays black: the same glass, the light dimmer, so it
   reads as a glow under dark glass rather than a white wash. */
.contact-call .cta-glow { background: radial-gradient(130px 90px at 32px 50%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%); }
.contact-call .cta-spot { background: radial-gradient(90px 70px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 70%); }

.cta-face { margin-top: 0; }

.cta-face {
  margin-top: calc(var(--space-5) + 4px);   /* the line's descenders */
  display: inline-flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 24px 0 8px; border-radius: var(--r-pill); gap: 16px;
  background: var(--ink); color: #fcfbfb;
  font-size: 16px; font-weight: 500; letter-spacing: -0.012em;   /* the call's line: 16 on every screen; "Free intro" stays footnote (14) */
  -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease;
}
.cta-face:active { transform: scale(0.97); }
@media (hover: hover) { .cta-face:hover { box-shadow: 0 14px 30px -14px rgba(10, 10, 10, 0.55); } }
.cta-face-img { position: relative; flex: none; width: 48px; height: 48px; }
.cta-face-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.2; text-align: left; }
.cta-face-text small { font-size: var(--footnote); font-weight: 400; color: rgba(252, 251, 251, 0.55); letter-spacing: var(--footnote-ls); }
.cta-face-img img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cta-face-img::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); }
.cta-face-arrow { margin-left: 8px; width: 14px; height: 14px; transition: transform 0.35s var(--ease-out); }
.cta-face:hover .cta-face-arrow { transform: translateX(3px); }


/* At the top the hero carries the big mark, so the nav in place goes without
   its logo; the pill that comes back on scroll-up has it. */
.v2 nav:not(.floating) .nav-logo { visibility: hidden; }   /* keeps its grid cell: the links stay centred */
.v2 nav:not(.floating) .nav-side { margin-left: 0; }


@media (max-width: 640px) {
  /* Air on top, then the fan follows the button closely with bigger cards
     (js/wheel.js) running off the bottom edge, whatever the phone's height. */
  .v2 .hero2 { margin-top: var(--space-12); }
  .v2 .wheel-zone { margin-top: var(--space-7); }
  .v2 .hero2 { --mark: 56px; }
  .hero2-actions { margin-top: calc(var(--space-4) + 3px); }
}
