/* ===== Fungae: design tokens ===== */
:root {
  color-scheme: light;

  --paper: #fefefe;
  --paper-tint: #f4f5f0;
  --ink: #1c2018;
  --ink-soft: #565b50;
  --moss: #3f4f2c;
  --moss-deep: #2f3c20;
  --on-moss: #fefefe;
  --line: #d3d5cc;
  --line-strong: #a5a89d;

  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --max-width: 97.5rem;
  --radius: 0.75rem;
  --radius-pill: 999px;
  --header-h: 4.75rem;

  --font-display: "Red Hat Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Red Hat Text", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scrollbar-color: var(--line-strong) var(--paper-tint);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--moss);
  accent-color: var(--moss);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* The logo matrix is pinned to the foot of the window. --scroll (0 at the top of the page, 1 at
   the end; set by script.js) makes it grow upwards, strengthen and drift sideways as the page is
   read. Without the script, or with reduced motion, it rests fully grown. */
:root { --scroll: 1; }

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  height: max(53.7vw, 32.2rem);
  background: url("assets/pattern-light.png") calc(50% - var(--scroll) * 7rem) bottom / max(100%, 60rem) auto repeat-x;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.55) 40%, transparent 92%);
  mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.55) 40%, transparent 92%);
  opacity: calc(var(--scroll) * 0.62);
  transform: translateY(calc((1 - var(--scroll)) * 46%));
  pointer-events: none;
  will-change: transform, opacity;
}

[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

::selection { background: var(--moss); color: var(--on-moss); }

:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.45rem + 1.7vw, 3.25rem); line-height: 1.12; letter-spacing: -0.018em; }
h2 { font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.375rem); }
h3 { font-size: 1.1875rem; letter-spacing: -0.005em; line-height: 1.3; }

h1.page-title { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

p { color: var(--ink-soft); margin: 0 0 1em; max-width: 68ch; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

img { max-width: 100%; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin-bottom: 0.7em; color: var(--ink-soft); }
ul.plain li strong { color: var(--ink); font-weight: 600; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }

/* Small tracked capitals: header descriptor, nav, sign-off, stage and role labels */
.brand-tag,
.main-nav a,
.growth-label,
.founder-role {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
}

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 1.25rem; }
.logo-link { display: flex; align-items: center; }
.logo-link img { height: 3.25rem; width: auto; display: block; }

.brand-tag {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin: 0;
  padding: 0.55rem 0 0.55rem 1.25rem;
  border-left: 1px solid var(--line-strong);
  white-space: nowrap;
}

.main-nav { display: flex; gap: clamp(1.25rem, 2.6vw, 2.75rem); }

.main-nav a {
  position: relative;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.85rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.14em;
  bottom: 0.4rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; border-radius: var(--radius-pill); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 3.125rem;
  padding: 0.7rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn svg { width: 1.125rem; height: 1.125rem; flex: none; transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary { background: var(--moss); border-color: var(--moss); color: var(--on-moss); }
.btn-primary:hover { background: var(--moss-deep); border-color: var(--moss-deep); }

.btn-secondary,
.btn-tertiary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover,
.btn-tertiary:hover { border-color: var(--ink); background: var(--paper-tint); }

.btn:disabled,
.btn:disabled:hover {
  background: var(--paper-tint);
  border-color: var(--line);
  color: #6b7065;
  cursor: not-allowed;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.875rem 1rem; margin-top: 1.75rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--moss);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.text-link svg { width: 1.125rem; height: 1.125rem; flex: none; transition: transform 0.35s var(--ease-out); }
.text-link:hover svg { transform: translateX(4px); }

/* ===== Home: hero ===== */
/* The copy sits on the page; the photograph is a sheet hung from the top-right corner whose
   left and bottom edges are part of the image file (a fibrous deckle onto paper white). */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  column-gap: clamp(0.5rem, 1.5vw, 2rem);
  padding-left: max(var(--gutter), calc((100% - var(--max-width)) / 2 + var(--gutter)));
  overflow: hidden;
}

.hero-copy { padding-block: clamp(2.5rem, 5vw, 5rem); }

.hero h1 { margin: 0; }

.h1-accent { color: var(--moss); }

.br-narrow { display: none; }

.hero .cta-row { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  align-self: start;
  transform-origin: 100% 0;
  mix-blend-mode: multiply; /* lets the logo matrix pass behind the photo's white margin */
}

/* ===== Home: the sample, annotated ===== */
.specimen { padding-block: clamp(1rem, 2.5vw, 2.5rem) clamp(2.5rem, 5vw, 4.5rem); }

.specimen-inner {
  position: relative;
  display: grid;
  grid-template-columns: 28% minmax(0, 1fr);
  column-gap: 30%;
  align-items: center;
}

.specimen-figure { margin: 0; }
.specimen-figure img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }

.specimen-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-rows: 1fr;
  align-self: stretch;
}

