/* ───── Theme tokens ─────
   Defaults v2 = palette "mycelium" — coral/cream, matching the app.
   Other palettes (earth, clay, forest, moss) override via [data-palette]. */

:root {
  --bg:        #f7f1e6;
  --bg-soft:   #f0e8d6;
  --bg-card:  #fdf8ee;
  --ink:       #1c1a16;
  --ink-soft:  #5a5650;
  --ink-faint: rgba(28, 26, 22, 0.5);
  --line:      rgba(28, 26, 22, 0.14);
  --line-soft: rgba(28, 26, 22, 0.07);
  --moss:      #b4423d;          /* deep coral/burgundy — text emphasis */
  --olive:     #9bb6b3;          /* pale teal — secondary */
  --slate:     #2e4858;          /* deep slate-blue — project squares */
  --accent:    #ee716c;          /* bright coral — buttons / hubs */
  --accent-ink:#cf514c;          /* coral hover */
  --accent-soft: #fbdcd8;        /* pink wash — soft cards */

  --serif: "Instrument Serif", "Source Serif 4", Georgia, serif;
  --sans:  "Instrument Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;

  --maxw: 1180px;
  --readw: 660px;

  /* Type scale — 9 tokens. Every font-size on the site maps to one of these. */
  --fs-micro: 12px;                        /* labels, eyebrow, footnotes */
  --fs-small: 14px;                        /* UI, nav, footer links, small body */
  --fs-base:  17px;                        /* default body */
  --fs-read:  18px;                        /* long-form body */
  --fs-lg:    22px;                        /* card titles, kickers, callouts */
  --fs-xl:    30px;                        /* big card titles, modal title */
  --fs-h3:    clamp(28px, 3.6vw, 44px);    /* persona-title */
  --fs-h2:    clamp(36px, 5vw, 64px);      /* section h2 */
  --fs-hero:  clamp(40px, 4.7vw, 72px);    /* hero h1 */
}

/* Typeface variants */
[data-typeface="fraunces"]    { --serif: "Fraunces", Georgia, serif; --sans: "Inter", ui-sans-serif, system-ui, sans-serif; }
[data-typeface="source"]      { --serif: "Source Serif 4", Georgia, serif; --sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif; }
[data-typeface="garamond"]    { --serif: "EB Garamond", Georgia, serif; --sans: "Newsreader", ui-sans-serif, system-ui, sans-serif; font-feature-settings: "liga", "kern"; }
[data-typeface="instrument"]  { --serif: "Instrument Serif", Georgia, serif; --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif; }

