/*
  Infinite Tic Tac Toe — Landing Styles
  Theme colors from AppColors:
    background: #F5EAD2
    secondary:  #F0D33B
    font:       #1749A5
    cross:      #B75246
    circle:     #45C076
    black:      #1E1E1E
*/

:root {
  --bg: #F5EAD2;
  --secondary: #F0D33B;
  --text: #1749A5;
  --cross: #B75246;
  --circle: #45C076;
  --ink: #1E1E1E;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(30, 30, 30, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: "Space Grotesk", Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; }
h1 { font-size: clamp(2.2rem, 4.2vw + 1rem, 4.4rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: clamp(1.6rem, 1.2vw + 1rem, 2.2rem); margin: 0 0 12px; }
h3 { font-size: 1.2rem; margin: 0 0 8px; }
h4 { font-size: 1rem; margin: 0 0 6px; }
p { margin: 0 0 10px; font-size: 1rem; line-height: 1.6; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-grid {
  position: absolute;
  inset: -20% -10% -10% -10%;
  background-image:
    linear-gradient(to right, rgba(23,73,165,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23,73,165,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 60% -20%, black 30%, transparent 70%);
}
.floating-icons {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  opacity: 0;
  transition: opacity 240ms ease-out;
}
.floating-icons img {
  align-self: center; justify-self: center;
  animation: float 12s ease-in-out infinite;
  width: clamp(28px, 6vw, 80px);
  height: auto;
}
.floating-icons .icon-x { animation-delay: 0s; }
.floating-icons .icon-o { animation-delay: 2s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}

.site-header {
  position: sticky;
  top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  backdrop-filter: blur(6px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand-text { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.nav a.btn { color: var(--ink); }
.nav-toggle { display: none; background: transparent; border: 0; font-size: 24px; color: var(--ink); }

.btn {
  --btn-bg: var(--secondary);
  --btn-fg: var(--ink);
  appearance: none;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(30, 30, 30, 0.16); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow); }
.btn-primary { background: var(--secondary); color: var(--ink); }
.btn-ghost { background: transparent; border: 2px solid var(--text); color: var(--text); box-shadow: none; }

.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 40px 0 20px; }
.hero .subtitle { font-size: 1.1rem; opacity: 0.9; }
.hero-art { position: relative; }

.board {
  --line: rgba(23, 73, 165, 0.35);
  aspect-ratio: 1 / 1; width: min(520px, 88%);
  margin-left: auto; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(240, 211, 59, 0.18), rgba(69, 192, 118, 0.12));
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  position: relative; overflow: hidden;
}
.board::before, .board::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
}
.board::before { /* grid lines */
  background-image:
    linear-gradient(to right, transparent calc(33.333% - 1px), var(--line) calc(33.333%), transparent calc(33.333% + 1px), transparent calc(66.666% - 1px), var(--line) calc(66.666%), transparent calc(66.666% + 1px)),
    linear-gradient(to bottom, transparent calc(33.333% - 1px), var(--line) calc(33.333%), transparent calc(33.333% + 1px), transparent calc(66.666% - 1px), var(--line) calc(66.666%), transparent calc(66.666% + 1px));
}
.cell { display: grid; place-items: center; position: relative; }
.cell::after { content: ""; display: block; width: 58%; aspect-ratio: 1 / 1; background-repeat: no-repeat; background-position: center; background-size: contain; transition: opacity 220ms ease; }
.cell.x::after { background-image: url('assets/cross.svg'); transform: rotate(-6deg); animation: pop 900ms ease both 120ms; }
.cell.o::after { background-image: url('assets/circle.svg'); transform: rotate(4deg); animation: pop 900ms ease both 300ms; }
.fade-out::after { opacity: 0; }
.about-to-remove::after { opacity: 0.45; }
@keyframes pop { 0% { transform: scale(0.6) rotate(0deg); opacity: 0; } 100% { transform: scale(1) rotate(var(--rot, 0)); opacity: 1; } }

.waitlist { margin-top: 22px; }
.waitlist form { display: flex; gap: 10px; align-items: stretch; width: 100%; }
.waitlist input[type="email"] {
  flex: 1 1 auto;
  background: var(--white);
  border: 2px solid rgba(23, 73, 165, 0.25);
  border-radius: 999px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 1rem;
  outline: none;
}
.waitlist input[type="email"]::placeholder { color: rgba(30,30,30,0.55); }
.form-help { font-size: 0.9rem; opacity: 0.9; margin-top: 8px; }
.form-status { margin-top: 10px; min-height: 22px; font-weight: 600; }
.form-status.small { min-height: 18px; font-weight: 500; font-size: 0.95rem; }
.success-box {
  margin-top: 16px; padding: 14px; border-radius: var(--radius);
  background: rgba(240, 211, 59, 0.25);
  border: 1px solid rgba(23, 73, 165, 0.25);
}
.referral {
  display: flex; gap: 10px; align-items: center; margin-top: 10px;
}
.referral input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(23, 73, 165, 0.35); background: var(--white); color: var(--ink); }

.section { padding: 60px 0; }
.features .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--white);
  border: 1px solid rgba(23, 73, 165, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.badge { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; font-weight: 900; color: var(--white); margin-bottom: 8px; }
.badge.play { background: var(--cross); }
.badge.play img { width: 70%; height: auto; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
.badge.leaderboard { background: var(--secondary); color: var(--ink); }
.badge.invite { background: var(--circle); }

.how .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; background: rgba(255,255,255,0.6); border: 1px solid rgba(23,73,165,0.15); padding: 12px; border-radius: 12px; }
.step-num { width: 36px; height: 36px; border-radius: 8px; background: var(--secondary); color: var(--ink); display: grid; place-items: center; font-weight: 800; }

.faq details { background: rgba(255,255,255,0.7); border: 1px solid rgba(23,73,165,0.18); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin-top: 8px; }

.final-cta .cta-card {
  background: linear-gradient(135deg, rgba(69, 192, 118, 0.18), rgba(183, 82, 70, 0.12));
  border: 1px solid rgba(23,73,165,0.22);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.final-cta form.inline { display: flex; gap: 10px; margin-top: 10px; }
.final-cta input[type="email"] { flex: 1; background: var(--white); border: 2px solid rgba(23, 73, 165, 0.25); border-radius: 999px; padding: 14px 16px; color: var(--ink); }

.site-footer { display: flex; justify-content: center; align-items: center; padding: 30px 0 40px; }
.brandline { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-weight: 800; }
.footer-nav { display: inline-flex; gap: 16px; justify-self: center; }
.fineprint { justify-self: end; opacity: 0.7; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

@media (max-width: 720px) {
  .nav { display: none; position: absolute; right: 4%; top: 60px; background: rgba(255,255,255,0.9); padding: 10px; border-radius: 12px; box-shadow: var(--shadow); }
  .nav.open { display: grid; gap: 8px; }
  .nav-toggle { display: inline-block; }
  .features .feature-grid { grid-template-columns: 1fr; }
  .waitlist form, .final-cta form.inline { flex-direction: column; }
  .board { margin-left: auto; margin-right: auto; }
}


