/* =====================================================================
   RespMech — respmech.dk
   Design system. One file: tokens → base → layout → components → motion
   → responsive → reduced-motion → print.

   Brand bridge:
   • Old respmech.dk identity — azure #03A9F4 + orange #FF9800 over dark
     slate, Muli/Mulish type, a "graphs · code · calculations" texture.
   • New RespMech branding — the azure "signal-tile" logo and the desktop
     app's calm, light "scientific instrument" UI (steel-blue #2C6E9B,
     white cards on a soft neutral canvas).

   CSP note: no inline styles anywhere. All SVG in the HTML uses
   presentation attributes only; every animation lives here.
   ===================================================================== */

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body { min-height: 100%; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
/* Two-tone focus ring so it meets ≥3:1 on BOTH light and dark grounds: the
   steel outline carries light backgrounds, the azure glow carries dark ones. */
:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(3,169,244,.4); border-radius: 3px; }

/* skip-to-content link — first focusable element, visible on focus only */
.skip { position: absolute; left: 50%; top: -60px; transform: translateX(-50%); z-index: 100;
  background: var(--surface); color: var(--steel); font-weight: 700; padding: .6rem 1.1rem;
  border: 1px solid var(--border); border-radius: 0 0 10px 10px; box-shadow: var(--shadow-md);
  transition: top .18s var(--ease); }
.skip:focus-visible { top: 0; }

/* --------------------------------------------------------------- tokens */
:root {
  /* old-brand accents (used on dark grounds) */
  --azure:        #03A9F4;
  --azure-hi:     #29B6F6;
  --azure-lo:     #0277BD;
  --azure-soft:   #5FC7FB;
  --azure-bright: #2EBCFC;
  --orange:       #FF9800;
  --orange-deep:  #F57C00;
  --orange-soft:  #FFAD33;
  --orange-text:  #A85400;   /* darkened orange for TEXT on light grounds — AA ≥ 4.5:1 on white, canvas & surface-alt */

  /* slate hero / dark bands */
  --slate-top: #22303F;
  --slate-mid: #1a2531;
  --slate-bot: #151C24;
  --ink:       #0B0E13;
  --data-ink:  #8FB6D6;   /* faint data-texture ink (from the splash) */

  /* app light palette ("scientific instrument") */
  --canvas:       #EEF1F5;
  --surface:      #FFFFFF;
  --surface-alt:  #F5F8FA;
  --steel:        #2C6E9B;
  --steel-hover:  #2A6591;
  --steel-press:  #24597F;
  --steel-soft:   #E6F0F7;
  --text:         #1F2933;
  --text-2:       #33404D;
  --muted:        #5C6B7A;
  --border:       #D8DEE6;
  --border-strong:#C4CCD6;
  --grid:         #E6EBF0;

  /* status (from the app theme) */
  --ok:    #1F7A4D;
  --warn:  #B7791F;
  --error: #B4322A;

  /* light-text on slate */
  --on-dark:       #F1F6FB;
  --on-dark-muted: #9DB0C2;   /* AA on slate even under the azure radial wash */
  --on-dark-faint: #93A4B7;   /* was #6b7d90 — that failed AA on the slate/footer */

  --focus: var(--azure);

  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* scale */
  --maxw: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.75rem);
  --radius:   14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --shadow-sm: 0 1px 2px rgba(20,32,44,.06), 0 2px 6px rgba(20,32,44,.05);
  --shadow-md: 0 4px 14px rgba(20,32,44,.08), 0 12px 34px rgba(20,32,44,.08);
  --shadow-lg: 0 10px 30px rgba(11,24,40,.14), 0 30px 70px rgba(11,24,40,.16);
  --shadow-slate: 0 20px 60px rgba(5,12,20,.45);
}

