/* ============================================================
   ChessRecall — Shared Stylesheet
   VanSoftware © 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --bg-0: #08080b;
  --bg-1: #0e0e15;
  --bg-2: #14141e;
  --bg-3: #1c1c28;
  --bg-4: #232334;

  --border:        rgba(255, 255, 255, 0.06);
  --border-mid:    rgba(255, 255, 255, 0.09);
  --border-gold:   rgba(201, 168, 76, 0.30);
  --border-gold-l: rgba(201, 168, 76, 0.15);

  --gold:      #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim:   rgba(201, 168, 76, 0.12);
  --gold-glow:  0 0 60px rgba(201, 168, 76, 0.14);

  --cream:  #f0ebe0;
  --text-1: #e6e1d6;
  --text-2: #9b9790;
  --text-3: #565250;

  --sq-light: rgba(201, 168, 76, 0.13);
  --sq-dark:  #0d0d15;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --max-w: 1180px;
  --gutter: 1.5rem;

  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg-0);
  color: var(--text-1);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; }
ul, ol { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.1;
  font-weight: 600;
  color: var(--cream);
}
h1 { font-size: clamp(3rem, 7vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

em { font-style: italic; color: var(--gold-light); }
p  { color: var(--text-2); line-height: 1.75; }

.section-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.35em 0.95em;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  background: var(--gold-dim);
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 4rem;
}
.section-header p {
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--gold);
  color: #080603;
  font-weight: 600;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.32);
}
.btn-outline {
  border-color: var(--border-gold);
  color: var(--gold);
  background: transparent;
}
.btn-outline:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}
.btn-ghost {
  color: var(--text-2);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--text-1);
  background: rgba(255,255,255,0.04);
}
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.83rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   GOOGLE PLAY BUTTON
   ============================================================ */
.gplay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.4rem;
  background: var(--bg-3);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text-1);
  transition: all 0.22s var(--ease);
}
.gplay-btn:hover {
  background: var(--bg-4);
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.gplay-icon { width: 26px; height: 26px; flex-shrink: 0; }
.gplay-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.gplay-small { font-size: 0.65rem; color: var(--text-3); letter-spacing: 0.06em; }
.gplay-big   { font-size: 1rem; font-weight: 600; color: var(--cream); line-height: 1; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 8, 11, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.025em;
  text-decoration: none;
}
.logo-icon { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.nav-links a {
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--text-1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-3);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-2); }
.footer-copy { font-size: 0.78rem; color: var(--text-3); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

/* Subtle chess-pattern background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-conic-gradient(
    rgba(201, 168, 76, 0.018) 0% 25%,
    transparent 0% 50%
  );
  background-size: 44px 44px;
  pointer-events: none;
}

.hero-glow-a {
  position: absolute;
  top: -180px; right: -140px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.08) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-glow-b {
  position: absolute;
  bottom: -80px; left: -220px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(80, 60, 180, 0.05) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-block: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.4em 1em;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  background: var(--gold-dim);
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: dot-pulse 2.2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

.hero-title {
  font-size: clamp(3.25rem, 7vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.05;
}
.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 480px;
  margin-bottom: 2.25rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
}
.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================================
   CHESS BOARD (hero visual)
   ============================================================ */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.board-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.board-glow {
  position: absolute;
  inset: -50px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.13) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.chess-board {
  width: 368px;
  height: 368px;
  border: 1.5px solid var(--border-gold);
  border-radius: 3px;
  position: relative;
  box-shadow:
    0 0 0 4px rgba(0,0,0,0.5),
    0 28px 80px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(201, 168, 76, 0.08);
  animation: board-breathe 3.5s ease-in-out infinite;
}
@keyframes board-breathe {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0,0,0,0.5), 0 28px 80px rgba(0,0,0,0.7), 0 0 40px rgba(201,168,76,0.1); }
  50%       { box-shadow: 0 0 0 4px rgba(0,0,0,0.5), 0 28px 80px rgba(0,0,0,0.7), 0 0 70px rgba(201,168,76,0.28); }
}

