/* ==========================================================================
   Miðbik - design system
   Type:   Manrope (display + text), JetBrains Mono (specs, labels)
   Colour: asphalt neutrals + one accent, derived from the Miðbik wordmark
           (charcoal #3a3a3a + sprout green #1db954)
   Radius: 8px controls, 14px containers and media. No other radii.
   ========================================================================== */

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------- reset ------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* -------------------------------------------------------- tokens ------ */
:root {
  /* surfaces + ink (light is the default mode) */
  --bg:          #fbfbf9;
  --surface:     #ffffff;
  --surface-2:   #f2f3f0;
  --ink:         #16191c;
  --ink-2:       #4a5157;
  --ink-3:       #666c72;
  --line:        #e2e4df;
  --line-strong: #cfd3cb;

  /* one accent, locked across every page */
  --accent:        #0f7235;   /* text + fills, AA on every surface */
  --accent-hover:  #0b5b2a;
  --accent-ink:    #ffffff;   /* text on accent */
  --accent-wash:   #eaf3ec;   /* tint blocks */
  --accent-mark:   #1db954;   /* the wordmark green: marks only, never text */

  /* product photography sits on a fixed tile in both modes */
  --photo-bg: #ecedea;

  --shadow-sm: 0 1px 2px rgb(22 25 28 / .05), 0 2px 8px rgb(22 25 28 / .04);
  --shadow-md: 0 2px 4px rgb(22 25 28 / .05), 0 12px 32px rgb(22 25 28 / .07);

  /* shape */
  --r-ctrl: 8px;
  --r-box:  14px;

  /* motion - MOTION_INTENSITY 4, restrained */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io:  cubic-bezier(0.77, 0, 0.175, 1);

  /* rhythm - VISUAL_DENSITY 3, airy */
  --pad-x:     clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 2.5rem + 7vw, 8.5rem);
  --max:       1240px;
  --nav-h:     72px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0e1113;
    --surface:     #14181a;
    --surface-2:   #1b2023;
    --ink:         #eef1ee;
    --ink-2:       #a8b1b3;
    --ink-3:       #7d8689;
    --line:        #262c30;
    --line-strong: #394247;

    --accent:       #35c96a;
    --accent-hover: #55dd85;
    --accent-ink:   #06210f;
    --accent-wash:  #14251a;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .40), 0 2px 8px rgb(0 0 0 / .30);
    --shadow-md: 0 2px 4px rgb(0 0 0 / .40), 0 12px 32px rgb(0 0 0 / .45);

    color-scheme: dark;
  }
}

/* ---------------------------------------------------------- base ------ */
body {
  position: relative;
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  color: var(--ink-2);
  background: var(--bg);
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: var(--pad-x); top: 0.5rem;
  transform: translateY(-160%);
  z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: 0.625rem 1rem; border-radius: var(--r-ctrl);
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  transition: transform 180ms var(--ease-out);
}
.skip:focus-visible { transform: translateY(0); }

/* ----------------------------------------------------- typography ----- */
/* Icelandic compounds run long (Malbiksviðgerðir, viðgerðarmalbik), so the
   display scale is capped lower than an English-language site would need.
   Headlines are held to two lines at every breakpoint. */