/* ------------------------------------------------------------- base type */
body {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--text);
  font-size: 1.0625rem;                 /* 17px */
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: var(--text); text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); letter-spacing: -.01em; }
h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
p { color: var(--text-2); }
.lede, .section-head p, .hero-lede, .stack p, .stack { text-wrap: pretty; }
strong { color: var(--text); font-weight: 700; }
code, kbd, samp { font-family: var(--font-mono); font-size: .92em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--steel);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--orange); border-radius: 2px; }
.lede { font-size: clamp(1.06rem, 1.7vw, 1.28rem); color: var(--muted); line-height: 1.62; }
.muted { color: var(--muted); }

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.6rem, 8vw, 6.5rem); position: relative; }
.section--tight { padding-block: clamp(2.4rem, 5vw, 3.4rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .lede { margin-top: .9rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
/* mirror the orange tick on the trailing side so a centered eyebrow is on-axis */
.section-head--center .eyebrow::after { content: ""; width: 22px; height: 2px; background: var(--orange); border-radius: 2px; flex: none; }
.eyebrow::before { flex: none; }

.section--alt { background: var(--surface-alt); border-block: 1px solid var(--border); }
.section--surface { background: var(--surface); }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.6rem; }

/* dark bands echo the splash */
.section--slate {
  background:
    radial-gradient(120% 90% at 15% 8%, rgba(3,169,244,.16), transparent 60%),
    linear-gradient(170deg, var(--slate-top), var(--slate-bot));
  color: var(--on-dark);
  overflow: hidden;
}
.section--slate h1, .section--slate h2, .section--slate h3, .section--slate h4 { color: var(--on-dark); }
.section--slate p { color: var(--on-dark-muted); }
.section--slate .eyebrow { color: var(--azure-soft); }
.section--slate .lede { color: var(--on-dark-muted); }
.section--slate strong, .hero strong { color: #fff; }

/* graph-paper texture, used behind dark bands (pure CSS, no assets) */
.gridwash { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(143,182,214,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,182,214,.07) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(130% 100% at 50% 0%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(130% 100% at 50% 0%, #000 55%, transparent 100%);
}

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(21,28,36,.9);                                   /* fallback if color-mix unsupported */
  background: color-mix(in srgb, var(--slate-bot) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(143,182,214,.14);
}
/* If backdrop-filter is unavailable, keep the bar fully opaque for legibility. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(21,28,36,.98); }
}
.site-header .wrap { display: flex; align-items: center; gap: 1.4rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--on-dark); letter-spacing: -.02em; font-size: 1.18rem; }
.brand svg, .brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 3px 10px rgba(2,119,189,.5); }
.brand .accent { color: var(--orange); }
.nav { margin-left: auto; display: flex; align-items: center; gap: .3rem; }
.nav a { position: relative; padding: .5rem .7rem; border-radius: 8px; font-size: .93rem; font-weight: 600; color: var(--on-dark-muted); white-space: nowrap; transition: color .2s, background .2s; }
.nav a:hover { color: var(--on-dark); background: rgba(143,182,214,.1); }
.nav a[aria-current="true"] { color: var(--azure-soft); }
.nav a[aria-current="true"]::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: 3px; height: 2px; border-radius: 2px; background: var(--orange); }
.nav a.nav-cta[aria-current="true"]::after { display: none; }
.nav a.nav-cta { color: var(--on-dark); background: rgba(3,169,244,.16); border: 1px solid rgba(95,199,251,.3); }
.nav a.nav-cta:hover { background: rgba(3,169,244,.28); }
.nav-ext::after, .link-ext::after { content: "↗"; font-size: .8em; margin-left: .25em; opacity: .7; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(143,182,214,.28); background: rgba(143,182,214,.08); color: var(--on-dark); align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.35em; border-radius: 11px; font-weight: 700; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; }
.btn--primary { background: linear-gradient(180deg, var(--orange-soft), var(--orange)); color: #241200; box-shadow: 0 6px 18px rgba(255,152,0,.32); }
.btn--primary:hover { background: linear-gradient(180deg, var(--orange), var(--orange-deep)); box-shadow: 0 8px 24px rgba(255,152,0,.4); }
.btn--steel { background: var(--steel); color: #fff; box-shadow: 0 6px 16px rgba(44,110,155,.28); }
.btn--steel:hover { background: var(--steel-hover); }
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--steel); background: var(--steel-soft); }
.btn--ghost-dark { background: rgba(241,246,251,.06); border-color: rgba(143,182,214,.34); color: var(--on-dark); }
.btn--ghost-dark:hover { background: rgba(241,246,251,.12); border-color: var(--azure-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

.link { color: var(--steel); font-weight: 600; border-bottom: 1.5px solid color-mix(in srgb, var(--steel) 35%, transparent); transition: border-color .2s, color .2s; }
.link:hover { border-color: var(--steel); }
.section--slate .link { color: var(--azure-soft); border-bottom-color: rgba(95,199,251,.4); }

/* --------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .38em .8em; border-radius: 999px; font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.chip svg { width: 1.05em; height: 1.05em; color: var(--steel); }
.chip--dark { background: rgba(143,182,214,.08); border-color: rgba(143,182,214,.22); color: var(--on-dark-muted); }
.chip--dark svg { color: var(--azure-soft); }
.chip--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden;
  background:
    radial-gradient(90% 70% at 12% 0%, rgba(3,169,244,.22), transparent 55%),
    radial-gradient(70% 60% at 92% 12%, rgba(2,119,189,.20), transparent 60%),
    linear-gradient(165deg, var(--slate-top) 0%, var(--slate-mid) 45%, var(--slate-bot) 100%);
  color: var(--on-dark);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem); }
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); color: #fff; letter-spacing: -.03em; }
/* orange underline that follows the text and wraps cleanly on narrow screens
   (a background gradient underlines each line-box; no fixed-width overflow). */
.hero h1 .u {
  background-image: linear-gradient(var(--orange), var(--orange));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% .09em;
  padding-bottom: .04em;
}
.hero-sub { font-size: clamp(1.05rem, 1.9vw, 1.28rem); color: var(--azure-soft); font-weight: 600; margin-top: 1.1rem; }
.hero-lede { color: var(--on-dark-muted); margin-top: .8rem; max-width: 34rem; font-size: 1.06rem; }
.hero .btn-row { margin-top: 1.8rem; }
.hero .chips { margin-top: 1.6rem; }

/* hero signal figure (the animated flow + EMG motif in the tile) */
.hero-figure { position: relative; aspect-ratio: 1 / 1; max-width: 460px; justify-self: center; width: 100%; }
.hero-figure .halo { position: absolute; inset: -8% ; background: radial-gradient(circle at 50% 45%, rgba(3,169,244,.35), transparent 62%); filter: blur(6px); z-index: 0; }
.hero-figure svg { position: relative; z-index: 1; width: 100%; height: 100%; filter: drop-shadow(0 24px 60px rgba(2,60,110,.55)); }

/* scattered analysis tokens behind the hero (echo the splash texture) */
.hero-tokens { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-tokens span {
  position: absolute; font-family: var(--font-mono); font-size: .82rem; color: var(--data-ink);
  opacity: .16; white-space: nowrap;
}

/* animated signal strokes (draw + breathe).
   Base state is a SOLID line (no dasharray) so the no-JS hero logo renders
   correctly; the draw animation's dasharray is applied only under html.js. */
.sig-flow, .sig-emg { stroke-dasharray: none; }
.sig-breathe { transform-box: fill-box; transform-origin: center; }

/* ---------------------------------------------------------- trust strip */
.trust { border-block: 1px solid var(--border); background: var(--surface); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: .9rem 1.5rem; align-items: center; justify-content: center; padding-block: 1.05rem; }
.trust-item { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.trust-item svg { width: 1.15rem; height: 1.15rem; color: var(--steel); flex: none; }

/* --------------------------------------------------------------- cards */
.grid-cards { display: grid; gap: 1.25rem; }
/* grid items default to min-width:auto, which lets wide content (code blocks,
   long URLs) push a track past the viewport. Let items shrink so their own
   overflow-x:auto scrolls instead of the page. */
.grid-cards > *, .split > * { min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3 { margin-bottom: .5rem; }
/* 4-up rows: reserve a two-line heading slot so body-text tops align */
@media (min-width: 961px) {
  .cols-4 .card h3 { min-height: 2.24em; }   /* 2 lines x 1.12 line-height */
}
/* install cards: bottom-align the last block (button / chips) across the row */
#install .card { display: flex; flex-direction: column; }
#install .card > :last-child { margin-top: auto; }
/* The download button and its two links are one call to action, so they sit together and
   the rule above bottom-aligns the pair rather than separating them. `gap` owns the spacing
   here, which is why .install-links drops .figcap's own margin-top: two sources of vertical
   space in the same stack is how the links ended up cramped against the button. */
.install-cta { display: flex; flex-direction: column; gap: 1.15rem; }
.install-links { margin-top: 0; display: flex; flex-direction: column; gap: .6rem;
  align-items: flex-start; }
@media (max-width: 640px) {
  /* On a phone the whole card is one column and the button is a full-width target, so the
     links need more air to read as separate choices rather than as its caption. */
  .install-cta { gap: 1.6rem; }
  .install-links { gap: .85rem; }
}
.card p { font-size: .98rem; color: var(--muted); }
.card .medallion { margin-bottom: 1.05rem; }

.medallion { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--steel-soft), #fff); border: 1px solid var(--border);
  color: var(--steel); box-shadow: var(--shadow-sm); }
.medallion svg { width: 27px; height: 27px; }
.card--slate .medallion { background: linear-gradient(160deg, rgba(3,169,244,.2), rgba(2,119,189,.08)); border-color: rgba(95,199,251,.28); color: var(--azure-soft); }

.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--steel); text-transform: uppercase; }
.kicker--hot { color: var(--orange-text); }
.section--slate .kicker { color: var(--azure-soft); }

/* ---------------------------------------------------------- split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; }
.split--top { align-items: start; }
.split--wide-media { grid-template-columns: .9fr 1.1fr; }
/* media-first rows: give the media the WIDE track (mirror of --wide-media) */
.split--flip { grid-template-columns: 1.1fr .9fr; }
.split + .split { margin-top: clamp(3rem, 6vw, 5rem); }
.split .num { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 10px;
  background: var(--steel); color: #fff; font-weight: 800; font-size: 1rem; margin-bottom: .75rem; box-shadow: var(--shadow-sm); }
.split .num + h3 { margin-bottom: .5rem; }

/* framed media (screenshots) */
.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-lg); position: relative; }
.frame--browser { padding-top: 34px; }
.frame--browser::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 34px; background: var(--surface-alt); border-bottom: 1px solid var(--border); z-index: 2; }
/* window controls via a real element to keep it crisp */
.frame .dots { position: absolute; top: 12px; left: 14px; z-index: 3; display: flex; gap: 8px; }
.frame .dots i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; display: block; }
.frame .dots i:nth-child(2) { background: #FEBC2E; }
.frame .dots i:nth-child(3) { background: #28C840; }
.frame img { width: 100%; display: block; }
.frame--plain { box-shadow: var(--shadow-md); }
.figcap { margin-top: .85rem; font-size: .86rem; color: var(--muted); }
.section--slate .frame { border-color: rgba(143,182,214,.18); box-shadow: var(--shadow-slate); }

/* --------------------------------------------------------------- steps */
.steps { display: grid; gap: 1rem; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  padding: 1.15rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step .n { counter-increment: step; width: 2rem; height: 2rem; border-radius: 8px; background: var(--steel-soft); color: var(--steel);
  display: grid; place-items: center; font-weight: 800; }
.step .n::before { content: counter(step); }
.step h4 { margin-bottom: .2rem; }
.step p { font-size: .94rem; color: var(--muted); }

/* ---------------------------------------------------------- checklist */
/* Absolute-positioned tick + padding so inline <strong>/<code>/text inside a
   list item flow as normal prose (a grid item per child would break rows). */
.checklist { display: grid; gap: .7rem; }
.checklist li { position: relative; padding-left: 34px; color: var(--text-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .18rem; width: 22px; height: 22px; border-radius: 7px;
  background: var(--ok);
  -webkit-mask: no-repeat center/13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4 10-11'/%3E%3C/svg%3E");
  mask: no-repeat center/13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4 10-11'/%3E%3C/svg%3E"); }
.section--slate .checklist li { color: var(--on-dark-muted); }

/* --------------------------------------------------------------- stats */
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); }
.stat .big { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; color: var(--steel); letter-spacing: -.02em; line-height: 1; }
.stat .lbl { font-size: .88rem; color: var(--muted); margin-top: .45rem; }
.section--slate .stat { background: rgba(143,182,214,.06); border-color: rgba(143,182,214,.18); }
.section--slate .stat .big { color: var(--azure-soft); }
.section--slate .stat .lbl { color: var(--on-dark-muted); }

/* ---------------------------------------------------------------- code */
.code {
  background: linear-gradient(180deg, #10171f, #0c1218); color: #cdd8e3; border: 1px solid rgba(143,182,214,.16);
  border-radius: var(--radius); padding: 1.15rem 1.3rem; overflow-x: auto; font-family: var(--font-mono);
  font-size: .88rem; line-height: 1.75; box-shadow: var(--shadow-md);
}
/* short-command blocks may wrap instead of clipping (the $ prompts mark real line starts) */
.code--wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.code .c { color: #6f8296; }       /* comment */
.code .p { color: var(--azure-soft); }  /* prompt / command */
.code .s { color: var(--orange-soft); } /* string / flag */
.code .k { color: #9fd0a6; }       /* keyword */
.code-head { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }

/* ------------------------------------------------------------ feature list */
.frow { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--border); }
.frow:first-child { border-top: none; }
.frow .medallion { width: 44px; height: 44px; }
.frow .medallion svg { width: 22px; height: 22px; }
.frow h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0; margin-bottom: .25rem; }
.frow p { font-size: .95rem; color: var(--muted); }

/* --------------------------------------------------------------- output tree */
.filetree { font-family: var(--font-mono); font-size: .9rem; line-height: 1.9; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); overflow-x: auto; white-space: nowrap; }
.filetree .dir { color: var(--steel); font-weight: 700; }
.filetree .note { color: var(--muted); }
.filetree .em { color: var(--text); font-weight: 700; }

/* ---------------------------------------------------------------- team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.member { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s; }
.member:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.member .photo { aspect-ratio: 1/1; width: 100%; object-fit: cover; background: var(--surface-alt); }
/* missing-photo placeholder: quiet graph-paper monogram (distinct from the CTA tile) */
.member .avatar-ph { aspect-ratio: 1/1; display: grid; place-items: center; background-color: var(--surface-alt);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px; }
.member .avatar-ph span { font-family: var(--font-display); font-weight: 800; font-size: clamp(3.25rem, 5vw, 4.25rem); color: var(--steel); opacity: .55; }
.member .body { padding: 1.05rem 1.15rem 1.25rem; }
.member h3 { font-size: 1.1rem; }
.member .role { font-size: .9rem; color: var(--muted); margin-top: .3rem; }
.member .badges { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: .6rem; }
.member .badge { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--steel); letter-spacing: .04em; text-transform: uppercase; }

/* --------------------------------------------------------------- notice */
.notice { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start;
  padding: 1.05rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-alt); font-size: .96rem; color: var(--text-2); }
.notice svg { width: 1.35rem; height: 1.35rem; color: var(--steel); flex: none; margin-top: .1rem; }
.notice--info { background: var(--steel-soft); border-color: #c4dbec; }
.section--slate .notice { background: rgba(143,182,214,.07); border-color: rgba(143,182,214,.2); color: var(--on-dark-muted); }

/* -------------------------------------------------------------- citation */
.cite { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--steel); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); font-size: .98rem; color: var(--text-2); }
.cite em { color: var(--text); }

/* --------------------------------------------------------------- footer */
.site-footer { background: linear-gradient(180deg, var(--slate-bot), var(--ink)); color: var(--on-dark-muted); }
.site-footer .wrap { padding-block: clamp(2.6rem, 5vw, 3.6rem); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .brand { margin-bottom: .9rem; }
.footer-brand p { color: var(--on-dark-faint); font-size: .92rem; max-width: 22rem; }
.footer-col h4 { color: var(--on-dark); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-col a { display: block; padding: .28rem 0; color: var(--on-dark-muted); font-size: .93rem; transition: color .2s; }
.footer-col a:hover { color: var(--azure-soft); }
.footer-bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(143,182,214,.14);
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--on-dark-faint); }
.footer-bottom .chips { gap: .4rem; }

/* ------------------------------------------------- newsletter subscribe */
.subscribe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
  padding-bottom: 2.2rem; margin-bottom: 2.2rem; border-bottom: 1px solid rgba(143,182,214,.14); }
.subscribe-copy h2 { color: var(--on-dark); font-size: 1.1rem; margin-bottom: .3rem; }
.subscribe-copy p { color: var(--on-dark-faint); font-size: .9rem; max-width: 30rem; }
.subscribe-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.subscribe-form input[type="email"] {
  background: rgba(241,246,251,.06); border: 1px solid rgba(143,182,214,.34); border-radius: 10px;
  padding: .75em 1em; color: var(--on-dark); font-size: .95rem; min-width: 15rem;
}
.subscribe-form input[type="email"]::placeholder { color: var(--on-dark-faint); }
/* :focus-visible deliberately NOT overridden here — inherits the sitewide
   two-tone rule at the top of this file (steel outline + azure glow),
   already built to pass contrast on both light and dark grounds. */
/* screen-reader-only label text (kept in the accessibility tree, hidden visually) */
.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; }
/* honeypot — hidden from assistive tech too (aria-hidden), left in the DOM/tab order
   removed so only non-visual bots that fill every field ever trip it */
