/* ============================================================
   AVA STUDIO — premium-cinematic studio portfolio
   All brand decisions live in :root as tokens. To rebrand,
   change the tokens here (colours + fonts) and the wordmark
   in the HTML — nothing else needs to move.
   ============================================================ */

:root {
  /* --- Ground & structure --- */
  --ink:        #0B0C10;   /* page ground (deep blue-black) */
  --ink-1:      #101218;   /* section alt */
  --ink-2:      #14161D;   /* raised panel / card */
  --ink-3:      #1B1E27;   /* elevated */
  --hair:       #262A36;   /* hairline / border */
  --hair-soft:  #1C2029;

  /* --- Accent (the one bold move: antique gold) --- */
  --gold:       #C9A24B;
  --gold-hi:    #E8CF8A;
  --gold-deep:  #9C7A32;
  --gold-glow:  rgba(201,162,75,0.14);

  /* --- Text --- */
  --paper:      #ECEAE4;   /* primary warm off-white */
  --paper-dim:  #9C9EA8;   /* muted cool grey */
  --paper-faint:#63666F;   /* captions / disabled */

  /* --- Semantic (kept separate from accent) --- */
  --live:       #57C98A;
  --pending:    #D8A038;
  --coming:     #7C88A8;

  /* --- Type --- */
  --f-display: "Cormorant", Georgia, "Times New Roman", serif;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  /* --- Metrics --- */
  --edge: clamp(20px, 5vw, 84px);   /* page side margin (letterbox) */
  --maxw: 1320px;
  --radius: 3px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* subtle film-grain ambient ground */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(201,162,75,0.06), transparent 60%),
    radial-gradient(100% 60% at 90% 110%, rgba(110,106,240,0.05), transparent 55%);
}

/* ---------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--edge); }
main { position: relative; z-index: 1; }
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 150px); }

/* ---------------------------------------------------------- type roles */
.eyebrow {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--gold); opacity: 0.7;
}
.eyebrow.center::before { display: none; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 500; line-height: 1.02; text-wrap: balance; letter-spacing: -0.01em; }
.display-xl { font-size: clamp(3.4rem, 12vw, 9.5rem); font-weight: 500; line-height: 0.92; }
.display-l  { font-size: clamp(2.6rem, 6vw, 5rem); }
.display-m  { font-size: clamp(2rem, 4vw, 3.2rem); }
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--paper-dim);
  line-height: 1.55;
  max-width: 46ch;
  font-weight: 400;
}
.muted { color: var(--paper-dim); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--f-body); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.95em 1.7em; border-radius: var(--radius);
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #201703;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 30px -12px var(--gold-glow);
}
.btn-gold:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 16px 40px -14px rgba(201,162,75,0.5); }
.btn-ghost { border: 1px solid var(--hair); color: var(--paper); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* link with animated underline */
.link-u { color: var(--gold-hi); font-weight: 600; letter-spacing: 0.02em; position: relative; }
.link-u::after { content:""; position:absolute; left:0; bottom:-3px; height:1px; width:100%; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

/* In-page anchor targets (#studio, #compliance, #integration, #contact) clear the
   fixed 78px header when navigated to, so the correct section top is shown. */
section[id] { scroll-margin-top: 96px; }

/* ---------------------------------------------------------- header / nav */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11,12,16,0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--hair-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; letter-spacing: 0.34em; padding-left: 0.34em; color: var(--paper); display: inline-flex; align-items: center; gap: 0.55em; }
.brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }
.nav-links a { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--paper-dim); transition: color .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--paper); }
.nav-cta { display: inline-flex; align-items: center; }
.nav-toggle { display: none; }

/* ---------------------------------------------------------- hero */
.hero { min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; opacity: 0.9; }
.hero::after { /* letterbox vignette */
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background: linear-gradient(180deg, rgba(11,12,16,0.55) 0%, transparent 22%, transparent 62%, var(--ink) 100%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-inner { padding-top: 90px; }
.hero h1 { margin-top: 0.18em; margin-bottom: 0.32em; }
.hero h1 .em { font-style: italic; color: var(--gold-hi); }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: clamp(20px,3vw,48px); border-top: 1px solid var(--hair); padding-top: 22px; margin-top: clamp(40px,7vw,80px); }
.hero-meta .stat .n { font-family: var(--f-display); font-size: clamp(1.8rem,3vw,2.6rem); color: var(--paper); line-height: 1; }
.hero-meta .stat .l { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-faint); margin-top: 8px; }

.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--paper-faint); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue .bar { width: 1px; height: 42px; background: linear-gradient(var(--gold), transparent); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0%,100% { opacity: .3; transform: scaleY(.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------------------------------------------------------- section heading */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: clamp(38px, 5vw, 64px); }
.sec-head .lede { margin-top: 20px; }
.sec-head-l { max-width: 640px; }

/* ---------------------------------------------------------- games grid */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 1.8vw, 26px); }
.games-grid.two { grid-template-columns: repeat(2, 1fr); }

