/* ==========================================================================
   Writrex — site stylesheet
   Design tokens first, then base, layout, components, animation.
   Every colour, size and radius used on the site comes from a token below.
   ========================================================================== */

:root {
  /* Colour */
  --bg: #080d1a;
  --bg-2: #0b1322;
  --surface: #0f1829;
  --surface-2: #131f35;
  --line: #1e2d45;
  --line-2: #2a3d55;
  --text: #f0f4ff;
  --muted: #8899aa;
  --dim: #5d6f85;
  --mint: #00e5a0;
  --mint-ink: #003d2b;
  --mint-soft: rgba(0, 229, 160, 0.08);
  --mint-line: rgba(0, 229, 160, 0.35);
  --blue: #5b9dff;
  --amber: #ffb454;
  --red: #e24b4a;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape + rhythm */
  --radius: 8px;
  --radius-lg: 12px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(60px, 8vw, 104px);
  --max: 1200px;
  --max-narrow: 860px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd, pre { font-family: var(--font-mono); }
::selection { background: var(--mint); color: var(--mint-ink); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--mint); color: var(--mint-ink); padding: 8px 14px; border-radius: 6px; z-index: 200; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* Blueprint grid behind everything (very faint) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(136, 153, 170, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(136, 153, 170, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

/* Reading progress — a single mint line drawn as you scroll */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 120; transform-origin: 0 50%; transform: scaleX(0); background: var(--mint); box-shadow: 0 0 12px var(--mint-line); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--max-narrow); }
.section { padding-block: var(--section-y); position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(11, 19, 34, 0.7) 12%, rgba(11, 19, 34, 0.7) 88%, transparent); }
.center { text-align: center; margin-inline: auto; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
}
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Type ---------- */
.eyebrow { display: block; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 20px; }
.eyebrow.mint { color: var(--mint); }
.h-display { font-size: clamp(42px, 7vw, 72px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; }
.h-page { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.h-section { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
.h-card { font-size: 19px; }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); line-height: 1.6; max-width: 640px; }
.center .lede, .lede.center { margin-inline: auto; }
.mint { color: var(--mint); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }

/* Headline accent gets a hand-drawn measurement underline */
.accent { color: var(--mint); position: relative; white-space: nowrap; }
.accent .u { position: absolute; left: 0; bottom: -0.16em; width: 100%; height: 0.18em; overflow: visible; }
.accent .u path { stroke: var(--mint); stroke-width: 2; fill: none; stroke-linecap: round; }

/* Technical caption: FIG. 01 — LABEL */
.fig-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 10px; }
.fig-label b { color: var(--mint); font-weight: 500; }
.fig-label::after { content: ""; flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 4px, transparent 4px 8px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(8, 13, 26, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(30, 45, 69, 0.7); }
.site-header .bar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 14px; color: var(--muted); transition: color 0.2s; position: relative; padding-block: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--mint-ink); }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--mint); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.35s var(--ease); }
.nav a[aria-current="page"]::after, .nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 42px; height: 42px; cursor: pointer; }
.nav-toggle svg { margin: auto; }
@media (max-width: 1000px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav { position: fixed; inset: 64px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 24px; max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
  .nav.open { max-height: calc(100vh - 64px); overflow: auto; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav a.btn { margin-top: 16px; text-align: center; border: 0; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 700; font-size: 15px; padding: 14px 28px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s; position: relative; }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--mint); color: var(--mint-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--mint-line); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); font-weight: 600; }
