/* Pontix landing page. Plain CSS, no build step, no network requests.
   Dark is the primary theme; a light variant follows the system setting. */

:root {
  color-scheme: dark light;

  /* Palette, taken from the control panel (packages/panel). */
  --ground: #03080f;
  --rail: #050b14;
  --raised: #0b1624;
  --ink: #eef2f6;
  --ink-soft: #9aa9bb;
  --ink-faint: #7d8da3; /* panel value #64748b is below AA on this ground at small sizes */
  --hairline: #14202f;
  --hairline-strong: #1e2f44;
  --accent: #0063ca;
  --accent-bright: #00dbff;

  /* Roles */
  --link: var(--accent-bright);
  --mark-text: var(--accent-bright);
  --button-bg: var(--accent-bright);
  --button-ink: #03080f;
  --glow: rgba(0, 219, 255, 0.16);
  --glow-soft: rgba(0, 99, 202, 0.22);
  --grid-line: rgba(154, 169, 187, 0.07);
  --code-bg: #060d18;
  --ok: #4ade80;
  --warn: #f5b942;
  --mute: #9aa9bb;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 16px;
  --wrap: 1120px;
  --radius: 14px;
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: #f7f9fc;
    --rail: #eef2f7;
    --raised: #ffffff;
    --ink: #0b1624;
    --ink-soft: #3d4d62;
    --ink-faint: #56667b;
    --hairline: #dde4ee;
    --hairline-strong: #c4cfdd;

    --link: #0063ca;
    --mark-text: #0063ca;
    --button-bg: #0063ca;
    --button-ink: #ffffff;
    --glow: rgba(0, 99, 202, 0.10);
    --glow-soft: rgba(0, 219, 255, 0.14);
    --grid-line: rgba(11, 22, 36, 0.06);
    --code-bg: #0b1624;
    --ok: #15803d;
    --warn: #8a5300;
    --mute: #56667b;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-color-scheme: light) {
  :focus-visible { outline-color: #0063ca; }
}

code, pre, kbd { font-family: var(--mono); }

:not(pre) > code {
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border: 1px solid var(--hairline);
  overflow-wrap: anywhere;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 20;
  background: var(--button-bg); color: var(--button-ink);
  padding: 0.5rem 0.9rem; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 10px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 60px;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }

.logo { width: 34px; height: auto; flex: none; overflow: visible; }
.logo .arch { fill: none; stroke: var(--mark-text); stroke-width: 2.8; stroke-linecap: round; }
.logo .from { fill: var(--ink); }
.logo .to { fill: var(--mark-text); }

/* One element, so a flex gap can never split the word. */
.name {
  font-weight: 800; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink);
}
.name span { color: var(--mark-text); }

.nav ul { display: flex; align-items: center; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 0.4rem 0.7rem; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none; font-size: 0.95rem;
}
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav a.nav-cta { color: var(--button-ink); background: var(--button-bg); font-weight: 600; margin-left: 0.25rem; }
.nav a.nav-cta:hover { background: var(--button-bg); filter: brightness(1.08); }

/* GitHub mark: inherits the text colour, so it themes with whatever holds it. */
svg.gh { width: 1.05em; height: 1.05em; flex: none; fill: currentColor; }
.nav a.nav-gh { display: inline-flex; align-items: center; gap: 0.4rem; }
/* On a phone the header keeps the mark and drops the word. */
@media (max-width: 760px) { .nav-gh-label { display: none; } }

/* Language switcher: the current language is plain text, the other a link. */
.nav .lang {
  display: flex; align-items: center; gap: 0.1rem; margin-left: 0.5rem; padding-left: 0.6rem;
  border-left: 1px solid var(--hairline-strong);
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em;
}
.nav .lang [aria-current="true"] { padding: 0.4rem 0.35rem; color: var(--mark-text); font-weight: 600; }
.nav .lang [aria-hidden="true"] { color: var(--ink-faint); }
.nav .lang a { padding: 0.4rem 0.35rem; font-size: inherit; }

@media (max-width: 760px) {
  .nav li.opt { display: none; }
}
@media (max-width: 480px) {
  .nav li.opt-sm { display: none; }
}
@media (max-width: 400px) {
  .name { font-size: 0.95rem; letter-spacing: 0.12em; }
  .nav a { padding-inline: 0.55rem; }
  .nav .lang { margin-left: 0.15rem; padding-left: 0.3rem; }
  .nav .lang [aria-current="true"], .nav .lang a { padding-inline: 0.25rem; }
}

/* ---------- Sections ---------- */

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
section + section { border-top: 1px solid var(--hairline); }

