/* ============================================================
   LOOP SOLUTIONS — design system
   Display: Space Grotesk · Body: Hanken Grotesk · Label: Space Mono
   ============================================================ */

:root {
  /* palette */
  --ink-950: oklch(0.20 0.035 260);
  --ink-900: oklch(0.25 0.038 260);
  --ink-800: oklch(0.30 0.040 260);
  --ink-700: oklch(0.40 0.040 260);
  --ink-600: oklch(0.50 0.035 260);

  --paper:   oklch(0.995 0.002 250);
  --paper-2: oklch(0.975 0.005 255);
  --paper-3: oklch(0.955 0.007 255);
  --line:    oklch(0.92 0.008 255);
  --line-2:  oklch(0.86 0.010 255);

  --muted:   oklch(0.52 0.022 258);
  --muted-d: oklch(0.74 0.020 258); /* muted on dark */

  /* primary accent: Loop blue (matches app; tweakable) */
  --gold:    oklch(0.62 0.165 260);
  --gold-d:  oklch(0.54 0.175 262);
  --gold-soft: oklch(0.93 0.040 258);

  /* brand secondaries: logo teal + coral, loop blue */
  --teal:    oklch(0.72 0.105 188);
  --coral:   oklch(0.66 0.170 32);
  --amber:   oklch(0.82 0.130 80);
  --blue:    oklch(0.62 0.165 260);
  --blue-l:  oklch(0.72 0.130 248);

  --radius: 14px;
  --radius-s: 10px;
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 80px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-900);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #fff; }

