/* ============================================================
   ACEQUEEN — Casino technology, refined.
   Design language: warm-charcoal luxury, champagne gold +
   felt emerald, high-contrast Fraunces display serif.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Instrument+Sans:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  --ink:        #0a0b0e;   /* page base */
  --ink-2:      #101217;   /* raised panel */
  --ink-3:      #171a21;   /* card */
  --line:       #262a33;   /* hairline */
  --line-soft:  #1c2028;

  --gold:       #e3c179;   /* champagne */
  --gold-deep:  #b78e3f;
  --emerald:    #3fd6a5;   /* felt glow */
  --emerald-dk: #135c48;

  --text:       #f3efe4;   /* warm white */
  --muted:      #a5a291;   /* warm grey */
  --muted-2:    #6f6d63;

  --radius:     18px;
  --radius-sm:  12px;
  --maxw:       1180px;
  --ease:       cubic-bezier(.22, 1, .36, 1);
  --shadow:     0 30px 60px -30px rgba(0,0,0,.8);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--gold); color: var(--ink); }

/* ---------- Atmosphere ---------- */
body::before {   /* top gradient wash + felt glow */
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(227,193,121,.10), transparent 60%),
    radial-gradient(900px 700px at 8% 6%, rgba(63,214,165,.07), transparent 55%),
    var(--ink);
}
body::after {    /* fine grain */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .04; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.wrap { width: min(var(--maxw), 92%); margin-inline: auto; }
section { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gold);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--ink) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-head.scrolled { border-bottom-color: var(--line-soft); background: color-mix(in oklab, var(--ink) 88%, transparent); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.32rem; letter-spacing: .01em; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand b { font-weight: 500; }
.brand span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 2.1rem; list-style: none; }
.nav-links a { font-size: .95rem; color: var(--muted); transition: color .2s var(--ease); position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gold); transition: width .25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.btn {
  --bg: var(--gold);
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: 100px; font-weight: 600; font-size: .95rem;
  background: var(--bg); color: var(--ink); border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(227,193,121,.55); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); box-shadow: none; color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); width: 40px; height: 40px; }
.nav-toggle svg { margin-inline: auto; }