.eyebrow {
  display: inline-block; margin: 0 0 1rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--link);
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); max-width: 22ch; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 62ch; margin: 1.1rem 0 0; }
p { margin: 0 0 1em; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

/* ---------- Hero ---------- */

.hero { position: relative; padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 7vw, 5.5rem); overflow: hidden; isolation: isolate; border-top: 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 78% 30%, var(--glow), transparent 70%),
    radial-gradient(50% 50% at 8% 0%, var(--glow-soft), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.hero-copy { max-width: 46rem; }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0 0 1.5rem; padding: 0.3rem 0.8rem;
  border: 1px solid var(--hairline-strong); border-radius: 999px;
  background: color-mix(in srgb, var(--raised) 70%, transparent);
  font-size: 0.85rem; color: var(--ink-soft);
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }

h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); letter-spacing: -0.035em; max-width: 16ch; }
h1 em { font-style: normal; color: var(--mark-text); }

.hero .lede { max-width: 56ch; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.3rem; border-radius: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1.2;
  border: 1px solid transparent;
}
.btn-primary { background: var(--button-bg); color: var(--button-ink); box-shadow: 0 0 0 0 var(--glow), 0 8px 28px -10px var(--glow); }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { color: var(--ink); border-color: var(--hairline-strong); background: color-mix(in srgb, var(--raised) 60%, transparent); }
.btn-ghost:hover { border-color: var(--link); text-decoration: none; }

.hero-visual { margin-top: clamp(2.5rem, 6vw, 4rem); }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }

.fig .svc { fill: var(--raised); stroke: var(--hairline-strong); stroke-width: 1.2; }
.fig .svc-label { fill: var(--ink); font-family: var(--font); font-size: 15px; font-weight: 600; }
.fig .svc-sub { fill: var(--ink-faint); font-family: var(--mono); font-size: 11px; }
.fig .wire { fill: none; stroke: var(--hairline-strong); stroke-width: 1.4; stroke-dasharray: 3 6; }
.fig .foot { fill: var(--ink); }
.fig .arch-glow { fill: none; stroke: var(--accent-bright); stroke-width: 12; stroke-linecap: round; opacity: 0.14; }
.fig .arch { fill: none; stroke: var(--mark-text); stroke-width: 4.2; stroke-linecap: round; }
.fig .flow { fill: none; stroke: var(--ground); stroke-width: 4.2; stroke-linecap: round; stroke-dasharray: 1 22; opacity: 0.9; animation: flow 2.4s linear infinite; }
.fig .node { fill: var(--mark-text); }
.fig .node-label { fill: var(--ground); font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; }
.fig .cap { fill: var(--ink-faint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

@keyframes flow { to { stroke-dashoffset: -46; } }

/* ---------- The problem ---------- */

.split { display: grid; gap: 2rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }
.split .lede { margin-top: 0; }
.split .lede + .lede { margin-top: 1rem; }

.callout {
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--raised); padding: 1.4rem 1.5rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

/* ---------- Steps ---------- */

.steps { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.steps li {
  counter-increment: step; position: relative;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--raised); padding: 1.5rem 1.4rem 1.4rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 0.9rem;
  font-family: var(--mono); font-size: 0.85rem; color: var(--link); letter-spacing: 0.1em;
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

/* Terminal-style code blocks stay dark in both themes. */
.term {
  margin: 1.5rem 0 0; overflow: hidden;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--code-bg); color: #eef2f6;
}
.term-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 1rem; border-bottom: 1px solid #1e2f44;
  font-family: var(--mono); font-size: 0.78rem; color: #9aa9bb;
}
.term pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.7; tab-size: 2; }
.term .c { color: #8394aa; }
.term .p { color: #00dbff; user-select: none; }
.term .k { color: #00dbff; }
.term .w { color: #f5b942; }
.term .e { color: #ff8f8f; }

/* ---------- Connectors ---------- */

.cards { display: grid; gap: 1rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--raised); padding: 1.4rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--link) 55%, var(--hairline-strong)); }
.card h3 { margin: 0.9rem 0 0.15rem; font-family: var(--mono); font-size: 1.05rem; }
.card .what { margin: 0 0 1rem; color: var(--ink); font-size: 0.98rem; }
.card p { color: var(--ink-soft); font-size: 0.93rem; margin: 0 0 0.9rem; }
.card p:last-child { margin-bottom: 0; }
.card .tools { margin-top: auto; color: var(--ink-faint); font-family: var(--mono); font-size: 0.8rem; line-height: 1.6; overflow-wrap: anywhere; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-soft);
}

/* The invitation after the examples: a dashed card, so it reads as "next". */
.card-cta {
  display: grid; gap: 1rem 2rem; align-items: center; margin-top: 1rem;
  padding: 1.5rem 1.6rem;
  border: 1px dashed color-mix(in srgb, var(--link) 60%, var(--hairline-strong)); border-radius: var(--radius);
  background: color-mix(in srgb, var(--raised) 60%, transparent);
}
@media (min-width: 760px) { .card-cta { grid-template-columns: 1fr auto; } }
.card-cta h3 { margin-bottom: 0.4rem; font-family: var(--mono); font-size: 1.05rem; }
.card-cta p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; max-width: 62ch; }
.card-cta .actions { margin-top: 0; }

