/* ═══════════════════════════════════════════════
   Baccarat Trainer — Main Stylesheet
   Casino Craft: dark, textured, tactile
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Earthy Base */
  --felt:        #1B3A2D;
  --felt-light:  #2A5743;
  --charcoal:    #1E1E1E;
  --graphite:    #2C2C2C;

  /* Neutrals */
  --warm-gray:   #6B6560;
  --taupe:       #A89F91;
  --sand:        #C8BDA8;
  --ivory:       #F4F0E8;
  --cream:       #FAF8F3;

  /* The One Neon */
  --neon:        #BFFF00;
  --neon-soft:   #D4FF4D;
  --neon-deep:   #8ABF00;
  --neon-glow:   rgba(191, 255, 0, 0.15);
  --neon-glow-strong: rgba(191, 255, 0, 0.35);

  /* Semantic */
  --player-blue: #3B7DD8;
  --banker-red:  #D84B3B;

  /* Motion */
  --ease-deal: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-ui: 400ms;
  --duration-card: 700ms;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--charcoal);
  color: var(--ivory);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Felt grain texture (global) ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ─── */
.container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 100px 0; }

/* ─── Scroll-reveal animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-deal), transform 0.7s var(--ease-deal);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children: 70ms per item (brand spec: 60-80ms) */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 70ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 140ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 210ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 280ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 350ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── Nav ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200,189,168,0.08);
}
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: 0.03em;
  text-decoration: none;
}
.nav-cta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--felt);
  background: var(--neon);
  padding: 9px 20px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: box-shadow 0.3s var(--ease-deal), opacity 0.2s;
}
.nav-cta:hover {
  opacity: 0.92;
  box-shadow: 0 0 20px var(--neon-glow-strong);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: 160px 0 120px;
  text-align: center;
  background: linear-gradient(160deg, var(--felt) 0%, var(--charcoal) 55%, var(--graphite) 100%);
  overflow: hidden;
}

/* Decorative card shapes */
.hero-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-card {
  position: absolute;
  width: 72px;
  height: 100px;
  border-radius: 8px;
  border: 1px solid rgba(200,189,168,0.12);
  background: linear-gradient(145deg, rgba(244,240,232,0.04) 0%, rgba(244,240,232,0.01) 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hero-card--1 {
  top: 15%; left: 6%;
  transform: rotate(-18deg);
  animation: card-float-1 8s var(--ease-deal) infinite alternate;
}
.hero-card--2 {
  top: 25%; right: 8%;
  transform: rotate(12deg);
  animation: card-float-2 9s var(--ease-deal) infinite alternate;
}
.hero-card--3 {
  bottom: 18%; left: 12%;
  transform: rotate(8deg);
  animation: card-float-3 7s var(--ease-deal) infinite alternate;
}
.hero-card--4 {
  bottom: 12%; right: 5%;
  transform: rotate(-22deg);
  animation: card-float-2 10s var(--ease-deal) infinite alternate;
  opacity: 0.6;
}
/* Card pip decoration */
.hero-card::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid rgba(200,189,168,0.15);
  border-radius: 2px;
}

@keyframes card-float-1 {
  0%   { transform: rotate(-18deg) translateY(0); }
  100% { transform: rotate(-14deg) translateY(-18px); }
}
@keyframes card-float-2 {
  0%   { transform: rotate(12deg) translateY(0); }
  100% { transform: rotate(16deg) translateY(-14px); }
}
@keyframes card-float-3 {
  0%   { transform: rotate(8deg) translateY(0); }
  100% { transform: rotate(4deg) translateY(-20px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-card { animation: none; }
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}
/* Neon glow underline on eyebrow */
.hero-eyebrow::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: var(--neon);
  box-shadow: 0 0 18px var(--neon-glow-strong);
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 8.5vw, 4.6rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ivory);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero-tagline {
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--sand);
  max-width: 440px;
  margin: 0 auto 48px;
  line-height: 1.7;
}
.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.btn-primary {
  display: inline-block;
  background: var(--neon);
  color: var(--felt);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 16px 40px;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: box-shadow 0.35s var(--ease-deal), transform 0.35s var(--ease-deal);
  box-shadow: 0 0 28px var(--neon-glow);
}
.btn-primary:hover {
  box-shadow: 0 0 44px var(--neon-glow-strong), 0 4px 20px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}
.hero-note {
  font-size: 0.76rem;
  color: var(--warm-gray);
  letter-spacing: 0.025em;
}

/* ─── Section divider — neon glow line ─── */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(200,189,168,0.15) 20%, rgba(200,189,168,0.15) 80%, transparent 100%);
  margin: 0;
  position: relative;
}
.divider--neon {
  background: linear-gradient(90deg, transparent 0%, var(--neon-glow) 30%, var(--neon-glow-strong) 50%, var(--neon-glow) 70%, transparent 100%);
  box-shadow: 0 0 20px var(--neon-glow);
}

