/* ---------- Tokens ---------- */
:root{
  --bg: #0c0d13;
  --bg-raised: #14151d;
  --bg-raised-2: #101119;
  --border: #22232e;
  --border-accent: #3d5afe;
  --accent: #4d63ff;
  --accent-soft: rgba(77,99,255,0.12);
  --text-primary: #f5f6fa;
  --text-secondary: #a3a4b3;
  --text-tertiary: #6b6c7c;
  --radius: 14px;
  --wrap: 1280px;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

.center{ text-align: center; }

a{ color: inherit; }

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

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12,13,19,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.brand-mark{ color: var(--accent); display: flex; }

.btn-ghost{
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: border-color .15s ease, background .15s ease;
}
.btn-ghost:hover{ border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Buttons ---------- */
.btn-primary{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  padding: 13px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(77,99,255,0.35);
}
.btn-primary span{ transition: transform .15s ease; }
.btn-primary:hover span{ transform: translateX(2px); }

/* ---------- Hero ---------- */
.hero{
  padding: 96px 0 48px;
  position: relative;
}
.hero-inner{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.hero-lede{
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  hyphens: none;
}
.hero-lede-line{
  display: block;
  white-space: nowrap;
}
.hero-sub{
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 65ch; /* within Butterick 45–90 / NN/g ~50–75 body measure */
  line-height: 1.55;
  margin: 0 0 32px;
}

/* Mosaic */
.hero-visual{ display: flex; justify-content: center; }
.mosaic{
  --tile: 18px;
  display: grid;
  grid-template-columns: repeat(30, var(--tile));
  grid-auto-rows: var(--tile);
  gap: 2px;
  width: max-content;
  max-width: 600px;
  border-radius: 10px;
  overflow: hidden;
}
.tile{
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background-color: var(--bg-raised);
  background-size: cover;
  background-position: center;
}
.tile.blocked::after{
  content: '🚫';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--tile) * 0.72);
  line-height: 1;
  background: rgba(12, 13, 19, 0.22);
  pointer-events: none;
}
.tile.empty{
  background-color: #1a1b24;
  background-image: none;
}
@media (prefers-reduced-motion: no-preference){
  .tile.pulse{
    animation: pulse 3.6s ease-in-out infinite;
  }
}
@keyframes pulse{
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

.scroll-cue{
  display: flex;
  justify-content: center;
  color: var(--text-tertiary);
  margin-top: 40px;
  text-decoration: none;
}

/* ---------- Section shared ---------- */
.section-title{
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
}
.section-sub{
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 48px;
}

.value{ padding: 88px 0 40px; }

.card-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card{
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card-active{
  border-color: var(--border-accent);
}
.card h3{
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
}
.card p{
  color: var(--text-secondary);
  font-size: 14.5px;
  margin: 0;
}
.accent{ color: var(--accent); }

/* ---------- How it works ---------- */
.how{ padding: 96px 0; }
.how-list{
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.how-item h3{
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}
.how-item p{
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

/* ---------- Beta signup ---------- */
.beta{
  padding: 96px 0;
  background: var(--bg-raised-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 76px;
}
.signup-form{
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.signup-form input{
  flex: 1;
  min-width: 220px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 16px;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease;
}
.signup-form input::placeholder{ color: var(--text-tertiary); }
.signup-form input:focus{ border-color: var(--accent); }
.signup-form input:invalid:not(:placeholder-shown){ border-color: #ff6b6b; }
.botcheck{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-note{
  min-height: 20px;
  font-size: 14px;
  margin: 16px 0 0;
  color: var(--accent);
}
.privacy-note{
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 8px 0 0;
}

/* ---------- Footer ---------- */
.site-footer{
  padding: 48px 0;
}
.site-footer p{
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0 0 8px;
}
.footer-meta{ font-size: 13px; }

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px){
  .hero-inner{
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-visual{ order: -1; }
  .mosaic{ --tile: 10px; }
  .card-grid{ grid-template-columns: 1fr; }
  .hero-lede{ font-size: 32px; }
}

@media (max-width: 480px){
  .wrap{ padding: 0 20px; }
  .hero{ padding: 64px 0 32px; }
  .hero-lede{ font-size: 22px; }
  .hero-lede-line{ white-space: normal; }
  .section-title{ font-size: 26px; }
  .signup-form{ flex-direction: column; }
  .signup-form input{ min-width: 0; }
}