/* Correct / wrong move flash overlay */
.sq-flash {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
  border-radius: 2px;
  animation: sq-flash-anim 0.85s ease forwards;
}
.sq-flash svg { width: 48%; height: 48%; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6)); }
.sq-flash--correct { background: rgba(60, 200, 110, 0.38); color: #5ae89a; }
.sq-flash--wrong   { background: rgba(220,  60,  60, 0.38); color: #ff6070; }
@keyframes sq-flash-anim {
  0%   { opacity: 0; transform: scale(0.55); }
  18%  { opacity: 1; transform: scale(1.05); }
  35%  { transform: scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ---- cm-chessboard theme overrides ---- */
/* Square colors */
.cm-chessboard .board .square.light { fill: rgba(201, 168, 76, 0.14) !important; }
.cm-chessboard .board .square.dark  { fill: #0d0d15 !important; }

/* Piece cursor */
.cm-chessboard .board .square { cursor: default; }
.cm-chessboard.input-enabled-white .board .square { cursor: pointer; }

/* Marker colors — frame (hint source) and dot (hint target) */
.cm-chessboard .markers .marker-frame path,
.cm-chessboard .markers .marker-frame rect,
.cm-chessboard .markers .marker-frame polygon { stroke: var(--gold) !important; fill: none !important; }
.cm-chessboard .markers .marker-dot circle,
.cm-chessboard .markers .marker-dot path,
.cm-chessboard .markers .marker-dot ellipse  { fill: rgba(201,168,76,0.55) !important; }
/* autoMarker (last move) — subtle gold */
.cm-chessboard .markers .marker-square rect  { fill: rgba(201,168,76,0.22) !important; stroke: none !important; }

/* ============================================================
   CHESS DEMO (interactive hero board)
   ============================================================ */
.demo-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 368px;
  margin-bottom: 0.7rem;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.28em 0.85em;
  border-radius: 100px;
  background: var(--gold-dim);
}
.demo-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.demo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.35s, transform 0.35s;
  flex-shrink: 0;
}
.demo-dot.active { background: var(--gold); transform: scale(1.25); }
.demo-dot.done   { background: rgba(201,168,76,0.45); }
.demo-move-label {
  font-size: 0.68rem;
  color: var(--text-3);
  letter-spacing: 0.05em;
  margin-left: 0.15rem;
}

/* Status bar */
.demo-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 368px;
  margin-top: 0.7rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
  min-height: 2.5rem;
}
.demo-status--hint {
  background: rgba(201,168,76,0.07);
  border-color: var(--border-gold-l);
  color: var(--text-1);
}
.demo-status--error {
  background: rgba(220,60,60,0.08);
  border-color: rgba(220,60,60,0.28);
  color: #e07878;
}
.demo-status--complete {
  background: rgba(201,168,76,0.1);
  border-color: var(--border-gold);
  color: var(--gold);
}
.demo-status-icon { font-size: 0.6rem; flex-shrink: 0; line-height: 1; }
.demo-status--hint     .demo-status-icon::before { content: '●'; color: var(--gold); }
.demo-status--error    .demo-status-icon::before { content: '✕'; color: #e07878; font-size: 0.8rem; }
.demo-status--complete .demo-status-icon::before { content: '✓'; color: var(--gold); font-size: 0.85rem; }

/* Completion overlay */
.demo-complete-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,8,11,0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  z-index: 10;
  animation: fadeIn 0.4s var(--ease) both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.demo-complete-card {
  text-align: center;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.demo-complete-appicon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.2);
}
.demo-complete-card h3 {
  font-size: 1.2rem;
  color: var(--cream);
  margin: 0;
}
.demo-complete-card p {
  font-size: 0.84rem;
  color: var(--text-2);
  max-width: 230px;
  line-height: 1.65;
  margin: 0;
}
.demo-replay-btn {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  transition: color 0.2s;
  font-family: inherit;
}
.demo-replay-btn:hover { color: var(--text-2); }

/* Responsive */
@media (max-width: 960px) {
  .demo-header, .demo-status { width: 300px; }
}
@media (max-width: 640px) {
  .demo-header, .demo-status { width: 272px; }
}

/* ============================================================
   FEATURES
   ============================================================ */
.features { padding: 8rem 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease);
}
.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.28s;
}
.feature-card:hover { border-color: var(--border-gold); transform: translateY(-3px); }
.feature-card:hover::after { opacity: 0.5; }
.feature-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 1.1rem;
  display: block;
  line-height: 1;
}
.feature-card h3 { margin-bottom: 0.75rem; }
.feature-card p  { font-size: 0.95rem; }