.specimen-notes li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.1rem 0 1.1rem 1.1rem;
}

.note-value {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.1rem + 1.45vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.012em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

.note-label {
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.1875rem);
  line-height: 1.35;
  color: var(--ink-soft);
}

/* Leader lines run from points on the sample to each note. Coordinates are percentages of
   .specimen-inner, so the notes column (starting at 58%) and its three equal rows are the anchors. */
.specimen-leaders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.specimen-leaders path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.specimen-dot {
  position: absolute;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--moss);
  border: 2px solid var(--paper);
  transform: translate(-50%, -50%);
}

.specimen-dot-a { left: 15.4%; top: 22%; }
.specimen-dot-b { left: 23.8%; top: 50%; }
.specimen-dot-c { left: 11.2%; top: 78%; }

/* ===== Growth thread: stages on home, roadmap on waitlist ===== */
.growth { position: relative; padding-top: 5.25rem; }
.stages-band { padding-bottom: clamp(3rem, 6vw, 5.5rem); }

.growth-thread,
.growth-thread-v { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.growth-thread { width: 100%; height: 4.5rem; }
.growth-thread-v { display: none; }

.thread-rest,
.thread-branches,
.thread-grown { fill: none; stroke-linecap: round; }
.thread-rest { stroke-width: 1.1; }
.thread-branches { stroke: var(--line); stroke-width: 1; }
.thread-grown { stroke: var(--moss); stroke-width: 1.8; stroke-dasharray: 10 100; }

.growth-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.growth-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: clamp(1rem, 2vw, 2rem);
}

/* Nodes sit on the thread; --node-y is the thread's height above each step, in the SVG's units. */
.growth-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--node-y) - 5.25rem);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  transform: translate(-50%, -50%);
}

.growth-step:nth-child(1) { --node-y: 2.5rem; --node-x: 1.25rem; }
.growth-step:nth-child(2) { --node-y: 1.375rem; --node-x: 0.875rem; }
.growth-step:nth-child(3) { --node-y: 2.875rem; --node-x: 1.375rem; }
.growth-step:nth-child(4) { --node-y: 1.625rem; --node-x: 1rem; }

.growth-step[aria-current]::before {
  background: var(--moss);
  border-color: var(--moss);
  outline: 1.5px solid var(--moss);
  outline-offset: 3px;
}

.growth-label { font-size: 0.6875rem; letter-spacing: 0.18em; color: var(--ink-soft); }
.growth-step[aria-current] .growth-label { color: var(--moss); }

.growth-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.008em;
  color: var(--ink);
}

.growth-step p { margin: 0; font-size: 1rem; line-height: 1.5; }

/* ===== Home: closing ===== */
.closing { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.closing-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.closing-lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.008em;
  color: var(--ink);
  max-width: 34em;
  margin: 0;
}

.closing-aside h2 { font-size: 1.1875rem; letter-spacing: -0.005em; margin-bottom: 0.75rem; }
.closing-aside p { margin-bottom: 1.25rem; }

/* ===== Subpages: sections ===== */
.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}

.section-first { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.section-alt { background: var(--paper-tint); }

.section-lede { max-width: 44rem; font-size: 1.1875rem; line-height: 1.55; }

.section .growth { margin-top: clamp(2.5rem, 5vw, 4rem); }

.text-center { text-align: center; }
.lede-center { margin: 0 auto 2em; }
.cta-row-center { justify-content: center; }
.team-heading { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); margin-top: clamp(3rem, 6vw, 4.5rem); }
.form-note { font-size: 0.875rem; margin-top: 0.75rem; }

.about-block { margin-bottom: clamp(3.5rem, 7vw, 6rem); }
.about-block:last-child { margin-bottom: 0; }

/* ===== Subpages: info columns ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.info-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-block { border-top: 1px solid var(--line-strong); padding-top: 1.25rem; }
.info-block h2 { font-size: 1.1875rem; letter-spacing: -0.005em; line-height: 1.3; }
.info-block h3:not(:first-child) { margin-top: 1.75rem; }

/* Market figures on the Info page: open columns, grouped by space alone */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  margin-block: clamp(3rem, 6vw, 5rem);
}