.display {
  font-size: clamp(2.2rem, 1.45rem + 2.6vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}
.h2 {
  font-size: clamp(1.8rem, 1.3rem + 1.7vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
  font-weight: 800;
  color: var(--ink);
}
.h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  line-height: 1.28;
  letter-spacing: -0.018em;
  font-weight: 700;
  color: var(--ink);
}
.lead {
  font-size: clamp(1.09rem, 1.02rem + 0.4vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 42ch;
}
.prose { max-width: 62ch; }
.prose p + p { margin-top: 1.1em; }
.measure { max-width: 58ch; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* -------------------------------------------------------- layout ----- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
/* Follows a block that already carries bottom padding (a page header, or the
   preceding section), so it only needs padding underneath. Without this the
   two paddings stack into a ~200px dead gap. */
.section--flush { padding-block: 0 clamp(3rem, 2rem + 4vw, 5rem); }
.rule { border-top: 1px solid var(--line); }
.hdr__scrim { display: none; }

/* Height of this decides when the header leaves its overlay state. */
[data-scroll-sentinel] {
  position: absolute; top: 0; left: 0;
  width: 1px; height: var(--stuck-after, 10px);
  pointer-events: none; visibility: hidden;
}

.stack > * + * { margin-top: var(--gap, 1rem); }

/* -------------------------------------------------------- header ----- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.hdr[data-stuck='true'] {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
@supports not (backdrop-filter: blur(1px)) { .hdr { background: var(--bg); } }

/* Overlay state, used only where the header sits on the hero photograph. */
.hdr[data-overlay='true']:not([data-stuck='true']):not([data-open='true']) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
.hdr[data-overlay='true']:not([data-stuck='true']):not([data-open='true']) .brand__dark  { display: none; }
.hdr[data-overlay='true']:not([data-stuck='true']):not([data-open='true']) .brand__light { display: block; }
.hdr[data-overlay='true']:not([data-stuck='true']):not([data-open='true']) .nav a:not(.btn) { color: rgb(255 255 255 / .84); }
.hdr[data-overlay='true']:not([data-stuck='true']):not([data-open='true']) .nav a:not(.btn)[aria-current='page'] { color: #ffffff; }
.hdr[data-overlay='true']:not([data-stuck='true']):not([data-open='true']) .nav a:not(.btn)::after { background: #ffffff; }
.hdr[data-overlay='true']:not([data-stuck='true']):not([data-open='true']) .burger {
  color: #ffffff; border-color: rgb(255 255 255 / .38);
}

.hdr__in {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: 96px; height: auto; }
.brand__light { display: none; }
@media (prefers-color-scheme: dark) {
  .brand__dark  { display: none; }
  .brand__light { display: block; }
}

.nav { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.nav a:not(.btn) {
  position: relative;
  padding: 0.5rem 0.75rem;
  font-size: 0.945rem; font-weight: 600;
  color: var(--ink-2); text-decoration: none;
  border-radius: var(--r-ctrl);
  transition: color 160ms ease;
  white-space: nowrap;
}
.nav a:not(.btn)::after {
  content: ''; position: absolute;
  left: 0.75rem; right: 0.75rem; bottom: 0.28rem; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 200ms var(--ease-out);
}
.nav a:not(.btn)[aria-current='page'] { color: var(--ink); }
.nav a:not(.btn)[aria-current='page']::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.btn):hover { color: var(--ink); }
  .nav a:not(.btn):hover::after { transform: scaleX(1); }
}
.nav__cta { margin-left: 0.5rem; }

.burger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  margin-left: auto;
  border-radius: var(--r-ctrl);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.burger:active { transform: scale(0.94); }
.burger svg { width: 20px; height: 20px; }

/* -------------------------------------------------------- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  border-radius: var(--r-ctrl);
  font-size: 0.97rem; font-weight: 700;
  letter-spacing: -0.006em;
  text-decoration: none;
  white-space: nowrap;              /* CTA labels never wrap */
  cursor: pointer;
  transition: transform 160ms var(--ease-out),
              background-color 160ms ease,
              border-color 160ms ease,
              color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn--sm { padding: 0.55rem 1rem; font-size: 0.92rem; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--accent-hover); }
  .btn--ghost:hover { border-color: var(--ink); background: var(--surface-2); }
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* inline text link with an arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 700; font-size: 0.97rem;
  color: var(--accent); text-decoration: none;
}
.tlink svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .tlink:hover { text-decoration: underline; text-underline-offset: 4px; }
  .tlink:hover svg { transform: translateX(3px); }
}

/* ----------------------------------------------------------- hero ---- */
/* Full-bleed photograph. The header sits over it, so the section pulls up by
   the nav height and pads it back internally. Art-directed: a 2:1 crop on
   desktop, a 3:4 crop on phones, where a wide band would show only tarmac. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* the header is nav-h plus its 1px transparent border */
  margin-top: calc(-1 * (var(--nav-h) + 1px));
  padding-top: calc(var(--nav-h) + 1px);
  /* Full device height. svh rather than dvh: dvh grows as mobile browser
     chrome collapses, which resizes the hero underneath the reader mid-scroll.
     svh is the viewport with chrome showing, which is exactly what is on
     screen at load. vh first as a fallback for older engines. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; display: block; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }

/* Two scrims: one across for the copy, one down the top so the overlaid
   header stays legible against the bright sky. */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgb(8 11 12 / .90) 0%, rgb(8 11 12 / .78) 46%, rgb(8 11 12 / .38) 74%, rgb(8 11 12 / .22) 100%),
    linear-gradient(to bottom, rgb(8 11 12 / .58) 0%, rgb(8 11 12 / 0) 30%);
}
.hero__in { width: 100%; }

