/* ============================================================
   STARTVEX — Landing Page
   ============================================================ */

:root {
  --bg:        #060708;
  --surface:   #0E1013;
  --surface-2: #14171C;
  --text:      #F4F4F0;
  --text-2:    #D6D6D0;
  --muted:     #82847F;
  --blue:      #5AA8FF;
  --green:     #9EF3D1;
  --amber:     #F5C46C;
  --red:       #FF6B6B;
  --border:    rgba(255,255,255,0.06);
  --border-2:  rgba(255,255,255,0.12);

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

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

::selection { background: rgba(90,168,255,0.3); color: #fff; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

.section-pad { padding-block: clamp(72px, 11vw, 140px); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }

.display {
  font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 700; text-wrap: balance; }
.h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 600; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text-2); line-height: 1.5; text-wrap: pretty; }

.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }

/* eyebrow / kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.kicker .idx { color: var(--blue); }
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1;
  padding: 15px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--blue);
  color: #04121f;
  box-shadow: 0 0 0 0 rgba(90,168,255,0);
}
.btn-primary:hover { background: #76b8ff; box-shadow: 0 10px 34px -10px rgba(90,168,255,0.55); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.03); }

.btn-lg { padding: 18px 32px; font-size: 16.5px; border-radius: 13px; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6,7,8,0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-img { height: 34px; width: auto; display: block; flex: none; }
.brand .mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  position: relative;
  flex: none;
}
.brand .mark::after {
  content: "";
  position: absolute; inset: 5px;
  background: var(--bg);
  border-radius: 3px;
  clip-path: polygon(55% 0, 100% 0, 45% 100%, 0 100%);
}
.nav-links {
  display: flex;
  gap: 34px;
  font-size: 15px;
  color: var(--text-2);
}
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(130px, 17vw, 200px);
  padding-bottom: clamp(40px, 6vw, 80px);
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -240px; left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 120vw);
  height: 720px;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
              rgba(90,168,255,0.16), rgba(158,243,209,0.06) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 30px;
}
.hero-badge .live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(158,243,209,0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(158,243,209,0.45); }
  70% { box-shadow: 0 0 0 8px rgba(158,243,209,0); }
  100% { box-shadow: 0 0 0 0 rgba(158,243,209,0); }
}
@media (prefers-reduced-motion: reduce) { .hero-badge .live { animation: none; } }

.hero h1 { margin-bottom: 24px; }
.hero h1 .accent { color: var(--blue); }
.hero .lead { max-width: 620px; margin: 0 auto 38px; }

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 80px);
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat .num.b { color: var(--blue); }
.stat .num.g { color: var(--green); }
.stat .lbl { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Hero mockup ---------- */
.hero-mock {
  position: relative;
  z-index: 1;
  margin: clamp(56px, 8vw, 90px) auto 0;
  max-width: 980px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20,23,28,0.9), rgba(14,16,19,0.9));
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.8);
  overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.mock-bar .dots { display: flex; gap: 7px; }
