/* LumpiApp / Project Lumpio — shared styles.
   Self-contained: system fonts only, no external requests (portable/offline). */

:root {
  --bg: #0a0b0f;
  --bg-2: #0f1116;
  --surface: #14161d;
  --surface-2: #191c24;
  --border: #262a34;
  --text: #e8eaf0;
  --muted: #9aa0ad;
  --cyan: #22d3ee;
  --magenta: #e879f9;
  --amber: #fbbf24;
  --green: #34d399;
  --radius: 16px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(1000px 500px at -10% 20%, rgba(232, 121, 249, 0.10), transparent 55%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(10, 11, 15, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 22px rgba(34, 211, 238, 0.6);
}
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .cta {
  color: #041016; background: var(--cyan); padding: 8px 14px; border-radius: 999px; font-weight: 600;
}
.nav-links .cta:hover { background: #67e8f9; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: 8px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--text); font-size: 19px; line-height: 1;
  cursor: pointer;
}

/* ---- Hero ---- */
.hero { padding: 96px 0 72px; }
.hero .kicker {
  display: inline-block; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.35); padding: 5px 12px; border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 7vw, 76px); line-height: 1.02; margin: 0 0 20px; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff, #b9c0cf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .glow {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 640px; margin: 0 0 32px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--border);
}
.btn.primary { background: linear-gradient(90deg, var(--cyan), #38bdf8); color: #041016; border: none; }
.btn.primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { color: var(--text); background: var(--surface); }
.btn.ghost:hover { background: var(--surface-2); text-decoration: none; }

/* ---- Sections ---- */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.eyebrow { color: var(--magenta); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }

/* ---- Cards ---- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: #33566b; }
.card .icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  margin-bottom: 16px; font-size: 20px;
  background: rgba(34, 211, 238, 0.12); border: 1px solid rgba(34, 211, 238, 0.25);
}
.card.magenta .icon { background: rgba(232, 121, 249, 0.12); border-color: rgba(232, 121, 249, 0.25); }
.card.amber .icon { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.25); }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .tag { display: inline-block; font-size: 12px; color: var(--cyan); margin-top: 12px; }

/* ---- Feature list ---- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; }
.feature .fi { color: var(--cyan); font-size: 18px; margin-top: 2px; }
.feature h4 { margin: 0 0 3px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---- Numbered steps (how it works) ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
}
.step .num {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 18px; margin-bottom: 16px;
  color: #041016; background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}
.step h3 { margin: 0 0 8px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- Reaction cues (safety strip) ---- */
.cues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.cue { border: 1px solid var(--border); border-radius: 14px; padding: 22px; background: var(--surface); }
.cue .swatch {
  width: 100%; height: 6px; border-radius: 999px; margin-bottom: 16px;
}
.cue.brake .swatch { background: #ef4444; box-shadow: 0 0 14px rgba(239, 68, 68, 0.7); }
.cue.turn  .swatch { background: var(--amber); box-shadow: 0 0 14px rgba(251, 191, 36, 0.7); }
.cue.honk  .swatch { background: linear-gradient(90deg, #ef4444, var(--amber), #ef4444); box-shadow: 0 0 14px rgba(239, 68, 68, 0.6); }
.cue h4 { margin: 0 0 6px; font-size: 17px; }
.cue p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---- Security list ---- */
.secure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; margin-top: 8px; }
.secure { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; }
.secure .lock { color: var(--green); font-size: 18px; margin-top: 2px; }
.secure h4 { margin: 0 0 3px; font-size: 16px; }
.secure p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---- Callout / band ---- */
.band {
  background: linear-gradient(90deg, rgba(34,211,238,0.09), rgba(232,121,249,0.09));
  border: 1px solid var(--border); border-radius: 20px; padding: 40px; text-align: center;
}
.band h2 { margin: 0 0 10px; font-size: clamp(24px, 3.6vw, 34px); }
.band p { color: var(--muted); margin: 0 0 24px; }

/* ---- Investor page bits ---- */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.pill { font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; }
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.phase { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.phase .when { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.phase h3 { margin: 8px 0 12px; font-size: 18px; }
.phase ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.phase li { margin-bottom: 6px; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.stat { border: 1px solid var(--border); border-radius: 14px; padding: 20px; background: var(--surface); }
.stat .big { font-size: 30px; font-weight: 700; background: linear-gradient(90deg, var(--cyan), var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.note { font-size: 12.5px; color: #6b7280; }

/* ---- Auth (utos sign-in) ---- */
.auth-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; vertical-align: middle;
  color: #041016; background: linear-gradient(90deg, var(--amber), #f59e0b);
  padding: 2px 9px; border-radius: 999px; margin-left: 6px;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
}
.cb-status { color: var(--muted); }
.cb-status.cb-error { color: #fca5a5; }
.cb-status.cb-ok { color: var(--green); }

/* ---- Sign-up modal ---- */
.modal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  color: var(--text);
  padding: 0;
  max-width: 430px;
  width: calc(100% - 40px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.modal::backdrop { background: rgba(4, 6, 10, 0.66); backdrop-filter: blur(3px); }
.signup-form { padding: 28px; display: grid; gap: 15px; }
.signup-form h2 { margin: 0; font-size: 23px; letter-spacing: -0.01em; }
.modal-intro { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.signup-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.signup-form .opt { color: var(--muted); font-weight: 400; }
.signup-form input {
  font: inherit; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
}
.signup-form input::placeholder { color: #5a6070; }
.signup-form input:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.signup-form input[aria-invalid="true"] { border-color: #ef4444; }
.field-err { color: #fca5a5; font-size: 12.5px; font-weight: 500; }
.field-err:empty { display: none; }
.form-status { margin: 2px 0 0; font-size: 14px; }
.form-status.err { color: #fca5a5; }
.form-status.ok { color: var(--green); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.modal-actions .btn { cursor: pointer; }

/* ---- Sign-up modal: selects + textareas match the inputs ---- */
.signup-form select,
.signup-form textarea {
  font: inherit; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  width: 100%; resize: vertical;
}
.signup-form textarea::placeholder { color: #5a6070; }
.signup-form select:focus,
.signup-form textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

/* ---- Even G2 HUD preview canvas (ops#143) ---- */
.even-hud-frame {
  display: flex; justify-content: center; margin: 20px 0;
  padding: 18px; border-radius: 16px;
  background: #000; border: 1px solid var(--border);
}
.even-hud-frame canvas { max-width: 100%; height: auto; image-rendering: pixelated; }

/* ---- Gate wall (members-only pages) ---- */
.gate-wall { display: grid; place-items: start center; min-height: 46vh; padding: 88px 24px 64px; }
.gate-box {
  max-width: 520px; text-align: center;
  border: 1px solid var(--border); border-radius: 20px; padding: 44px 36px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
.gate-title {
  font-size: clamp(26px, 4vw, 40px); line-height: 1.05; margin: 0 0 14px; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-msg { color: var(--muted); font-size: 16.5px; margin: 0 0 26px; }
.gate-actions { justify-content: center; }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 0 0 26px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border); cursor: default;
}
.store-badge[href] { color: var(--text); cursor: pointer; }
.store-badge[href]:hover { background: var(--surface-2); text-decoration: none; }
.auth-line { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 20px; font-size: 14px; color: var(--muted); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
/* ops#190: Developers/Partners/Investors/Municipalities moved here off the
   top nav (Tee). Same muted-link look as .nav-links, sized for footer text. */
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid.cols-3, .grid.cols-2, .features, .roadmap, .stat-row,
  .steps, .cues, .secure-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  /* ops#176 P1: this used to delete the whole nav with nothing to restore
     it -- .nav-links a:not(.cta) { display: none; }, unconditionally. Now
     scoped to the closed state; .nav-toggle (auth.js) opens it back up. */
  .nav-links:not(.open) a:not(.cta) { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(10, 11, 15, 0.97); border-bottom: 1px solid var(--border);
    padding: 8px 24px 18px;
  }
  .nav-links.open a:not(.cta) { display: block; padding: 12px 4px; }
  .nav-links.open .cta { align-self: flex-start; margin-top: 6px; }
  .hero { padding: 64px 0 48px; }
}

/* ---- Product pages: split hero + device mockups ---------------------------- */
.product-hero { padding: 72px 0 40px; }
.product-hero .split {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.product-hero .kicker { color: var(--cyan); }
.product-lead { color: var(--muted); font-size: 18px; max-width: 30em; margin-top: 16px; }
.device-stage {
  display: flex; justify-content: center; align-items: center; min-height: 520px;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(34,211,238,0.10), transparent 70%),
    radial-gradient(50% 50% at 70% 70%, rgba(232,121,249,0.10), transparent 70%);
  border-radius: 24px;
}
.device-caption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }

/* The recreated app HUD (shared by phone + watch) */
.hud { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.hud-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.gauge { position: relative; display: grid; place-items: center; margin: 4px auto; }
.ring {
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    var(--cyan), var(--magenta) 252deg, rgba(255,255,255,0.06) 252deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw)), #000 calc(100% - var(--rw) + 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw)), #000 calc(100% - var(--rw) + 1px));
  filter: drop-shadow(0 0 10px rgba(34,211,238,0.25));
}
.gauge-val { position: absolute; text-align: center; line-height: 1; }
.gauge-val .num { font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.gauge-val .unit { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.batt { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.batt > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #22d3ee); }
.cues { display: flex; gap: 8px; }
.cue {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  padding: 7px 0; border-radius: 9px; color: #0a0b0f;
}
.cue.brake { background: #f23545; color: #fff; }
.cue.lean  { background: #ffb020; }
.cue.horn  { background: #f2f7ff; }
.cue.off   { background: rgba(255,255,255,0.06); color: var(--muted); }
.hud-stats { display: flex; justify-content: space-between; text-align: center; }
.hud-stats > div { flex: 1; }
.hud-stats b { display: block; color: var(--text); font-size: 15px; font-weight: 800; }
.hud-stats small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }

/* iPhone */
.phone { position: relative; width: 268px; height: 552px; border-radius: 44px;
  background: #05060a; border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 0 8px #000; padding: 14px; }
.phone-island { position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 24px; background: #000; border-radius: 999px; z-index: 3; }
.phone-screen { width: 100%; height: 100%; border-radius: 32px; background: var(--bg);
  padding: 40px 20px 22px; overflow: hidden; }
.phone .ring { --rw: 15px; width: 174px; height: 174px; }
.phone .gauge-val .num { font-size: 52px; }
.phone .gauge-val .unit { font-size: 11px; margin-top: 4px; }

/* Apple Watch */
.watch { position: relative; width: 196px; height: 234px; border-radius: 52px;
  background: #05060a; border: 1px solid var(--border);
  box-shadow: 0 26px 70px rgba(0,0,0,0.6), inset 0 0 0 6px #0d0d10; padding: 20px 22px; }
.watch::before, .watch::after { content: ""; position: absolute; right: -5px; background: #1a1d24; border-radius: 3px; }
.watch::before { top: 78px; width: 6px; height: 34px; } /* crown */
.watch::after  { top: 122px; width: 5px; height: 26px; } /* side button */
.watch-screen { width: 100%; height: 100%; border-radius: 34px; background: var(--bg); padding: 14px; overflow: hidden; }
.watch .hud { gap: 9px; }
.watch .ring { --rw: 11px; width: 108px; height: 108px; }
.watch .gauge-val .num { font-size: 34px; }
.watch .gauge-val .unit { font-size: 8px; margin-top: 2px; }
.watch-mode { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cyan); }

/* Two-role duality band */
.roles { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center;
  margin-top: 26px; }
.role-arrow { color: var(--muted); font-size: 22px; text-align: center; }

@media (max-width: 820px) {
  .product-hero .split { grid-template-columns: 1fr; gap: 32px; }
  .device-stage { min-height: 440px; }
  .roles { grid-template-columns: 1fr; }
  .role-arrow { transform: rotate(90deg); }
}

/* ---- Coming-soon cover (auth-adaptive front door) ------------------------- */
.cs-cover {
  min-height: 90vh; display: flex; flex-direction: column; justify-content: center;
  padding: 72px 0 56px; position: relative; overflow: hidden;
}
.cs-cover::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 34%, rgba(34,211,238,0.13), transparent 70%),
    radial-gradient(52% 42% at 72% 76%, rgba(232,121,249,0.11), transparent 70%);
}
.cs-kicker { color: var(--cyan); text-transform: uppercase; letter-spacing: 0.22em; font-size: 13px; font-weight: 700; }
.cs-cover h1 { font-size: clamp(46px, 8.5vw, 96px); line-height: 1.02; letter-spacing: -0.02em; margin: 14px 0 0; text-wrap: balance; }
.cs-lead { font-size: 19px; color: var(--text); max-width: 30em; margin: 24px 0 0; }
.cs-muted { color: var(--muted); font-size: 15px; max-width: 34em; margin: 12px 0 0; }
.cs-hook { font-size: 18px; color: var(--text); font-style: italic; margin: 26px 0 0; max-width: 30em; }
.cs-band { margin-top: 30px; max-width: 42em; }
.cs-band .eyebrow { color: var(--magenta); }
.cs-band h2 { font-size: 26px; margin: 6px 0 10px; }
.cs-band p { color: var(--muted); font-size: 16px; }
.cs-band .btn-row { margin-top: 18px; }
/* auth-adaptive: anon sees ONLY the coming-soon cover; signed-in unlocks the site */
.member-only { display: none; }
:root[data-signed-in] .member-only { display: block; }
:root[data-signed-in] .anon-only { display: none; }
/* nav scope links flow inline in the flex nav when revealed to members */
:root[data-signed-in] .nav-scope { display: contents; }

/* Install CTAs are dev/admin-only. Hidden until auth.js confirms a dev session
   (sets data-install-ok on <html> after a server-verified /api/me check). This
   force-hides for signed-out visitors, signed-in non-devs, and before JS runs —
   so anonymous users never see the app-download affordance (they get the stores). */
html:not([data-install-ok]) [data-install-gate] { display: none !important; }