/* Only genuinely short screens, i.e. landscape phones. 640px tall is a normal
   portrait phone and a short laptop window, both of which fit the hero fine
   and should still fill the screen. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; }
  .hero__copy { padding-block: 2.25rem; }
}
.hero__copy { max-width: 38rem; padding-block: clamp(3rem, 7vh, 5.5rem); }
.hero .display { color: #f7f9f6; margin-bottom: 1.15rem; }
.hero .lead { color: #e0e5df; max-width: 34rem; margin-bottom: 2rem; }
.hero .btn--ghost { color: #f7f9f6; border-color: rgb(255 255 255 / .42); }
@media (hover: hover) and (pointer: fine) {
  .hero .btn--ghost:hover { background: rgb(255 255 255 / .14); border-color: #ffffff; }
}

/* Matches the <picture> switch: portrait viewports get the tall crop, so they
   also get the bottom-up scrim and full-width copy. */
@media (max-aspect-ratio: 1/1) {
  .hero__copy { max-width: none; }
  .hero::after {
    background:
      linear-gradient(to top, rgb(8 11 12 / .92) 12%, rgb(8 11 12 / .74) 48%, rgb(8 11 12 / .40) 100%),
      linear-gradient(to bottom, rgb(8 11 12 / .62) 0%, rgb(8 11 12 / 0) 28%);
  }
}

/* --------------------------------------------------------- benefits -- */
/* Layout family: asymmetric bento, 1 tall media cell + 2 stacked text cells */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-auto-rows: auto;
  gap: clamp(0.9rem, 1.5vw, 1.25rem);
}
.cell {
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  background: var(--surface);
  display: flex; flex-direction: column;
}
.cell__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-ctrl);
  background: var(--accent-wash);
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.cell__icon svg { width: 21px; height: 21px; }
.cell .h3 { margin-bottom: 0.55rem; }
.cell p { font-size: 0.985rem; line-height: 1.6; }

/* the tall media cell spans both rows on the left */
.cell--media {
  grid-row: span 2;
  padding: 0;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
  min-height: 340px;
}
.cell--media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cell--media .cell__body {
  position: relative; z-index: 1; margin-top: auto;
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  background: linear-gradient(to top, rgb(8 11 12 / .88) 0%, rgb(8 11 12 / .72) 45%, rgb(8 11 12 / 0) 100%);
}
.cell--media .h3, .cell--media p { color: #f4f6f3; }
.cell--media .cell__icon { background: rgb(255 255 255 / .14); color: #ffffff; }

/* the tinted cell, for background variation inside the grid */
.cell--wash { background: var(--accent-wash); border-color: transparent; }

/* ------------------------------------------------------------ proof -- */
/* Layout family: figure row over a monochrome logo wall */
.figs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 3rem);
  margin-bottom: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.fig__n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.fig p { font-size: 0.95rem; line-height: 1.55; max-width: 30ch; }

/* Logo wall. Each mark carries its own --lh so the row is balanced optically
   rather than by height: tall crests (Höfði, Árborg) need more, wide wordmarks
   (Lýsi, SASS) need less. Height-normalising alone leaves the crests tiny. */
/* Grid rather than flex: with seven marks of very different proportions, even
   columns give a steadier rhythm than space-between, and the wrap is
   predictable at every breakpoint. */
.logos {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  align-items: center; justify-items: center;
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
  max-width: 1080px;
  padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  border-top: 1px solid var(--line);
}
/* The anchor carries the hit area and the hover state, so the target is a
   comfortable size even where the mark itself is only 30px tall. */
.logos a {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.35rem;
  border-radius: var(--r-ctrl);
  opacity: 0.58;
  transition: opacity 200ms ease, transform 160ms var(--ease-out);
}
.logos a:active { transform: scale(0.97); }
.logos a:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .logos a:hover { opacity: 1; }
}
.logos img {
  height: var(--lh, 40px); width: auto;
  max-width: 170px;
  object-fit: contain;
}
.logos--few { --cols: 3; max-width: 620px; }
@media (prefers-color-scheme: dark) {
  .logos img { filter: invert(1); }
  .logos a { opacity: 0.7; }
}


