/* Lochlytic site styles. Brand tokens live in :root; swap them when the logo lands. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
/* Size-adjusted fallbacks so the swap to Geist doesn't shift layout. */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 105.16%;
  ascent-override: 95.57%;
  descent-override: 28.05%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Mono Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 127.08%;
  ascent-override: 79.08%;
  descent-override: 23.21%;
  line-gap-override: 0%;
}

:root {
  --ink: #0E1A22;        /* near-black blue, text and dark sections */
  --ink-soft: #3A4A55;   /* body text */
  --muted: #5B6B75;      /* small print */
  --paper: #F7F8F6;      /* page background */
  --surface: #FFFFFF;    /* cards, form panel */
  --line: #DCE2E0;       /* borders, dividers */
  --accent: #1F7A74;     /* loch teal, placeholder until logo */
  --accent-ink: #17625D; /* accent hover */
  --accent-2: #7FC8BE;   /* lighter teal for lines/glows on dark */
  --accent-wash: #E6F2F0;
  --error: #B42318;
  --dark-text: #E8EEEC;
  --dark-soft: #A9B8BE;
  --dark-line: #24343E;

  --radius: 14px;
  --maxw: 1120px;
  --gutter: 24px;
  --section: clamp(32px, 4.5vw, 56px);
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Geist", "Geist Fallback", system-ui, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace;
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --nav-h: 60px; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.1875rem; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
  margin: 0 0 14px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn .arrow { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; white-space: nowrap; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.65; cursor: progress; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.nav.is-scrolled, .nav.is-open {
  background: rgb(247 248 246 / 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-logo { display: inline-flex; margin-right: auto; border-radius: 6px; }
.nav-logo img { width: 207px; height: auto; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgb(14 26 34 / 0.05); }

.menu-btn { display: none; }

@media (max-width: 760px) {
  .nav-logo img { width: 172px; }
  .js .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
  }
  .menu-icon, .menu-icon::before {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s var(--ease);
  }
  .menu-icon { position: relative; transform: translateY(-3px); }
  .menu-icon::before { content: ""; position: absolute; top: 6px; }
  .menu-btn[aria-expanded="true"] .menu-icon { transform: translateY(0) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(-6px) rotate(-90deg); }

  .js .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -24px rgb(14 26 34 / 0.35);
    display: none;
  }
  .js .nav.is-open .nav-links { display: flex; }
  .js .nav-links a { padding: 12px 4px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .nav-links li:last-child a { border-bottom: 0; }

  /* Without JS, links stay visible and wrap under the logo row. */
  html:not(.js) .nav { position: absolute; height: auto; }
  html:not(.js) .nav-inner { flex-wrap: wrap; padding-block: 10px; }
  html:not(.js) nav { order: 3; width: 100%; }
  html:not(.js) .nav-links { flex-wrap: wrap; }
}

@media (max-width: 460px) {
  .nav-logo img { width: 152px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .js .menu-btn { padding: 0; width: 44px; }
  .nav-inner { gap: 8px; }
  .nav .btn-sm { padding: 8px 14px; }
}

@media (max-width: 374px) {
  .nav-logo img { width: 138px; }
}

@media (max-width: 350px) {
  .nav-logo img { width: 124px; }
}

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

main { display: block; }
.section { padding-block: var(--section); }
.section-tight { padding-block: calc(var(--section) * 0.6); }

.section-head { max-width: 960px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 + p { margin-top: 18px; font-size: 1.125rem; max-width: 720px; }

/* Motif divider between sections: a line, three nodes, one slow travelling glint */
.divider {
  position: relative;
  height: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.divider::before, .divider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}
.divider::before { background: var(--line); }
.divider::after {
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat;
  background-size: 120px 1px;
  background-position: -120px 0;
  animation: glint 9s linear infinite;
}
@keyframes glint { to { background-position: calc(100% + 120px) 0; } }
.divider span {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
}
.divider span:nth-child(2) { background: var(--accent); }

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

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(28px, 3vw, 36px));
  padding-bottom: clamp(24px, 4vw, 48px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 80% 40%, rgb(127 200 190 / 0.18), transparent 70%),
    radial-gradient(40% 50% at 10% 0%, rgb(127 200 190 / 0.10), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 11ch;
}
.hero-title .w { display: inline-block; }
.lede {
  margin-top: 24px;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 480px; margin-inline: auto; width: 100%; }
}

/* Flow diagram (hero) */
.flow .grid-dot { fill: var(--line); }
.flow .track { fill: none; stroke: #C6D1CE; stroke-width: 1.25; }
.flow .pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0.1 99.9;
  stroke-dashoffset: 0;
}
.flow .node rect { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.flow .node text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  fill: var(--ink-soft);
  letter-spacing: 0.02em;
}
.flow .node-core rect { fill: var(--ink); stroke: var(--ink); }
.flow .node-core text { fill: #fff; font-size: 13px; }
.flow .node-core .ring { fill: none; stroke: var(--accent-2); stroke-width: 1.25; opacity: 0.6; }
.flow .port { fill: var(--accent); }

/* ---------- Services ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; gap: 14px; } }

.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px -18px rgb(14 26 34 / 0.28);
}
.card .icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent);
}
.card h3 { margin-bottom: 10px; }
.card > p { font-size: 1rem; }
.includes-label {
  display: block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.includes-list { margin-top: 8px; display: grid; gap: 4px; }
.includes-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.includes-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.card-foot { margin-top: auto; }
.card > p + .card-foot { padding-top: 4px; }

/* ---------- Platforms ---------- */

.platforms {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.platforms .section-head { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}
.chips li.chip-alt {
  background: transparent;
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 860px) { .platforms { grid-template-columns: 1fr; } }

/* ---------- Team experience ---------- */

.experience-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: 28px; }
.experience-head .eyebrow { margin: 0; }
.experience-head p { font-size: 0.9375rem; color: var(--muted); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats li { padding: 32px 28px 32px 0; }
.stats li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label { display: block; margin-top: 12px; font-size: 1rem; max-width: 26ch; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .stats li, .stats li + li { padding: 24px 0; border-left: 0; }
  .stats li + li { border-top: 1px solid var(--line); }
}

/* ---------- How we work (dark) ---------- */

.dark {
  background: var(--ink);
  color: var(--dark-soft);
  position: relative;
  overflow: hidden;
}
.dark h2, .dark h3 { color: #fff; }
.dark .eyebrow { color: var(--accent-2); }
.dark :focus-visible { outline-color: var(--accent-2); }
.dark .section-head p { color: var(--dark-soft); }
.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(127 200 190 / 0.10) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.dark .wrap { position: relative; }

.steps {
  --gap: 32px;
  --node: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  counter-reset: step;
}
.step { position: relative; }
.step-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  margin-bottom: 24px;
  border: 1px solid var(--accent-2);
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { font-size: 1rem; }
/* Connector from this step's node to the next one */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--node) / 2);
  left: calc(var(--node) + 8px);
  width: calc(100% + var(--gap) - var(--node) - 16px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent-2), rgb(127 200 190 / 0.35));
  transform-origin: left center;
}
.js .step:not(:last-child)::after { transform: scaleX(0); transition: transform 0.7s var(--ease); }
.js .steps.is-in .step::after { transform: scaleX(1); }
.js .steps.is-in .step:nth-child(2)::after { transition-delay: 0.25s; }
.js .steps.is-in .step:nth-child(3)::after { transition-delay: 0.5s; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; --gap: 0px; }
  .step { display: grid; grid-template-columns: var(--node) 1fr; column-gap: 20px; padding-bottom: 36px; }
  .step:last-child { padding-bottom: 0; }
  .step-node { grid-row: span 2; margin-bottom: 0; }
  .step h3 { align-self: center; min-height: var(--node); display: flex; align-items: center; margin-bottom: 4px; }
  .step:not(:last-child)::after {
    top: calc(var(--node) + 8px);
    left: calc(var(--node) / 2);
    width: 1px;
    height: calc(100% - var(--node) - 16px);
    background: linear-gradient(180deg, var(--accent-2), rgb(127 200 190 / 0.35));
    transform-origin: center top;
  }
  .js .step:not(:last-child)::after { transform: scaleY(0); }
  .js .steps.is-in .step::after { transform: scaleY(1); }
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.people { display: grid; gap: 20px; }
.person {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.person-photo {
  width: 148px;
  height: 148px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--accent-wash);
}
.person-name { font-size: 1.375rem; }
.person-role {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.person-bio { margin-top: 14px; font-size: 1rem; }
.person-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.person-link:hover { border-color: var(--accent); color: var(--accent); }
.person-link svg { width: 18px; height: 18px; }

.network {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent-wash), rgb(230 242 240 / 0.3));
}
.network p { font-size: 1.0625rem; color: var(--ink-soft); }
.network svg { width: 100%; max-width: 260px; height: auto; color: var(--accent); }

@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .person { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  .person-photo { width: 112px; height: 112px; }
  .network { padding: 22px; }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-info .lede { margin-top: 18px; font-size: 1.125rem; }
.contact-info .btn { margin-top: 28px; }
.contact-lines { margin-top: 32px; display: grid; gap: 10px; font-size: 1rem; }
.contact-lines li { display: flex; align-items: center; gap: 12px; }
.contact-lines svg { flex: none; width: 18px; height: 18px; color: var(--accent); }
.contact-lines a { color: var(--ink); font-weight: 500; }

.panel {
  padding: clamp(20px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 48px -36px rgb(14 26 34 / 0.35);
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--ink); font-weight: 500; font-size: 0.9375rem; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #C6D1CE;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { min-height: 148px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6E7D86; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(31 122 116 / 0.18);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(180 35 24 / 0.15); }
.field-error { color: var(--error); font-size: 0.875rem; min-height: 0; }
.field-error:empty { display: none; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.turnstile-slot { min-height: 74px; }
.turnstile-slot.is-compact { min-height: 149px; }

.form-actions { display: grid; gap: 14px; }
.form-actions .btn { justify-self: start; }
.form-note { font-size: 0.875rem; color: var(--muted); }
.form-error {
  padding: 12px 14px;
  border-radius: 10px;
  background: #FEF3F2;
  color: var(--error);
  font-size: 0.9375rem;
}
.form-error a { color: var(--error); font-weight: 500; }

.form-success {
  display: grid;
  gap: 12px;
  padding: 12px 0;
  color: var(--ink);
  font-size: 1.125rem;
}
.form-success:focus { outline: none; }
.form-success .check {
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
}
.noscript-note { font-size: 1rem; }
html:not(.js) .form { display: none; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

.footer {
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.footer-logo img { width: 104px; height: auto; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-meta a { color: var(--ink-soft); }
.footer-meta a:hover { color: var(--accent); }
.copyright { width: 100%; font-size: 0.875rem; }

/* ---------- Text pages (privacy, 404) ---------- */

.page {
  padding-top: calc(var(--nav-h) + clamp(24px, 3.5vw, 44px));
  padding-bottom: var(--section);
}
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
.prose .updated { margin-top: 12px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); }
.prose .intro { margin-top: 28px; font-size: 1.125rem; }
.prose h2 { font-size: 1.375rem; margin-top: 48px; margin-bottom: 12px; letter-spacing: -0.01em; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose ul { display: grid; gap: 8px; }
.prose li { position: relative; padding-left: 20px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.prose strong { color: var(--ink); font-weight: 600; }
.notfound .btn { margin-top: 32px; }
.notfound .lede { margin-top: 18px; }

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

/* Reveal on scroll: JS adds .is-in once; CSS animates. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Cards keep their quick hover transition after revealing. */
.js .card[data-reveal].is-in {
  transition: opacity 0.5s var(--ease) var(--d, 0ms), transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

/* Hero entrance */
@keyframes rise {
  from { opacity: 0; transform: translateY(0.4em); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.js .hero .eyebrow { animation: fade-up 0.5s var(--ease) both; }
.js .hero-title .w { animation: rise 0.5s var(--ease) both; animation-delay: calc(60ms + var(--i) * 55ms); }
.js .hero .lede { animation: fade-up 0.5s var(--ease) 0.3s both; }
.js .hero-actions { animation: fade-up 0.5s var(--ease) 0.38s both; }
.js .hero-art { animation: fade-up 0.8s var(--ease) 0.1s both; }

/* Data dots travelling along the flow lines */
@keyframes travel { to { stroke-dashoffset: -100; } }
.flow .pulse { animation: travel var(--t, 10s) linear infinite; animation-delay: var(--delay, 0s); }
@keyframes ring { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.7; } }
.flow .node-core .ring { animation: ring 5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .step:not(:last-child)::after { transform: none; }
  .flow .pulse { display: none; }
  .card:hover { transform: none; }
}