.btn-ghost:hover { color: var(--text); border-color: var(--mint-line); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row, .btn-row.center { justify-content: center; }

/* ---------- Cards with drawn corner brackets ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; transition: border-color 0.3s, transform 0.4s var(--ease), background 0.3s; }
.card::before, .card::after { content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid var(--mint); opacity: 0; transition: opacity 0.3s, width 0.45s var(--ease), height 0.45s var(--ease); pointer-events: none; }
.card::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: var(--radius-lg); }
.card::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: var(--radius-lg); }
a.card:hover, .card.hoverable:hover { border-color: var(--line-2); transform: translateY(-3px); background: var(--surface-2); }
a.card:hover::before, a.card:hover::after, .card.hoverable:hover::before, .card.hoverable:hover::after { opacity: 1; width: 44px; height: 44px; }
.card p { color: var(--muted); font-size: 15px; margin-top: 10px; }
.card h3 + p { margin-top: 10px; }
.card .more { display: inline-flex; margin-top: 18px; color: var(--mint); font-size: 14px; font-weight: 600; gap: 8px; }
.card-flat { background: transparent; }
.card-mint { border-color: var(--mint-line); background: linear-gradient(180deg, var(--mint-soft), transparent 60%), var(--surface); }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mint); margin-bottom: 14px; }

/* Icon plates: line icons that draw themselves in */
.icon { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); display: grid; place-items: center; margin-bottom: 18px; color: var(--mint); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Plan badges ---------- */
.plan { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.plan.free { color: var(--mint); border-color: var(--mint-line); background: var(--mint-soft); }
.plan.starter { color: var(--blue); border-color: rgba(91, 157, 255, 0.4); }
.plan.professional { color: var(--amber); border-color: rgba(255, 180, 84, 0.4); }
.plan.agency { color: #d6a3ff; border-color: rgba(214, 163, 255, 0.4); }
.plan.new { color: var(--mint-ink); background: var(--mint); border-color: var(--mint); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(72px, 11vw, 150px) var(--gutter) clamp(48px, 8vw, 100px); overflow: hidden; text-align: center; --mx: 50%; --my: 50%; }
.hero .inner { position: relative; z-index: 2; max-width: 980px; margin-inline: auto; }
.hero .lede { margin: 26px auto 44px; }
.hero-note { color: var(--muted); font-size: 13px; margin-top: 22px; }
.hero-draw { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-draw svg { width: 100%; height: 100%; }
.hero-draw .g { fill: none; stroke: var(--line-2); stroke-width: 1; }
.hero-draw .m { fill: none; stroke: var(--mint); stroke-width: 1; opacity: 0.55; }

/* Product mock (browser frame) */
.browser { border: 1px solid var(--line); border-top: 1px solid var(--mint); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); text-align: left; box-shadow: 0 40px 100px -40px rgba(0, 229, 160, 0.18); }
.browser .top { display: flex; align-items: center; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.browser .dots { display: flex; gap: 8px; }
.browser .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser .title { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.browser .body { display: grid; grid-template-columns: 190px 1fr; min-height: 380px; }
.browser aside { border-right: 1px solid var(--line); background: var(--bg-2); padding: 14px 0; }
.browser aside div { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; color: var(--muted); border-left: 2px solid transparent; }
.browser aside div.on { color: var(--text); border-color: var(--mint); background: var(--mint-soft); }
.browser aside svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.browser .main { padding: 22px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.kpi .k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 6px; }
.kpi .v.mint { color: var(--mint); }
.gen-row { margin-top: 16px; display: flex; gap: 10px; }
.gen-row .field { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; font-size: 13.5px; color: var(--text); display: flex; align-items: center; }
.gen-row .go { background: var(--mint); color: var(--mint-ink); font-weight: 700; font-size: 13px; padding: 11px 20px; border-radius: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pills span { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.pills span.on { color: var(--mint); border-color: var(--mint-line); background: var(--mint-soft); }
.gate { margin-top: 16px; background: var(--bg); border: 1px solid var(--mint-line); border-radius: 8px; padding: 14px 16px; }
.gate .row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.bar-track { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar-fill { height: 100%; background: var(--mint); width: 0; border-radius: 6px; transition: width 1.6s var(--ease); }
.in .bar-fill, .bar-fill.on { width: var(--w, 91%); }
.browser .main { min-width: 0; }
@media (max-width: 760px) { .browser .body { grid-template-columns: minmax(0, 1fr); } .browser aside { display: none; } .browser .main { padding: 16px; } .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .kpi { padding: 10px; } .kpi .k { font-size: 9px; letter-spacing: 0.08em; } .kpi .v { font-size: 17px; } .gen-row { flex-wrap: wrap; } .gen-row .field { flex: 1 1 100%; } .gen-row .go { flex: 1 1 100%; text-align: center; } }

/* ---------- Logo marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 48px; width: max-content; }
.js .marquee .track { animation: slide 46s linear infinite; }
.js .marquee:hover .track { animation-play-state: paused; }
.marquee span { font-size: 14px; color: var(--muted); white-space: nowrap; font-weight: 500; display: inline-flex; align-items: center; gap: 10px; }
.marquee span i { font-style: normal; font-size: 10px; color: var(--mint); font-family: var(--font-mono); border: 1px solid var(--mint-line); border-radius: 4px; padding: 1px 6px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Figures (line diagrams that draw themselves) ---------- */
.fig { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(15, 24, 41, 0.9), rgba(11, 19, 34, 0.9)); padding: 22px 22px 14px; overflow: hidden; }
.fig::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(136, 153, 170, 0.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(136, 153, 170, 0.06) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.fig > * { position: relative; }
.fig svg { width: 100%; height: auto; overflow: visible; }
.fig .cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--dim); margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* Shape styles used inside figures */
.fig .s, .hero-draw .s { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.fig .a { fill: none; stroke: var(--mint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fig .b { fill: none; stroke: var(--blue); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fig .w { fill: none; stroke: var(--amber); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fig .r { fill: none; stroke: var(--red); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fig .dash { stroke-dasharray: 5 5; }
.fig .fill-a { fill: var(--mint-soft); stroke: var(--mint); stroke-width: 1.4; }
.fig .fill-s { fill: rgba(19, 31, 53, 0.8); stroke: var(--line-2); stroke-width: 1.2; }
.fig text { font-family: var(--font-mono); font-size: 10.5px; fill: var(--muted); letter-spacing: 0.04em; }
.fig text.t-a { fill: var(--mint); }
.fig text.t-w { fill: var(--amber); }
.fig text.t-r { fill: var(--red); }
.fig text.t-b { fill: var(--blue); }
.fig text.t-l { font-size: 12.5px; fill: var(--text); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
.fig .node { fill: var(--bg); stroke: var(--mint); stroke-width: 1.6; }
.fig .pkt { fill: var(--mint); }

/* Draw-on-reveal engine: JS sets --len on every shape */
.js .fig .s, .js .fig .a, .js .fig .b, .js .fig .w, .js .fig .r, .js .fig .fill-a, .js .fig .fill-s,
.js .hero-draw .s, .js .hero-draw .g, .js .hero-draw .m, .js .accent .u path, .js .dim path, .js .dim line {
  stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000);
  transition: stroke-dashoffset 1.5s var(--ease) var(--d, 0s);
}
.js .fig .dash { stroke-dasharray: 5 5; stroke-dashoffset: 0; opacity: 0; transition: opacity 0.8s var(--d, 0.6s); }
.js .fig .fill-a, .js .fig .fill-s { fill-opacity: 0; transition: stroke-dashoffset 1.5s var(--ease) var(--d, 0s), fill-opacity 0.9s ease calc(var(--d, 0s) + 0.9s); }
.js .fig text, .js .fig .node, .js .fig .pkt { opacity: 0; transition: opacity 0.7s ease calc(var(--d, 0s) + 0.5s); }
.js .drawn .s, .js .drawn .a, .js .drawn .b, .js .drawn .w, .js .drawn .r, .js .drawn .fill-a, .js .drawn .fill-s,
.js .hero-draw.drawn .s, .js .hero-draw.drawn .g, .js .hero-draw.drawn .m, .js .drawn .accent .u path, .js .accent.drawn .u path, .js .dim.drawn path, .js .dim.drawn line { stroke-dashoffset: 0; }
.js .drawn .dash { opacity: 1; }
.js .drawn .fill-a, .js .drawn .fill-s { fill-opacity: 1; }
.js .drawn text, .js .drawn .node, .js .drawn .pkt { opacity: 1; }
/* Icons draw when their card reveals */
.js .icon svg * { stroke-dasharray: var(--len, 60); stroke-dashoffset: var(--len, 60); transition: stroke-dashoffset 1.1s var(--ease) var(--d, 0.15s); }
.js .in .icon svg *, .js .icon.in svg * { stroke-dashoffset: 0; }

/* Dimension-line divider:  |———— LABEL ————| */
.dim { display: flex; align-items: center; gap: 14px; margin-block: 0 44px; color: var(--dim); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.dim svg { flex: 1; height: 12px; }
.dim svg path, .dim svg line { stroke: var(--line-2); stroke-width: 1; fill: none; }
.dim span b { color: var(--mint); font-weight: 500; }

/* Animated packet along a flow line (SMIL in markup); scroll-linked path */
.flow { stroke-dasharray: 2 7; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -18; } }
.scan { animation: scan 5s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(var(--scan, 200px)); } }
.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.blink::after { content: "▍"; color: var(--mint); animation: pulse 1s steps(2) infinite; margin-left: 2px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Pipeline ---------- */
.pipe { position: relative; }
.pipe-svg { width: 100%; height: auto; }
.pipe-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: -8px; }
.pipe-step { text-align: center; padding: 0 6px; }
.pipe-step .n { font-family: var(--font-mono); font-size: 12px; color: var(--mint); letter-spacing: 0.1em; }
.pipe-step h3 { font-size: 16px; margin-top: 8px; }
.pipe-step p { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) { .pipe-svg { display: none; } .pipe-steps { grid-template-columns: 1fr; margin: 0; } .pipe-step { text-align: left; border-left: 1px solid var(--mint-line); padding: 6px 0 6px 18px; } }

.pl-line { fill: none; stroke: var(--line-2); stroke-width: 1.4; stroke-dasharray: 4 6; }
.pl-draw { fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; }
.pl-node { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.6; transition: stroke 0.4s, fill 0.4s; }
.pl-node.on { stroke: var(--mint); fill: var(--mint-soft); }
.pl-ico { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.4s; }
.pl-node.on ~ .pl-ico { stroke: var(--mint); }
.pl-ring { fill: none; stroke: var(--mint); stroke-width: 1; opacity: 0; }
.pl-node.on ~ .pl-ring { opacity: 0.5; animation: ring 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { transform: scale(1); opacity: 0.5; } to { transform: scale(1.7); opacity: 0; } }
.pipe-step { transition: opacity 0.5s; }

/* Terminal-style in/out panels */
.term { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); overflow: hidden; }
.term .head { display: flex; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; }
.term ul { padding: 18px 20px; display: grid; gap: 12px; }
.term li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text); }
.term li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; stroke: var(--mint); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.term.no li { color: var(--muted); }
.term.no li svg { stroke: var(--red); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { padding: 30px 24px; text-align: center; border-right: 1px solid var(--line); background: var(--surface); }
.stat:last-child { border-right: 0; }
.stat .num { font-size: clamp(32px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; color: var(--mint); }
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 6px; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- Lists ---------- */
.checks { display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; color: var(--text); font-size: 15px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e5a0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); border: 1px solid var(--mint-line); border-radius: 50%; }
.checks.no li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e24b4a' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); border-color: rgba(226, 75, 74, 0.4); }
.checks.muted li { color: var(--muted); }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan-card { display: flex; flex-direction: column; }
.plan-card .name { min-height: 26px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-card .name h3 { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.plan-card .price { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; margin-top: 14px; }
.plan-card .price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan-card .sites { color: var(--mint); font-size: 14px; font-weight: 600; margin-top: 4px; }
.plan-card .blurb { color: var(--muted); font-size: 14px; margin: 12px 0 20px; min-height: 42px; }
.plan-card .checks { margin-bottom: 26px; flex: 1; align-content: start; }
.plan-card .checks li { font-size: 14px; }
.plan-card.pop { border-color: var(--mint-line); background: linear-gradient(180deg, var(--mint-soft), transparent 50%), var(--surface); }
/* Agency Pro: full-width card under the three plans */
.plan-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: clamp(24px, 4vw, 56px); align-items: center; }
.plan-wide .pw-main .blurb { min-height: 0; margin: 12px 0 0; }
.plan-wide .checks { margin: 0; flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.plan-wide .btn { white-space: nowrap; }
@media (max-width: 980px) { .plans { grid-template-columns: 1fr; } .plan-wide { grid-template-columns: 1fr; gap: 22px; } .plan-wide .checks { grid-template-columns: 1fr; } .plan-wide .btn { justify-self: start; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { position: sticky; top: 0; background: var(--bg-2); color: var(--muted); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(19, 31, 53, 0.5); }
td.c, th.c { text-align: center; white-space: nowrap; }
tr.grp td { background: var(--bg-2); color: var(--mint); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding-block: 10px; }
.y { color: var(--mint); font-weight: 700; }
.n { color: var(--dim); }
.matrix td:first-child { color: var(--text); min-width: 260px; }
.matrix td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--mint-line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mint); font-size: 22px; font-weight: 400; transition: transform 0.3s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 22px 20px; color: var(--muted); font-size: 15px; max-width: 760px; }
.faq .ans a { color: var(--mint); }

/* ---------- Quote + CTA ---------- */
.quote { border-left: 2px solid var(--mint); padding: 6px 0 6px 24px; font-size: clamp(19px, 2.4vw, 24px); font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; }
.quote cite { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 12px; font-weight: 400; }
.cta-band { border: 1px solid var(--mint-line); border-radius: 16px; padding: clamp(40px, 6vw, 72px) var(--gutter); text-align: center; background: radial-gradient(ellipse 60% 100% at 50% 0%, var(--mint-soft), transparent 70%), var(--surface); position: relative; overflow: hidden; }
.cta-band .lede { margin: 18px auto 32px; }

/* ---------- Callouts ---------- */
.callout { border: 1px solid var(--line-2); border-left: 3px solid var(--mint); border-radius: var(--radius); background: var(--surface); padding: 16px 20px; margin: 22px 0; font-size: 15px; color: var(--muted); }
.callout strong { color: var(--text); }
.callout.warn { border-left-color: var(--amber); }
.callout.danger { border-left-color: var(--red); }
.callout.note { border-left-color: var(--blue); }

/* ---------- Docs + prose ---------- */
.docs-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr) 200px; gap: 40px; padding-block: 48px 96px; align-items: start; }
.docs-nav { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 8px; font-size: 14px; }
.docs-nav input { width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px; margin-bottom: 18px; }
.docs-nav input:focus { border-color: var(--mint-line); outline: none; }
.docs-nav h4 { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-family: var(--font-mono); margin: 20px 0 8px; font-weight: 500; }
.docs-nav a { display: block; padding: 7px 12px; border-left: 1px solid var(--line); color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.docs-nav a:hover { color: var(--text); }
.docs-nav a[aria-current="page"] { color: var(--mint); border-left-color: var(--mint); background: var(--mint-soft); }
.docs-toc { position: sticky; top: 88px; font-size: 13px; }
.docs-toc h4 { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-family: var(--font-mono); margin-bottom: 10px; font-weight: 500; }
.docs-toc a { display: block; padding: 5px 0 5px 12px; color: var(--muted); border-left: 1px solid var(--line); }
.docs-toc a.on { color: var(--mint); border-left-color: var(--mint); }
.prose h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.prose h2 { font-size: 27px; margin: 56px 0 14px; padding-top: 12px; scroll-margin-top: 90px; position: relative; }
.prose h2::before { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 2px; background: var(--mint); }
.prose h3 { font-size: 19px; margin: 32px 0 10px; scroll-margin-top: 90px; }
.prose p { color: #b5c1d1; margin: 14px 0; }
.prose .lead { color: var(--muted); font-size: 18px; max-width: 680px; }
.prose ul, .prose ol { margin: 14px 0; padding-left: 4px; display: grid; gap: 9px; color: #b5c1d1; }
.prose ul li { padding-left: 22px; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 7px; height: 1px; background: var(--mint); }
.prose ol { counter-reset: s; }
.prose ol li { padding-left: 38px; position: relative; counter-increment: s; }
.prose ol li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--mint-line); color: var(--mint); font-size: 12px; font-family: var(--font-mono); display: grid; place-items: center; }
.prose a { color: var(--mint); border-bottom: 1px solid var(--mint-line); }
.prose a:hover { border-bottom-color: var(--mint); }
.prose strong { color: var(--text); }
.prose code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 0.86em; color: var(--mint); }
.prose pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font-size: 13px; margin: 18px 0; position: relative; }
.prose pre code { background: none; border: 0; padding: 0; color: #d6e1f2; }
.copy { position: absolute; top: 8px; right: 8px; font: 11px var(--font-mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.copy:hover { color: var(--mint); border-color: var(--mint-line); }
.prose .table-wrap { margin: 20px 0; }
.prose .table-wrap td:first-child { color: var(--text); font-weight: 500; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; }
.pager a { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; color: var(--text); transition: border-color 0.2s; }
.pager a:hover { border-color: var(--mint-line); }
.pager small { display: block; color: var(--dim); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.pager a:last-child { text-align: right; }
@media (max-width: 1180px) { .docs-wrap { grid-template-columns: 240px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 860px) { .docs-wrap { grid-template-columns: 1fr; gap: 24px; } .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; } }
.legal { padding-block: 64px 96px; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(28px, 4vw, 56px); text-align: center; position: relative; }
.page-head .lede { margin: 20px auto 0; }
.crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--dim); margin-bottom: 22px; }
.crumbs a:hover { color: var(--mint); }
.crumbs i { font-style: normal; margin-inline: 8px; color: var(--line-2); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form label { font-size: 13px; font-weight: 600; color: var(--text); display: block; margin-bottom: 7px; }
.form input, .form select, .form textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); padding: 13px 14px; font: inherit; font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); outline: none; }
.form textarea { min-height: 110px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.notice { display: none; border: 1px solid rgba(226, 75, 74, 0.5); background: rgba(226, 75, 74, 0.08); color: #ff9c9b; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 36px; margin-top: 40px; background: var(--bg); }
.foot { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 36px; }
.foot h4 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-family: var(--font-mono); font-weight: 500; margin-bottom: 16px; }
.foot li + li { margin-top: 10px; }
.foot a { color: var(--muted); font-size: 14px; transition: color 0.2s; }
.foot a:hover { color: var(--mint); }
.foot .about p { color: var(--muted); font-size: 14px; margin-top: 16px; max-width: 280px; }
.legal-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 22px; color: var(--dim); font-size: 13px; }
.legal-row a:hover { color: var(--mint); }
@media (max-width: 960px) { .foot { grid-template-columns: repeat(2, 1fr); } .foot .about { grid-column: 1 / -1; } }

/* ---------- Coming soon (blog) ---------- */
.soon { position: relative; }
.soon .badge { position: absolute; top: 20px; right: 20px; }

/* ---------- Reduced motion: everything is shown in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; transition-delay: 0s !important; }
  .marquee .track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Key facts list (also read by AI agents as a definition list) ---------- */
.facts { display: grid; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); margin: 0; }
.facts > div { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); padding-top: 2px; }
.facts dd { margin: 0; color: var(--text); font-size: 15px; }
@media (max-width: 640px) { .facts > div { grid-template-columns: 1fr; gap: 4px; } }
/* ---------- Features mega-menu ---------- */
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 6px; }
.nav-item .chev { transition: transform 0.25s var(--ease); opacity: 0.7; }
.nav-item:hover .chev, .nav-item:focus-within .chev { transform: rotate(180deg); }
.submenu { position: absolute; top: 100%; left: 50%; width: 660px; padding-top: 14px; transform: translateX(-50%) translateY(6px); opacity: 0; visibility: hidden; transition: opacity 0.22s, transform 0.3s var(--ease), visibility 0.22s; z-index: 110; }
.nav-item:hover .submenu, .nav-item:focus-within .submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.sub-panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7); padding: 10px; position: relative; }
.sub-panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 28px; height: 28px; border-top: 2px solid var(--mint); border-left: 2px solid var(--mint); border-top-left-radius: var(--radius-lg); pointer-events: none; }
.sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.nav .submenu a { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 9px; color: var(--text); font-size: 14px; }
.nav .submenu a::after { display: none; }
.nav .submenu a:hover { background: var(--mint-soft); }
.sm-ico { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); display: grid; place-items: center; color: var(--mint); }
.sm-ico svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sm-txt strong { display: block; font-weight: 600; }
.sm-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.sub-foot { display: flex; justify-content: space-between; gap: 12px; margin: 8px 4px 2px; padding: 12px 10px 4px; border-top: 1px solid var(--line); }
.nav .sub-foot a { padding: 0; color: var(--mint); font-size: 13px; font-weight: 600; }
.nav .sub-foot a:hover { background: none; text-decoration: underline; }
@media (max-width: 1000px) {
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-item > a { border-bottom: 0; width: 100%; justify-content: space-between; }
  .nav-item .chev { display: none; }
  .submenu { position: static; width: auto; padding: 0 0 12px 12px; transform: none; opacity: 1; visibility: visible; border-left: 1px solid var(--mint-line); margin-left: 4px; }
  .nav-item:hover .submenu, .nav-item:focus-within .submenu { transform: none; }
  .sub-panel { border: 0; box-shadow: none; padding: 0; background: none; }
  .sub-panel::before { display: none; }
  .sub-grid { grid-template-columns: 1fr; }
  .nav .submenu a { padding: 9px 10px; border-bottom: 0; font-size: 15px; }
  .sm-ico, .sm-txt small { display: none; }
  .sub-foot { border-top: 0; padding: 4px 10px 0; margin: 0; flex-direction: column; gap: 8px; }
}