/* Retention curve */
.retention-svg { width: 100%; height: 90px; margin-top: 1.5rem; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  padding: 8rem 0;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(16.66% + 1.25rem);
  right: calc(16.66% + 1.25rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}
.step { text-align: center; padding: 1.5rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
}
.step h3 { margin-bottom: 0.7rem; }

/* ============================================================
   OPENINGS CAROUSEL
   ============================================================ */
.openings { padding: 6rem 0; }
.openings-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.openings-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 0.55rem 1.2rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-2);
  white-space: nowrap;
  transition: all 0.2s;
}
.chip:hover, .chip.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing {
  padding: 8rem 0;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pricing-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 3rem;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 880px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: transform 0.28s var(--ease), border-color 0.28s;
  display: flex;
  flex-direction: column;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card--best {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--bg-3) 0%, var(--bg-2) 100%);
  box-shadow: var(--gold-glow);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #080603;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3em 0.95em;
  border-radius: 100px;
  white-space: nowrap;
}
.p-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1.25rem;
}
.p-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}
.p-currency { font-size: 1.2rem; color: var(--text-2); margin-bottom: 0.2rem; }
.p-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.9rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}
.p-period { font-size: 0.85rem; color: var(--text-3); }
.p-note {
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  min-height: 1.1em;
}
.p-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
.p-features {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 2rem;
  flex: 1;
}
.p-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-2);
}
.p-features li .chk { color: var(--gold); font-weight: 700; flex-shrink: 0; }
.p-features li.off { color: var(--text-3); }
.p-features li.off .chk { color: var(--text-3); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials { padding: 8rem 0; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.testi-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.28s, transform 0.28s;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.testi-card:hover { border-color: var(--border-gold); transform: translateY(-3px); }
.testi-stars { color: var(--gold); font-size: 0.9rem; letter-spacing: 0.1em; }
.testi-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.075rem;
  color: var(--text-1);
  line-height: 1.65;
  flex: 1;
}
.testi-author { display: flex; align-items: center; gap: 0.75rem; }
.testi-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border-gold-l);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.testi-name  { font-size: 0.875rem; font-weight: 600; color: var(--cream); line-height: 1.3; }
.testi-info  { font-size: 0.75rem; color: var(--text-3); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  padding: 7rem 0;
  text-align: center;
  background: linear-gradient(145deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(201, 168, 76, 0.07) 0%, transparent 68%);
  pointer-events: none;
}
.cta-banner h2 { margin-bottom: 1rem; position: relative; z-index: 1; }
.cta-banner p  { max-width: 460px; margin: 0 auto 2.5rem; font-size: 1.075rem; position: relative; z-index: 1; }
.cta-btns { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; z-index: 1; }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-hero {
  padding: 9rem 0 4rem;
  text-align: center;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-conic-gradient(
    rgba(201, 168, 76, 0.015) 0% 25%,
    transparent 0% 50%
  );
  background-size: 44px 44px;
  pointer-events: none;
}
.legal-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 0.75rem; position: relative; z-index: 1; }
.legal-hero p  { font-size: 0.88rem; color: var(--text-3); position: relative; z-index: 1; }