/* -------------------------------------------------------------- faq -- */
/* Layout family: stacked header over a full-width accordion list */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%;
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 1.4rem 0;
  text-align: left;
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  cursor: pointer;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .faq__q:hover { color: var(--accent); } }
.faq__q span { flex: 1; }
.faq__q svg {
  width: 20px; height: 20px; flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--ink-3);
  transition: transform 240ms var(--ease-out), color 160ms ease;
}
.faq__q[aria-expanded='true'] svg { transform: rotate(180deg); color: var(--accent); }

/* grid-row trick keeps the panel mounted so the transition is interruptible */
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms var(--ease-out);
}
.faq__q[aria-expanded='true'] + .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p {
  padding-bottom: 1.5rem;
  padding-right: clamp(0rem, 6vw, 3.5rem);
  max-width: 68ch;
  font-size: 1rem;
}

/* -------------------------------------------------------- cta band --- */
/* Layout family: full-bleed image band with a scrim */
.band {
  position: relative;
  border-radius: var(--r-box);
  overflow: hidden;
  isolation: isolate;
  padding: clamp(3rem, 2rem + 5vw, 6rem) clamp(1.5rem, 1rem + 4vw, 4.5rem);
}
.band img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.band::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgb(8 11 12 / .90) 0%, rgb(8 11 12 / .78) 45%, rgb(8 11 12 / .45) 100%);
}
.band__in { max-width: 34ch; }
.band .h2 { color: #f7f9f6; margin-bottom: 0.9rem; }
.band p { color: #cfd6cf; margin-bottom: 2rem; font-size: 1.05rem; }
.band .btn--ghost { color: #f7f9f6; border-color: rgb(255 255 255 / .38); }
@media (hover: hover) and (pointer: fine) {
  .band .btn--ghost:hover { background: rgb(255 255 255 / .12); border-color: #ffffff; }
}

/* ----------------------------------------------------- section head -- */
.shead { margin-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem); }
.shead .h2 { margin-bottom: 0.85rem; }
.shead p { max-width: 52ch; font-size: 1.05rem; }

/* --------------------------------------------------------- products -- */
/* 6 products, 3 columns, 2 full rows. No empty cells at any breakpoint. */
.pgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.5vw, 1.5rem);
}
@media (max-width: 940px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pgrid { grid-template-columns: 1fr; } }

/* page header: left-aligned, its own family, distinct from the home hero */
.phead { padding-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); padding-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.phead .display { max-width: 18ch; margin-bottom: 1.1rem; }
.phead .lead { max-width: 54ch; }

/* split block: copy beside a supporting panel */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.split__media { border-radius: var(--r-box); overflow: hidden; background: var(--photo-bg); }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pcard {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .pcard:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
}
.pcard__media {
  background: var(--photo-bg);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.pcard__body .mono { margin-bottom: 0.55rem; }
.pcard__body .h3 { margin-bottom: 0.5rem; }
.pcard__body p { font-size: 0.955rem; line-height: 1.6; }
.pcard__spec {
  margin-top: auto; padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.chip {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
}

/* ------------------------------------------------------- editorial --- */
/* Layout family: sticky side column beside a reading column */
.ed {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.ed__side { position: sticky; top: calc(var(--nav-h) + 2rem); }
.ed__side img { border-radius: var(--r-box); width: 100%; }
.ed__body p { font-size: 1.06rem; }
.ed__body p + p { margin-top: 1.15em; }

/* timeline: grouped rows, one hairline between groups only */
.tl { display: grid; gap: 0; }
.tl__row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.tl__row:last-child { border-bottom: 0; }
.tl__yr {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.95rem; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.tl__row .h3 { margin-bottom: 0.35rem; }
.tl__row p { font-size: 0.985rem; max-width: 56ch; }

/* --------------------------------------------------------- contact --- */
.cgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.field .hint { font-size: 0.82rem; color: var(--ink-3); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctrl);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { resize: vertical; min-height: 132px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field .err { font-size: 0.85rem; font-weight: 600; color: #b3261e; display: none; }
@media (prefers-color-scheme: dark) { .field .err { color: #ff9a90; } }
.field[data-invalid='true'] input,
.field[data-invalid='true'] textarea { border-color: #b3261e; }
.field[data-invalid='true'] .err { display: block; }

.form__note { font-size: 0.88rem; color: var(--ink-3); }
.form__status {
  display: none;
  padding: 1rem 1.15rem;
  border-radius: var(--r-ctrl);
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--ink);
  font-size: 0.95rem; font-weight: 600;
}
.form__status[data-show='true'] { display: block; }

.info { display: grid; gap: 1.5rem; }
.info__row { display: flex; gap: 0.9rem; align-items: flex-start; }
.info__row svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 0.22rem; }
.info__row strong { display: block; color: var(--ink); font-size: 0.98rem; margin-bottom: 0.15rem; }
.info__row a { font-weight: 600; }
.info__row p { font-size: 0.97rem; }

.aside {
  padding: clamp(1.5rem, 1rem + 1.5vw, 2rem);
  border-radius: var(--r-box);
  background: var(--surface-2);
}
.aside .h3 { margin-bottom: 0.6rem; }
.aside p { font-size: 0.97rem; }

/* ---------------------------------------------------------- footer --- */
.ftr { border-top: 1px solid var(--line); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2rem; }
.ftr__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.ftr__brand img { width: 104px; margin-bottom: 1rem; }
.ftr__brand p { font-size: 0.95rem; max-width: 34ch; }
.ftr h2 { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 0.9rem; }
.ftr ul { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.ftr ul a, .ftr ul span { font-size: 0.95rem; color: var(--ink-2); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .ftr ul a:hover { color: var(--accent); } }
.ftr__base {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  align-items: center; justify-content: space-between;
  font-size: 0.875rem; color: var(--ink-3);
}

/* ---------------------------------------------------------- motion --- */
/* Purpose: sequence content as it enters, so the eye lands on the headline
   before the supporting detail. Once only, never blocks interaction.      */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  /* keep the accordion usable without motion */
  .faq__a { transition: none; }
}

/* ------------------------------------------------------ responsive --- */
@media (max-width: 1000px) {
  .ftr__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ftr__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }

  .logos { --cols: 3; }
  .logos img { height: calc(var(--lh, 40px) * 0.86); }

  .burger { display: flex; }

  /* Menu panel stays mounted so open/close is a real, interruptible transition
     rather than a display swap. visibility keeps links out of the tab order
     while closed. A scrim dims the page so the panel's CTA is not confused
     with the hero CTA sitting directly beneath it. */
  .nav {
    display: flex;
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; align-items: stretch;
    gap: 0.25rem;
    margin-left: 0;
    padding: 0.75rem var(--pad-x) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 200ms var(--ease-out),
                transform 200ms var(--ease-out),
                visibility 0s linear 200ms;
  }
  .hdr[data-open='true'] .nav {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 200ms var(--ease-out),
                transform 200ms var(--ease-out),
                visibility 0s;
  }
  /* The scrim lives outside .hdr on purpose: backdrop-filter on the header
     makes it the containing block for fixed children, which would collapse
     a scrim positioned inside it to the header's own 64px box. */
  .hdr__scrim {
    display: block;
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 90;
    background: color-mix(in srgb, var(--ink) 52%, transparent);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms;
  }
  .hdr[data-open='true'] + .hdr__scrim {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 200ms var(--ease-out), visibility 0s;
  }
  .nav a:not(.btn) { padding: 0.8rem 0.5rem; font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta { margin: 0.5rem 0 0; }
  .nav .btn { width: 100%; }


  .bento { grid-template-columns: 1fr; }
  .cell--media { grid-row: auto; min-height: 300px; }

  .ed { grid-template-columns: 1fr; }
  .ed__side { position: static; }

  .cgrid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .figs { grid-template-columns: 1fr; gap: 1.75rem; }
  .fig { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1.25rem; align-items: baseline; }
  .fig__n { margin-bottom: 0; }
  .tl__row { grid-template-columns: 1fr; gap: 0.4rem; }
  .ftr__grid { grid-template-columns: 1fr; }
  .ftr__base { flex-direction: column; align-items: flex-start; }
  .logos { --cols: 3; gap: 1.5rem 1.25rem; }
  .logos img { height: calc(var(--lh, 40px) * 0.74); }
}

@media (max-width: 480px) {
  .btn-row .btn { width: 100%; }
  .band { padding-inline: 1.5rem; }
}
