/* =========================================================
   BASE — design tokens, reset, layout primitives, utilities
   ========================================================= */

:root {
  /* Core palette — mirrors the app's dark mode */
  --bg:        #000000;
  --bg-soft:   #0a0a0a;
  --surface:   #121212;
  --surface-2: #1a1a1a;
  --border:    #1f1f1f;
  --border-2:  #2a2a2a;
  --text:      #ffffff;
  --text-2:    #d4d4d4;
  --text-3:    #8a8a8a;
  --text-4:    #5c5c5c;

  --accent:    #3B82F6;
  --accent-2:  #60a5fa;
  --hot:       #F40752;
  --mint:      #82F4B1;
  --gold:      #FFF95B;

  /* Friend-card gradients lifted from the app */
  --g-rose:   linear-gradient(180deg, #F40752, #F9AB8F);
  --g-coral:  linear-gradient(180deg, #FFB88E, #EA5753);
  --g-citrus: linear-gradient(180deg, #FF930F, #FFF95B);
  --g-mint:   linear-gradient(180deg, #82F4B1, #30C67C);
  --g-cyber:  linear-gradient(180deg, #4DC9E6, #210CAE);
  --g-sky:    linear-gradient(180deg, #9FCCFA, #0974F1);
  --g-indigo: linear-gradient(180deg, #595CFF, #C6F8FF);
  --g-plum:   linear-gradient(180deg, #B15B86, #440F50);
  --g-rain:   linear-gradient(180deg, #84FFC9, #AAB2FF, #ECA0FF);
  --g-pastel: linear-gradient(180deg, #F2F3E2, #B2E5F8, #F4B3EF);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 28px;

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Subtle ambient grain — sells the dark mode */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1200px 700px at 80% -10%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(244,7,82,.07), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(130,244,177,.06), transparent 60%);
  filter: saturate(1.2);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: .04;
  mix-blend-mode: overlay;
}

/* iOS Safari's bottom URL pill is translucent and picks up whatever
   page color is rendering behind it (theme-color only paints the top
   status bar, not the bottom pill). With viewport-fit=cover, our page
   extends into the safe area, so any yellow strobing/zap content can
   tint the pill. This paints a fixed black bar in just the safe-area
   zone so the pill always reads as black. */
html::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  z-index: 200;
  pointer-events: none;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
section { position: relative; z-index: 1; }

/* =========================================================
   UTILITIES
   ========================================================= */
.section-label {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.section-label::before, .section-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, var(--border-2), transparent);
}

.glow-text { text-shadow: 0 0 30px rgba(89,92,255,.35); }
.no-select { user-select: none; }
.kbd {
  display: inline-flex; align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.04);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--text-2);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