.legal-body {
  padding: 4rem 0 7rem;
}
.legal-container {
  max-width: 740px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.legal-toc {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 3rem;
}
.legal-toc-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.75rem;
}
.legal-toc ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.legal-toc li { font-size: 0.875rem; color: var(--text-2); }
.legal-toc a { color: var(--text-2); transition: color 0.2s; }
.legal-toc a:hover { color: var(--gold); }

.legal-section { margin-bottom: 3rem; }
.legal-section h2 {
  font-size: 1.45rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  color: var(--cream);
  scroll-margin-top: 80px;
}
.legal-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 1.5rem 0 0.5rem;
}
.legal-section p {
  font-size: 0.94rem;
  color: var(--text-2);
  margin-bottom: 0.85rem;
}
.legal-section ul, .legal-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.legal-section ul { list-style: disc; }
.legal-section ol { list-style: decimal; }
.legal-section li { font-size: 0.94rem; color: var(--text-2); }
.legal-section a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.legal-section a:hover { color: var(--gold-light); }

.info-box {
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid var(--border-gold-l);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.info-box p { color: var(--text-1); margin: 0; font-size: 0.9rem; }

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  padding: 8rem 0;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}
.faq-item[open] {
  border-color: var(--border-gold-l);
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--cream);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
  line-height: 1;
}
.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}
.faq-a {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
}
.faq-a p {
  font-size: 0.925rem;
  color: var(--text-2);
  line-height: 1.75;
  margin: 0;
  padding-top: 1rem;
}
.faq-a strong { color: var(--text-1); }

/* ============================================================
   SCROLL ANIMATION
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-d1 { transition-delay: 0.1s; }
.fade-up-d2 { transition-delay: 0.2s; }
.fade-up-d3 { transition-delay: 0.3s; }
.fade-up-d4 { transition-delay: 0.4s; }

/* Hero animate-in */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-anim-1 { animation: heroIn 0.7s 0.1s var(--ease-out) both; }
.hero-anim-2 { animation: heroIn 0.7s 0.22s var(--ease-out) both; }
.hero-anim-3 { animation: heroIn 0.7s 0.34s var(--ease-out) both; }
.hero-anim-4 { animation: heroIn 0.7s 0.46s var(--ease-out) both; }
.hero-anim-5 { animation: heroIn 0.7s 0.58s var(--ease-out) both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 1rem;
    text-align: center;
  }
  .hero-visual { order: -1; }
  .hero-subtitle, .hero-cta, .hero-stats { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }

  .chess-board { width: 300px; height: 300px; }

  .features-grid { grid-template-columns: 1fr; }
  .feature-card--wide { grid-template-columns: 1fr; }

  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }

  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 1rem; }
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.5rem;
    z-index: 99;
  }
  .nav-toggle { display: flex; }
  .chess-board { width: 272px; height: 272px; }
  .hero-cta { flex-direction: column; }
  .pricing-grid { max-width: 100%; }
}

/* ============================================================
   BLOG — SHARED
   ============================================================ */
.blog-hero {
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-inner { max-width: 760px; }
.blog-hero h1 { margin-bottom: 1rem; }
.blog-hero p {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 560px;
}

/* Category pills */
.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4em 1em;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-gold-l);
  color: var(--text-2);
  background: transparent;
  transition: all 0.2s var(--ease);
}
.cat-pill:hover,
.cat-pill.active {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-dim);
}
.cat-pill .cat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* Blog grid */
.blog-section { padding: 4rem 0 8rem; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Blog card */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.blog-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.blog-card--featured {
  grid-column: span 2;
  flex-direction: row;
}
.blog-card-cover {
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}
.blog-card--featured .blog-card-cover {
  width: 45%;
  min-height: 280px;
}
.blog-card:not(.blog-card--featured) .blog-card-cover {
  height: 160px;
  width: 100%;
  font-size: 2rem;
}
.blog-card-cover-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.blog-card-cover-icon {
  font-size: 2.5rem;
  line-height: 1;
}
.blog-card-cover-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}
.blog-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.blog-card h3 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--cream);
}
.blog-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-3);
}
.blog-card-meta time { color: var(--text-3); }
.blog-card-meta .read-time { color: var(--text-3); }
.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold);
  margin-top: 1.25rem;
  transition: gap 0.2s var(--ease);
}
.blog-card-link:hover { gap: 0.6rem; }
.blog-card-link::after { content: '→'; }