/* ---------- Hero ---------- */
.hero { padding: clamp(4.5rem, 10vw, 8.5rem) 0 clamp(3.5rem, 6vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(2.9rem, 6.4vw, 5.4rem); line-height: .98; letter-spacing: -.02em;
  margin: 1.4rem 0 1.5rem;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p.lead { font-size: 1.18rem; color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-note { margin-top: 2.4rem; display: flex; gap: 2rem; color: var(--muted-2); font-size: .85rem; }
.hero-note b { color: var(--text); font-family: 'Fraunces', serif; font-size: 1.7rem; font-weight: 400; display: block; }

/* Hero card stack (the Ace + Queen) */
.card-stack { position: relative; height: 460px; }
.play-card {
  position: absolute; width: 236px; height: 340px; border-radius: 20px;
  background: linear-gradient(160deg, var(--ink-3), #0d0f14);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 1.4rem; display: flex; flex-direction: column; justify-content: space-between;
}
.play-card .pip { font-family: 'Fraunces', serif; font-size: 2rem; line-height: 1; }
.play-card .pip.br { align-self: flex-end; transform: rotate(180deg); }
.play-card .suit-lg { position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; opacity: .9; }
.play-card.ace { left: 4%; top: 30px; transform: rotate(-9deg); color: var(--gold); z-index: 2; animation: floatA 7s var(--ease) infinite; }
.play-card.queen { right: 2%; top: 88px; transform: rotate(8deg); color: var(--emerald); z-index: 1; animation: floatB 8s var(--ease) infinite; }
.play-card.ace  { border-color: color-mix(in oklab, var(--gold) 35%, var(--line)); }
.play-card.queen{ border-color: color-mix(in oklab, var(--emerald) 30%, var(--line)); }
@keyframes floatA { 0%,100%{ transform: rotate(-9deg) translateY(0);} 50%{ transform: rotate(-9deg) translateY(-14px);} }
@keyframes floatB { 0%,100%{ transform: rotate(8deg) translateY(0);} 50%{ transform: rotate(8deg) translateY(12px);} }
.card-glow { position: absolute; inset: 12% 8%; border-radius: 50%; filter: blur(70px);
  background: radial-gradient(circle at 40% 40%, rgba(227,193,121,.28), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(63,214,165,.22), transparent 60%); z-index: 0; }

/* Marquee of trust words */
.strip { border-block: 1px solid var(--line-soft); padding: 1.4rem 0; overflow: hidden; }
.strip-track { display: flex; gap: 4rem; white-space: nowrap; width: max-content; animation: slide 34s linear infinite; }
.strip-track span { font-family: 'Fraunces', serif; font-style: italic; font-size: 1.25rem; color: var(--muted-2); display: inline-flex; align-items: center; gap: 4rem; }
.strip-track span::after { content: "◆"; color: var(--gold-deep); font-size: .8rem; font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Section heading ---------- */
.sec { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.sec-head { max-width: 640px; margin-bottom: 3.2rem; }
.sec-head h2 { font-family: 'Fraunces', serif; font-weight: 400; font-size: clamp(2.1rem, 4.4vw, 3.3rem); line-height: 1.05; letter-spacing: -.015em; margin: 1.1rem 0 1rem; }
.sec-head p { color: var(--muted); font-size: 1.1rem; }

/* ---------- Products ---------- */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.product {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line); padding: 2.5rem 2.4rem 2.6rem;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.product::before { /* corner suit watermark */
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background-repeat: no-repeat; background-size: contain; opacity: .06;
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.product:hover { transform: translateY(-6px); }
.product.rgs:hover { border-color: color-mix(in oklab, var(--gold) 45%, var(--line)); }
.product.core:hover { border-color: color-mix(in oklab, var(--emerald) 45%, var(--line)); }
.product:hover::before { opacity: .1; transform: rotate(8deg) scale(1.05); }
.product .tag { display: inline-flex; align-items: center; gap: .5rem; font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); }
.product.rgs .tag { color: var(--gold); border-color: color-mix(in oklab, var(--gold) 30%, var(--line)); }
.product.core .tag { color: var(--emerald); border-color: color-mix(in oklab, var(--emerald) 30%, var(--line)); }
.product h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 2rem; margin: 1.4rem 0 .3rem; letter-spacing: -.01em; }
.product .full { font-size: .9rem; color: var(--muted-2); letter-spacing: .04em; margin-bottom: 1.1rem; }
.product > p { color: var(--muted); margin-bottom: 1.6rem; }
.product ul { list-style: none; display: grid; gap: .7rem; }
.product li { display: flex; gap: .7rem; font-size: .96rem; color: var(--text); }
.product li svg { flex: none; margin-top: .28rem; }
.product .more { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.8rem; font-weight: 600; font-size: .95rem; color: var(--gold); transition: gap .25s var(--ease); }
.product.core .more { color: var(--emerald); }
.product .more:hover { gap: .9rem; }
.suit-icon { width: 40px; height: 40px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink); padding: 2.2rem 1.8rem; }
.stat b { font-family: 'Fraunces', serif; font-weight: 400; font-size: clamp(2.2rem,4vw,3rem); display: block; letter-spacing: -.02em; }
.stat b .u { color: var(--gold); }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Capability grid ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.feature { padding: 2rem 1.9rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--ink-2), var(--ink)); transition: transform .35s var(--ease), border-color .35s var(--ease); }
.feature:hover { transform: translateY(-4px); border-color: var(--line); }
.feature .fico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in oklab, var(--gold) 12%, var(--ink-3)); color: var(--gold); margin-bottom: 1.1rem; }
.feature h4 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.28rem; margin-bottom: .5rem; }
.feature p { color: var(--muted); font-size: .96rem; }