.subscribe-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------- mailing-list landing pages (api/)
   These carry the site's real header. Without it the confirmation page was a
   bare centred card that looked so much like the confirmation e-mail itself
   that Emil could not tell which of the two he was looking at (29-07-2026) —
   two headings reading "Confirm your subscription", two buttons reading
   "Confirm subscription". The header, the address line and the changed wording
   in api/confirm.php exist to say plainly: you are on respmech.dk now. */
.rm-util-page { background: var(--canvas); min-height: 100vh; display: flex;
  flex-direction: column; }
.rm-util-main { flex: 1 1 auto; display: flex; align-items: center;
  justify-content: center; padding: 2rem; }
.rm-util-card { max-width: 560px; }
.rm-util-h1 { font-size: 1.5rem; margin: .3rem 0 .8rem; }
.rm-util-where { margin-left: auto; font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }
.rm-util-addr { font-weight: 700; word-break: break-all; }
.rm-util-why { font-size: .92rem; color: var(--muted); }

/* --------------------------------------------------------- reveal motion */
/* Progressive enhancement: elements are only hidden when JS is present
   (html.js), so a no-JS visitor sees all content immediately. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: .08s; }
.js .reveal[data-d="2"] { transition-delay: .16s; }
.js .reveal[data-d="3"] { transition-delay: .24s; }

@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes drawIn { from { stroke-dashoffset: var(--len, 1200); } to { stroke-dashoffset: 0; } }
@keyframes pulseDot { 0%,100% { r: 12; opacity: 1; } 50% { r: 16; opacity: .75; } }
@keyframes auraPulse { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: .8; transform: scale(1.06); } }

.hero-figure { animation: floatY 7s var(--ease) infinite; }
.hero-figure .halo { animation: auraPulse 6s var(--ease) infinite; }
.js .sig-flow { stroke-dasharray: 1600; animation: drawIn 2.4s var(--ease) forwards; }
.js .sig-emg { stroke-dasharray: 1400; animation: drawIn 2.6s var(--ease) .3s forwards; }
.sig-dot { animation: pulseDot 3.2s var(--ease) infinite; }

/* ----------------------------------------------------------- responsive */
/* 4-up cards get their designed width only above 1180px; 2x2 in between */
@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-figure { order: -1; max-width: 220px; }
  .hero-tokens { display: none; }   /* the floating tokens collide with the copy on small screens */
  .split, .split--wide-media, .split--flip { grid-template-columns: 1fr; }
  .split .media { order: -1; }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 > :nth-child(3):last-child { grid-column: 1 / -1; }   /* no 2+1 orphan card */
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
/* collapse the nav to a hamburger before the 8 items + CTA would wrap or crowd the brand */
@media (max-width: 1180px) {
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--slate-bot); border-bottom: 1px solid rgba(143,182,214,.16); padding: .7rem var(--gutter) 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .6rem; font-size: 1rem; }
  .nav a[aria-current="true"]::after { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .trust .wrap { gap: .8rem 1.4rem; }
  .hero .btn-row .btn { flex: 1 1 auto; }
  .hero-figure { max-width: 176px; }
  .code, .filetree { font-size: .8rem; }
  .subscribe { flex-direction: column; align-items: stretch; }
  .subscribe-form input[type="email"] { min-width: 0; width: 100%; }
  .subscribe-form .btn { width: 100%; }
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal, .reveal { opacity: 1 !important; transform: none !important; }
  .hero-figure, .hero-figure .halo, .sig-dot { animation: none; }
  .js .sig-flow, .js .sig-emg { stroke-dasharray: none; animation: none; }
}

