/* Nexus Map — the landing page.
   Layout: a map legend turned into a page. The four groups of a map (People, Planet,
   Progress, Profit) are the only bright colours, used where they mean something; the
   rest is ink on a slightly green paper, with the app's own link notation in the hero.
   No web fonts, no external requests: system faces only. */

:root {
  --paper: #f3f5f2;
  --surface: #ffffff;
  --sunk: #e9ede8;
  --ink: #15201d;
  --muted: #4d5a56;
  --line: #d6ddd7;
  --accent: #1f5bd0;
  --accent-ink: #ffffff;
  --accent-soft: #e3ebfb;
  /* the map's groups, and its link notation */
  --people: #3b7be8;
  --planet: #1f9d5b;
  --progress: #d99812;
  --profit: #e0484d;
  --pos: #2d7cb6;
  --neg: #cf6128;
  --node-ring: #15201d;

  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(2rem, 1.4rem + 2.2vw, 2.9rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.8vw, 4.3rem);
  --wide: 1160px;
  --text: 62ch;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1513;
    --surface: #161e1b;
    --sunk: #121917;
    --ink: #e6ece9;
    --muted: #a0ada8;
    --line: #28332f;
    --accent: #7ea6ff;
    --accent-ink: #0c1422;
    --accent-soft: #1b2638;
    --people: #6c9ef2;
    --planet: #43c07c;
    --progress: #f0b43a;
    --profit: #f06a6e;
    --pos: #5fa6da;
    --neg: #e8864f;
    --node-ring: #e6ece9;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1513;
  --surface: #161e1b;
  --sunk: #121917;
  --ink: #e6ece9;
  --muted: #a0ada8;
  --line: #28332f;
  --accent: #7ea6ff;
  --accent-ink: #0c1422;
  --accent-soft: #1b2638;
  --people: #6c9ef2;
  --planet: #43c07c;
  --progress: #f0b43a;
  --profit: #f06a6e;
  --pos: #5fa6da;
  --neg: #e8864f;
  --node-ring: #e6ece9;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.eyebrow { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: var(--text); }
.muted { color: var(--muted); }
.ref { font-family: var(--mono); font-size: 0.85em; color: var(--muted); }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: var(--step-0); text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); color: var(--accent-ink); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: var(--step--1); }
/* the pilot: a price without a checkout; the title says why */
.btn.pilot { cursor: default; border-style: dashed; opacity: 0.8; }
.btn.pilot:hover { background: transparent; color: var(--ink); }

/* ── header ── */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: var(--step--1); white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav-menu { display: none; margin-left: auto; }
@media (max-width: 960px) {
  .nav { display: none; }
  .nav-menu { display: block; position: relative; }
  .nav-menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: var(--step--1); }
  .nav-menu summary::-webkit-details-marker { display: none; }
  .nav-menu[open] .nav-drop { display: flex; }
  .nav-drop { display: none; position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-width: 200px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14); }
  .nav-drop a { padding: 8px 10px; color: var(--ink); text-decoration: none; border-radius: 6px; }
  .nav-drop a:hover { background: var(--sunk); }
}