.stat-card .stat-num {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.375rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.012em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

.stat-card p { margin: 0; font-size: 1rem; }

.form-embed {
  min-height: 20rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.form-embed iframe { display: block; width: 100%; border: none; }

/* ===== Subpages: team ===== */
.founder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.founder-card { display: flex; flex-direction: column; }
.founder-photo { aspect-ratio: 1; margin-bottom: 1.25rem; }

/* Initials stand in until there are portraits */
.founder-mark {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--moss);
}
.founder-card h3 { order: 1; margin-bottom: 0.5rem; }
.founder-role { order: 2; margin-bottom: 0.9rem; font-size: 0.6875rem; letter-spacing: 0.18em; color: var(--moss); }
.founder-card p { order: 3; margin: 0; }

/* Photo slots: swap the file in assets/ (same filename) to replace */
.photo-slot { display: block; width: 100%; object-fit: cover; border-radius: var(--radius); }

/* ===== "Coming soon" blocks ===== */
.placeholder-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8.75rem;
  padding: 1.25rem;
  text-align: center;
  background: repeating-linear-gradient(135deg, var(--paper-tint) 0 10px, var(--paper) 10px 20px);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.placeholder-block::before {
  content: attr(data-label);
  max-width: 32ch;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--ink-soft);
}

.placeholder-inline { min-height: 5.75rem; margin-bottom: 1em; }
.blog-teaser { min-height: 11.25rem; }

/* ===== Contact form ===== */
.contact-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; max-width: 27.5rem; }
.contact-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.875rem; font-weight: 500; color: var(--ink); }

.contact-form input,
.contact-form textarea {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.75rem 0.95rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #6b7065; opacity: 1; }

.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline-offset: 1px; border-color: var(--moss); }

.contact-form button { align-self: flex-start; margin-top: 0.375rem; }

/* ===== Footer ===== */
.site-footer { padding-block: 1.75rem; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.footer-inner a { color: var(--ink); }

/* ===== Motion ===== */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .hero-photo { animation: photo-settle 1.8s var(--ease-out) both; }

  @keyframes photo-settle {
    from { transform: scale(1.04); }
    to { transform: scale(1); }
  }
}

/* ===== Responsive ===== */
@media (max-width: 89.99rem) {
  .br-narrow { display: inline; }
}

@media (max-width: 68rem) {
  .brand-tag { display: none; }
}

@media (max-width: 60rem) {
  .specimen-inner { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .specimen-figure { max-width: 34rem; }
  .specimen-leaders,
  .specimen-dot { display: none; }
  .specimen-notes { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; column-gap: 1.5rem; }
  .specimen-notes li { justify-content: flex-start; padding: 0; }

  .closing-inner { grid-template-columns: 1fr; }

  .info-grid,
  .info-grid-2,
  .founder-grid { grid-template-columns: 1fr; }

  .stat-row { grid-template-columns: 1fr; gap: 2rem; }
  .founder-photo { max-width: 20rem; }
}

@media (max-width: 56.25rem) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .main-nav.open { display: flex; }
  .main-nav a { padding-block: 1rem; line-height: 1.5; }
  .main-nav a::after { display: none; }
  .main-nav a.active { text-decoration: underline; text-underline-offset: 0.4em; }
}

@media (max-width: 50rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-block: clamp(2rem, 7vw, 3rem) 1.5rem; padding-right: var(--gutter); }
  .hero-photo { width: calc(100% + var(--gutter) * 0.5); max-width: none; margin-left: calc(var(--gutter) * -0.5); }
}

@media (max-width: 44rem) {
  .hero .cta-row { flex-direction: column; align-items: flex-start; }

  .specimen-notes { grid-template-columns: 1fr; row-gap: 1.5rem; }

  /* The thread turns to run down the left edge */
  .growth { padding-top: 0; }
  .growth-thread { display: none; }
  .growth-thread-v { display: block; top: 0.45rem; width: 2.5rem; height: 100%; }
  .growth-steps { grid-template-columns: 1fr; grid-auto-rows: 1fr; }
  .growth-step { padding: 0 0 2rem 3.5rem; }
  .growth-step::before { left: var(--node-x); top: 0.45rem; }
}

@media (max-width: 23rem) {
  .hero h1 { font-size: 1.75rem; }
}

/* ===== Live panels page: the embedded SFNM monitor ===== */
/* Its tab bar is sticky; park it under the site header. "body" outranks the component's own injected rule. */
body .sfnm .s-tabs { top: calc(var(--header-h) + 1px); }
/* The component styles itself; stop the site's paragraph colour and measure leaking in. */
.sfnm p { color: inherit; max-width: none; }