/* ─── Value Props ─── */
.value-props {
  padding: 88px 0;
  background: linear-gradient(180deg, var(--charcoal) 0%, var(--felt) 100%);
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 48px;
}
.props-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .props-grid { grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
}
.prop {
  padding: 28px 24px;
  border-radius: 12px;
  border: 1px solid rgba(200,189,168,0.08);
  background: linear-gradient(160deg, rgba(42,87,67,0.25) 0%, rgba(30,30,30,0.4) 100%);
  position: relative;
  transition: border-color 0.3s var(--ease-deal), box-shadow 0.3s var(--ease-deal);
}
.prop:hover {
  border-color: rgba(191,255,0,0.2);
  box-shadow: 0 0 24px var(--neon-glow);
}
/* Top neon accent line on hover */
.prop::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: var(--neon);
  opacity: 0;
  transition: opacity 0.3s var(--ease-deal);
  box-shadow: 0 0 16px var(--neon-glow-strong);
}
.prop:hover::before { opacity: 1; }

.prop-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--neon-deep);
  margin-bottom: 14px;
}
.prop h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: 10px;
  line-height: 1.2;
}
.prop p {
  font-size: 0.87rem;
  color: var(--sand);
  line-height: 1.65;
}

/* ─── How It Works ─── */
.how-it-works {
  padding: 88px 0;
  background: var(--felt);
  position: relative;
}
/* Felt texture overlay for this section */
.how-it-works::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--felt) 0%, #152e22 50%, var(--felt) 100%);
  z-index: 0;
}
.how-it-works .container { z-index: 1; }

.how-it-works h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5.5vw, 2.8rem);
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: 56px;
  line-height: 1.12;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
/* Vertical connecting line */
.steps::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--neon-glow-strong) 0%, rgba(200,189,168,0.1) 100%);
}
@media (max-width: 639px) {
  .steps::before { left: 18px; }
}

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(200,189,168,0.06);
}
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: none; }
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--neon);
  letter-spacing: 0.1em;
  padding-top: 2px;
  position: relative;
}
/* Neon dot on timeline */
.step-num::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon-glow-strong);
}
.step-body h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: 8px;
}
.step-body p {
  font-size: 0.87rem;
  color: var(--sand);
  line-height: 1.65;
}

/* ─── Feature Callout ─── */
.callout {
  padding: 88px 0;
  background: linear-gradient(180deg, var(--felt) 0%, var(--charcoal) 100%);
}
.callout-card {
  background: linear-gradient(145deg, rgba(42,87,67,0.35) 0%, rgba(30,30,30,0.5) 100%);
  border: 1px solid rgba(191,255,0,0.12);
  border-radius: 16px;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
/* Top glow line */
.callout-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(191,255,0,0.5), transparent);
  box-shadow: 0 0 20px var(--neon-glow);
}
/* Subtle corner glow */
.callout-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--neon-glow) 0%, transparent 70%);
  pointer-events: none;
}
.callout-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ivory);
  line-height: 1.45;
  margin-bottom: 20px;
  position: relative;
}
/* Decorative open-quote mark */
.callout-quote::before {
  content: '\201C';
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-style: normal;
  color: var(--neon-deep);
  opacity: 0.3;
  position: absolute;
  top: -24px;
  left: -8px;
  line-height: 1;
}
.callout-attr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe);
}
.callout-detail {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(200,189,168,0.1);
  font-size: 0.88rem;
  color: var(--sand);
  line-height: 1.75;
}
.callout-detail strong {
  color: var(--ivory);
  font-weight: 500;
}
.callout-detail-note {
  margin-top: 14px;
  color: var(--taupe);
}

/* ─── CTA Section ─── */
.cta-section {
  padding: 100px 0 120px;
  text-align: center;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}
/* Ambient neon glow behind CTA */
.cta-section::before {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--neon-glow) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 6.5vw, 3.4rem);
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: 16px;
  line-height: 1.1;
}
.cta-section > .container > p {
  font-size: 0.95rem;
  color: var(--sand);
  margin-bottom: 40px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}
.app-store-badge {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s var(--ease-deal), box-shadow 0.3s var(--ease-deal);
  border-radius: 12px;
}
.app-store-badge:hover {
  transform: translateY(-2px);
}
.app-store-badge img {
  height: 56px;
  width: auto;
  display: block;
}
.cta-fine {
  margin-top: 20px;
  font-size: 0.73rem;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
}

/* ─── Footer ─── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(200,189,168,0.08);
  padding: 36px 0;
  background: var(--charcoal);
}
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--taupe);
}
.footer-links {
  display: flex;
  gap: 28px;
}
.footer-links a {
  font-size: 0.78rem;
  color: var(--warm-gray);
  text-decoration: none;
  transition: color 0.25s var(--ease-deal);
}
.footer-links a:hover { color: var(--neon-deep); }

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero { padding: 130px 0 80px; }
  section { padding: 72px 0; }
  .hero-card { display: none; }
  .callout-card { padding: 32px 22px; }
  .callout-quote::before { display: none; }
  .steps::before { display: none; }
  .step-num::before { display: none; }
}
