/* ==========================================================================
   E&A THANGKA ARTWORK — Hero
   --------------------------------------------------------------------------
   The logo is presented face-on, like a round thangka hung on a wall: no tilt,
   no coin thickness, nothing that distorts the lettering. Depth comes from
   layers moving at different rates — the mandala rings drift furthest, the
   mark barely at all — plus the flowing backdrop behind everything.

   JavaScript writes three custom properties and nothing else:
   --mx, --my (pointer, -1 … 1) and --sy (scroll through the hero, 0 … 1).
   ========================================================================== */

.hero {
  --mx: 0;
  --my: 0;
  --sy: 0;
  --disc: clamp(230px, 44vw, 460px);

  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + var(--sp-8));
  padding-bottom: var(--sp-20);
  overflow: hidden;
  isolation: isolate;
  background: transparent;          /* the atmosphere shows through */
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: var(--z-hero-bg);
  pointer-events: none;
}

/* The whole medallion drifts gently with the scroll */
.hero__scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: translate3d(0, calc(var(--sy) * -80px), 0);
}

.hero__medallion {
  position: relative;
  width: var(--disc);
  height: var(--disc);
  display: grid;
  place-items: center;
}

/* A charcoal plate behind the mark. Without it the logo's black disc
   disappears into the page and the gold one reads as a bitten crescent. */
.hero__medallion::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #2a241e 0%, #171310 46%, #0C0A08 78%);
  box-shadow: inset 0 2px 30px rgba(0, 0, 0, .9), 0 26px 70px -18px rgba(0, 0, 0, .9);
}

/* --- Mandala rings, turning slowly around the mark ------------------------ */
.hero__mandala {
  position: absolute;
  width: calc(var(--disc) * 2.05);
  height: calc(var(--disc) * 2.05);
  color: var(--c-gold);
  opacity: .34;
  /* rotate is its own property, so the parallax transform stays free */
  animation: spin 190s linear infinite;
  transform: translate3d(calc(var(--mx) * -26px), calc(var(--my) * -20px), 0);
  transition: transform 600ms var(--ease-out);
}
.hero__mandala--inner {
  width: calc(var(--disc) * 1.34);
  height: calc(var(--disc) * 1.34);
  opacity: .46;
  animation: spin 110s linear infinite reverse;
  transform: translate3d(calc(var(--mx) * -14px), calc(var(--my) * -11px), 0);
}

/* --- Fine gold hoop, just outside the mark -------------------------------- */
.hero__hoop {
  position: absolute;
  width: calc(var(--disc) * 1.13);
  height: calc(var(--disc) * 1.13);
  border: 1px solid rgba(212, 168, 87, .55);
  border-radius: 50%;
  transform: translate3d(calc(var(--mx) * -8px), calc(var(--my) * -6px), 0);
  transition: transform 600ms var(--ease-out);
}
.hero__hoop::after {                  /* a second, fainter hoop */
  content: '';
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(212, 168, 87, .2);
  border-radius: 50%;
}

/* --- Halo behind the mark -------------------------------------------------- */
.hero__glow {
  position: absolute;
  width: calc(var(--disc) * 2.4);
  height: calc(var(--disc) * 2.4);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 200, 138, .26) 0%, rgba(212, 168, 87, .1) 38%, transparent 68%);
  mix-blend-mode: screen;
  animation: breathe 8s ease-in-out infinite;
}

/* --- The mark itself, face-on ----------------------------------------------- */
.hero__logo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, .85));
  animation: rest 11s ease-in-out infinite;
  transform: translate3d(calc(var(--mx) * 7px), calc(var(--my) * 5px), 0);
  transition: transform 600ms var(--ease-out);
}

/* --- Gold dust in front -------------------------------------------------------
   Sits directly in the stage, not the scene, so it spans the full width even
   though the medallion is confined to one column. */
.hero__dust {
  position: absolute;
  inset: 0;
  transform: translate3d(calc(var(--mx) * 26px), calc(var(--sy) * -50px + var(--my) * 20px), 0);
  transition: transform 600ms var(--ease-out);
}
.hero__ember {
  position: absolute;
  top: var(--t);
  left: var(--l);
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: var(--c-gold-lt);
  box-shadow: 0 0 10px 2px rgba(240, 217, 160, .55);
  opacity: 0;
  animation: float var(--d, 16s) ease-in-out var(--delay, 0s) infinite;
}

/* --- Vignette, keeping the type legible over it all --------------------------- */
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 48%, rgba(11, 10, 9, .5) 100%),
    linear-gradient(180deg, rgba(11, 10, 9, .5) 0%, transparent 22%, transparent 70%, rgba(11, 10, 9, .7) 100%);
}

/* --- Content ------------------------------------------------------------------- */
.hero__content {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left));
  text-align: center;
  opacity: calc(1 - var(--sy) * 1.15);
}

.hero__eyebrow {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-5);
}

