/* Syncopy landing page — single stylesheet, no framework, no JS for layout.
 *
 * Branding per marketing/landingpage-v1.md:
 *   accent (mint):  #2DD4A4
 *   font:           Manrope (400/500/600/700/800)
 *   tone:           dark, trader-tool aesthetic; no gradients, no fluff
 */

:root {
  /* Surfaces */
  --bg:          #0d1224;
  --surface:    #131a30;
  --surface-2: #1a2240;
  --border:    rgba(255, 255, 255, 0.08);

  /* Text */
  --text:        #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  /* Brand */
  --mint:       #2DD4A4;
  --mint-dim:   #1faa83;

  /* Spacing scale */
  --gap-1:  4px;
  --gap-2:  8px;
  --gap-3:  12px;
  --gap-4:  16px;
  --gap-5:  24px;
  --gap-6:  32px;
  --gap-8:  48px;
  --gap-10: 64px;

  /* Layout */
  --max-w: 720px;
  --radius:    14px;
  --radius-sm: 8px;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--mint);
  text-decoration: none;
  transition: color 160ms ease;
}
a:hover { color: #4be0b8; }

img { max-width: 100%; height: auto; display: block; }

/* Page wrapper — single column, generous padding, max-width for readability */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--gap-8) var(--gap-5);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  margin-bottom: var(--gap-10);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-3);
  margin-bottom: var(--gap-6);
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand img {
  width: 40px;
  height: 40px;
}

.wordmark {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero-title {
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--gap-4) 0;
  color: var(--text);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-2);
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  flex-shrink: 0;
  /* Subtle pulse signals "alive, in motion" */
  animation: pulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(45, 212, 164, 0.4);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(45, 212, 164, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(45, 212, 164, 0); }
}

/* ── Definition (LLM anchor block) ─────────────────────────────────────── */

.definition {
  margin-bottom: var(--gap-10);
  padding-left: var(--gap-4);
  border-left: 2px solid var(--mint);
}

.definition p {
  margin: 0 0 var(--gap-4) 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.definition-tagline {
  color: var(--text-muted) !important;
  font-size: 15px !important;
  margin-bottom: 0 !important;
}

/* ── Value props ───────────────────────────────────────────────────────── */

.values {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-5);
  margin-bottom: var(--gap-10);
}

.value {
  padding: var(--gap-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.value h2 {
  margin: 0 0 var(--gap-2) 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.value p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* ── Currently building ────────────────────────────────────────────────── */

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 var(--gap-3) 0;
  color: var(--text);
}

.section-lede {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 var(--gap-6) 0;
  line-height: 1.65;
}

.building {
  margin-bottom: var(--gap-10);
}

.building-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-5);
}

.building-col {
  padding: var(--gap-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.building-col h3 {
  margin: 0 0 var(--gap-3) 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mint);
}

.building-col ul {
  margin: 0;
  padding-left: var(--gap-5);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.building-col li + li {
  margin-top: 6px;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.faq {
  margin-bottom: var(--gap-10);
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--gap-3);
  overflow: hidden;
  transition: border-color 160ms ease;
}

.faq details[open] {
  border-color: rgba(45, 212, 164, 0.3);
}

.faq summary {
  padding: var(--gap-4) var(--gap-5);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
  color: var(--text);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  position: absolute;
  right: var(--gap-5);
  top: 50%;
  transform: translateY(-50%);
  color: var(--mint);
  font-weight: 600;
  font-size: 20px;
  transition: transform 160ms ease;
  line-height: 1;
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 var(--gap-5) var(--gap-5);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Waitlist ──────────────────────────────────────────────────────────── */

.waitlist {
  margin-bottom: var(--gap-10);
  text-align: center;
  position: relative;
  /* Layered atmospheric halo: a wider, softer mint glow + a tighter inner
   * cloud. Together they create a "spotlight on stage" effect — the white
   * Tally card appears to emerge from light rather than sit on dark. */
  background:
    radial-gradient(
      ellipse 80% 90% at 50% 75%,
      rgba(45, 212, 164, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 60% at 50% 80%,
      rgba(255, 255, 255, 0.04) 0%,
      transparent 70%
    );
  padding: var(--gap-10) var(--gap-3) var(--gap-8);
  border-radius: 32px;
}

.waitlist .section-title {
  margin-bottom: var(--gap-3);
}

.waitlist-sub {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto var(--gap-6);
}

.tally-wrap {
  /* Off-white instead of pure white — slightly softer next to the dark
   * page. Multi-layer shadow stack creates an atmospheric falloff: tight
   * contact + medium ambient + wide mint-tinted halo + outermost dark
   * shadow that catches the page. The result is a feathered transition
   * rather than a single hard rectangle on dark. */
  position: relative;
  background: #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 1px 2px  rgba(0, 0, 0, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.25),
    0 24px 60px rgba(45, 212, 164, 0.18),
    0 50px 120px rgba(45, 212, 164, 0.10),
    0 80px 200px rgba(0, 0, 0, 0.5);
}

/* Feathered halo that wraps the card — sits BEHIND it via z-index but
 * extends well beyond the card edges. Bridges card → page so the eye
 * doesn't catch a hard rectangle. */
.tally-wrap::before {
  content: '';
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(248, 250, 252, 0.08) 0%,
    rgba(248, 250, 252, 0.02) 40%,
    transparent 70%
  );
  border-radius: 60px;
  filter: blur(20px);
  pointer-events: none;
}

.tally-wrap iframe {
  width: 100%;
  border: 0;
  display: block;
  /* Cross-origin-safe trick to dim Tally's pure white interior — pixel
   * compositing happens locally so we can darken the iframe content
   * without breaking same-origin policy. brightness(0.93) ≈ subtle
   * off-white tint, keeps the mint button readable. */
  filter: brightness(0.93);
}

.noscript-fallback {
  text-align: center;
  color: var(--text-muted);
  margin-top: var(--gap-4);
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding-top: var(--gap-6);
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (min-width: 720px) {
  .page {
    padding: var(--gap-10) var(--gap-5);
  }
  .values {
    grid-template-columns: repeat(3, 1fr);
  }
  .building-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero {
    margin-bottom: var(--gap-10);
  }
}

/* Selection colour matches the brand */
::selection {
  background: rgba(45, 212, 164, 0.3);
  color: var(--text);
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
  * { transition: none !important; }
}
