/* ────────────────────────────────────────────────────────────────
   Akram Vignan Dallas — craft + motion layer
   Tokens verified against akram-vignan.com via designlang:
   primary #CB4B1F · secondary #0DB1CD · accent #FAE8D8 · cream #FFF9EC
   motion: 300/500ms, smooth easing, scroll-linked
   Everything degrades to a fully visible static page without JS.
   ──────────────────────────────────────────────────────────────── */

:root {
  --teal:      #0DB1CD;
  --accent-2:  #FAE8D8;
  --ease:      cubic-bezier(.22, .68, .16, 1);
  --ease-out:  cubic-bezier(.16, .84, .28, 1);
  --dur:       .3s;
  --dur-lg:    .56s;
  --shadow-xl: 0 30px 70px rgba(89, 12, 12, .16), 0 6px 18px rgba(89, 12, 12, .07);
}

/* ---------- 1. paper: warm grain + a top scroll meter ---------- */

.grain {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.meter {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999;
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--terra), #E0762F 55%, var(--teal));
  transition: transform .1s linear;
}

/* ---------- 2. reveal engine ---------- */

html.js-motion [data-rv] {
  opacity: 0;
  transform: translate3d(0, var(--rv-y, 22px), 0) scale(var(--rv-s, 1));
  will-change: opacity, transform;
}
html.js-motion [data-rv].in {
  opacity: 1; transform: none;
  transition:
    opacity var(--dur-lg) var(--ease-out) var(--d, 0ms),
    transform var(--dur-lg) var(--ease-out) var(--d, 0ms);
}

/* rules draw rather than appear */
html.js-motion .rule { transform: scaleX(0); transform-origin: 0 50%; }
html.js-motion .rule.in { transform: scaleX(1); transition: transform .7s var(--ease) var(--d, 0ms); }

/* ---------- 3. header: settles into a denser bar ---------- */

.bar { transition: height var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease); }
.bar-in { transition: height var(--dur) var(--ease); }
.bar.stuck { box-shadow: 0 6px 28px rgba(89, 12, 12, .09); background: rgba(255, 249, 236, .96); }
.bar.stuck .bar-in { height: 62px; }
.bar.stuck .mark { font-size: 22px; transition: font-size var(--dur) var(--ease); }

/* ---------- 4. hero: choreographed entrance ---------- */

html.js-motion .hero-copy > * { opacity: 0; transform: translate3d(0, 20px, 0); }
html.js-motion .hero-lit .hero-copy > * {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out) var(--d), transform .8s var(--ease-out) var(--d);
}
html.js-motion .hero-copy > *:nth-child(1) { --d: 60ms; }
html.js-motion .hero-copy > *:nth-child(2) { --d: 150ms; }
html.js-motion .hero-copy > *:nth-child(3) { --d: 260ms; }
html.js-motion .hero-copy > *:nth-child(4) { --d: 370ms; }
html.js-motion .hero-copy > *:nth-child(5) { --d: 460ms; }

/* the photograph settles out of a slow push-in, and the warm glow blooms */
/* LCP-safe: the hero photo never starts transparent — it only settles out of a
   slow push-in, so Lighthouse can count its paint immediately. */
.hero-photo img { animation: heroSettle 1.6s var(--ease-out) both; }
@keyframes heroSettle { from { transform: scale(1.05); } to { transform: none; } }
.hero-photo img { box-shadow: var(--shadow-xl); }
html.js-motion .hero-photo::after { opacity: 0; }
html.js-motion .hero-lit .hero-photo::after { opacity: 1; transition: opacity 1.4s var(--ease-out) 400ms; }

/* headline gets tighter, more expensive metrics */
h1 { letter-spacing: -0.018em; }
.hero h1 { font-size: clamp(47px, 7.3vw, 86px); }

/* free-badge: pill with a live teal dot */
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 50px; padding: 9px 18px 9px 15px;
  box-shadow: 0 6px 18px rgba(89, 12, 12, .06); }
.hero .eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 0 0 rgba(13, 177, 205, .55);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 68%, 100% { box-shadow: 0 0 0 0 rgba(13, 177, 205, .5); }
  34%           { box-shadow: 0 0 0 7px rgba(13, 177, 205, 0); }
}

/* ---------- 5. buttons: weight, lift, and a light sweep ---------- */