.mock-bar .dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.mock-bar .url {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  margin-left: 12px;
}
.mock-body { display: grid; grid-template-columns: 200px 1fr; min-height: 320px; }
.mock-side { border-right: 1px solid var(--border); padding: 18px 16px; display: flex; flex-direction: column; gap: 9px; }
.mock-side .si { height: 30px; border-radius: 8px; display: flex; align-items: center; gap: 9px; padding: 0 11px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.mock-side .si.active { background: rgba(90,168,255,0.1); color: var(--blue); }
.mock-side .si .ic { width: 6px; height: 6px; border-radius: 2px; background: currentColor; flex:none; }
.mock-main { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.mock-kpi { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: rgba(255,255,255,0.015); }
.mock-kpi .k-l { font-size: 11px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.mock-kpi .k-v { font-family: var(--font-mono); font-size: 22px; margin-top: 8px; font-weight: 600; }
.mock-chart { border: 1px solid var(--border); border-radius: 12px; padding: 18px; flex: 1; display: flex; align-items: flex-end; gap: 8px; min-height: 150px; background: rgba(255,255,255,0.015); }
.mock-chart .bar { flex: 1; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, rgba(90,168,255,0.85), rgba(90,168,255,0.18)); }
.mock-chart .bar:nth-child(3n) { background: linear-gradient(180deg, rgba(158,243,209,0.8), rgba(158,243,209,0.15)); }

/* ---------- Generic card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .22s ease, transform .22s ease, background .22s ease;
}
.card:hover { border-color: var(--border-2); transform: translateY(-3px); background: var(--surface-2); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* icon chip */
.ic-chip {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  margin-bottom: 20px;
}
.ic-chip svg { width: 22px; height: 22px; }
.ic-chip.blue { color: var(--blue); border-color: rgba(90,168,255,0.3); background: rgba(90,168,255,0.08); }
.ic-chip.green { color: var(--green); border-color: rgba(158,243,209,0.3); background: rgba(158,243,209,0.08); }
.ic-chip.amber { color: var(--amber); border-color: rgba(245,196,108,0.3); background: rgba(245,196,108,0.08); }
.ic-chip.red { color: var(--red); border-color: rgba(255,107,107,0.3); background: rgba(255,107,107,0.08); }

.card h3 { margin-bottom: 9px; }
.card p { color: var(--text-2); font-size: 15.5px; line-height: 1.5; }

/* ---------- Problema ---------- */
.problema { border-top: 1px solid var(--border); background: linear-gradient(180deg, #050506, var(--bg)); }
.prob-card { display: flex; flex-direction: column; gap: 14px; }
.prob-card .pnum { font-family: var(--font-mono); font-size: 13px; color: var(--red); }
.prob-card h3 { font-size: 1.25rem; }
.transition-line {
  margin-top: clamp(44px, 6vw, 72px);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.transition-line .em { color: var(--blue); }

/* ---------- Passos ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.steps::before {
  content: "";
  position: absolute;
  top: 27px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-2) 12%, var(--border-2) 88%, transparent);
  z-index: 0;
}
.step { position: relative; z-index: 1; }
.step .snum {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 600;
  color: var(--blue);
  background: var(--bg);
  border: 1px solid rgba(90,168,255,0.4);
  margin-bottom: 22px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 15.5px; }
.step .cost { font-family: var(--font-mono); font-size: 13px; color: var(--green); margin-top: 10px; }

/* ---------- Perfis ---------- */
.profile-card .role { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; }

/* ---------- Modelo económico ---------- */
.model { border-top: 1px solid var(--border); }
.flow {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  justify-content: center;
  max-width: 920px;
  margin-inline: auto;
}
.flow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--border-2) 0%, var(--blue) 100%);
  z-index: 0;
}
.flow-node {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 22px 18px;
  background: var(--surface);
  text-align: center;
}
.flow-node .fn-l { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.flow-node .fn-v { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-top: 6px; }
.flow-node.accent { border-color: rgba(90,168,255,0.45); background: rgba(90,168,255,0.07); box-shadow: 0 0 0 1px rgba(90,168,255,0.2), 0 14px 40px -16px rgba(90,168,255,0.35); }
.flow-arrow {
  position: relative;
  z-index: 1;
  flex: none;
  align-self: center;
  width: 38px;
  height: 38px;
  margin: 0 -6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-2);
  color: var(--blue);
  font-size: 16px;
}
.flow-dests { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.dest {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 13px 16px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.dest .pct { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-left: auto; }
.dest.d-blue  { border-left-color: var(--blue); }
.dest.d-green { border-left-color: var(--green); }
.dest.d-amber { border-left-color: var(--amber); }
.dest.d-red   { border-left-color: var(--red); }
.model-note { text-align: center; margin-top: clamp(36px,5vw,56px); font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem,2.4vw,1.7rem); letter-spacing:-0.02em; text-wrap:balance; }

/* ---------- Planos ---------- */
.plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; align-items: stretch; }
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex; flex-direction: column;
  transition: border-color .22s ease, transform .22s ease;
}
.plan:hover { transform: translateY(-3px); border-color: var(--border-2); }
.plan.featured { border-color: rgba(90,168,255,0.45); background: linear-gradient(180deg, rgba(90,168,255,0.06), var(--surface)); position: relative; }
.plan .tag { position: absolute; top: -11px; left: 30px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #04121f; background: var(--blue); padding: 4px 11px; border-radius: 100px; }
.plan .p-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.plan .p-price { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 600; margin: 14px 0 2px; letter-spacing: -0.02em; }
.plan .p-price .per { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.plan .p-desc { color: var(--text-2); font-size: 14.5px; min-height: 42px; }
.plan ul { list-style: none; margin: 24px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.plan li { display: flex; gap: 11px; font-size: 15px; color: var(--text-2); align-items: flex-start; }
.plan li .ck { color: var(--green); flex: none; margin-top: 2px; }
.plan .btn { width: 100%; }

/* ---------- Números ---------- */
.metrics { border-top: 1px solid var(--border); }
.metrics-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.metric { background: var(--bg); padding: 34px 26px; }
.metric .m-num { font-family: var(--font-mono); font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; }
.metric:nth-child(1) .m-num { color: var(--blue); }
.metric:nth-child(2) .m-num { color: var(--green); }
.metric:nth-child(3) .m-num { color: var(--text); }
.metric:nth-child(4) .m-num { color: var(--amber); }
.metric .m-lbl { font-size: 14.5px; color: var(--text-2); margin-top: 10px; line-height: 1.4; }
.metrics-foot { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-top: 22px; text-align: center; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: none; border: none; cursor: pointer;
  text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: var(--text);
  padding: 26px 4px;
}
.faq-q .pm { position: relative; width: 18px; height: 18px; flex: none; transition: transform .25s ease; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; }
.faq-q .pm::before { left: 0; top: 8px; width: 18px; height: 2px; }
.faq-q .pm::after { top: 0; left: 8px; width: 2px; height: 18px; transition: transform .25s ease; }
.faq-item.open .pm::after { transform: scaleY(0); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.faq-a p { color: var(--text-2); font-size: 15.5px; padding: 0 4px 26px; max-width: 660px; }

/* ---------- CTA final ---------- */
.cta-final { border-top: 1px solid var(--border); }
.cta-box {
  position: relative;
  border: 1px solid var(--border-2);
  border-radius: 24px;
  padding: clamp(48px, 8vw, 88px) var(--gutter);
  text-align: center;
  overflow: hidden;
  background: var(--surface);
}
.cta-box .glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 90% at 50% 120%, rgba(90,168,255,0.22), rgba(158,243,209,0.08) 45%, transparent 70%);
  pointer-events: none;
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 { margin-bottom: 18px; }
.cta-box .lead { max-width: 540px; margin: 0 auto 34px; }
.cta-box .sub { font-family: var(--font-mono); font-size: 13.5px; color: var(--green); margin-top: 20px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: clamp(56px, 7vw, 80px) 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 16px; }
.footer .f-tag { color: var(--muted); font-size: 14.5px; max-width: 280px; margin-bottom: 22px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; display: grid; place-items: center; color: var(--text-2); transition: border-color .15s, color .15s; }
.socials a:hover { border-color: var(--border-2); color: var(--text); }
.socials svg { width: 17px; height: 17px; }
.f-col h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.f-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.f-col a { color: var(--text-2); font-size: 14.5px; transition: color .15s; }
.f-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: clamp(48px,6vw,72px); padding-top: 28px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); font-family: var(--font-mono); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid .f-brand { grid-column: 1 / -1; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .grid-3, .grid-4, .plans, .steps, .flow-dests { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .flow { flex-direction: column; max-width: 360px; }
  .flow::before { display: none; }
  .flow-node, .flow-dests { width: 100%; }
  .flow-arrow { transform: rotate(90deg); margin: -6px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Auth modal ---------- */
.auth-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,5,6,0.78); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.auth-overlay.open { display: flex; animation: authfade .25s ease; }
@keyframes authfade { from { opacity: 0; } to { opacity: 1; } }
.auth-modal {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 20px; padding: 32px;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,0.8);
  animation: authpop .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes authpop { from { transform: translateY(14px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.auth-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border-radius: 8px; border: 1px solid var(--border-2); background: none;
  color: var(--text-2); font-size: 15px; cursor: pointer; transition: border-color .15s, color .15s;
}
.auth-close:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }
.auth-brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -0.02em; margin-bottom: 22px; }
.auth-mark { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, var(--blue), var(--green)); }
.auth-logo { height: 24px; width: auto; display: block; }

.auth-tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 4px; margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 9px 0; border-radius: 8px; border: none; background: none; color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.auth-tab.active { background: var(--surface-2); color: var(--text); }

.auth-form { display: none; flex-direction: column; }
.auth-form.active { display: flex; }
.auth-title { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 6px 0 22px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.auth-field span { font-size: 13px; font-weight: 600; }
.auth-field input { background: var(--bg); border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; color: var(--text); font-family: var(--font-body); font-size: 14.5px; outline: none; transition: border-color .15s; }
.auth-field input:focus { border-color: var(--blue); }
.auth-field input::placeholder { color: var(--muted); }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 18px; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.auth-check input { accent-color: var(--blue); }
.auth-terms { margin-bottom: 18px; }
.auth-link { font-size: 13px; color: var(--blue); }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #04121f; font-family: var(--font-body); font-weight: 600; font-size: 15px; padding: 14px; border-radius: 11px; transition: background .15s, transform .15s; }
.auth-submit:hover { background: #76b8ff; transform: translateY(-1px); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-oauth { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--border-2); border-radius: 11px; padding: 13px; font-size: 14.5px; font-weight: 500; color: var(--text); transition: border-color .15s, background .15s; }
.auth-oauth:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.03); }
.auth-oauth .oa-ic { color: var(--blue); font-size: 16px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-switch { background: none; border: none; color: var(--blue); font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