.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--hair-soft);
  aspect-ratio: 3 / 4; display: block;
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
  will-change: transform;
}
.game-card:hover { transform: translateY(-6px); border-color: rgba(201,162,75,0.4); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8); }
.game-poster { position: absolute; inset: 0; }
.game-poster canvas { width: 100%; height: 100%; }
.g-logo { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%); width: 74%; max-height: 46%; object-fit: contain; z-index: 1; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6)); pointer-events: none; transition: transform .5s var(--ease); }
.game-card:hover .g-logo { transform: translate(-50%, -58%) scale(1.03); }
.gp-poster .g-logo { width: 68%; max-height: 34%; }
.game-card .veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(9,10,14,0.35) 55%, rgba(9,10,14,0.94) 100%); z-index: 1; }
.game-body { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; }
.game-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.game-bottom { transform: translateY(0); }
.game-card .g-name { font-family: var(--f-display); font-size: 1.9rem; font-weight: 600; line-height: 1.02; letter-spacing: -0.01em; }
.game-card .g-hook { color: var(--paper-dim); font-size: 0.86rem; margin-top: 6px; max-width: 30ch; opacity: 0; max-height: 0; transition: opacity .45s var(--ease), max-height .45s var(--ease); }
.game-card:hover .g-hook { opacity: 1; max-height: 60px; }
.game-specs { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.game-specs .sp { font-size: 0.7rem; letter-spacing: 0.06em; }
.game-specs .sp b { display: block; font-family: var(--f-body); font-weight: 700; color: var(--paper); font-size: 0.92rem; letter-spacing: 0; }
.game-specs .sp span { color: var(--paper-faint); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.62rem; }

/* status + volatility chips */
.chip { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.5em 0.8em; border-radius: 100px; border: 1px solid var(--hair); background: rgba(11,12,16,0.6); backdrop-filter: blur(4px); }
.chip .led { width: 6px; height: 6px; border-radius: 50%; background: var(--coming); }
.chip.live .led { background: var(--live); box-shadow: 0 0 8px var(--live); }
.chip.pending .led { background: var(--pending); box-shadow: 0 0 8px var(--pending); }
.chip.coming .led { background: var(--coming); }
.chip.cert { color: var(--gold-hi); border-color: rgba(201,162,75,0.35); }

/* volatility meter */
.vol { display: inline-flex; gap: 3px; align-items: center; }
.vol i { width: 5px; height: 14px; border-radius: 1px; background: var(--hair); display: block; }
.vol i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }

/* ---------------------------------------------------------- feature strip / values */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair-soft); border: 1px solid var(--hair-soft); border-radius: var(--radius); overflow: hidden; }
.value { background: var(--ink-1); padding: clamp(28px,3.4vw,48px); }
.value .num { font-family: var(--f-display); color: var(--gold); font-size: 1rem; letter-spacing: 0.2em; }
.value h3 { font-size: 1.5rem; margin: 16px 0 10px; color: var(--paper); }
.value p { color: var(--paper-dim); font-size: 0.94rem; }

/* ---------------------------------------------------------- split / about */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about-figure { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hair); }
.about-figure canvas { width: 100%; height: 100%; }
.about-list { display: flex; flex-direction: column; gap: 22px; margin-top: 34px; }
.about-list li { display: flex; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--hair-soft); }
.about-list .mk { color: var(--gold); font-family: var(--f-display); font-size: 1.3rem; line-height: 1; flex: none; }
.about-list b { display: block; margin-bottom: 4px; }
.about-list p { color: var(--paper-dim); font-size: 0.92rem; }

/* ---------------------------------------------------------- operators / cta band */
.band { background: var(--ink-1); border-block: 1px solid var(--hair-soft); }
.band-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.certs { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.cert-badge { display: flex; align-items: center; gap: 10px; border: 1px solid var(--hair); border-radius: var(--radius); padding: 12px 16px; background: var(--ink-2); }
.cert-badge .cb-i { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold-deep); display: grid; place-items: center; color: var(--gold); font-family: var(--f-display); font-weight: 700; font-size: 0.9rem; }
.cert-badge .cb-t b { font-size: 0.82rem; letter-spacing: 0.04em; }
.cert-badge .cb-t span { font-size: 0.66rem; color: var(--paper-faint); text-transform: uppercase; letter-spacing: 0.12em; }