/* ------------------------------------------------------- utility classes */
/* (kept small + purposeful so no inline styles are ever needed — CSP) */
.nobr     { white-space: nowrap; }
/* anti-harvest e-mail: the "@" comes from CSS so the raw HTML never contains
   a matchable address; site.js upgrades the element to a real mailto link */
.em-at::before { content: "@"; }
.u-mt-xs  { margin-top: .7rem; }
.u-mt-sm  { margin-top: .9rem; }
.u-mt     { margin-top: 1.1rem; }
.u-mt-md  { margin-top: 1.3rem; }
.u-mt-lg  { margin-top: 1.4rem; }
.u-mt-xl  { margin-top: 2.2rem; }
.u-mt-2x  { margin-top: 2.4rem; }
.u-mt-gap { margin-top: clamp(2.6rem, 5vw, 4rem); }
.u-center { text-align: center; }
.measure  { max-width: 46rem; margin-inline: auto; }
.h-compact { margin: .5rem 0 .9rem; }
.h-mini    { margin: .4rem 0 .8rem; }
.h-inst    { margin: .5rem 0 .7rem; }
.m-code    { margin: 1.1rem 0; }
.deg { font-weight: 600; font-size: .9rem; color: var(--muted); }
a.badge { border-bottom: none; }
.figcap--dark { color: var(--on-dark-faint); }

