/* AMROTS — site stylesheet
   Layout idea: basalt-dark bands (header, page hero, footer) frame cool-paper
   content. Wide Archivo display type, IBM Plex for reading, Plex Mono for the
   labels an engineer would expect in monospace. Apricot is the single accent. */

@font-face { font-family: "Archivo Wide"; src: url("../fonts/archivo-display.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* Basalt defaults. theme.css (generated from content/site.json) overrides all of these. */
  --paper: #f2f4f6; --surface: #ffffff; --ink: #101c2b; --muted: #526173; --line: #d3dae2;
  --accent: #e9772b; --accent-ink: #b4500f; --on-accent: #101c2b; --signal: #0d7a84;
  --band: #0b1522; --band-surface: #122033; --band-ink: #e9eef3; --band-muted: #9dabba; --band-line: #27384c; --band-accent: #f4a462;

  --font-display: "Archivo Wide", "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --h-weight: 800; --h3-weight: 700; --h-track: -0.015em;

  /* Generated artwork in empty image slots */
  --art-bg: var(--band); --art-line: var(--band-line); --art-ink: var(--band-muted); --art-accent: var(--band-accent);
  --logo-filter: grayscale(1) brightness(0);

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --radius: 3px;
  --hdr-h: 68px;
  --hdr-alpha: 30%;
  --hdr-alpha-scrolled: 96%;
  --hdr-blur: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo-filter: grayscale(1) brightness(0) invert(1); --logo-plate-on: 1; } }
:root[data-theme="dark"] { --logo-filter: grayscale(1) brightness(0) invert(1); --logo-plate-on: 1; }

/* Bands (header, hero, footer, banners) keep the same token names, so every component works inside them. */
.band {
  --paper: var(--band);
  --surface: var(--band-surface);
  --ink: var(--band-ink);
  --muted: var(--band-muted);
  --line: var(--band-line);
  --accent-ink: var(--band-accent);
  --logo-filter: grayscale(1) brightness(0) invert(1);
  --logo-plate-on: 1;
  background: var(--band);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: var(--h-track); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: var(--h-weight); }
h2 { font-size: clamp(1.55rem, 3.1vw, 2.35rem); font-weight: var(--h-weight); }
h3 { font-size: 1.14rem; font-weight: var(--h3-weight); letter-spacing: -0.005em; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; }
p code, li code { background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 0.08em 0.35em; border-radius: 3px; }

.container { width: 100%; max-width: min(100%, calc(var(--wrap) + 2 * var(--gutter))); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; z-index: 100; border-radius: var(--radius); font-weight: 600; }
.skip:focus { top: 12px; }

.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-ink); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.55; color: var(--muted); max-width: 62ch; }
.prose { display: grid; gap: 1.05em; max-width: 68ch; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.stack { display: grid; gap: 18px; align-content: start; }
.stack-lg { display: grid; gap: 28px; align-content: start; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: var(--radius); font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: var(--font-body); transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.textlink { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.textlink:hover { text-decoration: underline; }

/* Header */
/* The header floats over the hero: see-through at the top of the page, solid once scrolled. */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) var(--hdr-alpha), transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) var(--hdr-alpha), transparent);
  -webkit-backdrop-filter: blur(var(--hdr-blur)) saturate(1.3); backdrop-filter: blur(var(--hdr-blur)) saturate(1.3);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.site-header.is-scrolled { background: color-mix(in srgb, var(--paper) var(--hdr-alpha-scrolled), transparent); border-bottom-color: var(--line); box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.5); }
main > .hero:first-child:not(.hero--slider) { padding-top: calc(var(--hdr-h) + clamp(48px, 8vw, 96px) * var(--hero-space, 1)); }
.hero--slider .slide { padding-top: calc(var(--hdr-h) + clamp(48px, 8vw, 96px) * var(--hero-space, 1)); }
/* Page header height (Studio: Header tab, All page headers) */
main > .hero:first-child:not(.hero--slider) { min-height: var(--hero-min, auto); display: grid; align-content: center; }
.hero--slider .slide { min-height: var(--hero-min, auto); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.22rem; letter-spacing: 0.06em; }
.brand svg { width: 30px; height: 30px; color: var(--accent); flex: none; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; border-radius: var(--radius); }
.site-nav > ul > li > a:hover, .site-nav > ul > li > a[aria-current] { color: var(--accent-ink); }
.has-menu > a::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); margin-left: 8px; }
.menu { position: absolute; top: 100%; left: 0; min-width: 250px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s; }
.menu--wide { min-width: 350px; }
.has-menu:hover > .menu, .has-menu:focus-within > .menu { visibility: visible; opacity: 1; transform: none; }
.menu a { display: block; padding: 9px 12px; color: var(--ink); text-decoration: none; font-size: 0.95rem; border-radius: 4px; }
.menu a:hover, .menu a[aria-current] { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.site-nav .btn { padding: 10px 16px; font-size: 0.95rem; }
.nav-toggle { display: none; background: transparent; border: 1.5px solid var(--line); border-radius: var(--radius); width: 44px; height: 44px; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 14px var(--gutter) 24px; flex-direction: column; align-items: stretch; gap: 16px; max-height: calc(100vh - 68px); overflow-y: auto; }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li > a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .has-menu > a::after { display: none; }
  .menu { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; border: 0; background: transparent; padding: 4px 0 8px 14px; min-width: 0; }
  .menu a { color: var(--muted); padding: 7px 4px; }
  .site-nav .btn { justify-content: center; }
}

