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

/* ── Design Tokens ── */
:root {
  --ch-electric: #00D4AA;
  --ch-deep:     #0B1D2C;
  --ch-warm:     #FF8E6E;
  --ch-lavender: #C4B5FD;
  --ch-surface:  #F6F9F8;
  --ch-card:     #FFFFFF;
  --ch-text:     #1A2B3A;
  --ch-muted:    #6B8299;
  --ch-border:   #E2EBE8;
  --ch-gradient-accent: linear-gradient(135deg, #00D4AA, #00B894);
  --ch-gradient-hero:   linear-gradient(135deg, #F0FDF9 0%, #F6F9F8 40%, #FFF5F0 100%);
}

/* ── Base ── */
body {
  font-family: 'Outfit', sans-serif;
  background: var(--ch-gradient-hero);
  color: var(--ch-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 48px 24px 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* ── Background shapes ── */
.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-shape { position: absolute; }

.bg-shape-1 {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -60px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.10), rgba(0, 212, 170, 0.03));
  border: 1px solid rgba(0, 212, 170, 0.08);
  transform: rotate(14deg);
}

.bg-shape-2 {
  width: 200px;
  height: 200px;
  bottom: 60px;
  left: -60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 142, 110, 0.10), rgba(255, 142, 110, 0.03));
  border: 1px solid rgba(255, 142, 110, 0.08);
}

.bg-shape-3 {
  width: 140px;
  height: 140px;
  top: 40%;
  right: 8%;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.12), rgba(196, 181, 253, 0.03));
  border: 1px solid rgba(196, 181, 253, 0.10);
  transform: rotate(-10deg);
}

.bg-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.06) 0%, transparent 65%);
}

/* ── Content wrapper ── */
.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 520px;
  margin-block: auto;
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ch-deep);
  text-decoration: none;
  margin-bottom: 32px;
}

.logo-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ch-gradient-accent);
  box-shadow: 0 0 8px rgba(0, 212, 170, 0.45);
  flex-shrink: 0;
}

/* ── Legal card ── */
.card {
  background: var(--ch-card);
  border-radius: 16px;
  border: 1px solid var(--ch-border);
  padding: 32px 36px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: left;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ch-deep);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ch-border);
}

.legal-section h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ch-muted);
  margin-bottom: 8px;
}

.legal-section p {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--ch-text);
}

.legal-section p + p { margin-top: 8px; }

.legal-section a {
  color: var(--ch-electric);
  text-decoration: none;
  font-weight: 500;
}

.legal-section a:hover { text-decoration: underline; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 24px 24px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 0;
}

.footer a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--ch-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
  border-radius: 3px;
  white-space: nowrap;
}

.footer a:hover { color: var(--ch-electric); }

.footer a:focus-visible {
  outline: 2px solid var(--ch-electric);
  outline-offset: 3px;
  color: var(--ch-electric);
}

.footer a[aria-current="page"] {
  color: var(--ch-deep);
  pointer-events: none;
}

.footer-sep {
  display: inline-block;
  margin: 0 10px;
  opacity: 0.4;
}

/* ── Legal links ── */
.legal-section a:focus-visible {
  outline: 2px solid var(--ch-electric);
  outline-offset: 2px;
  border-radius: 2px;
}

.logo:focus-visible {
  outline: 2px solid var(--ch-electric);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ══════════════════════════════════════════════
   404 page
   ══════════════════════════════════════════════ */

.page-404 {
  overflow: hidden;
}

.page-404-headline {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--ch-deep);
  margin-bottom: 16px;
}

.page-404 p.sub {
  font-size: 1rem;
  color: var(--ch-muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

.error-link {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ch-electric);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.error-link::before {
  content: '←';
}

.error-link:hover {
  gap: 10px;
}

.error-link:focus-visible {
  outline: 2px solid var(--ch-electric);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ══════════════════════════════════════════════
   Index / Coming Soon – page-specific styles
   Body carries class="page-index" on this page.
   ══════════════════════════════════════════════ */

.page-index {
  padding: 32px 24px;
  overflow: hidden;
}

.page-index .content {
  max-width: 640px;
}

.page-index .logo {
  margin-bottom: 48px;
}

/* Headline */
.page-index h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--ch-deep);
  margin-bottom: 20px;
}

.headline-accent {
  position: relative;
  display: inline;
}

.headline-accent::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  height: 9px;
  background: rgba(0, 212, 170, 0.22);
  border-radius: 4px;
  z-index: -1;
}

/* Sub-copy */
.page-index p.sub {
  font-size: 1rem;
  color: var(--ch-muted);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 380px;
}

/* Handwritten annotation */
.annotation {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--ch-warm);
  transform: rotate(-2deg);
  display: inline-block;
}

/* ── Responsive (Index) ── */
@media (max-width: 680px) {
  .page-index h1 {
    font-size: 2rem;
    letter-spacing: -1px;
  }
}

@media (max-width: 420px) {
  .page-index h1 {
    font-size: 1.7rem;
    letter-spacing: -0.5px;
  }

  .page-index .logo {
    margin-bottom: 36px;
  }

  .page-index p.sub {
    font-size: 0.95rem;
  }
}

/* ══════════════════════════════════════════════
   Shared Responsive
   ══════════════════════════════════════════════ */

/* ── Responsive ── */
@media (max-width: 560px) {
  body {
    padding: max(40px, 10vh) 20px 0;
  }

  /* Index: override body padding with sufficient top spacing */
  .page-index {
    padding: max(64px, 15vh) 20px 48px;
  }

  .content {
    max-width: 100%;
  }

  .bg-shape-1 { width: 200px; height: 200px; top: -60px; right: -40px; }
  .bg-shape-2 { width: 130px; height: 130px; }
  .bg-shape-3 { display: none; }

  .card { padding: 24px 20px; gap: 20px; }

  .footer {
    padding: 20px 16px 28px;
    gap: 2px 0;
  }

  .footer a { font-size: 0.62rem; letter-spacing: 0.5px; }
  .footer-sep { margin: 0 7px; }

  .page-404-headline {
    font-size: 2rem;
    letter-spacing: -1px;
  }
}