/* spec table (game page + operators) */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--hair-soft); }
.spec-table th { text-align: left; padding: 15px 0; color: var(--paper-faint); font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; width: 42%; vertical-align: top; }
.spec-table td { text-align: right; padding: 15px 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* feature tags */
.tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { border: 1px solid var(--hair); border-radius: 100px; padding: 8px 15px; font-size: 0.78rem; color: var(--paper-dim); letter-spacing: 0.02em; }
.tag.gold { border-color: rgba(201,162,75,0.4); color: var(--gold-hi); }

/* ---------------------------------------------------------- age gate */
.agegate { position: fixed; inset: 0; z-index: 200; background: var(--ink); display: grid; place-items: center; padding: 24px; text-align: center; }
.agegate.hide { display: none; }
.agegate-card { max-width: 560px; }
.agegate .brand { justify-content: center; font-size: 2.4rem; margin-bottom: 30px; }
.agegate h2 { font-size: clamp(2rem,4vw,3rem); margin-bottom: 18px; }
.agegate p { color: var(--paper-dim); margin-bottom: 10px; }
.agegate .fine { font-size: 0.8rem; color: var(--paper-faint); max-width: 44ch; margin: 22px auto 30px; line-height: 1.6; }
.agegate-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.agegate .deny { color: var(--paper-faint); font-size: 0.85rem; align-self: center; }
.agegate .deny:hover { color: var(--paper-dim); }

/* ---------------------------------------------------------- demo modal */
.modal { position: fixed; inset: 0; z-index: 180; display: none; }
.modal.open { display: block; }
.modal-scrim { position: absolute; inset: 0; background: rgba(6,7,10,0.86); backdrop-filter: blur(6px); }
.modal-shell { position: absolute; inset: clamp(12px,4vh,54px) clamp(12px,4vw,54px); display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 120px -30px #000; }
.modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--hair-soft); }
.modal-bar .mb-title { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.modal-bar .mb-title .g-name { font-family: var(--f-display); font-size: 1.3rem; }
.modal-note { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pending); border: 1px solid rgba(216,160,56,0.35); padding: 5px 10px; border-radius: 100px; }
.modal-close { width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: var(--radius); display: grid; place-items: center; transition: border-color .3s, color .3s; }
.modal-close:hover { border-color: var(--gold); color: var(--gold); }
.modal-frame { flex: 1; position: relative; background: #05060a; }
.modal-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--hair-soft); background: var(--ink-1); position: relative; z-index: 1; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: clamp(48px,6vw,80px); }
.foot-brand .brand { font-size: 2.2rem; margin-bottom: 18px; }
.foot-brand p { color: var(--paper-dim); max-width: 34ch; font-size: 0.92rem; }
.foot-col h4 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: 18px; font-family: var(--f-body); font-weight: 600; }
.foot-col a { display: block; color: var(--paper-dim); padding: 7px 0; font-size: 0.92rem; transition: color .25s; }
.foot-col a:hover { color: var(--gold-hi); }
.compliance { border-top: 1px solid var(--hair-soft); padding-block: 30px; display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.compliance p { font-size: 0.78rem; color: var(--paper-faint); max-width: 70ch; line-height: 1.6; }
.rg { display: flex; align-items: center; gap: 14px; flex: none; }
.rg .r18 { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--paper-dim); display: grid; place-items: center; font-weight: 800; font-size: 0.82rem; color: var(--paper); letter-spacing: -0.02em; }
.rg a { font-size: 0.78rem; color: var(--paper-dim); }
.rg a:hover { color: var(--paper); }

/* ---------------------------------------------------------- reveal animation */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ---------------------------------------------------------- game page */
.gp-hero { padding-top: 150px; }
.gp-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(36px,5vw,72px); align-items: start; }
.gp-poster { position: relative; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hair); }
.gp-poster canvas { width: 100%; height: 100%; }
.gp-play { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: linear-gradient(0deg, rgba(9,10,14,0.7), transparent 60%); }
.play-btn { display: inline-flex; align-items: center; gap: 12px; }
.play-ring { width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; background: rgba(11,12,16,0.5); transition: transform .4s var(--ease), background .3s; }
.play-btn:hover .play-ring { transform: scale(1.08); background: var(--gold); color: #201703; }
.gp-back { display: inline-flex; align-items: center; gap: 8px; color: var(--paper-dim); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 28px; }
.gp-back:hover { color: var(--gold-hi); }

/* ---------------------------------------------------------- utilities & motion pref */
.center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
.hr { height: 1px; background: var(--hair-soft); border: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .gp-grid { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .band-inner { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { position: fixed; inset: 78px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0; background: rgba(11,12,16,0.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--hair); padding: 8px var(--edge) 24px; transform: translateY(-120%); transition: transform .45s var(--ease); height: auto; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: 16px 0; border-bottom: 1px solid var(--hair-soft); font-size: 0.95rem; }
  .nav-links .nav-cta { padding-top: 18px; }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; width: 30px; }
  .nav-toggle span { height: 2px; background: var(--paper); transition: transform .3s, opacity .3s; }
  .nav-toggle.x span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.x span:nth-child(2) { opacity: 0; }
  .nav-toggle.x span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .games-grid, .games-grid.two { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .hero-meta { flex-wrap: wrap; gap: 22px 32px; }
}