.hero__title {
  font-weight: 300;
  font-size: var(--fs-hero);
  line-height: 1.06;
  margin-bottom: var(--sp-6);
  text-wrap: balance;
}
.hero__title-line { display: block; }
.hero__title-line--accent {
  font-style: italic;
  color: var(--c-gold-lt);
  text-shadow: 0 0 50px rgba(212, 168, 87, .35);
}

.hero__lede {
  max-width: 56ch;
  margin: 0 auto var(--sp-8);
  font-size: var(--fs-lead);
  font-weight: 300;
  color: var(--c-text-mute);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sp-6) + env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: var(--z-content);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  font-size: .58rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  opacity: calc(1 - var(--sy) * 2);
}
.hero__scroll::after {
  content: '';
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--c-gold), transparent);
  animation: cue 2.4s ease-in-out infinite;
}
.hero__scroll:hover { color: var(--c-gold); }

/* --- Keyframes ------------------------------------------------------------------ */
@keyframes spin    { to { rotate: 360deg; } }
@keyframes breathe { 0%, 100% { opacity: .55; scale: 1; } 50% { opacity: 1; scale: 1.05; } }
@keyframes rest    { 0%, 100% { scale: 1; } 50% { scale: 1.018; } }
@keyframes cue {
  0%, 100% { transform: scaleY(.35); transform-origin: top; opacity: .35; }
  50%      { transform: scaleY(1);   transform-origin: top; opacity: 1; }
}
@keyframes float {
  0%   { opacity: 0; transform: translate3d(0, 12px, 0) scale(.7); }
  18%  { opacity: .9; }
  70%  { opacity: .7; }
  100% { opacity: 0; transform: translate3d(14px, -70px, 0) scale(1.15); }
}

/* ==========================================================================
   Layout and degradation
   ========================================================================== */

/* Desktop: type on the left, the medallion sitting to the right of centre */
/* Desktop: type and medallion are two columns of one centred block, so the
   pair reads as a single composition rather than two things pinned to
   opposite edges. */
@media (min-width: 1024px) {
  .hero { --disc: clamp(300px, 26vw, 440px); }

  .hero__scene {
    left: 0;
    right: 0;
    width: min(100%, var(--container));
    margin-inline: auto;
    padding-inline: var(--gutter);
    grid-template-columns: 53% 47%;
    align-items: center;
  }
  .hero__medallion { grid-column: 2; justify-self: center; }

  .hero__content { text-align: left; display: grid; grid-template-columns: 53% 47%; }
  .hero__content > * { grid-column: 1; }
  .hero__lede { margin-inline: 0; max-width: 100%; }
  .hero__actions { justify-content: flex-start; }
  .hero__title { max-width: 100%; }
  .hero__vignette {
    background:
      radial-gradient(90% 90% at 74% 46%, transparent 40%, rgba(11, 10, 9, .45) 100%),
      linear-gradient(90deg, rgba(11, 10, 9, .78) 4%, rgba(11, 10, 9, .32) 44%, transparent 74%),
      linear-gradient(180deg, rgba(11, 10, 9, .45) 0%, transparent 24%, transparent 72%, rgba(11, 10, 9, .7) 100%);
  }
}

/* Below the two-column breakpoint the mark sits above the type rather than
   behind it — stacked, never overlapping. */
@media (max-width: 1023px) {
  .hero {
    min-height: auto;
    padding-bottom: clamp(3rem, 10vw, 5rem);
  }
  .hero__scene {
    align-content: start;
    padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + var(--sp-8));
  }
  .hero__content {
    padding-top: calc(var(--disc) * 1.16 + var(--sp-10));
  }
  .hero__mandala { width: calc(var(--disc) * 1.62); height: calc(var(--disc) * 1.62); }
  .hero__mandala--inner { width: calc(var(--disc) * 1.2); height: calc(var(--disc) * 1.2); opacity: .3; }
  .hero__glow { width: calc(var(--disc) * 1.9); height: calc(var(--disc) * 1.9); }
}

@media (max-width: 767px) {
  .hero__ember:nth-child(n + 6) { display: none; }
}

/* Touch devices get the resting animation but no pointer tracking */
@media (hover: none), (pointer: coarse) {
  .hero__mandala,
  .hero__hoop,
  .hero__logo,
  .hero__dust { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__mandala,
  .hero__mandala--inner,
  .hero__glow,
  .hero__logo,
  .hero__scroll::after { animation: none; }
  .hero__dust { display: none; }
  .hero__scene,
  .hero__mandala,
  .hero__hoop,
  .hero__logo { transform: none; }
  .hero__content,
  .hero__scroll { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Phones: strip the hero back to mark, headline and one clear action.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .hero__eyebrow {
    font-size: .62rem;
    letter-spacing: .2em;
    margin-bottom: var(--sp-4);
  }
  .hero__title { font-size: clamp(2.1rem, 10vw, 3rem); }
  .hero__lede {
    font-size: 1rem;
    max-width: 40ch;
    margin-bottom: var(--sp-6);
  }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__scroll { display: none; }        /* the content below is cue enough */
}