/* Palettes */
[data-palette="mycelium"] { --bg:#f7f1e6; --bg-soft:#f0e8d6; --bg-card:#fdf8ee; --ink:#1c1a16; --ink-soft:#5a5650; --moss:#b4423d; --olive:#9bb6b3; --slate:#2e4858; --accent:#ee716c; --accent-ink:#cf514c; --accent-soft:#fbdcd8; }
[data-palette="earth"]    { --bg:#f5efe4; --bg-soft:#efe7d6; --bg-card:#faf6ec; --ink:#3d3024; --ink-soft:#6b5a48; --moss:#5a6b3f; --olive:#8a9670; --slate:#3a4654; --accent:#c97a3a; --accent-ink:#a35a22; --accent-soft:#f0d9bb; }
[data-palette="clay"]     { --bg:#ebe6db; --bg-soft:#e0d9c8; --bg-card:#f3eee2; --ink:#2b2a26; --ink-soft:#5b574c; --moss:#4a5d3a; --olive:#a89a7a; --slate:#3a4654; --accent:#d4a24c; --accent-ink:#a37a22; --accent-soft:#efddb6; }
[data-palette="forest"]   { --bg:#f7f3ec; --bg-soft:#ece6d8; --bg-card:#fbf8f1; --ink:#1f3326; --ink-soft:#3e5343; --moss:#6b8a5e; --olive:#b8a585; --slate:#3a4654; --accent:#b85a2a; --accent-ink:#8c401a; --accent-soft:#e9c2a4; }
[data-palette="moss"]     { --bg:#ede9dd; --bg-soft:#dfd9c8; --bg-card:#f5f1e6; --ink:#2a3326; --ink-soft:#4e5849; --moss:#647a4a; --olive:#9aa17a; --slate:#3a4654; --accent:#cc8a3a; --accent-ink:#9c6420; --accent-soft:#ecd2a8; }

/* Dark mode overrides */
[data-mode="dark"] {
  --bg:        #14130f;
  --bg-soft:   #1d1c17;
  --bg-card:  #1f1d18;
  --ink:       #ebe4d2;
  --ink-soft:  #b5ad99;
  --ink-faint: rgba(235, 228, 210, 0.5);
  --line:      rgba(235, 228, 210, 0.16);
  --line-soft: rgba(235, 228, 210, 0.09);
  --moss:      #f0938e;
  --olive:     #8aa6a3;
  --slate:     #5e7a8c;
  --accent:    #ee716c;
  --accent-ink:#f48e8a;
  --accent-soft: rgba(238, 113, 108, 0.18);
}

/* ───── Base ───── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

::selection { background: var(--accent); color: var(--bg); }

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

/* paper texture — VERY subtle, only on light modes */
body::before {
  content:"";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(61,48,36,.045) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: .55;
  mix-blend-mode: multiply;
}
[data-mode="dark"] body::before { display: none; }

/* ───── Layout ───── */
.page { position: relative; z-index: 1; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.read { max-width: var(--readw); }

section { position: relative; }

/* Section divider — a thin rule that looks like a thread */
.thread-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* ───── Typography ───── */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content:"";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: .6;
}

h1, h2, h3, .h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.04;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.display-hero {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -0.018em;
  max-width: 13ch;
  text-wrap: balance;
  margin: 0;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-lg);
  line-height: 1.3;
  color: var(--ink-soft);
}

p { margin: 0 0 1.05em 0; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.small { font-size: var(--fs-small); color: var(--ink-soft); }

em, .it { font-style: italic; font-family: var(--serif); font-weight: 500; }

strong { font-weight: 500; color: var(--ink); }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 500;
  padding: 13px 22px 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease;
  letter-spacing: 0.005em;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: transparent; color: var(--accent-ink); border-color: var(--accent); transform: translateY(-1px); }
.btn .arr { display:inline-block; transition: transform .18s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ───── Hero ───── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding-block: 80px 100px;
  position: relative;
}
.hero-left { position: relative; z-index: 2; }
.hero-right {
  position: relative;
  height: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* v4: a centred, aspect-ratio-locked stage so stickers map to SVG content */
.hero-stage {
  position: relative;
  aspect-ratio: 600 / 780;
  height: 100%;
  max-height: 680px;
  width: auto;
  max-width: 100%;
}
.hero-wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.hero-wordmark .mark {
  width: 28px; height: 28px;
  flex: none;
}
.hero-wordmark .name {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}
.hero-body {
  max-width: 48ch;
  font-size: var(--fs-read);
  line-height: 1.6;
  color: var(--ink);
  margin-top: 32px;
  margin-bottom: 36px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-illus {
  position: absolute;
  inset: 0;
  display: block;
  overflow: visible;
}
.hero-illus svg { width: 100%; height: 100%; display: block; }

/* Hero badges (small floating labels on illustration) */
.hero-tag {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--bg) inset, 0 1px 2px rgba(0,0,0,.04);
}
/* v4: sticker positions in the hero-stage coordinate space (matches SVG viewBox) */
.hero-tag.tag-top      { top: 2%;    left: 50%;  transform: translateX(-50%); }
.hero-tag.tag-bottom   { bottom: 1%; left: 50%;  transform: translateX(-50%); }
.hero-tag.tag-left-1   { top: 30%;   left: 0%;   transform: translateX(-30%); }
.hero-tag.tag-right-1  { top: 33%;   right: 0%;  transform: translateX(30%); }
.hero-tag.tag-left-2   { top: 64%;   left: -6%; }
.hero-tag.tag-right-2  { top: 66%;   right: -4%; }

/* ───── Section spacing ───── */
.sect { padding: 110px 0; }
.sect-tight { padding: 80px 0; }
.sect-loose { padding: 140px 0; }

.sect-head {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 56px;
  max-width: 760px;
}

/* ───── Section 2: Poznáš to? ───── */
.poznas {
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}
.poznas .rhythm p {
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--ink);
  max-width: 38ch;
}
.poznas .rhythm p + p { margin-top: 1.1em; }
.poznas .rhythm em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--moss);
}

/* ───── Section 3: Origin story ───── */
.origin {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}
.origin-portrait {
  position: sticky; top: 80px;
}
.portrait-frame {
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.portrait-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.portrait-caption {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.origin-body p { font-size: var(--fs-read); line-height: 1.65; max-width: 56ch; }
.origin-body p + p { margin-top: 1em; }
.origin-sig {
  margin-top: 36px;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--moss);
}

/* Drop cap on origin first paragraph */
.dropcap::first-letter {
  font-family: var(--serif);
  font-size: 4.2em;
  line-height: 0.82;
  float: left;
  padding: 0.08em 0.14em 0 0;
  color: var(--moss);
  font-weight: 400;
}

/* ───── Section 4: What is Mycelium ───── */
.what {
  background: var(--bg);
  position: relative;
}
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.what-illus {
  aspect-ratio: 1 / 1;
  position: relative;
}
.what-illus svg { width: 100%; height: 100%; display: block; }

/* "Čo je Mycelium" long-form body inherits read-size */
.what .read p { font-size: var(--fs-read); line-height: 1.65; }
.what .read p + p { margin-top: 1em; }

/* Chat demo */
.chat-trigger {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  transition: border-color .2s, color .2s;
}
.chat-trigger:hover { border-color: var(--moss); color: var(--ink); }
.chat-trigger .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--moss);
  box-shadow: 0 0 0 0 var(--moss);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--moss) 60%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in oklab, var(--moss) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--moss) 0%, transparent); }
}

