/* =============================================================================
   Flexin: landing (HTML-only port of app/page.tsx + app/globals.css).
   Pure black, translucent-white surfaces, large type. Zero build.
   Spacing rides an 8-based scale: 8 · 16 · 24 · 32 · 48 · 64 · 96 · 128.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #f4f4f5;
  --muted: #8a8a92;
  --faint: #56565d;
  --line: rgba(255, 255, 255, 0.1);
  --card: rgba(255, 255, 255, 0.025);
  --field: rgba(255, 255, 255, 0.04);
  --glow-a: #5b8cff; /* electric blue */
  --glow-b: #b14bff; /* violet */
  --glow-c: #2ce6a8; /* mint: alive / live */
  --down: #ef5d6b;   /* the day it breaks */
  --live: #4f9b78;   /* desaturated green: quiet "live/active" dot */
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; max-width: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.4;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Top-down vignette to seat the content. */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(120% 120% at 50% 0%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

::selection { background: var(--glow-a); color: #fff; }
a { color: inherit; text-decoration: none; }

/* Inline icon sprite usage. */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: middle; }

/* ---------- Floating blurred shapes (restrained) ---------- */
.field { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3;
  will-change: transform; transition: transform 0.6s var(--ease);
}
.orb--a { width: 44vmax; height: 44vmax; top: -18vmax; left: -12vmax; background: var(--glow-a); animation: drift1 24s ease-in-out infinite; }
.orb--b { width: 34vmax; height: 34vmax; bottom: -14vmax; right: -8vmax; background: var(--glow-b); opacity: 0.24; animation: drift2 28s ease-in-out infinite; }
.orb--c { width: 18vmax; height: 18vmax; top: 36%; right: 26%; background: var(--glow-c); opacity: 0.12; animation: drift3 32s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vmax,4vmax) scale(1.08); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vmax,-3vmax) scale(1.12); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4vmax,5vmax) scale(0.92); } }

/* ---------- Layout ---------- */
.wrap { position: relative; z-index: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }
/* Section rhythm bounded to the 8-scale (64 to 128) instead of raw vh. */
.section { padding-block: clamp(64px, 12vh, 128px); }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: 0.18em; font-size: 15px; }
.brand .ic { width: 22px; height: 22px; }
/* Editorial line: no border, no background, no icon, no glow. Just type. */
.tagline {
  font-size: 12px; letter-spacing: 0.2em; text-transform: lowercase;
  color: var(--muted); font-weight: 400; text-align: right; max-width: 58%; line-height: 1.4;
}
@media (max-width: 480px) { .tagline { font-size: 11px; letter-spacing: 0.14em; } }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100dvh - 70px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 0 64px;
}
.hero-wordmark { font-size: 13px; font-weight: 800; letter-spacing: 0.34em; color: var(--muted); margin-bottom: 24px; }
.headline {
  font-size: clamp(40px, 9.5vw, 104px);
  font-weight: 900; letter-spacing: -0.035em; line-height: 0.95;
  text-transform: lowercase; max-width: 14ch; overflow-wrap: break-word;
}
.headline .grad {
  background: linear-gradient(95deg, var(--glow-a), var(--glow-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { margin-top: 24px; font-size: clamp(17px, 3.6vw, 22px); color: var(--muted); max-width: 32ch; line-height: 1.45; }
.hero-foot { margin-top: 24px; font-size: 14px; color: var(--faint); letter-spacing: 0.01em; }

/* ---------- Hero status line ---------- */
.status { margin-top: 32px; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); letter-spacing: 0.02em; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); flex: 0 0 auto; }

/* ---------- Section heading ---------- */
.eyebrow { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--glow-a); margin-bottom: 16px; }

/* ---------- Emotional: the day it breaks ---------- */
.streak-title { font-size: clamp(30px, 7vw, 60px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.0; max-width: 16ch; }
.days { list-style: none; margin: 48px 0 0; max-width: 420px; border-top: 1px solid var(--line); }
.day {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(20px, 5.2vw, 30px); font-weight: 700; letter-spacing: -0.02em;
}
.day .label { color: var(--fg); }
.day .mark { display: inline-flex; color: var(--fg); }
.day .mark .ic { width: 22px; height: 22px; }
.day.broken .label { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.day.broken .mark { color: var(--faint); }
.streak-body { margin-top: 48px; font-size: clamp(17px, 3.8vw, 22px); line-height: 1.5; color: var(--muted); max-width: 30ch; }
.streak-body strong { color: var(--fg); font-weight: 600; }
.punch { margin-top: 48px; font-size: clamp(30px, 7.5vw, 64px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.0; }
.punch .grad { background: linear-gradient(95deg, var(--glow-c), var(--glow-a)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Social proof: progress feed ---------- */
.proof-line { font-size: clamp(26px, 6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; max-width: 16ch; }
.proof-neg { margin-top: 16px; font-size: clamp(15px, 3.4vw, 18px); color: var(--muted); line-height: 1.6; }
.feed { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 48px; }
.fcard {
  border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  background: linear-gradient(180deg, var(--card), transparent);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.fcard:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }
.fwin { display: flex; align-items: center; gap: 12px; font-size: clamp(19px, 4.5vw, 23px); font-weight: 700; letter-spacing: -0.01em; }
.fwin-ic {
  display: inline-flex; flex: 0 0 auto; color: var(--fg);
  width: 38px; height: 38px; border-radius: 11px; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}
.fwin-ic .ic { width: 22px; height: 22px; }
.fmeta { margin-top: 12px; font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }

/* ---------- Closing ---------- */
.join { text-align: center; }
.join-inner { max-width: 540px; margin: 0 auto; }
.join-title { font-size: clamp(26px, 6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.join-sub { margin-top: 16px; font-size: clamp(15px, 3.4vw, 18px); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 48px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { font-weight: 900; letter-spacing: 0.16em; font-size: 20px; }
.footer-meta { display: flex; gap: 24px; align-items: center; color: var(--muted); font-size: 14px; letter-spacing: 0.04em; }
.footer-meta a:hover { color: var(--fg); }

/* ---------- Entrance animations ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (min-width: 680px) { .feed { grid-template-columns: repeat(2, 1fr); } }