/* ---------- Integration steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; counter-reset: step; }
.step { position: relative; padding-top: 2.4rem; }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 0; left: 0; font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--gold); letter-spacing: .1em; }
.step::after { content: ""; position: absolute; top: .55rem; left: 2.4rem; right: -.75rem; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.step:last-child::after { display: none; }
.step h4 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.22rem; margin-bottom: .5rem; }
.step p { color: var(--muted); font-size: .94rem; }

/* ---------- CTA band ---------- */
.cta { text-align: center; padding: clamp(3.5rem,7vw,6rem) 0; }
.cta-inner { position: relative; border: 1px solid var(--line); border-radius: 26px; padding: clamp(3rem,6vw,5rem) 2rem; overflow: hidden; background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.cta-inner::before { content: ""; position: absolute; inset: -40% 20% auto; height: 300px; filter: blur(80px);
  background: radial-gradient(circle, rgba(227,193,121,.18), transparent 60%); }
.cta h2 { position: relative; font-family: 'Fraunces', serif; font-weight: 400; font-size: clamp(2.1rem,5vw,3.6rem); line-height: 1.04; letter-spacing: -.02em; margin-bottom: 1.2rem; }
.cta h2 em { font-style: italic; color: var(--gold); }
.cta p { position: relative; color: var(--muted); max-width: 48ch; margin: 0 auto 2rem; font-size: 1.1rem; }
.cta .hero-cta { position: relative; justify-content: center; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line-soft); padding: 4rem 0 2.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.foot .brand { margin-bottom: 1.1rem; }
.foot-col p { color: var(--muted-2); font-size: .92rem; max-width: 32ch; }
.foot-col h5 { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1.1rem; font-weight: 600; }
.foot-col ul { list-style: none; display: grid; gap: .7rem; }
.foot-col a { color: var(--muted); font-size: .95rem; transition: color .2s var(--ease); }
.foot-col a:hover { color: var(--gold); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: .85rem; flex-wrap: wrap; }
.foot-bottom .resp { max-width: 60ch; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay: .08s; }
.reveal[data-d="2"]{ transition-delay: .16s; }
.reveal[data-d="3"]{ transition-delay: .24s; }

/* ---------- Legal / privacy page ---------- */
.legal { padding: clamp(3rem,7vw,6rem) 0 5rem; }
.legal-head { max-width: 760px; margin-bottom: 3rem; }
.legal-head h1 { font-family: 'Fraunces', serif; font-weight: 400; font-size: clamp(2.4rem,5vw,3.6rem); letter-spacing: -.02em; margin: 1.1rem 0 .8rem; }
.legal-head .updated { color: var(--muted-2); font-size: .9rem; }
.legal-body { display: grid; grid-template-columns: 220px 1fr; gap: 3.5rem; align-items: start; }
.legal-toc { position: sticky; top: 100px; }
.legal-toc ol { list-style: none; counter-reset: toc; display: grid; gap: .55rem; }
.legal-toc a { counter-increment: toc; color: var(--muted); font-size: .9rem; display: flex; gap: .6rem; transition: color .2s var(--ease); }
.legal-toc a::before { content: counter(toc,decimal-leading-zero); color: var(--gold-deep); font-family: 'Fraunces', serif; }
.legal-toc a:hover { color: var(--text); }
.legal-article h2 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.55rem; margin: 2.6rem 0 .9rem; scroll-margin-top: 100px; }
.legal-article h2:first-child { margin-top: 0; }
.legal-article p { color: var(--muted); margin-bottom: 1rem; }
.legal-article ul { color: var(--muted); margin: 0 0 1.2rem 1.2rem; display: grid; gap: .5rem; }
.legal-article li b { color: var(--text); font-weight: 600; }
.legal-article a.inline { color: var(--gold); }
.legal-article .num { color: var(--gold); font-family: 'Fraunces', serif; margin-right: .5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .card-stack { height: 380px; margin-top: 1rem; }
  .products, .grid3, .stats, .steps, .foot-grid { grid-template-columns: 1fr 1fr; }
  .legal-body { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}
@media (max-width: 640px) {
  .nav-links, .nav .btn.desktop { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--ink-2); border-bottom: 1px solid var(--line); padding: .5rem 4%; }
  .nav-links.open li { padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
  .products, .grid3, .stats, .steps, .foot-grid { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .hero-note { flex-wrap: wrap; gap: 1.4rem; }
  .card-stack { height: 340px; }
  .play-card { width: 200px; height: 290px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