/* ===== Refinement layer: real material photography and calmer, smoother motion ===== */
.hero-photo {
  mix-blend-mode: normal;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%), linear-gradient(to top, transparent 0%, #000 10%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 12%), linear-gradient(to top, transparent 0%, #000 10%);
  mask-composite: intersect;
  translate: 0 calc(var(--scroll, 0) * -6rem);
  filter: contrast(1.06) saturate(1.04);
}
.specimen-figure img {
  mix-blend-mode: normal;
  filter: drop-shadow(0 28px 36px rgb(40 30 15 / 0.22)) drop-shadow(0 4px 6px rgb(40 30 15 / 0.12));
  transition: transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}
.specimen-figure:hover img { transform: translateY(-6px) rotate(-0.6deg); }
.btn { transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), color 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.btn:active { transform: scale(0.98); }
.site-header { background: rgb(254 254 254 / 0.82); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }

/* Sections settle into place as they enter; content is visible without script */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .specimen-leaders { opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity 0.6s var(--ease-out) 0.45s, clip-path 1.4s var(--ease-out) 0.45s; }
  .js .specimen.is-in .specimen-leaders { opacity: 1; clip-path: inset(0 0 0 0); }
  .js .specimen-dot { scale: 0; transition: scale 0.6s var(--ease-out) 0.3s; }
  .js .specimen.is-in .specimen-dot { scale: 1; }
  .js .specimen-notes li { opacity: 0; translate: 12px 0; transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out); }
  .js .specimen.is-in .specimen-notes li { opacity: 1; translate: 0 0; }
  .js .specimen.is-in .specimen-notes li:nth-child(1) { transition-delay: 0.9s; }
  .js .specimen.is-in .specimen-notes li:nth-child(2) { transition-delay: 1.05s; }
  .js .specimen.is-in .specimen-notes li:nth-child(3) { transition-delay: 1.2s; }
  .js .growth .thread-grown { stroke-dashoffset: 10; transition: stroke-dashoffset 1.6s var(--ease-out) 0.4s; }
  .js .growth.is-in .thread-grown { stroke-dashoffset: 0; }
}

@media (max-width: 60rem) {
  .specimen-inner { grid-template-columns: 1fr; }
  .specimen-figure { max-width: 20rem; margin-inline: auto; }
}

/* ===== Living motion: page transitions, organic reveals, growing hyphae ===== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.45s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 0.7s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; filter: blur(6px); transform: scale(0.985); } }
@keyframes vt-in { from { opacity: 0; filter: blur(8px); clip-path: circle(0% at 50% 40%); } to { opacity: 1; filter: none; clip-path: circle(150% at 50% 40%); } }

.hero, .section-first { position: relative; isolation: isolate; }
.hyphae { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: visible; }
.hyphae path { fill: none; stroke: var(--moss); stroke-linecap: round; opacity: 0.11; }
.hyphae circle { fill: var(--moss); opacity: 0.28; }

@media (prefers-reduced-motion: no-preference) {
  /* sections open like a colony spreading from a point, sharpening as they arrive */
  .js [data-reveal] { opacity: 0; transform: scale(0.97); transform-origin: 30% 50%; filter: blur(12px); transition: opacity 1.1s var(--ease-out), filter 1.3s var(--ease-out), transform 1.6s var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; filter: none; transform: none; }
  .hyphae path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: hypha-grow 3.2s var(--ease-out) forwards; animation-delay: var(--d); }
  .hyphae circle { scale: 0; transform-box: fill-box; transform-origin: center; animation: node-pop 0.8s var(--ease-out) forwards; animation-delay: var(--d); }
  .hero h1, .hero .cta-row { animation: rise 1.2s var(--ease-out) both; }
  .hero .cta-row { animation-delay: 0.25s; }
  .main-nav a, .btn, .text-link { transition-duration: 0.5s; }
  .btn-primary { background-image: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.18), transparent 60%); }
}
@keyframes hypha-grow { to { stroke-dashoffset: 0; } }
@keyframes node-pop { to { scale: 1; } }
@keyframes rise { from { opacity: 0; filter: blur(8px); translate: 0 18px; } }

/* Office visualisation with panels in place of the single sample */
.specimen-inner.is-office { display: block; }
.office { margin: 0 0 clamp(2rem, 4vw, 3.5rem); }
.office svg { display: block; width: 100%; height: auto; border-radius: var(--radius); overflow: hidden; }
.is-office .specimen-notes { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; column-gap: clamp(1.5rem, 4vw, 4rem); }
.is-office .specimen-notes li { padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .office-panels image { opacity: 0; transition: opacity 0.9s var(--ease-out); }
  .js .specimen.is-in .office-panels image { opacity: 1; }
}
@media (max-width: 44rem) { .is-office .specimen-notes { grid-template-columns: 1fr; row-gap: 1.25rem; } }

.office img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