/* ---- layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-d);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--gold-d);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--gold); }
.eyebrow.on-dark::before { background: var(--gold); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
.section-title { font-size: clamp(30px, 4.4vw, 56px); letter-spacing: -0.03em; }
p { text-wrap: pretty; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklch, var(--ink-950) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in oklch, white 8%, transparent);
  transition: background .3s ease, border-color .3s ease;
}
.site-header.compact { background: color-mix(in oklch, var(--ink-950) 97%, transparent); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--paper); }
.brand .mark { width: 46px; height: 24px; flex: none; }
.brand .word {
  font-family: var(--font-display); font-weight: 700;
  font-size: 23px; letter-spacing: 0.14em; color: var(--paper);
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--muted-d);
  transition: color .18s ease; position: relative; white-space: nowrap;
}
.nav-links a:hover { color: var(--paper); }
.nav-right { display: flex; align-items: center; gap: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-d); box-shadow: 0 8px 24px -8px color-mix(in oklch, var(--gold) 75%, transparent); }
.btn-ghost-d { color: var(--paper); border-color: color-mix(in oklch, white 22%, transparent); }
.btn-ghost-d:hover { background: color-mix(in oklch, white 8%, transparent); border-color: color-mix(in oklch, white 40%, transparent); }
.btn-dark { background: var(--ink-950); color: var(--paper); }
.btn-dark:hover { background: var(--ink-800); box-shadow: 0 10px 26px -12px var(--ink-950); }
.btn-ghost { color: var(--ink-900); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-900); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn-lg { padding: 16px 30px; font-size: 16px; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--paper); margin: 5px 0; transition: .25s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; background: var(--ink-950); color: var(--paper);
  overflow: hidden; isolation: isolate;
}
.hero::before { /* dot grid */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(color-mix(in oklch, white 6%, transparent) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
}
.hero::after { /* gold glow */
  content: ""; position: absolute; z-index: -1;
  width: 60vw; height: 60vw; right: -12vw; top: -16vw;
  background: radial-gradient(circle, color-mix(in oklch, var(--gold) 26%, transparent), transparent 62%);
  filter: blur(8px);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  padding-block: clamp(64px, 9vw, 120px);
}
.hero h1 {
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.96; letter-spacing: -0.035em;
}
.hero h1 .accent { background: linear-gradient(102deg, var(--teal) 12%, var(--coral) 88%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .out { color: transparent; -webkit-text-stroke: 1.6px color-mix(in oklch, white 60%, transparent); }
.hero-sub {
  margin-top: 26px; font-size: clamp(17px, 1.5vw, 21px);
  color: var(--muted-d); max-width: 30ch; line-height: 1.45;
}
.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 40px; display: flex; gap: 26px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--muted-d); text-transform: uppercase;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* hero loop visual */
.hero-visual { position: relative; aspect-ratio: 1/1; display: grid; place-items: center; }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
.loop-path { fill: none; stroke-width: 16; stroke-linecap: round; }
.loop-track { stroke: color-mix(in oklch, white 14%, transparent); }
.loop-base { stroke: url(#loopGrad); opacity: 0.65; filter: drop-shadow(0 0 18px color-mix(in oklch, var(--gold) 30%, transparent)); }
.loop-flow {
  stroke: url(#loopFlowGrad); stroke-dasharray: 130 700; stroke-width: 16;
  filter: drop-shadow(0 0 16px color-mix(in oklch, var(--gold) 70%, transparent));
}
@media (prefers-reduced-motion: no-preference) {
  .loop-flow { animation: loopFlow 6s linear infinite; }
}
@keyframes loopFlow { to { stroke-dashoffset: -830; } }
body.no-loop-motion .loop-flow { animation: none; }
.loop-node { fill: var(--paper); filter: drop-shadow(0 0 10px color-mix(in oklch, var(--blue-l) 80%, transparent)); }
.loop-ring { fill: none; stroke: color-mix(in oklch, white 11%, transparent); stroke-width: 1.5; }

/* ============================================================
   MARQUEE / POSITIONING STRIP
   ============================================================ */
.strip { background: var(--ink-900); color: var(--muted-d); border-top: 1px solid color-mix(in oklch,white 7%,transparent); }
.strip .wrap { display: flex; align-items: center; gap: 18px; padding-block: 18px; flex-wrap: wrap; justify-content: center; }
.strip .pill {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--paper);
  border: 1px solid color-mix(in oklch,white 14%,transparent);
  padding: 7px 14px; border-radius: 999px;
}

/* ============================================================
   SECTION BASE
   ============================================================ */
section.block { padding-block: clamp(72px, 9vw, 132px); }
.block-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 68px); }
.block-head .section-title { margin-top: 18px; }
.block-head p { margin-top: 18px; font-size: 19px; color: var(--muted); max-width: 56ch; }

/* ============================================================
   FEATURES
   ============================================================ */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feat {
  background: var(--paper); padding: 38px 32px 42px;
  transition: background .25s ease, transform .25s ease;
  position: relative;
}
.feat:hover { background: var(--paper-2); }
.feat .ic {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: var(--gold-soft); color: var(--gold-d);
}
.feat .ic svg { width: 22px; height: 22px; }
.feat h3 { font-size: 21px; letter-spacing: -0.01em; }
.feat p { margin-top: 10px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.feat .num {
  position: absolute; top: 26px; right: 30px;
  font-family: var(--font-mono); font-size: 12px; color: var(--line-2);
}

/* ============================================================
   LOOP / HOW IT WORKS  (dark)
   ============================================================ */
.loopwork { background: var(--ink-950); color: var(--paper); position: relative; overflow: hidden; }
.loopwork::before {
  content:""; position:absolute; inset:0;
  background-image: radial-gradient(color-mix(in oklch, white 5%, transparent) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 20%, transparent 70%);
}
.loopwork .block-head p { color: var(--muted-d); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.step {
  position: relative; padding: 30px 26px; border-radius: var(--radius);
  background: color-mix(in oklch, white 4%, transparent);
  border: 1px solid color-mix(in oklch, white 9%, transparent);
}
.step .k { font-family: var(--font-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }
.step h3 { font-size: 22px; margin-top: 14px; }
.step p { margin-top: 10px; color: var(--muted-d); font-size: 15px; }
.step .dot {
  position: absolute; top: -7px; left: 26px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 5px color-mix(in oklch, var(--gold) 22%, transparent);
}

/* ============================================================
   COMPLIANCE  (split)
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 80px); align-items: center; }
.compliance .panel {
  background: var(--ink-950); color: var(--paper); border-radius: 20px;
  padding: 44px; position: relative; overflow: hidden;
}
.compliance .panel::after {
  content:""; position:absolute; right:-30%; bottom:-40%;
  width: 80%; height: 90%;
  background: radial-gradient(circle, color-mix(in oklch, var(--blue) 30%, transparent), transparent 65%);
}
.check-list { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.check-list li { list-style: none; display: flex; gap: 14px; align-items: flex-start; position: relative; z-index: 1; }
.check-list .cm {
  flex: none; width: 26px; height: 26px; border-radius: 8px; margin-top: 2px;
  background: var(--gold); color: #fff; display: grid; place-items: center;
}
.check-list .cm svg { width: 14px; height: 14px; }
.check-list b { font-family: var(--font-display); font-weight: 600; font-size: 16.5px; }
.check-list span { display: block; color: var(--muted-d); font-size: 14.5px; margin-top: 2px; }

/* ============================================================
   SECURITY  (light cards)
   ============================================================ */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sec {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  background: var(--paper); transition: border-color .2s ease, transform .2s ease;
}
.sec:hover { border-color: var(--ink-900); transform: translateY(-3px); }
.sec .ic { width: 40px; height: 40px; color: var(--ink-900); margin-bottom: 18px; }
.sec h3 { font-size: 18px; }
.sec p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

/* ============================================================
   CTA / BETA
   ============================================================ */
.cta { background: var(--ink-950); color: var(--paper); position: relative; overflow: hidden; }
.cta::before {
  content:""; position:absolute; inset:0; z-index:0;
  background: radial-gradient(ellipse 60% 120% at 50% 0%, color-mix(in oklch, var(--gold) 18%, transparent), transparent 60%);
}
.cta .wrap { position: relative; z-index: 1; }
.cta-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px,5vw,72px); align-items: center; padding-block: clamp(64px,8vw,108px); }
.cta h2 { font-size: clamp(34px, 4.6vw, 60px); letter-spacing: -0.03em; }
.cta p { margin-top: 18px; color: var(--muted-d); font-size: 18px; max-width: 44ch; }

.beta-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-d); }
.field input, .field select {
  font-family: var(--font-body); font-size: 16px; color: var(--paper);
  background: color-mix(in oklch, white 5%, transparent);
  border: 1px solid color-mix(in oklch, white 16%, transparent);
  border-radius: var(--radius-s); padding: 14px 16px; transition: border-color .2s ease, background .2s ease;
}
.field input::placeholder { color: color-mix(in oklch, white 36%, transparent); }
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); background: color-mix(in oklch, white 8%, transparent); }
.field.invalid input { border-color: oklch(0.62 0.18 25); }
.field .err { font-size: 12.5px; color: oklch(0.72 0.16 30); display: none; }
.field.invalid .err { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 13px; color: var(--muted-d); }
.form-success {
  display: none; flex-direction: column; gap: 12px; text-align: center;
  padding: 40px 24px; border: 1px dashed color-mix(in oklch,white 22%,transparent); border-radius: var(--radius);
}
.form-success.show { display: flex; }
.form-success .badge { width: 54px; height: 54px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; margin: 0 auto; }
.form-success h3 { font-size: 24px; }
.form-success p { color: var(--muted-d); margin: 0 auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink-900); color: var(--muted-d); padding-block: 60px 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid color-mix(in oklch,white 9%,transparent); }
.footer .brand .word, .footer .brand { color: var(--paper); }
.footer-blurb { margin-top: 18px; max-width: 34ch; font-size: 14.5px; line-height: 1.5; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-d); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14.5px; color: var(--paper); opacity: .82; transition: opacity .18s; }
.footer-col a:hover { opacity: 1; color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 26px; flex-wrap: wrap; font-size: 13px; }
.footer-bottom a:hover { color: var(--gold); }

/* ============================================================
   REVEAL — content statically visible (class kept as a no-op hook)
   ============================================================ */
.reveal { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-visual { max-width: 360px; margin-inline: auto; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split, .cta-inner { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links, .nav-right .btn-ghost-d { display: none; }
  .menu-toggle { display: block; }
  .nav-links.open {
    display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column;
    background: var(--ink-950); padding: 20px var(--pad) 30px; gap: 18px; border-bottom: 1px solid color-mix(in oklch,white 10%,transparent);
  }
  .feat-grid, .steps, .sec-grid, .form-row, .footer-top { grid-template-columns: 1fr; }
  .hero-meta { gap: 14px; }
}