.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.42) 50%, transparent 68%);
  transform: translateX(-120%);
}
.btn:hover::after { transform: translateX(120%); transition: transform .75s var(--ease); }
.btn-ghost::after { background: linear-gradient(105deg, transparent 32%, rgba(203,75,31,.14) 50%, transparent 68%); }

/* ---------- 6. cards, slots, tiles: real elevation on hover ---------- */

.cell, .master, .exp a {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cell:hover, .master:hover, .exp a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(203, 75, 31, .3);
}
.cell .num { transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.cell:hover .num { opacity: .9; transform: translateY(-2px); }

.exp a img { transition: transform .5s var(--ease); }
.exp a:hover img { transform: scale(1.05); }

/* schedule: the ceremony row earns a drawn accent edge */
.slot { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); position: relative; }
.slot:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.slot.key::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--terra), var(--teal));
  border-radius: 3px 0 0 3px; transform: scaleY(0); transform-origin: 50% 0;
}
html.js-motion .slot.key.in::before { transform: scaleY(1); transition: transform .8s var(--ease) .25s; }
html:not(.js-motion) .slot.key::before { transform: scaleY(1); }

/* fact strip: serif figures, drawn hairline */
.fact b { font-size: 30px; letter-spacing: -0.01em; }
.fact { position: relative; }
.fact::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px;
  background: var(--terra); opacity: .5; transform: scaleX(0); transform-origin: 0 50%;
}
html.js-motion .fact.in::after { transform: scaleX(1); transition: transform .6s var(--ease) var(--d, 0ms); }
html:not(.js-motion) .fact::after { transform: scaleX(1); }

/* chips warm on hover */
.tried li { transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.tried li:hover { background: var(--accent-2); border-color: rgba(203,75,31,.25); transform: translateY(-2px); }

/* ---------- 6b. featured player: keeps people on the page ---------- */

/* Thumbnails stay small; exactly one player is ever mounted, and it opens
   full-width inside the grid where the clicked card sits. */
.vp-stage {
  grid-column: 1 / -1;
  border-radius: var(--r); overflow: hidden;
  background: #0f0d0c; box-shadow: var(--shadow-xl);
  position: relative; aspect-ratio: 16 / 9;
  animation: vpOpen .42s var(--ease-out) both;
}
@keyframes vpOpen { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
.vp-stage.closing { animation: vpShut .26s var(--ease) both; }
@keyframes vpShut { to { opacity: 0; transform: scale(.985); } }
.vp-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vp-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(15,13,12,.72); color: #fff;
  font: 600 19px/1 var(--sans); display: grid; place-items: center;
  backdrop-filter: blur(6px);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.vp-close:hover { background: var(--terra); transform: scale(1.06); }

/* the card whose player is open reads as active, not clickable-again */
.exp a.is-playing { border-color: var(--terra); box-shadow: var(--shadow); }
.exp a.is-playing .txt > span { color: var(--terra); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .vp-stage, .vp-stage.closing { animation: none !important; }
}

/* ---------- 7. pull quote: paper edge ---------- */

.pull { position: relative; }
.pull::before {
  content: "\201C"; position: absolute; top: -6px; left: 18px;
  font-family: var(--serif); font-size: 92px; line-height: 1;
  color: var(--terra); opacity: .16;
}
.pull { padding-top: 34px; }

/* ---------- 8. FAQ: content eases open ---------- */

.faq details { transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: rgba(203,75,31,.22); }
.faq summary { transition: color var(--dur) var(--ease); }
.faq summary:hover { color: var(--terra); }
.faq summary::after { transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details[open] p { animation: faqIn .42s var(--ease-out) both; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 9. closing: the quote breathes in ---------- */

html.js-motion .close-quote { --rv-y: 14px; --rv-s: .985; }

/* ---------- 10. map + venue framing ---------- */

.venue-map { box-shadow: var(--shadow); border-radius: var(--r); overflow: hidden; }

/* ---------- 11. honour reduced motion completely ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js-motion [data-rv],
  html.js-motion .hero-copy > *,
  html.js-motion .hero-photo img,
  html.js-motion .hero-photo::after { opacity: 1 !important; transform: none !important; }
  html.js-motion .rule, html.js-motion .fact::after { transform: scaleX(1) !important; }
  html.js-motion .slot.key::before { transform: scaleY(1) !important; }
  .meter, .hero .eyebrow::before { animation: none !important; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