.chat-demo {
  margin-top: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  max-width: 540px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  line-height: 1.55;
  min-height: 220px;
}
.chat-line { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.chat-line .who {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  width: 70px;
  flex: none;
  padding-top: 4px;
}
.chat-line.user .text { font-style: italic; font-family: var(--serif); font-size: var(--fs-read); line-height: 1.4; color: var(--ink); }
.chat-line.myc  .text { color: var(--ink); }
.chat-line .text { flex: 1; }
.chat-result {
  margin-top: 8px;
  background: var(--bg-soft);
  border-left: 2px solid var(--moss);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.chat-result strong { color: var(--ink); }
.chat-caret {
  display: inline-block;
  width: 0.55ch; height: 1.05em; vertical-align: -0.16em;
  background: var(--ink);
  margin-left: 1px;
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ───── Section 5: For whom ───── */
.personas {
  background: var(--bg-soft);
}
.persona-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 36px;
  padding: 52px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.persona-row:last-child { border-bottom: none; }
.persona-num {
  font-family: var(--serif);
  font-size: var(--fs-read);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  padding-top: 18px;
}
.persona-title {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  line-height: 1.02;
  letter-spacing: -0.018em;
  font-weight: 400;
  margin: 0 0 18px 0;
  max-width: 22ch;
}
.persona-title em { color: var(--moss); font-style: italic; }
.persona-body {
  max-width: 64ch;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
}
.persona-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  color: var(--accent-ink);
  letter-spacing: 0.01em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  cursor: pointer;
}
.persona-link:hover { color: var(--accent); }

/* ───── Section 6: How it works ───── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  margin-top: 56px;
}
.how-card {
  display: flex; flex-direction: column;
  gap: 14px;
  position: relative;
}
.how-card .icon {
  width: 64px; height: 64px;
  color: var(--moss);
  margin-bottom: 8px;
}
.how-card h4 {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
.how-card p { font-size: var(--fs-base); line-height: 1.55; color: var(--ink-soft); margin: 0; }
.how-card em { color: var(--moss); }

/* ───── Section 7: Changes ───── */
.changes {
  background: var(--bg-soft);
}
.changes .stanza {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 36px;
  padding: 36px 0;
  align-items: start;
  border-bottom: 1px dashed var(--line-soft);
}
.changes .stanza:last-child { border-bottom: none; }
.changes .stanza-mark {
  width: 64px; height: 64px;
  color: var(--moss);
  padding-top: 6px;
}
.changes .stanza p {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  line-height: 1.35;
  margin: 0;
  max-width: 32ch;
  color: var(--ink);
}

/* ───── Section 8: Already growing ───── */
.projects {
  background: var(--bg);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.project-card {
  padding: 32px 28px 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  transition: background .2s ease;
  cursor: default;
}
.project-card:hover { background: var(--bg-card); }
.project-card .mark {
  width: 36px; height: 36px;
  color: var(--moss);
  margin-bottom: 10px;
}
.project-card h4 {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}
.project-card p { font-size: var(--fs-base); line-height: 1.5; color: var(--ink-soft); margin: 0; }
.project-card .kind {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-top: auto;
}

/* ───── Section 9: Why now ───── */
.whynow {
  background: var(--ink);
  color: var(--bg);
  padding: 130px 0;
  position: relative;
  overflow: hidden;
}
.whynow .eyebrow { color: rgba(245,239,228,0.55); }
.whynow .eyebrow::before { background: rgba(245,239,228,0.55); }
.whynow h2 { color: var(--bg); }
.whynow p { color: rgba(245,239,228,0.85); max-width: 62ch; font-size: var(--fs-read); line-height: 1.65; }
.whynow p + p { margin-top: 1em; }
.whynow .accent-word { color: var(--accent); font-style: italic; font-family: var(--serif); font-weight: 500; }
.whynow .pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid rgba(245,239,228,0.18);
}
.whynow .pillar h5 {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245,239,228,0.55);
  margin: 0 0 16px 0;
}
.whynow .pillar p {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  line-height: 1.4;
  color: var(--bg);
  margin: 0;
}

.whynow-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.whynow-bg svg {
  width: 100%;
  height: 100%;
  display: block;
  /* Faint, desaturated — drawn lines, not neon. Applies on svg so the
     outer .illus-decorative opacity rule can't override it. */
  opacity: 0.16;
  filter: saturate(0.5) brightness(1.1);
}

/* ───── Section 10: Invitation ───── */
.invite {
  background: var(--bg-card);
  padding: 130px 0;
}
.invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.invite-intro p { font-size: var(--fs-read); line-height: 1.65; max-width: 44ch; }
.invite-intro p + p { margin-top: 1em; }
.invite-mail {
  margin-top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-read);
  color: var(--moss);
}
.invite-mail strong { font-style: normal; color: var(--ink); font-family: var(--sans); font-weight: 500; }