.legend { margin-top: 1.75rem; color: var(--ink-soft); font-size: 0.95rem; max-width: 70ch; }

/* ---------- Trust ---------- */

.trust { background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--rail) 80%, transparent)); }
.trust-grid { display: grid; gap: 1px; background: var(--hairline-strong); border: 1px solid var(--hairline-strong); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .trust-grid { grid-template-columns: 1fr 1fr; } }
.trust-item { background: var(--ground); padding: 1.6rem 1.5rem; }
.trust-item h3 { margin-bottom: 0.5rem; }
.trust-item p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.caveat { margin-top: 1.5rem; max-width: 70ch; color: var(--ink-soft); font-size: 0.95rem; padding-left: 1rem; border-left: 2px solid var(--warn); }
.caveat strong { color: var(--ink); }

/* ---------- Quick start ---------- */

.start-note { margin-top: 1.25rem; padding: 1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); border-radius: 10px; color: var(--ink-soft); font-size: 0.97rem; max-width: 70ch; }
.start-note strong { color: var(--ink); }
.start-grid { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 900px) { .start-grid { grid-template-columns: 1fr 1fr; align-items: start; } .start-grid .term { margin-top: 0; } }
.start-grid h3 { margin-bottom: 0.6rem; font-size: 1rem; color: var(--ink-soft); font-weight: 600; }
.start-grid + .small { margin-top: 1.5rem; }
.small { color: var(--ink-soft); font-size: 0.95rem; max-width: 70ch; }

/* ---------- Contribute ---------- */

.contribute-box {
  display: grid; gap: 2rem; align-items: start;
  border: 1px solid var(--hairline-strong); border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background:
    radial-gradient(60% 120% at 100% 0%, var(--glow), transparent 70%),
    var(--raised);
}
@media (min-width: 900px) { .contribute-box { grid-template-columns: 1.05fr 1fr; gap: 3rem; } }
.contribute-box h2 { max-width: 20ch; }
.contribute-box p { color: var(--ink-soft); max-width: 56ch; }
.contribute-box .lede { margin-top: 1rem; }

.why { display: grid; gap: 0.8rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.why li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); font-size: 0.98rem; }
.why li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--mark-text); }
.why strong { color: var(--ink); }

.takes {
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: color-mix(in srgb, var(--ground) 55%, transparent);
  padding: 1.4rem 1.5rem;
}
.takes h3 { margin-bottom: 0.9rem; }
.takes ol { margin: 0; padding-left: 1.4rem; color: var(--ink-soft); font-size: 0.96rem; }
.takes li + li { margin-top: 0.65rem; }
.takes li::marker { color: var(--link); font-family: var(--mono); font-size: 0.85em; }
.takes strong { color: var(--ink); }
.takes .dco { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--hairline); color: var(--ink-soft); font-size: 0.93rem; max-width: none; }

.field-map-note { margin-top: 1.75rem; margin-bottom: 0; }
.field-map-note + .term { margin-top: 0.75rem; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--hairline); padding-block: 3rem 3.5rem; background: var(--rail); color: var(--ink-soft); font-size: 0.93rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; } }
.site-footer h2 { font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.8rem; max-width: none; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer p { margin: 0 0 0.8rem; }
.site-footer .brand { margin-bottom: 1rem; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
.fine { color: var(--ink-faint); font-size: 0.85rem; max-width: 80ch; }
.site-footer .footer-bottom p { margin: 0; }
.credit { color: var(--ink-faint); font-size: 0.85rem; white-space: nowrap; }
.credit a { color: var(--ink-soft); font-weight: 600; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fig .flow { animation: none; }
  .card { transition: none; }
}

/* Grid items default to min-width:auto, which lets a wide <pre> stretch the
   whole column past the viewport. Let them shrink and scroll inside instead. */
.start-grid > *, .split > *, .cards > *, .trust-grid > *, .footer-grid > *, .contribute-box > *, .card-cta > * { min-width: 0; }
.term { max-width: 100%; }

.nav a { white-space: nowrap; }

/* On a phone the figure scales to about 45%, so its text is enlarged to stay readable. */
@media (max-width: 600px) {
  .fig .svc-label { font-size: 21px; }
  .fig .cap { font-size: 18px; letter-spacing: 0.06em; }
  .fig .node-label { font-size: 20px; }
}