/* slate-context variants of otherwise-light components */
.card--slate { background: rgba(143,182,214,.06); border-color: rgba(143,182,214,.18); }
.card--slate h3 { color: #fff; }
.card--slate p  { color: var(--on-dark-muted); }
.cite--slate { background: rgba(143,182,214,.06); border-color: rgba(143,182,214,.18); }
.cite--slate p { color: var(--on-dark-muted); }
.cite--slate strong { color: #fff; }
.cite--slate em { color: var(--on-dark); }

/* the "get in touch" tile at the end of the team grid — dark slate so it reads
   as an ACTION tile, not another missing-photo placeholder */
.member--cta { display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--slate-top), var(--slate-mid)); border-color: rgba(143,182,214,.25); }
.member--cta .body { text-align: center; }
.member--cta h3 { color: var(--on-dark); }
.member--cta .role { color: var(--on-dark-muted); }
.member--cta .btn { margin-top: .9rem; }

/* ----------------------------------------------------------------- print */
@media print {
  .site-header, .nav-toggle, .hero-tokens, .hero-figure { display: none; }
  /* JS hides reveals until scrolled into view; ensure everything prints. */
  .js .reveal, .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.2rem; }
  .section--slate, .hero, .site-footer { background: #fff !important; color: #000 !important; }
  .card, .frame, .stat, .member { box-shadow: none; border-color: #bbb; }
  a { color: #000; }
}