/* Page hero */
.hero { padding-block: calc(clamp(48px, 8vw, 96px) * var(--hero-space, 1)); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; opacity: 0.28; mask-image: radial-gradient(ellipse at 80% 30%, #000 0%, transparent 68%); -webkit-mask-image: radial-gradient(ellipse at 80% 30%, #000 0%, transparent 68%); pointer-events: none; }
.hero > .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; align-content: start; }
.hero--plain .hero-copy { max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* WebP copies come wrapped in <picture>; let the <img> lay out as if it were the direct child */
picture { display: contents; }

/* Header background media */
.hero--media::before { display: none; }
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: var(--hero-dim-bg, var(--band)); opacity: var(--hero-dim, 0.55); }
.hero-media.dim-medium::after { opacity: 0.55; }
.hero-media.dim-light::after { opacity: 0.35; }
.hero-media.dim-strong::after { opacity: 0.72; }
.hero-media.dim-heavy::after { opacity: 0.85; }
.hero > .container { z-index: 1; }
.brand img { height: var(--logo-h, 34px); width: auto; max-width: min(260px, 48vw); display: block; object-fit: contain; }
.site-footer .brand img { height: calc(var(--logo-h, 34px) * 0.85); }
img.monogram { object-fit: cover; width: 100%; }

/* Home slider */
.hero--slider { padding-block: 0; }
.slider { position: relative; }
.slides { display: grid; overflow: hidden; }
.slide { grid-area: 1 / 1; position: relative; display: grid; align-items: center; min-width: 0;
  padding-block: calc(clamp(48px, 8vw, 96px) * var(--hero-space, 1)) max(84px, calc(clamp(96px, 11vw, 128px) * var(--hero-space, 1)));   /* the bottom keeps room for the slider controls */
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.75s ease, visibility 0s 0.75s; }
.slide.is-left { transform: translateX(-100%); }
.slide.is-active { transform: none; visibility: visible; transition: transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.75s ease, visibility 0s; }
.slide.no-anim { transition: none; }
.slider[data-effect="fade"] .slide { transform: none; opacity: 0; }
.slider[data-effect="fade"] .slide.is-active { opacity: 1; }
.slide > .container { position: relative; z-index: 1; }
.slide--solo .hero-grid { grid-template-columns: minmax(0, 1fr); }
.slide--solo .hero-copy { max-width: 780px; }
.slide .display { font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: var(--h-weight); }
.slide .display em { font-style: normal; color: var(--accent); }
.slide.is-active .hero-copy > * { animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.slide.is-active .hero-copy > :nth-child(2) { animation-delay: 0.12s; }
.slide.is-active .hero-copy > :nth-child(3) { animation-delay: 0.24s; }
.slide.is-active .hero-copy > :nth-child(4) { animation-delay: 0.36s; }
.slide.is-active .hero-grid > :nth-child(2) { animation: rise 0.8s 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.slider-ui { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 2; pointer-events: none; }
.slider-ui-row { display: flex; align-items: center; gap: 10px; }
.slider-ui-row > * { pointer-events: auto; }
.slider-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius); border: 1.5px solid var(--line); background: color-mix(in srgb, var(--band) 65%, transparent); color: var(--ink); cursor: pointer; transition: border-color 0.15s ease; }
.slider-btn:hover { border-color: var(--ink); }
.slider-btn svg { width: 20px; height: 20px; }
.slider-pause[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.slider-dots { display: flex; gap: 6px; padding-inline: 6px; }
.slider-dots button { width: 34px; height: 24px; padding: 10px 0; border: 0; background: var(--muted); background-clip: content-box; opacity: 0.55; cursor: pointer; transition: width 0.25s ease, opacity 0.2s ease; }
.slider-dots button[aria-current="true"] { background-color: var(--accent); opacity: 1; width: 56px; }
@media (max-width: 900px) { .slide { align-items: start; padding-top: 40px; } }
.facts-band { padding-bottom: clamp(36px, 5vw, 60px); }
.facts-band .facts { margin-top: 0; }

/* Terminal */
.terminal { background: color-mix(in srgb, var(--band) 55%, #000); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.terminal-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.terminal-bar span { margin-left: 8px; }
.terminal pre { margin: 0; padding: 18px 18px 20px; font-family: var(--font-mono); font-size: clamp(0.72rem, 1.5vw, 0.84rem); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: #c9d4df; }
.terminal .ln { display: block; animation: line-in 0.4s ease both; }
/* Cycling sessions. Each screen scrolls: while a session types out, the newest line stays in view. */
.term-screens { position: relative; height: calc(19 * 1.7em + 38px); font-family: var(--font-mono); font-size: clamp(0.66rem, 1.35vw, 0.8rem); }
.term-screen { position: absolute; inset: 0; overflow: auto; padding: 18px 18px 20px; visibility: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; }
.term-screen.is-on { visibility: visible; }
.term-screen pre { padding: 0; font-size: inherit; white-space: pre; overflow: visible; width: max-content; min-width: 100%; }
.js .term-screen .ln { display: none; animation: none; }
.js .term-screen .ln.shown { display: block; animation: line-in 0.25s ease both; }
.terminal .w { color: #ffd27a; }
.term-screen.wide { font-size: min(0.6rem, 1.05vw); }
.terminal .p { color: #7f8fa1; }
.terminal .k { color: var(--band-accent); }
.terminal .s { color: #55c4cd; }
.terminal .ok { color: #8fd694; }
.terminal .cursor { display: inline-block; width: 0.6em; height: 1.05em; background: var(--band-accent); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
.ln:nth-child(1) { animation-delay: 0.1s; } .ln:nth-child(2) { animation-delay: 0.2s; } .ln:nth-child(3) { animation-delay: 0.3s; }
.ln:nth-child(4) { animation-delay: 0.4s; } .ln:nth-child(5) { animation-delay: 0.5s; } .ln:nth-child(6) { animation-delay: 0.6s; }
.ln:nth-child(7) { animation-delay: 0.7s; } .ln:nth-child(8) { animation-delay: 0.8s; } .ln:nth-child(9) { animation-delay: 0.9s; }
.ln:nth-child(10) { animation-delay: 1s; } .ln:nth-child(11) { animation-delay: 1.1s; } .ln:nth-child(12) { animation-delay: 1.2s; }
.ln:nth-child(13) { animation-delay: 1.5s; } .ln:nth-child(14) { animation-delay: 1.9s; } .ln:nth-child(15) { animation-delay: 2.2s; }
.ln:nth-child(16) { animation-delay: 2.4s; } .ln:nth-child(n+17) { animation-delay: 2.6s; }

/* Diagrams */
/* A visual's frame (fill and border) is painted on a backing layer, so the Studio's background
   opacity (--dg-bg-alpha) fades it without fading the drawing. Styles set --dg-paint and --dg-border. */
/* the opacity applies to visuals in page headers; Visual sections further down keep a solid frame */
.hero .diagram { --dg-bg-alpha: var(--hero-dg-alpha, 1); }
.diagram { --dg-paint: color-mix(in srgb, var(--surface) 70%, transparent); --dg-border: 1px solid var(--line);
  position: relative; isolation: isolate; border: 1px solid transparent; border-radius: calc(var(--radius) + 2px); padding: 10px; }
.diagram::before { content: ""; position: absolute; inset: -1px; z-index: -1; pointer-events: none; border-radius: inherit;
  background: var(--dg-paint); border: var(--dg-border); opacity: var(--dg-bg-alpha, 1); }
.diagram svg { display: block; width: 100%; height: auto; }
.dg-l { stroke: var(--muted); stroke-width: 1.4; opacity: 0.6; fill: none; }
.dg-l.a { stroke: var(--accent); opacity: 1; stroke-width: 1.8; stroke-dasharray: 5 6; animation: flow 1.6s linear infinite; }
.dg-l.x { stroke: #e2574c; opacity: 0.9; stroke-dasharray: 2 5; }
.dg-l.d { stroke-dasharray: 3 5; }
.dg-n { fill: var(--surface); stroke: var(--muted); stroke-width: 1.2; }
.dg-n.a { stroke: var(--accent); stroke-width: 1.8; }
.dg-t { font-family: var(--font-mono); font-size: 11.5px; fill: var(--ink); }
.dg-t.m { fill: var(--muted); font-size: 10.5px; }
.dg-t.a { fill: var(--accent-ink); }
@keyframes flow { to { stroke-dashoffset: -22; } }

/* Sections */
.section { padding-block: clamp(52px, 8vw, 100px); }
.section--tight { padding-block: clamp(36px, 5vw, 60px); }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.split--wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
@media (max-width: 860px) { .split, .split--wide-left { grid-template-columns: minmax(0, 1fr); } }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: clamp(36px, 6vw, 64px); }
.facts li { padding: 22px 20px 0 0; display: grid; gap: 4px; align-content: start; }
.facts b { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: var(--h-weight); letter-spacing: -0.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Cards */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--3, .grid--2, .grid--4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.card p { color: var(--muted); font-size: 0.98rem; line-height: 1.6; }
.section--surface .card { background: var(--paper); }

.svc { position: relative; text-decoration: none; color: var(--ink); padding: 26px 24px 22px; grid-template-rows: auto auto 1fr auto; gap: 12px; transition: border-color 0.15s ease, transform 0.15s ease; }
.svc:hover { border-color: var(--accent); transform: translateY(-2px); }
.svc-top { display: flex; align-items: center; justify-content: space-between; }
.svc-icon { width: 42px; height: 42px; border-radius: var(--radius); display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-ink); }
.svc-icon svg { width: 22px; height: 22px; }
.svc-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; }
.svc-more { font-weight: 600; font-size: 0.93rem; color: var(--accent-ink); display: inline-flex; gap: 8px; }

.principle { border-top: 2px solid var(--accent); padding-top: 18px; display: grid; gap: 8px; align-content: start; }
.principle p { color: var(--muted); font-size: 0.98rem; }

/* Image slots: a photo when one is set, otherwise generated artwork in the design's colours */
.ph { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--art-bg); aspect-ratio: 4 / 3; isolation: isolate; }
.ph--wide { aspect-ratio: 21 / 8; }
.ph--card { aspect-ratio: 16 / 10; }
.ph--tall { aspect-ratio: 4 / 5; }
.ph--square { aspect-ratio: 1; }
.ph > img, .ph > svg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
.ph-initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: var(--h-weight); font-size: 1.6rem; color: var(--art-accent); }
.art-bg { fill: var(--art-bg); }
.art-l { stroke: var(--art-line); fill: none; stroke-width: 1.2; }
.art-i { stroke: var(--art-ink); fill: none; stroke-width: 1; opacity: 0.55; }
.art-a { stroke: var(--art-accent); fill: none; stroke-width: 1.6; }
.art-n { fill: var(--art-bg); stroke: var(--art-ink); stroke-width: 1.2; }
.art-na { fill: var(--art-accent); }
.art-led { fill: var(--art-accent); }
.art-led.off { fill: var(--art-line); }
.art-glow { fill: var(--art-accent); opacity: 0.16; }
.wide-figure { padding-top: clamp(28px, 4vw, 48px); }

/* Service cards with an image on top */
.svc { padding: 0; overflow: hidden; gap: 0; grid-template-rows: auto 1fr; }
.svc .ph { border-radius: 0; }
.svc:hover .ph > img, .svc:hover .ph > svg { transform: scale(1.045); }
.svc-body { padding: 0 24px 24px; display: grid; gap: 12px; grid-template-rows: auto auto 1fr auto; }
.svc .svc-top { margin-top: -23px; position: relative; }
.svc-icon { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 16px color-mix(in srgb, var(--ink) 14%, transparent); }
.svc .svc-num { padding-top: 26px; }

/* Optional image slots appear only once an image is chosen; the Studio shows them as dashed boxes */
.ph--optional { display: grid; place-items: center; background: transparent; border: 2px dashed var(--line); color: var(--muted); font-size: 0.9rem; padding: 12px; text-align: center; }
.optional-figure { padding-top: clamp(28px, 4vw, 48px); }

/* Office map */
.map { position: relative; overflow: hidden; }
.map-dots { display: block; width: 100%; height: auto; }
.map-dots .land { stroke: var(--muted); stroke-opacity: 0.42; stroke-width: 3.6; stroke-linecap: round; }
.map-dots .route { stroke: var(--accent); stroke-width: 2; fill: none; stroke-dasharray: 6 7; animation: flow 1.6s linear infinite; }
.map-dots .pin { fill: var(--accent); }
.map-dots .pulse { fill: none; stroke: var(--accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
.map-dots text { font-family: var(--font-mono); font-size: 17px; font-weight: 500; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }
.map-dots text.sub { fill: var(--muted); font-size: 13.5px; font-weight: 400; }
.map { margin-inline: auto; max-width: max(1600px, var(--wrap)); padding-inline: clamp(0px, 2vw, 24px); }
@keyframes pulse { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(3.2); opacity: 0; } }
.map-band { padding-block: clamp(36px, 6vw, 72px); }
.map-band .container { display: grid; gap: 18px; }
.map-embed { position: relative; height: clamp(320px, 45vw, 520px); border-block: 1px solid var(--line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-embed.tone-dark iframe { filter: grayscale(1) invert(0.92) contrast(0.88) brightness(0.95); }
.map-embed.tone-grey iframe { filter: grayscale(1) contrast(1.05); }

/* Animated threat and traffic maps */
.livemap-band { padding-block: clamp(52px, 8vw, 96px) clamp(36px, 5vw, 56px); position: relative; overflow: hidden; }
.livemap-wrap { max-width: max(1600px, var(--wrap)); margin-inline: auto; padding-inline: clamp(0px, 2vw, 24px); }
.livemap { position: relative; margin: 0; }
.livemap svg { display: block; width: 100%; height: auto; }
.livemap .land { stroke: var(--muted); stroke-opacity: 0.32; stroke-width: 3.6; stroke-linecap: round; }
.livemap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.livemap-foot { display: grid; gap: 14px; margin-top: 18px; }
.livemap-side { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 40px; align-items: start; }
.livemap-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.92rem; color: var(--muted); }
.livemap-legend li { display: inline-flex; align-items: center; gap: 8px; }
.livemap-band i[class^="k-"] { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.k-vol, .k-yvn { background: var(--accent); }
.k-proto { background: var(--signal); }
.k-app, .k-ink { background: var(--ink); }
.livemap-feed { display: grid; gap: 4px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); min-height: calc(6 * 1.6em); }
.livemap-feed li { display: grid; grid-template-columns: 10px minmax(0, 11em) minmax(0, 1fr) auto; gap: 10px; align-items: center; line-height: 1.6; animation: line-in 0.35s ease both; }
.livemap-feed b { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livemap-feed span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livemap-feed em { font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; }
.livemap-note { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 760px) { .livemap-side { grid-template-columns: minmax(0, 1fr); } .livemap-feed li { grid-template-columns: 10px minmax(0, 1fr) auto; } .livemap-feed span { display: none; } }

/* Industry pages */
.svc-body--plain { padding-top: 22px; grid-template-rows: auto 1fr auto; }
.issues { display: grid; gap: 0; }
.issues li { padding: 14px 0 14px 28px; border-top: 1px solid var(--line); position: relative; line-height: 1.5; }
.issues li:first-child { border-top: 0; padding-top: 4px; }
.issues li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 12px; height: 2px; background: var(--accent); }
.issues li:first-child::before { top: 0.75em; }
.svc-mini { text-decoration: none; color: var(--ink); grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; transition: border-color 0.15s ease; }
.svc-mini:hover { border-color: var(--accent); }
.svc-mini .svc-icon { grid-row: span 2; }
.svc-mini p { grid-column: 2; }

/* "What do you need?" finder */
.needs { display: flex; flex-wrap: wrap; gap: 10px; }
.needs a { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.3; transition: border-color 0.15s ease, background-color 0.15s ease; }
.needs a { border-radius: var(--radius); }
.needs a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.needs a span { color: var(--accent-ink); font-weight: 600; white-space: nowrap; }

/* Overlapping image pair with a badge */
.collage { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(12, minmax(0, 1fr)); aspect-ratio: 1 / 0.95; }
.collage .ph { aspect-ratio: auto; }
.collage .ph:nth-child(1) { grid-column: 1 / 10; grid-row: 1 / 10; }
.collage .ph:nth-child(2) { grid-column: 6 / 13; grid-row: 6 / 13; outline: 8px solid var(--paper); }
.section--surface .collage .ph:nth-child(2) { outline-color: var(--surface); }
.badge { position: absolute; left: 0; bottom: 4%; z-index: 2; background: var(--accent); color: var(--on-accent); padding: 16px 20px; border-radius: var(--radius); display: grid; gap: 2px; max-width: 200px; line-height: 1.3; font-weight: 500; }
.badge b { font-family: var(--font-display); font-weight: var(--h-weight); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }

/* Banner with a background image */
/* The banner sits inside the page column as a framed panel, aligned with the content around it */
.banner-wrap { padding-block: clamp(28px, 4vw, 48px); }
.banner { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) clamp(28px, 5vw, 72px); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line); }
.banner-copy { position: relative; z-index: 1; display: grid; gap: 18px; max-width: 780px; }
.banner .lead { color: var(--ink); opacity: 0.86; }

/* Testimonial */
.testimonial { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
.testimonial .ph { border-radius: 50%; }
@media (max-width: 600px) { .testimonial { grid-template-columns: minmax(0, 1fr); } .testimonial .ph { width: 96px; } }

/* Partner and platform logos */
.logos { --gap: clamp(36px, 6vw, 72px); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.logos-track { display: flex; align-items: center; gap: var(--gap); width: max-content; animation: marquee var(--marquee, 36s) linear infinite; }
.logos.speed-slow { --marquee: 64s; } .logos.speed-fast { --marquee: 22s; }
.logos:hover .logos-track, .logos:focus-within .logos-track { animation-play-state: paused; }
.logo { flex: none; height: 64px; display: flex; align-items: center; color: var(--muted); text-decoration: none; }
.logo img { max-height: 44px; max-width: 170px; width: auto; height: auto; object-fit: contain; display: block; }
/* Light plate behind logos on dark backgrounds (dark mode and bands), so dark brand colours stay
   readable. Studio: Images tab → Platforms → "Light backdrop in dark mode". */
.logos--plate .logo { position: relative; isolation: isolate; padding-inline: 14px; border-radius: 8px; }
.logos--plate .logo::before { content: ""; position: absolute; inset: 6px 0; z-index: -1; border-radius: inherit; background: #f3f5f9;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.logos--plate-hover .logo:hover::before, .logos--plate-hover .logo:focus-visible::before,
.logos--plate-always .logo::before { opacity: calc(var(--logo-plate-a, 0.92) * var(--logo-plate-on, 0)); }
/* on an always-on plate, one-colour logos turn dark instead of white */
.logos--plate-always.logos--mono .logo img { filter: grayscale(1) brightness(0); }
.logos--plate-always .logo-word { color: color-mix(in srgb, #11151d calc(100% * var(--logo-plate-on, 0)), currentColor); }
.logos--mono .logo img { filter: var(--logo-filter); opacity: 0.72; transition: filter 0.2s ease, opacity 0.2s ease; }
.logos--mono .logo:hover img { filter: none; opacity: 1; }
.logo-word { font-family: var(--font-display); font-weight: var(--h3-weight); font-size: clamp(1.1rem, 2vw, 1.45rem); letter-spacing: 0.01em; white-space: nowrap; }
.logos--grid { -webkit-mask-image: none; mask-image: none; }
.logos--grid .logos-track { animation: none; width: auto; flex-wrap: wrap; column-gap: var(--gap); row-gap: 8px; }
.logos--grid .logo[aria-hidden="true"] { display: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
@media (prefers-reduced-motion: reduce) {
  .logos { -webkit-mask-image: none; mask-image: none; }
  .logos-track { animation: none; width: auto; flex-wrap: wrap; row-gap: 8px; }
  .logo[aria-hidden="true"] { display: none; }
}

/* Lists */
.checklist { display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; line-height: 1.5; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 0.42em; width: 13px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.scope { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); display: grid; gap: 18px; }
.section--surface .scope { background: var(--paper); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-family: var(--font-mono); font-size: 0.78rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface); }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.steps > li { counter-increment: step; padding: 24px 22px 6px 0; display: grid; gap: 8px; align-content: start; position: relative; }
.steps > li::before { content: "0" counter(step); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; color: var(--accent-ink); letter-spacing: 0.08em; }
.steps > li::after { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.steps p { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.phase { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: clamp(18px, 4vw, 48px); padding-block: clamp(28px, 4vw, 44px); border-top: 1px solid var(--line); }
.phase-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.phase-body { display: grid; gap: 16px; max-width: 760px; }
.phase-body > p { color: var(--muted); }
@media (max-width: 640px) { .phase { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* Timeline */
.timeline { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 28px 28px; display: grid; gap: 4px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.timeline time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-ink); letter-spacing: 0.06em; text-transform: uppercase; }
.timeline p { color: var(--muted); font-size: 0.98rem; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative; font-weight: 600; font-size: 1.06rem; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 1.4rem; color: var(--accent-ink); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding: 0 44px 22px 0; max-width: 72ch; }

/* Quote */
.quote { display: grid; gap: 20px; max-width: 900px; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-weight: 650; font-size: clamp(1.35rem, 2.8vw, 2.05rem); line-height: 1.25; letter-spacing: -0.012em; text-wrap: balance; }
.quote blockquote::before { content: "\201C"; color: var(--accent); }
.quote blockquote::after { content: "\201D"; color: var(--accent); }
.quote figcaption { color: var(--muted); font-size: 0.97rem; }
.quote figcaption b { color: var(--ink); font-weight: 600; }

.platforms { display: flex; flex-wrap: wrap; gap: 10px 34px; align-items: baseline; }
.platforms li { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--muted); letter-spacing: 0.01em; }

/* CTA band */
.cta { padding-block: clamp(48px, 7vw, 84px); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.cta-inner > div { display: grid; gap: 12px; }
.cta p { color: var(--muted); max-width: 58ch; }
@media (max-width: 760px) { .cta-inner { grid-template-columns: minmax(0, 1fr); } }

.prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.prevnext a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 4px; }
.prevnext a:hover { border-color: var(--accent); }
.prevnext small { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.prevnext b { font-family: var(--font-display); font-weight: 700; }
.prevnext a:last-child { text-align: right; }
@media (max-width: 560px) { .prevnext { grid-template-columns: minmax(0, 1fr); } .prevnext a:last-child { text-align: left; } }

/* Team */
.profile { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
.monogram { aspect-ratio: 1; border-radius: var(--radius); background: var(--art-bg); color: var(--art-accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 4rem; letter-spacing: 0.02em; border: 1px solid var(--line); }
@media (max-width: 700px) { .profile { grid-template-columns: minmax(0, 1fr); } .monogram { max-width: 160px; font-size: 3rem; } }

/* Contact */
.contact-list { display: grid; gap: 22px; }
.contact-list h3 { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px; }
.contact-list p, .contact-list address { color: var(--muted); font-style: normal; line-height: 1.55; }
.contact-list a { font-weight: 600; }
.form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.93rem; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 11px 12px; width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.form-note { color: var(--muted); font-size: 0.9rem; }
.form-status { font-size: 0.95rem; padding: 12px 14px; border-left: 3px solid var(--signal); background: color-mix(in srgb, var(--signal) 10%, transparent); border-radius: 0 var(--radius) var(--radius) 0; }
.form-status[hidden] { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(44px, 6vw, 72px) 28px; font-size: 0.96rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.3fr 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); }
.footer-grid h2 { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.footer-grid ul { display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-about { display: grid; gap: 14px; align-content: start; }
.footer-about p, .footer-grid address { color: var(--muted); font-style: normal; line-height: 1.6; }
.footer-base { margin-top: clamp(32px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: 0.86rem; font-family: var(--font-mono); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .nav-toggle, .cta, .prevnext { display: none; }
  .band { background: #fff; color: #000; }
}

/* Language switcher */
/* Language menu: a flag button that opens a short list */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--ink); font: 500 0.8rem var(--font-mono); letter-spacing: 0.04em; user-select: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.lang-menu > summary:hover, .lang-menu[open] > summary { border-color: var(--ink); }
.lang-menu .flag { width: 20px; height: 14px; flex: none; border-radius: 2px; display: block; }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); z-index: 60; }
.lang-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--ink); text-decoration: none; font-size: 0.93rem; border-radius: 4px; white-space: nowrap; }
.lang-list a:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.lang-list a[aria-current] { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 600; }
@media (max-width: 960px) {
  .lang-menu > summary { width: 100%; justify-content: flex-start; }
  .lang-list { position: static; margin-top: 6px; box-shadow: none; }
}

/* Armenian words run long: tighten the header so it stays on one line */
html[lang="hy"] .site-nav { gap: 14px; }
html[lang="hy"] .site-nav > ul { gap: 0; }
html[lang="hy"] .site-nav > ul > li > a { font-size: 0.86rem; padding: 10px 8px; letter-spacing: -0.005em; }
html[lang="hy"] .has-menu > a::after { margin-left: 6px; }
html[lang="hy"] .site-nav .btn { font-size: 0.84rem; padding: 9px 13px; }
.site-nav > ul > li > a, .site-nav .btn { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1240px) {
  .site-nav { gap: 14px; }
  .site-nav > ul > li > a { padding-inline: 8px; }
  html[lang="hy"] .site-nav > ul > li > a { font-size: 0.8rem; padding-inline: 6px; }
  html[lang="hy"] .site-nav .btn { font-size: 0.8rem; padding-inline: 10px; }
  html[lang="hy"] .brand span { display: none; }
}
html[lang="hy"] h1 { font-size: clamp(1.8rem, 4.3vw, 3.25rem); overflow-wrap: anywhere; hyphens: auto; }
html[lang="hy"] h2 { overflow-wrap: anywhere; }

/* Theme switch */
.theme-toggle { width: 38px; height: 38px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; grid-area: 1 / 1; }
.theme-toggle .i-sun { display: none; }
.theme-toggle[aria-pressed="true"] .i-sun { display: block; }
.theme-toggle[aria-pressed="true"] .i-moon { display: none; }

/* NOC status pill */
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-family: var(--font-mono); font-size: 0.78rem; }
.status-pill b { font-weight: 500; color: var(--ink); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #3fbf6f; box-shadow: 0 0 0 3px color-mix(in srgb, #3fbf6f 25%, transparent); animation: status 2.4s ease-in-out infinite; }
.status-pill.state-degraded i { background: #f0b429; box-shadow: 0 0 0 3px color-mix(in srgb, #f0b429 25%, transparent); }
.status-pill.state-incident i { background: #ef5350; box-shadow: 0 0 0 3px color-mix(in srgb, #ef5350 25%, transparent); }
.status-pill.state-maintenance i { background: #5aa9ff; box-shadow: 0 0 0 3px color-mix(in srgb, #5aa9ff 25%, transparent); }
a.status-pill:hover { border-color: var(--ink); }
@keyframes status { 50% { opacity: 0.45; } }
.footer-base { align-items: center; }

/* Booking button sizing */
.form-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.btn--sm { padding: 8px 14px; font-size: 0.92rem; }

/* Case studies, notes, finder */
.draft-badge { display: inline-block; justify-self: start; font-family: var(--font-mono); font-size: 0.74rem; padding: 3px 8px; border: 1px dashed var(--accent); color: var(--accent-ink); border-radius: var(--radius); }
.facts-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.facts-list dt { color: var(--muted); font-size: 0.92rem; }
.facts-list dd { margin: 0; }
.notes-list { display: grid; gap: 0; max-width: 900px; }
.note-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.note-row time { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); padding-top: 6px; }
.note-row h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.note-row h2 a { color: var(--ink); text-decoration: none; }
.note-row h2 a:hover { color: var(--accent-ink); }
.note-row p { color: var(--muted); }
@media (max-width: 640px) { .note-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.article { max-width: 72ch; display: grid; gap: 1.05em; }
.article h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 0.8em; }
.article h3 { margin-top: 0.6em; }
.article p, .article li { color: var(--muted); }
.article ul, .article ol { padding-left: 1.3em; display: grid; gap: 6px; }
.article ul { list-style: square; } .article ol { list-style: decimal; }
.article blockquote { margin: 0; padding-left: 18px; border-left: 3px solid var(--accent); }
.article-meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.article-meta span { border: 1px solid var(--line); padding: 1px 8px; border-radius: var(--radius); }
pre.code { margin: 0; background: color-mix(in srgb, var(--band) 92%, #000); color: #d6dee8; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.6; }
pre.code code { background: none; padding: 0; }
.finder-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .finder-wrap { grid-template-columns: minmax(0, 1fr); } }
.finder { display: grid; gap: 28px; }
.finder-q { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.finder-q legend { font-family: var(--font-display); font-weight: var(--h3-weight); font-size: 1.2rem; display: grid; gap: 4px; padding: 0; }
.finder-q legend span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-ink); font-weight: 500; }
.finder-opts { display: grid; gap: 8px; }
.finder-opts label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.finder-opts label:hover { border-color: var(--muted); }
.finder-opts label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.finder-opts input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.finder-results { display: grid; gap: 16px; position: sticky; top: calc(var(--hdr-h) + 20px); }
.finder-result { gap: 12px; }

/* Hero visuals */
.pkt { fill: var(--accent); }
.diagram .dg-n.a { fill: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.rk-u { fill: color-mix(in srgb, var(--surface) 60%, transparent); stroke: var(--line); stroke-width: 1; }
.rk-port { fill: var(--line); }
.led { fill: #3fbf6f; animation: led 1.6s steps(2) infinite; }
.led.alt { fill: var(--accent); }
.led.off { fill: var(--line); animation: none; }
.led.d1 { animation-duration: 0.9s; } .led.d2 { animation-duration: 1.3s; } .led.d3 { animation-duration: 0.7s; animation-delay: 0.3s; }
.led.d4 { animation-duration: 2.1s; } .led.d5 { animation-duration: 1.1s; animation-delay: 0.5s; } .led.d6 { animation-duration: 0.5s; }
.led.d7 { animation-duration: 2.7s; animation-delay: 0.8s; } .led.d8 { animation-duration: 1.7s; animation-delay: 0.2s; }
@keyframes led { 50% { opacity: 0.25; } }
.vis-spectrum .ch-line { fill: none; stroke: var(--accent); stroke-width: 1.8; }
.vis-spectrum .ch { transform-box: fill-box; transform-origin: 50% 100%; animation: ch 3.2s ease-in-out infinite alternate; }
.vis-spectrum .ch.d1 { animation-duration: 2.6s; } .vis-spectrum .ch.d2 { animation-duration: 3.8s; } .vis-spectrum .ch.d3 { animation-duration: 2.2s; animation-delay: -1s; }
.vis-spectrum .ch.d4 { animation-duration: 4.4s; } .vis-spectrum .ch.d5 { animation-duration: 2.9s; animation-delay: -2s; } .vis-spectrum .ch.d6 { animation-duration: 3.5s; animation-delay: -0.5s; }
.vis-spectrum .ch.d7 { animation-duration: 2.4s; animation-delay: -1.5s; } .vis-spectrum .ch.d8 { animation-duration: 4s; animation-delay: -3s; }
@keyframes ch { from { transform: scaleY(0.82); } to { transform: scaleY(1.04); } }
.vis-globe { display: grid; place-items: center; }
.vis-globe canvas { display: block; width: 100%; }
@media (prefers-reduced-motion: reduce) { .pkt { display: none; } }
.card--link { text-decoration: none; color: var(--ink); transition: border-color 0.15s ease; }
.card--link:hover { border-color: var(--accent); }

/* ------------------------------------------------------------ diagram styles
   Every service diagram is the same SVG; data-dg on its frame picks the look. */
.dg-c { display: none; fill: none; stroke: var(--muted); stroke-width: 1.2; }
.diagram[data-dg] { transition: none; }

/* Blueprint: white linework on a blue grid, in light and dark */
.diagram[data-dg="blueprint"] { --bp: #10437a; --dg-border: 1px solid #2e6aa8;
  --dg-paint: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px) 0 0 / 52px 52px, linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 13px 13px, linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 13px 13px, var(--bp); }
.diagram[data-dg="blueprint"] .dg-l { stroke: #dbe9f8; opacity: .55; stroke-width: 1.1; }
.diagram[data-dg="blueprint"] .dg-l.a { stroke: #fff; opacity: 1; stroke-width: 1.6; }
.diagram[data-dg="blueprint"] .dg-l.x { stroke: #ffb3a8; }
.diagram[data-dg="blueprint"] .dg-n { fill: color-mix(in srgb, var(--bp) calc(100% * var(--dg-bg-alpha, 1)), var(--paper)); stroke: #dbe9f8; stroke-dasharray: 4 3; }
.diagram[data-dg="blueprint"] .dg-n.a { fill: #164f8c; stroke: #fff; stroke-dasharray: none; stroke-width: 1.8; }
.diagram[data-dg="blueprint"] .dg-t, .diagram[data-dg="blueprint"] .dg-t.a { fill: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.diagram[data-dg="blueprint"] .dg-t.m { fill: #b7d0ea; }
.diagram[data-dg="blueprint"] .pkt { fill: #fff; }

/* Glow: dark glass with lit links */
.diagram[data-dg="glow"] { --dg-border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  --dg-paint: radial-gradient(120% 90% at 50% 40%, color-mix(in srgb, var(--accent) 16%, #0a1018), #070b11 72%); }
.diagram[data-dg="glow"] .dg-l { stroke: #6f8296; opacity: .45; }
.diagram[data-dg="glow"] .dg-l.a { stroke: var(--accent); filter: url(#dg-glow); stroke-dasharray: none; opacity: .95; }
.diagram[data-dg="glow"] .dg-n { fill: #111923; stroke: rgba(255,255,255,.22); }
.diagram[data-dg="glow"] .dg-n.a { fill: color-mix(in srgb, var(--accent) 22%, #0a1018); stroke: var(--accent); filter: url(#dg-glow); }
.diagram[data-dg="glow"] .dg-t { fill: #e7eef6; }
.diagram[data-dg="glow"] .dg-t.m { fill: #8ea0b3; }
.diagram[data-dg="glow"] .dg-t.a { fill: color-mix(in srgb, var(--accent) 60%, #fff); }
.diagram[data-dg="glow"] .pkt { fill: #fff; filter: url(#dg-glow); }

/* Solid: filled blocks and heavy links */
.diagram[data-dg="solid"] .dg-l { stroke: var(--ink); opacity: .35; stroke-width: 3; stroke-linecap: round; }
.diagram[data-dg="solid"] .dg-l.a { stroke: var(--accent); opacity: 1; stroke-width: 3.5; stroke-dasharray: none; }
.diagram[data-dg="solid"] .dg-l.x { stroke: #e2574c; stroke-width: 3; }
.diagram[data-dg="solid"] .dg-n { fill: var(--ink); stroke: none; rx: 3px; }
.diagram[data-dg="solid"] .dg-n.a { fill: var(--accent); }
.diagram[data-dg="solid"] .nt { fill: var(--paper); font-weight: 600; }
.diagram[data-dg="solid"] .nt.a { fill: var(--on-accent, #fff); }
.diagram[data-dg="solid"] .pkt { fill: var(--paper); stroke: var(--accent); stroke-width: 2; r: 4px; }

/* Floating: no frame, rounded pills over the page */
.diagram[data-dg="floating"] { --dg-paint: none; --dg-border: 0 solid transparent; padding: 0; }
.diagram[data-dg="floating"] .dg-n { fill: var(--paper); stroke: color-mix(in srgb, var(--ink) 28%, transparent); rx: 17px; }
.diagram[data-dg="floating"] .dg-n.a { fill: color-mix(in srgb, var(--accent) 12%, var(--paper)); stroke: var(--accent); rx: 22px; }
.diagram[data-dg="floating"] .dg-l { opacity: .4; stroke-width: 1; }
.diagram[data-dg="floating"] .dg-l.a { stroke-dasharray: 1 7; stroke-linecap: round; stroke-width: 2.4; }

/* Isometric: the drawing laid on a tilted plane, with a slab edge under it */
.diagram[data-dg="isometric"] { --dg-paint: none; --dg-border: 0 solid transparent; padding: 0 0 18px; overflow: visible; }
/* here the tilted plane is the background, so it takes the opacity */
.diagram[data-dg="isometric"] svg { --a: var(--dg-bg-alpha, 1); transform: perspective(1600px) rotateX(42deg) rotateZ(-20deg) scale(.84); transform-origin: 50% 50%;
  background: color-mix(in srgb, var(--surface) calc(88% * var(--a)), transparent); border: 1px solid color-mix(in srgb, var(--line) calc(100% * var(--a)), transparent); border-radius: 6px;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--line) calc(100% * var(--a)), transparent), 0 6px 0 color-mix(in srgb, var(--line) calc(70% * var(--a)), transparent),
    0 30px 50px -20px rgba(0,0,0,calc(.55 * var(--a))); }
.diagram[data-dg="isometric"] .dg-n { filter: drop-shadow(0 3px 0 color-mix(in srgb, var(--ink) 30%, transparent)); }
.diagram[data-dg="isometric"] .dg-n.a { filter: drop-shadow(0 4px 0 color-mix(in srgb, var(--accent) 60%, #000)); }
.diagram[data-dg="isometric"] .dg-t { font-weight: 600; }

/* Sketch: hand-drawn lines on dot paper */
.diagram[data-dg="sketch"] { --dg-border: 1px dashed var(--line);
  --dg-paint: radial-gradient(color-mix(in srgb, var(--muted) 45%, transparent) 1px, transparent 1.2px) 0 0 / 16px 16px, color-mix(in srgb, var(--surface) 80%, transparent); }
.diagram[data-dg="sketch"] .dg-l, .diagram[data-dg="sketch"] .dg-n { filter: url(#dg-rough); stroke-width: 1.8; stroke-linecap: round; }
.diagram[data-dg="sketch"] .dg-l { stroke: var(--ink); opacity: .55; }
.diagram[data-dg="sketch"] .dg-l.a { stroke: var(--accent); opacity: 1; stroke-dasharray: 9 5; }
.diagram[data-dg="sketch"] .dg-n { fill: color-mix(in srgb, var(--surface) 92%, transparent); stroke: var(--ink); }
.diagram[data-dg="sketch"] .dg-n.a { fill: color-mix(in srgb, var(--accent) 22%, var(--surface)); stroke: var(--accent); stroke-width: 2.2; }
.diagram[data-dg="sketch"] .dg-t { font-family: var(--font-body); font-size: 12.5px; font-style: italic; }

/* Schematic: near-black panel, dotted grid, corner marks instead of boxes (the same in light and dark) */
.diagram[data-dg="schematic"] { --sch-bg: #040508; --dg-border: 1px solid #1a1f2a;
  --dg-paint: radial-gradient(color-mix(in srgb, var(--accent) 30%, transparent) 1px, transparent 1.3px) 10px 10px / 20px 20px, var(--sch-bg); }
.diagram[data-dg="schematic"] .dg-c { display: inline; stroke: #7d8899; }
.diagram[data-dg="schematic"] .dg-n { fill: color-mix(in srgb, var(--sch-bg) calc(100% * var(--dg-bg-alpha, 1)), var(--paper)); stroke: none; }
.diagram[data-dg="schematic"] .dg-n.a { fill: color-mix(in srgb, var(--accent) 12%, var(--sch-bg)); }
.diagram[data-dg="schematic"] .dg-c.a { stroke: var(--accent); stroke-width: 1.6; }
.diagram[data-dg="schematic"] .dg-l { stroke: #4f5a6c; stroke-width: 1; opacity: 1; }
.diagram[data-dg="schematic"] .dg-l.a { stroke: var(--accent); stroke-dasharray: none; stroke-width: 1.4; }
.diagram[data-dg="schematic"] .dg-t { fill: #e4e9f1; text-transform: uppercase; letter-spacing: .08em; font-size: 9.5px; }
.diagram[data-dg="schematic"] .dg-t.m { fill: #8a95a7; }
.diagram[data-dg="schematic"] .dg-t.a { fill: color-mix(in srgb, var(--accent) 70%, #fff); }

/* ---------------------------------------------------------- live log visuals
   DDoS mitigation console and firewall security log (livelog.js). Same frame as the diagrams, so
   diagram styles and the header background opacity apply. */
.vis-log { --lg-ink: var(--ink); --lg-muted: var(--muted); --lg-line: var(--line);
  --lg-ok: #2fbf71; --lg-bad: #ef4f4f; --lg-warn: #e6a23c; --lg-act: var(--accent);
  aspect-ratio: 520 / 340; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 10px;
  font-family: var(--font-mono); color: var(--lg-ink); overflow: hidden; }
.vis-log > x-t-skip { display: contents; }
/* styles with their own fixed dark panel keep light text, even on light pages */
.diagram[data-dg="blueprint"].vis-log, .diagram[data-dg="glow"].vis-log, .diagram[data-dg="schematic"].vis-log {
  --lg-ink: #e6ebf2; --lg-muted: #8f9aac; --lg-line: rgba(255, 255, 255, 0.12); }
.diagram[data-dg="blueprint"].vis-log { --lg-act: #ffffff; }
.lg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: 0.04em; }
.lg-title { color: var(--lg-muted); }
.lg-title::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: var(--lg-ok); vertical-align: 1px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lg-ok) 25%, transparent); }
.lg-state { font-weight: 600; font-size: 10.5px; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 4px; border: 1px solid currentColor;
  transition: color 0.3s ease, background-color 0.3s ease; }
.lg-state--ok { color: var(--lg-ok); background: color-mix(in srgb, var(--lg-ok) 10%, transparent); }
.lg-state--bad { color: var(--lg-bad); background: color-mix(in srgb, var(--lg-bad) 14%, transparent); animation: lg-pulse 1.1s ease-in-out infinite; }
.lg-state--mit, .lg-state--warn { color: var(--lg-warn); background: color-mix(in srgb, var(--lg-warn) 12%, transparent); }
@keyframes lg-pulse { 50% { background: color-mix(in srgb, var(--lg-bad) 30%, transparent); } }
.lg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--lg-line); }
.lg-stats div { display: grid; gap: 2px; }
.lg-stats strong { font-size: 17px; font-weight: 600; color: var(--lg-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.lg-stats span { font-size: 10px; color: var(--lg-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.vis-log--firewall .lg-stats div:nth-child(1) strong { color: var(--lg-ok); }
.vis-log--firewall .lg-stats div:nth-child(2) strong { color: var(--lg-bad); }
.vis-log--firewall .lg-stats div:nth-child(3) strong { color: var(--lg-warn); }
.lg-lines { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
  font-size: 10.5px; line-height: 1.75;
  -webkit-mask-image: linear-gradient(transparent, #000 34%); mask-image: linear-gradient(transparent, #000 34%); }
.lg-lines li { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; white-space: nowrap;
  transition: opacity 0.35s ease, transform 0.35s ease; }
.vis-log--firewall .lg-lines li { grid-template-columns: auto 44px minmax(0, 1fr) auto; }
.lg-lines li.lg-new { opacity: 0; transform: translateY(6px); }
.lg-lines time { color: var(--lg-muted); font-variant-numeric: tabular-nums; }
.lg-lines b { font-weight: 600; letter-spacing: 0.04em; }
.lg-lines span { overflow: hidden; text-overflow: ellipsis; }
.lg-lines i { font-style: normal; color: var(--lg-muted); }
.lg-base b, .lg-stat b { color: var(--lg-muted); }
.lg-detect b, .lg-deny b { color: var(--lg-bad); }
.lg-detect span { color: color-mix(in srgb, var(--lg-bad) 55%, var(--lg-ink)); }
.lg-class b, .lg-drop b { color: var(--lg-warn); }
.lg-act b { color: var(--lg-act); }
.lg-clear b, .lg-allow b { color: var(--lg-ok); }
.lg-deny span, .lg-drop span { color: color-mix(in srgb, var(--lg-ink) 82%, transparent); }
@media (max-width: 560px) {
  .vis-log .lg-lines li { grid-template-columns: 64px minmax(0, 1fr); }
  .vis-log--firewall .lg-lines li { grid-template-columns: 44px minmax(0, 1fr); }
  .lg-lines time, .lg-lines i { display: none; }
  .vis-log { aspect-ratio: auto; height: 300px; }
}