.form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-group label span.opt { color: var(--ink-faint); text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 4px; }
.form-group input,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 10px;
  font-family: var(--sans);
  font-size: var(--fs-base);
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.form-group textarea { min-height: 80px; line-height: 1.5; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--moss); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-faint); }

/* ───── Footer ───── */
.foot {
  border-top: 1px solid var(--line);
  padding: 64px 0 56px;
  background: var(--bg);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 32ch;
}
.foot-brand .name {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}
.foot-brand .tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  line-height: 1.45;
}
.foot-col h6 {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px 0;
}
.foot-col a {
  display: block;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  padding: 4px 0;
  transition: color .15s;
  border-bottom: 1px solid transparent;
}
.foot-col a:hover { color: var(--accent-ink); }
.foot-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-micro);
  color: var(--ink-faint);
}

/* ───── Mycelium illustration animation ───── */
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
.mycelium-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
}
.mycelium-line.animate {
  stroke-dasharray: var(--len, 800);
  stroke-dashoffset: var(--len, 800);
  animation: draw 3.6s cubic-bezier(.6,.04,.32,1) forwards;
  animation-delay: var(--delay, 0s);
}
.mycelium-node {
  fill: currentColor;
}
.mycelium-node.animate {
  opacity: 0;
  animation: nodeIn 0.4s ease-out forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes nodeIn {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 0.95; transform: scale(1); }
}