/* ============================================================
   BLOG — ARTICLE (single post)
   ============================================================ */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
  padding: 5rem 0 8rem;
}
.post-header { margin-bottom: 3rem; }
.post-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.post-cat::before {
  content: '';
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--gold);
}
.post-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-3);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.post-meta time { color: var(--text-2); }
.post-meta .read-time { color: var(--text-3); }
.post-meta .author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-2);
}
.post-meta .author img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* Article body */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-2);
}
.post-body h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--cream);
}
.post-body h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--cream);
}
.post-body p { margin-bottom: 1.4rem; }
.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { color: var(--text-2); }
.post-body strong { color: var(--text-1); font-weight: 600; }
.post-body em { color: var(--gold-light); font-style: italic; }
.post-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--gold-light); }
.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-1);
}
.post-body blockquote p { margin: 0; color: var(--text-1); }

/* Callout / highlight box */
.callout {
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}
.callout-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.callout p { color: var(--text-1); margin: 0; font-size: 0.95rem; }

/* Data table */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}
.post-body th {
  background: var(--bg-3);
  color: var(--text-1);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-mid);
}
.post-body td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.post-body tr:hover td { background: var(--bg-2); }

/* Retention chart */
.retention-chart {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
}
.retention-chart-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  text-align: center;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 140px;
}
.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  justify-content: flex-end;
}
.chart-bars-pair {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  width: 100%;
  justify-content: center;
}
.chart-bar {
  width: 22px;
  border-radius: 3px 3px 0 0;
  transition: opacity 0.2s;
}
.chart-bar--cram {
  background: rgba(150, 100, 100, 0.6);
  border: 1px solid rgba(200, 100, 100, 0.4);
}
.chart-bar--fsrs {
  background: linear-gradient(to top, var(--gold), var(--gold-light));
  opacity: 0.85;
}
.chart-bar-label {
  font-size: 0.7rem;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
}
.chart-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-2);
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.chart-legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
}
.chart-legend-dot--cram { background: rgba(150,100,100,0.6); }
.chart-legend-dot--fsrs { background: var(--gold); }

/* In-article CTA */
.article-cta {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 3rem 0;
  text-align: center;
}
.article-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--cream);
}
.article-cta p {
  color: var(--text-2);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.article-cta .cta-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Post sidebar */
.post-sidebar { position: sticky; top: 88px; }
.sidebar-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h4 {
  font-size: 0.9rem;
  color: var(--cream);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.toc-list a {
  font-size: 0.82rem;
  color: var(--text-3);
  transition: color 0.2s;
  line-height: 1.4;
  padding: 0.2rem 0;
}
.toc-list a:hover { color: var(--gold); }
.sidebar-app-card {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border-gold);
}
.sidebar-app-card .app-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-gold-l);
}
.sidebar-app-card h4 {
  border-bottom: none;
  padding-bottom: 0;
  color: var(--cream);
}
.sidebar-app-card p {
  font-size: 0.82rem;
  color: var(--text-2);
  margin: 0.5rem 0 1.25rem;
  line-height: 1.55;
}

/* Related posts */
.related-posts {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}
.related-posts h2 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

/* Blog responsive */
@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-card--featured { grid-column: span 2; flex-direction: column; }
  .blog-card--featured .blog-card-cover { width: 100%; min-height: 180px; }
  .post-layout { grid-template-columns: 1fr; gap: 2rem; }
  .post-sidebar { position: static; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card--featured { grid-column: span 1; }
  .post-layout { padding: 3rem 0 5rem; }
  .article-cta .cta-btns { flex-direction: column; }
}
