/* ==========================================================================
   Ellen & Rod — design 4: the circle window and the left rail
   Loaded after styles.css; only overrides what changes.
   ========================================================================== */

/* --- the hero: a sticky stage the page scrolls past --- */
.hero--circle { display: block; height: 230vh; min-height: 0; padding: 0; overflow: visible; color: var(--ink); background: var(--cream); text-align: center; }
.hc__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hc__window {
  position: absolute; inset: 0;
  clip-path: circle(var(--r, 30vmin) at calc(50% + var(--dx, 0px)) calc(var(--cy, 47%) + var(--dy, 0px)));
  will-change: clip-path;
}
.hero--circle .hero__media { transform: none; border-radius: 0; }
.hc__veil { position: absolute; inset: 0; background: rgb(30 20 12 / calc(var(--q, 0) * .5)); pointer-events: none; }

.hc__ring {
  position: absolute; left: calc(50% + var(--dx, 0px)); top: calc(var(--cy, 47%) + var(--dy, 0px));
  width: calc(var(--r0, 200px) * 2 + 76px); height: auto; translate: -50% -50%; rotate: var(--rot, 0deg);
  opacity: calc(1 - var(--q, 0) * 3); pointer-events: none; overflow: visible;
}
.hc__ring text { font-family: var(--f-body); font-weight: 700; font-size: 15px; fill: var(--ink); }

.hc__rating { position: absolute; top: 24px; right: 24px; z-index: 3; white-space: nowrap; color: var(--ink); background: var(--white); border-color: var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; opacity: calc(1 - var(--q, 0) * 3); }
.hc__rating .star { color: var(--tomato); }

/* the wordmark and what sits under it */
.hero__body.hc { position: absolute; inset: 0; max-width: none; margin: 0; transform: none; opacity: calc(1 - var(--q, 0) * 1.5); pointer-events: none; }
.hero--circle .hc > .hero__title {
  position: absolute; left: 0; right: 0; top: var(--cy, 47%);
  translate: 0 -54%; white-space: nowrap; color: var(--ink); text-shadow: none;
  font-size: clamp(60px, 17.5vw, 300px); letter-spacing: -.04em; line-height: .9;
  transform: translateY(calc(var(--q, 0) * -36vh)) scale(calc(1 + var(--q, 0) * .12));
  animation: none; opacity: 1;
}
.hero--circle .hero__title .amp { color: var(--tomato); position: relative; z-index: 2; }
.hc__below { position: absolute; left: 0; right: 0; bottom: max(5vh, 28px); display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 var(--pad); pointer-events: auto; }
.js .hero--circle .hc > .hc__below { opacity: 0; }
.is-ready .hero--circle .hc > .hc__below { animation: rise 1s var(--out) 1s forwards; }
.hc .hero__lede { margin: 0; color: var(--ink-soft); text-shadow: none; font-size: clamp(17px, 1.8vw, 21px); }
.hc .hero__lede span { color: var(--tomato); }
.hc .hero__actions { margin-top: 0; }

/* once the window has opened right up */
.hc__after {
  position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; padding: 0 var(--pad);
  font-family: var(--f-display); font-size: clamp(48px, 8vw, 128px); line-height: 1; color: var(--white);
  text-shadow: 0 6px 40px rgba(20, 12, 6, .5);
  opacity: clamp(0, calc((var(--q, 0) - .55) * 3), 1); transform: translateY(calc((1 - var(--q, 0)) * 40px));
  pointer-events: none;
}

@media (max-width: 760px) {
  .hero--circle { height: 210vh; }
  .hero--circle .hc > .hero__title { font-size: 17vw; }
  .hc__rating { top: auto; bottom: calc(max(5vh, 28px) + 150px); right: 50%; translate: 50% 0; }
  .hc .hero__actions .btn { flex: 1 1 auto; }
  .hc__ring text { font-size: 17px; }
}

/* --- the rail: the nav stands up on the left on wide screens --- */
@media (min-width: 1000px) {
  body { padding-left: 84px; }
  .nav.nav--rail {
    top: 0; left: 0; width: 84px; height: 100vh; translate: none; transform: none !important;
    flex-direction: column; justify-content: space-between; align-items: center; gap: 0;
    padding: 22px 0; border-radius: 0; border: 0; border-right: 1px solid var(--line);
    background: var(--cream); color: var(--ink); box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .nav--rail .nav__name, .nav--rail .nav__status, .nav--rail .nav__ink { display: none; }
  .nav--rail .nav__links { flex-direction: column; gap: 2px; }
  .nav--rail .nav__links a { writing-mode: vertical-rl; transform: rotate(180deg); padding: 14px 10px; opacity: .6; letter-spacing: .04em; }
  .nav--rail .nav__links a::after { content: ""; position: absolute; left: -2px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--tomato); scale: 0; transition: scale .4s var(--out); }
  .nav--rail .nav__links a.is-active { opacity: 1; color: var(--tomato); }
  .nav--rail .nav__links a.is-active::after { scale: 1; }
  .nav--rail .nav__links a:hover { opacity: 1; }
  .nav--rail .nav__end { flex-direction: column; gap: 10px; }
  .nav--rail .sound__btn { background: var(--paper-2); }
  .nav--rail .eq.is-on, .nav--rail .eq.is-hinting { color: var(--tomato); }
  .nav--rail .nav__call { width: 42px; height: 42px; min-height: 0; padding: 0; justify-content: center; }
  .nav--rail .nav__call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav--rail .nav__call svg { width: 18px; height: 18px; fill: currentColor; }
  .dock { display: none; }
}
@media (max-width: 999px) { .nav__call svg { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero--circle { height: auto; }
  .hc__stage { position: relative; }
  .js .hero--circle .hc > .hc__below { opacity: 1; animation: none; }
  .hc__after { display: none; }
}

/* the music bubble beside the rail button */
.sound-hint.is-beside .sound-hint__arrow { bottom: auto; top: 50%; left: -7px; margin: -7px 0 0; border: 7px solid transparent; border-left: 0; border-right: 8px solid var(--butter); }

/* the hero here is cream, not a photo, so the phone nav starts in its cream dress */
.nav.nav--rail { background: rgba(251, 246, 236, .9); color: var(--ink); border-color: var(--line); box-shadow: 0 12px 40px -18px rgba(42, 32, 23, .3); }
.nav--rail .nav__menu, .nav--rail .sound__btn { background: var(--paper-2); }
.nav--rail .eq.is-hinting, .nav--rail .eq.is-on { color: var(--tomato); }