/* ── hero ── */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(32px, 5vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero h1 em { font-style: italic; color: var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 4px 0 0; list-style: none; font-size: var(--step--1); color: var(--muted); }
.facts li { display: flex; align-items: center; gap: 7px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--planet); flex: none; }
.loop-figure { margin: 0; min-width: 0; }
.loop-figure svg { width: 100%; height: auto; display: block; }
.loop-figure figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 10px; max-width: 52ch; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* the diagram: the app's notation */
.lk { fill: none; stroke-width: 2.4; }
.lk.pos { stroke: var(--pos); }
.lk.neg { stroke: var(--neg); stroke-dasharray: 7 6; }
.lk.flow { stroke-dasharray: 3 11; stroke-linecap: round; stroke-width: 3.2; opacity: 0.85; animation: flow 1.6s linear infinite; }
.lk.flow.neg { stroke: var(--neg); }
@keyframes flow { to { stroke-dashoffset: -28; } }
.nd { stroke: var(--node-ring); stroke-width: 2; }
.nd.people { fill: var(--people); }
.nd.progress { fill: var(--progress); }
.nd.profit { fill: var(--profit); }
.nlabel { font-family: var(--body); font-size: 13px; font-weight: 600; fill: var(--ink); }
.nref { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.sgn { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.sgn.pos { fill: var(--pos); }
.sgn.neg { fill: var(--neg); }
.looptag rect { fill: var(--surface); stroke: var(--line); }
.looptag text { font-family: var(--mono); font-size: 13px; font-weight: 700; fill: var(--ink); }
.delay { stroke: var(--progress); stroke-width: 2.4; }
@media (prefers-reduced-motion: reduce) { .lk.flow { animation: none; display: none; } }

/* ── sections ── */
section { padding-block: clamp(48px, 7vw, 96px); }
section.alt { background: var(--sunk); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }

.shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 18px 50px -24px rgba(12, 30, 26, 0.35); }
.shot img { width: 100%; }
.shot-cap { font-size: var(--step--1); color: var(--muted); margin-top: 12px; max-width: 80ch; }

/* how it works: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.steps li { padding: 20px 20px 4px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.steps li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.steps .n { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); }
.steps p { color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .steps li:first-child { border-top: 0; }
}

/* features: text beside a screenshot, alternating */
.feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature + .feature { margin-top: clamp(48px, 7vw, 88px); }
.feature.flip .feature-text { order: 2; }
.feature-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.feature-text ul { margin: 4px 0 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.feature-text li::marker { color: var(--accent); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-text { order: 0; }
}

.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: clamp(40px, 6vw, 72px); }
.more-grid > div { background: var(--paper); padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
section.alt .more-grid > div { background: var(--sunk); }
.more-grid p { color: var(--muted); font-size: var(--step--1); line-height: 1.55; }
@media (max-width: 860px) { .more-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .more-grid { grid-template-columns: 1fr; } }

/* the three assistants */
.ai-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: clamp(28px, 4vw, 44px); }
.ai-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ai-card .where { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.ai-card p { color: var(--muted); font-size: var(--step--1); line-height: 1.55; }
@media (max-width: 860px) { .ai-cards { grid-template-columns: 1fr; } }
.promise { margin-top: 18px; padding: 16px 18px; border-left: 3px solid var(--planet); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); max-width: 820px; }

/* privacy */
.privacy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.privacy div { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.privacy p { color: var(--muted); }
@media (max-width: 720px) { .privacy { grid-template-columns: 1fr; } }

/* pricing: free, a module, a workshop; then the modules themselves */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.plan.featured { border: 2px solid var(--accent); }
.plan .tag { align-self: flex-start; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 4px; }
.price { font-family: var(--display); font-size: var(--step-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--body); font-size: var(--step--1); font-weight: 400; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: var(--step--1); color: var(--muted); flex: 1; }
.plan ul li::marker { color: var(--planet); }
.plan .btn { justify-content: center; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }

.list-head { margin: clamp(40px, 6vw, 64px) 0 16px; scroll-margin-top: 88px; }
/* one row per module: what it does, and its own checkout */
.modules { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.modules li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modules li:last-child { border-bottom: 0; }
.mod-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mod-text h4 { margin: 0; font-family: var(--display); font-size: var(--step-1); font-weight: 600; line-height: 1.25; }
.mod-text p { color: var(--muted); font-size: var(--step--1); }
.modules .btn { flex: none; white-space: nowrap; }
/* a module that is not on sale yet: a note where the Buy button would be */
.modules .mod-soon { flex: none; color: var(--muted); font-size: var(--step--1); }
.pricing-note { margin-top: 14px; max-width: 80ch; font-size: var(--step--1); color: var(--muted); }
/* for screen readers only: which module a "Buy" button is for */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.buy-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: buy; }
/* the number sits beside the text rather than in a flex row, so a link inside a step flows with its sentence */
.buy-steps li { counter-increment: buy; position: relative; padding-left: 40px; min-width: 0; color: var(--muted); }
.buy-steps li::before { content: counter(buy); position: absolute; left: 0; top: 0; font-family: var(--mono); font-weight: 700; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
@media (max-width: 1000px) { .buy-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .buy-steps { grid-template-columns: 1fr; } }

/* workshops */
.workshop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.workshop ul { margin: 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 860px) { .workshop { grid-template-columns: 1fr; } }

/* stay in the loop: the one form on the page */
.signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.signup-form { display: flex; flex-direction: column; gap: 16px; padding: 24px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.signup-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.signup-fields label { display: flex; flex-direction: column; gap: 6px; font-size: var(--step--1); font-weight: 600; min-width: 0; }
.signup-fields input { font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; min-height: 44px; padding: 0 12px; min-width: 0; }
.signup-fields input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.signup-choices { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.signup-choices legend { font-size: var(--step--1); font-weight: 600; padding: 0; margin-bottom: 8px; }
.signup-choices label, .signup-consent { display: flex; align-items: flex-start; gap: 10px; font-size: var(--step--1); color: var(--ink); cursor: pointer; }
.signup-choices label { align-items: center; }
.signup-consent span { color: var(--muted); }
.signup-form input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.signup-form .cta-row { align-items: center; }
.signup-form .btn { border: 0; cursor: pointer; font-family: inherit; }
.signup-form .btn:disabled { opacity: 0.6; cursor: default; }
.signup-status { font-size: var(--step--1); color: var(--muted); min-height: 1.5em; }
.signup-status.ok { color: var(--planet); }
.signup-status.bad { color: var(--profit); }
@media (max-width: 860px) { .signup { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .signup-fields { grid-template-columns: 1fr; } }

/* questions */
.faq { max-width: 820px; display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--line); padding-block: 16px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin-top: 10px; max-width: var(--text); }

/* closing */
.closing { text-align: left; }
.closing .wrap { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.closing h2 { max-width: 18ch; }

.site-foot { border-top: 1px solid var(--line); padding-block: 32px 40px; font-size: var(--step--1); color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* the appearance switch in the nav: Auto, Light, Dark */
.theme-switch { font: inherit; font-size: var(--step--1); color: var(--muted); background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; line-height: 1.2; }
.theme-switch:hover { color: var(--ink); border-color: var(--ink); }
.nav-drop .theme-switch { align-self: flex-start; margin: 4px 10px 2px; }

/* the legal pages: Impressum, privacy policy, terms */
.legal { max-width: 74ch; padding-block: 40px 72px; }
.legal h1 { font-family: var(--display); font-size: var(--step-3); margin: 6px 0 18px; }
.legal h2 { font-size: var(--step-1); margin: 32px 0 8px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 22px; }
.legal .draft { border: 2px dashed var(--profit); border-radius: var(--radius); background: var(--surface); padding: 12px 16px; }
.legal .box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 16px; margin: 12px 0; }