/* Illustrations intensity */
[data-illustrations="none"] .illus-decorative { display: none; }
[data-illustrations="subtle"] .illus-decorative { opacity: 0.55; }
[data-illustrations="bold"]   .illus-decorative { opacity: 1; }

/* ───── Responsive ───── */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 60px 80px; }
  .hero-right { min-height: 320px; }
  .origin { grid-template-columns: 1fr; gap: 32px; }
  .origin-portrait { position: static; max-width: 220px; }
  .what-grid { grid-template-columns: 1fr; gap: 48px; }
  .how-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .whynow .pillars { grid-template-columns: 1fr; gap: 32px; }
  .invite-grid { grid-template-columns: 1fr; gap: 48px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .sect { padding: 80px 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 24px; }
  .how-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .persona-row { grid-template-columns: 1fr; gap: 12px; padding: 36px 0; }
  .persona-num { padding-top: 0; }
  .changes .stanza { grid-template-columns: 1fr; gap: 12px; }
  .changes .stanza-mark { width: 48px; height: 48px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   V2 ADDITIONS — top nav, login modal, living-network section
   ═══════════════════════════════════════════════════════════ */

/* ───── Top nav ───── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.topnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: var(--fs-read);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.topnav-brand .mark {
  width: 22px;
  height: 22px;
  display: inline-block;
  color: var(--accent);
}
.topnav-brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
  display: inline-block;
}
.topnav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.topnav-link {
  font-family: var(--sans);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .15s;
}
.topnav-link:hover { color: var(--ink); }
.topnav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: background .2s, color .2s, transform .18s;
}
.topnav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.topnav-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
}
.topnav-live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: livepulse 1.6s ease-in-out infinite;
}
@keyframes livepulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.55; transform: scale(0.85); }
}

/* ───── Login modal ───── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, var(--ink) 38%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadein .25s ease-out;
}
.modal-backdrop[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  padding: 0;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.05);
  overflow: hidden;
  animation: modalin .3s cubic-bezier(.2,.7,.3,1);
}
@keyframes modalin {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  background: var(--accent);
  padding: 28px 32px 30px;
  position: relative;
  overflow: hidden;
}
.modal-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 88% 30%, rgba(255,255,255,.22) 0, transparent 30%),
    radial-gradient(circle at 14% 110%, rgba(0,0,0,.10) 0, transparent 40%);
  pointer-events: none;
}
.modal-head .eyebrow { color: rgba(255,255,255,0.7); }
.modal-head .eyebrow::before { background: rgba(255,255,255,0.7); }
.modal-title {
  font-family: var(--serif);
  font-size: var(--fs-xl);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 14px 0 0;
}
.modal-title em { font-style: italic; }
.modal-body { padding: 28px 32px 30px; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: var(--fs-read);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .15s;
}
.modal-close:hover { background: rgba(255,255,255,0.32); }
.modal-row {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px;
}
.modal-row label {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.modal-row input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 10px;
  font-family: var(--sans);
  font-size: var(--fs-base);
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
}
.modal-row input:focus { border-bottom-color: var(--accent); }
.modal-row input::placeholder { color: var(--ink-faint); }
.modal-remember {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 22px;
  font-size: var(--fs-small);
}
.modal-remember .row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  cursor: pointer;
}
.modal-remember .row input { accent-color: var(--accent); }
.modal-remember .link {
  color: var(--accent-ink);
  cursor: pointer;
}
.modal-remember .link:hover { color: var(--accent); }
.modal-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 500;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: background .2s, color .2s, transform .18s;
}
.modal-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 18px;
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.modal-magic {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  padding: 11px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.modal-magic:hover { border-color: var(--accent); color: var(--accent-ink); }
.modal-footer {
  text-align: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.modal-footer a {
  color: var(--accent-ink);
  margin-left: 4px;
}
.modal-footer a:hover { color: var(--accent); }
.modal-tip {
  margin-top: 14px;
  text-align: center;
  font-size: var(--fs-micro);
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--serif);
  font-weight: 500;
}

/* ───── Section: Živá mapa siete (network demo) ───── */
.netmap {
  background: var(--bg-card);
  padding: 110px 0;
  position: relative;
  overflow: hidden;
}
.netmap .sect-head { margin-bottom: 40px; }
.netmap-frame {
  background: #fdfaf3;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 28px 22px;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.15), 0 1px 0 #fff inset;
  position: relative;
}
[data-mode="dark"] .netmap-frame { background: var(--bg-card); }
.netmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 16px;
}
.netmap-crumb {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.netmap-crumb em {
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0.12em;
  color: var(--moss);
}
.netmap-tabs {
  display: flex;
  gap: 22px;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
}
.netmap-tab {
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.netmap-tab.on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.netmap-tab .ct { color: var(--ink-faint); margin-left: 6px; }
.netmap-tab.on .ct { color: var(--accent-ink); }
.netmap-canvas {
  position: relative;
  aspect-ratio: 16 / 9;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
}
.netmap-canvas svg { width: 100%; height: 100%; display: block; }
.netmap-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.netmap-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.netmap-legend .sw {
  width: 14px; height: 14px;
  flex: none;
  display: inline-block;
}
.netmap-legend .sw.circle      { background: var(--accent); border-radius: 50%; }
.netmap-legend .sw.circle-grey { background: #c4bfb6; border-radius: 50%; }
.netmap-legend .sw.square      { background: var(--slate); }
.netmap-legend .sw.diamond     { background: var(--accent); transform: rotate(45deg); width: 10px; height: 10px; }
.netmap-legend .sw.hex {
  background: var(--olive);
  width: 14px;
  height: 14px;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
}
.netmap-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px 16px;
  width: 220px;
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
  font-family: var(--sans);
  font-size: var(--fs-small);
}
.netmap-card .lbl {
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 6px;
}
.netmap-card .ttl {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.netmap-card .sub {
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.netmap-card .hint {
  font-size: var(--fs-micro);
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ── Hover pill (small label attached to a node) ── */
.netmap-pill {
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
  pointer-events: none;
  z-index: 5;
  animation: pillin .14s ease-out;
}
@keyframes pillin {
  from { opacity: 0; transform: translate(-50%, calc(-100% - 6px)) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, calc(-100% - 14px)) scale(1); }
}

/* ── Hovercard (bigger detail card) ── */
.netmap-hovercard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px 20px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  box-shadow: 0 22px 48px -10px rgba(0,0,0,.18), 0 4px 14px rgba(0,0,0,.06);
  pointer-events: none;
  z-index: 6;
  animation: cardin .18s ease-out;
}
[data-mode="dark"] .netmap-hovercard { background: var(--bg-card); }
@keyframes cardin {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.netmap-hovercard .lbl {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 500;
  margin-bottom: 8px;
}
.netmap-hovercard .ttl {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.netmap-hovercard .sub {
  color: var(--ink-soft);
  font-size: var(--fs-small);
  line-height: 1.45;
  margin-bottom: 8px;
}
.netmap-hovercard .tg {
  font-size: var(--fs-small);
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.netmap-hovercard .div {
  height: 1px;
  background: var(--line-soft);
  margin: 0 -22px 12px;
}
.netmap-hovercard .hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-micro);
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.netmap-caption {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.netmap-caption .item h5 {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 8px;
}
.netmap-caption .item p {
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: 1.4;
  margin: 0;
  color: var(--ink);
  max-width: 30ch;
}
.netmap-caption .item em { color: var(--moss); }

/* small-screen tweaks for netmap */
@media (max-width: 980px) {
  .netmap-caption { grid-template-columns: 1fr; }
  .netmap-card { width: 180px; padding: 12px 14px 14px; }
  .netmap-card .ttl { font-size: var(--fs-base); }
}
@media (max-width: 640px) {
  .topnav-links .topnav-link { display: none; }
  .topnav-inner { padding: 12px 20px; }
  .netmap-legend { grid-template-columns: 1fr; padding: 10px 12px; }
  .netmap-frame { padding: 18px 14px 14px; }
}

/* Coral accent for selection */
::selection { background: var(--accent); color: #fff; }

