/* Melopra marketing site. Brand system ported from docs/design-brief-stitch.md
   Dark, flat, studio-feel. Teal (#29fcf3) is the single accent on navy (#0b1326). */

:root {
  /* Surfaces */
  --bg: #0b1326;
  --surface-low: #141d31;
  --surface: #19233c;
  --surface-high: #232e45;
  --surface-highest: #2e3851;
  /* Text */
  --on-surface: #dae2fd;
  --muted: #c6c6cc;
  --faint: #909096;
  /* Lines */
  --hairline: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.13);
  /* Brand */
  --brand: #29fcf3;
  --on-brand: #003735;
  --brand-tint: rgba(41, 252, 243, 0.10);
  --brand-badge: rgba(41, 252, 243, 0.18);
  /* Reserved state colours (used only for the state-machine visual) */
  --state-not-started: #373a3b;
  --state-working: #3b82f6;
  --state-verify: #8b5cf6;
  --state-solid: #10b981;
  --state-secure: #40f0a8; /* brighter shade of solid — the graduated "Secure" node */
  --ladder: var(--brand);  /* the maintenance-ladder steps in the journey visual */
  /* Fonts */
  --font-head: 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* Radius */
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;
  --gutter: 20px;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

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

/* ── Typography ── */
h1, h2, h3, .wordmark { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-weight: 700; font-size: clamp(38px, 6vw, 60px); }
h2 { font-weight: 600; font-size: clamp(26px, 4vw, 34px); }
h3 { font-weight: 600; font-size: 20px; }
.eyebrow { font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ── Nav ── */
header.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 19, 38, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-weight: 700; font-size: 22px; color: var(--brand); letter-spacing: -0.03em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--on-surface); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: var(--r-lg);
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--on-surface); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ── Sections ── */
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { margin: 12px 0; }

/* ── Hero ── */
.hero { padding-top: clamp(56px, 10vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% 0 auto 50%; transform: translateX(-50%);
  width: 780px; height: 780px; border-radius: 50%;
  background: radial-gradient(circle, rgba(41,252,243,0.10), transparent 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { margin: 18px 0; max-width: 16ch; }
.hero .lead { max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* ── Spacing-journey visual (brand hero) ── */
.journey {
  margin-top: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px clamp(16px, 3vw, 32px) 20px;
}
/* Scrolls on narrow screens so the labels stay readable; fits fully on desktop. */
.journey-scroll { overflow-x: auto; overflow-y: hidden; margin: 0 -8px; padding: 0 8px 4px; }
.journey svg { display: block; width: 100%; min-width: 720px; height: auto; overflow: visible; }
.jrail { stroke: var(--border); stroke-width: 2; }
.jrail-rest { stroke-dasharray: 3 6; }
.jseg-line { stroke: var(--hairline); stroke-width: 1; }
.jseg-label {
  fill: var(--faint); font-family: var(--font-body); font-weight: 600;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; text-anchor: middle;
}
.jrest {
  fill: var(--faint); font-family: var(--font-body); font-size: 11px;
  letter-spacing: 0.04em; text-anchor: middle;
}
.jnode { fill: var(--muted); font-family: var(--font-body); font-size: 13px; text-anchor: middle; }
.jnode-milestone { fill: var(--on-surface); font-family: var(--font-head); font-weight: 600; }
.jsub { fill: var(--faint); font-family: var(--font-body); font-size: 11px; font-style: italic; text-anchor: middle; }
.jsecure-ring { fill: none; stroke: var(--state-secure); stroke-width: 1.5; opacity: 0.5; }
.journey-cap { margin-top: 16px; font-size: 14px; color: var(--muted); max-width: 60ch; }
.journey-cap strong { color: var(--on-surface); font-weight: 600; }

/* ── Cards / grids ── */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--muted); }
.card .kicker { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.card .science { display: block; margin-top: 14px; font-size: 13px; color: var(--faint); font-style: italic; }

/* ── How it works (numbered) ── */
.steps { counter-reset: step; }
.step { display: flex; gap: 20px; padding: 22px 0; border-top: 1px solid var(--hairline); }
.step:first-child { border-top: none; }
.step-num {
  counter-increment: step; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--brand); color: var(--brand);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 600;
}
.step-num::before { content: counter(step); }
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 15px; }

/* ── Quote / credibility ── */
.credit { background: var(--surface-low); border: 1px solid var(--border); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 48px); }
.credit .book { font-family: var(--font-head); font-weight: 600; font-size: clamp(20px, 3vw, 26px); font-style: italic; }
.credit p { color: var(--muted); margin-top: 14px; max-width: 60ch; }

/* ── CTA band ── */
.cta-band { text-align: center; }
.cta-band .card { padding: clamp(36px, 6vw, 64px); background: var(--surface); }
.cta-band h2 { margin-bottom: 12px; }
.cta-band .hero-cta { justify-content: center; }

/* ── Footer ── */
footer { border-top: 1px solid var(--hairline); padding: 48px 0; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.foot-col h4 { font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.foot-col a { display: block; font-size: 14px; color: var(--muted); padding: 4px 0; }
.foot-col a:hover { color: var(--on-surface); }
.foot-legal { font-size: 13px; color: var(--faint); margin-top: 28px; }
