/* Karya Grid Technology. Tokens follow brand/agent-prompts/KARYA-GRID-BRAND-AGENT-PROMPT.md §3;
   gradient and motion exceptions are recorded in DESIGN-NOTES.md. Components use tokens only. */

@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/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("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ink: #0E2F36; --ink-deep: #0A2329; --ink-raised: #143A42; --teal: #25505A;
  --copper: #C8643B; --copper-soft: #E08A63; --mist: #EDF1F0; --white: #FFFFFF;
  --copper-glow: rgba(200, 100, 59, .16); --teal-glow: rgba(37, 80, 90, .14);

  --bg: #FFFFFF; --surface: #EDF1F0; --surface-raised: #FFFFFF;
  --fg: #0E2F36; --fg-muted: #4E6266; --rule: #D3DCDB;
  --accent: #C8643B; --accent-text: #A8481F;
  --btn-bg: #0E2F36; --btn-fg: #FFFFFF; --btn-hover: #1C434C; --focus: #C8643B;
  --ok: #2E6B4F; --err: #B3261E;
  --block: #0E2F36; --block-2: #25505A; --on-block: #EDF1F0;

  --grad-hero:
    radial-gradient(55% 70% at 88% 12%, var(--copper-glow), transparent 70%),
    radial-gradient(65% 80% at 4% 0%, var(--teal-glow), transparent 70%),
    linear-gradient(180deg, var(--bg) 55%, var(--surface) 100%);
  --grad-surface: linear-gradient(180deg, var(--surface) 0%, var(--bg) 140%);
  --grad-rule: linear-gradient(90deg, var(--copper) 0%, var(--teal) 55%, transparent 100%);
  --grad-band:
    radial-gradient(50% 65% at 92% 0%, rgba(200, 100, 59, .30), transparent 70%),
    linear-gradient(135deg, var(--ink-deep) 0%, var(--ink) 48%, var(--teal) 125%);

  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 3px;
  --header-h: 72px;
  --gutter: max(16px, env(safe-area-inset-left));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A2329; --surface: #0E2F36; --surface-raised: #143A42;
    --fg: #EDF1F0; --fg-muted: #9DB2B5; --rule: #25505A;
    --accent-text: #E08A63; --btn-bg: #EDF1F0; --btn-fg: #0E2F36; --btn-hover: #D3DCDB; --focus: #E08A63;
    --ok: #6FC29B; --err: #F2877F;
    --block: #2F6773; --block-2: #4A8B98; --on-block: #FFFFFF;
    --copper-glow: rgba(200, 100, 59, .20); --teal-glow: rgba(53, 112, 125, .22);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A2329; --surface: #0E2F36; --surface-raised: #143A42;
  --fg: #EDF1F0; --fg-muted: #9DB2B5; --rule: #25505A;
  --accent-text: #E08A63; --btn-bg: #EDF1F0; --btn-fg: #0E2F36; --btn-hover: #D3DCDB; --focus: #E08A63;
  --ok: #6FC29B; --err: #F2877F;
  --block: #2F6773; --block-2: #4A8B98; --on-block: #FFFFFF;
  --copper-glow: rgba(200, 100, 59, .20); --teal-glow: rgba(53, 112, 125, .22);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--font); overflow-x: clip; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 3vw + 1.2rem, 3.5rem); line-height: 1.07; letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 2.2vw + 1rem, 2.5rem); line-height: 1.15; letter-spacing: -.018em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; max-width: 68ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent-text); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { width: min(1200px + 2 * 48px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sprite symbol, .icon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.icon { width: 20px; height: 20px; flex: none; }
.skip { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--btn-bg); color: var(--btn-fg); }
.skip:focus { top: 8px; }
.eyebrow { font: 500 .75rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px; }
.lead { font-size: 1.1875rem; line-height: 1.6; color: var(--fg-muted); max-width: 58ch; }
.fine { font-size: .8125rem; color: var(--fg-muted); }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius); font: 600 .9375rem/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .18s ease-out, color .18s ease-out, border-color .18s ease-out; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: transparent; border-color: var(--fg); color: var(--fg); }
.btn-secondary:hover { background: var(--surface); }
.btn-accent { background: var(--copper-soft); color: var(--ink-deep); }
.btn-accent:hover { background: var(--mist); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { transition: transform .18s ease-out; }
.text-link:hover .icon { transform: translateX(4px); }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top); }
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; padding-block: 8px; margin-right: auto; }
.logo img { display: block; height: 40px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }
.site-nav ul { display: flex; gap: 28px; }
.site-nav a { display: inline-block; padding: 12px 0; color: var(--fg); font-weight: 500; font-size: .9375rem; text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom 4px / 0 2px; transition: background-size .2s ease-out; }
.site-nav a:hover, .site-nav a[aria-current="true"] { background-size: 100% 2px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-cta { min-height: 44px; padding-inline: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: var(--radius); background: transparent; color: var(--fg); cursor: pointer; }
.icon-btn:hover { border-color: var(--fg); }
.icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
.menu-btn, .menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }
.menu-btn[aria-expanded="true"] .icon-menu { display: none; }
.progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: linear-gradient(90deg, var(--teal), var(--copper)); transform-origin: left; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear both; animation-timeline: scroll(root); }
}
@keyframes progress { to { transform: scaleX(1); } }

/* ---------- Hero ---------- */
.hero { background: var(--grad-hero); padding-block: 72px 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.hero-visual { margin: 0; }
.hero-visual svg { display: block; width: 100%; height: auto; }
.hero-visual text { font: 500 15px var(--mono); fill: var(--fg); }
.hero-visual .on-block { fill: var(--on-block); }
.grid-lines { stroke: var(--rule); stroke-width: 1; fill: none; opacity: .5; }
.box { fill: var(--surface-raised); stroke: var(--rule); stroke-width: 1.5; }
.line, .axis { fill: none; stroke: var(--fg); stroke-width: 1.5; }
.block { fill: var(--block); }
.wedge { fill: var(--accent); }
.slab { fill: var(--block); }
.slab-2 { fill: var(--block-2); }
.slab-3 { fill: var(--accent); }
.bar { fill: var(--block); }
.bar-4 { fill: var(--block-2); }
.trend { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 160; }
.rail { fill: none; stroke: var(--rule); stroke-width: 2; }
.flow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 10 90; animation: flow 2.8s linear infinite; }
.flow-b { animation-delay: -.9s; }
.flow-c { animation-delay: -1.8s; }
@keyframes flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.bar { transform-box: fill-box; transform-origin: bottom; animation: grow .8s .5s cubic-bezier(.2, .7, .2, 1) both; }
.bar-2 { animation-delay: .6s; } .bar-3 { animation-delay: .7s; } .bar-4 { animation-delay: .8s; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.trend { animation: draw 1.2s 1s ease-out both; }
@keyframes draw { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
.node, .pipeline { animation: rise .6s ease-out both; }
.node-2 { animation-delay: .08s; } .node-3 { animation-delay: .16s; } .pipeline { animation-delay: .24s; } .node-4 { animation-delay: .32s; } .node-5 { animation-delay: .4s; }
.hero-copy { animation: rise .6s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 56px 0 0; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface-raised); padding: 20px 24px; }
.facts dt { font: 500 .75rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 8px; }
.facts dd { margin: 0; font-weight: 600; line-height: 1.4; }

/* ---------- Sections ---------- */
.section { padding-block: 104px; }
.section-alt { background: var(--grad-surface); }
.section-head { max-width: 760px; margin-bottom: 56px; padding-top: 24px; background: var(--grad-rule) no-repeat top left / 100% 2px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p:not(.eyebrow) { color: var(--fg-muted); }
.section-head p + p { margin-top: 16px; }
.section-head strong { color: var(--fg); }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; padding: 28px; background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--radius); }
.card:hover, .card:focus-within { border-color: var(--fg); }
.card h3 { margin: 24px 0 12px; }
.card > p { color: var(--fg-muted); }
.card .ticks { margin-block: 20px; }
.card .text-link { margin-top: auto; }
.art { display: block; width: 100%; height: auto; max-height: 150px; padding: 12px; background: linear-gradient(135deg, var(--teal-glow), transparent 55%, var(--copper-glow)); border-radius: var(--radius); }
.a-line, .a-arrow { fill: none; stroke: var(--rule); stroke-width: 2; }
.a-arrow { stroke: var(--accent); }
.a-block { fill: var(--block); }
.a-accent { fill: var(--accent); }
.a-flow { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 8 40; animation: flow-short 1.8s linear infinite; }
@keyframes flow-short { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
.a-trend { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 240; }
.grow { transform-box: fill-box; transform-origin: bottom; }
.js [data-reveal].is-in .grow { animation: grow .7s cubic-bezier(.2, .7, .2, 1) both; }
.js [data-reveal].is-in .g2 { animation-delay: .08s; } .js [data-reveal].is-in .g3 { animation-delay: .16s; } .js [data-reveal].is-in .g4 { animation-delay: .24s; } .js [data-reveal].is-in .g5 { animation-delay: .32s; }
.js [data-reveal].is-in .a-trend { animation: draw-long 1.2s .3s ease-out both; }
@keyframes draw-long { from { stroke-dashoffset: 240; } to { stroke-dashoffset: 0; } }

.ticks li { position: relative; padding-left: 20px; margin-top: 10px; font-size: .9375rem; line-height: 1.55; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--accent); clip-path: polygon(100% 0, 100% 100%, 0 50%); }

.supporting { margin-top: 56px; }
.supporting ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.supporting li { border-top: 1px solid var(--rule); padding-top: 16px; color: var(--fg-muted); font-size: .9375rem; }
.supporting strong { display: block; color: var(--fg); font-size: 1.0625rem; margin-bottom: 4px; }

/* ---------- Case study ---------- */
.loop { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; margin-bottom: 56px; }
.loop li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--surface-raised); border: 1px solid var(--rule); border-top: 3px solid var(--block); border-radius: var(--radius); }
.loop li:last-child { border-top-color: var(--accent); }
.loop li:not(:last-child)::after { content: ""; position: absolute; top: 50%; left: calc(100% + 1px); width: 28px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent) var(--rule); background-size: 200% 100%; animation: pulse 2s linear infinite; }
@keyframes pulse { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.loop strong { font-size: 1.0625rem; }
.loop span:last-child { color: var(--fg-muted); font-size: .875rem; line-height: 1.5; }
.step { font: 500 .8125rem/1 var(--mono); color: var(--accent-text); margin-bottom: 8px; }
.delivered { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.delivered article { border-top: 1px solid var(--rule); padding-top: 20px; }
.delivered h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.delivered p { color: var(--fg-muted); font-size: .9375rem; }
.delivered .note { border-top-color: var(--accent); }

/* ---------- Approach ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: linear-gradient(90deg, var(--teal), var(--copper)); transform-origin: left; }
.js .process::before { transform: scaleX(0); transition: transform 1.4s .2s cubic-bezier(.2, .7, .2, 1); }
.js .process.is-in::before { transform: scaleX(1); }
.process li { position: relative; display: flex; flex-direction: column; padding-top: 40px; }
.process li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; background: var(--block); border: 3px solid var(--bg); outline: 1px solid var(--rule); }
.process li:last-child::before { background: var(--accent); }
.process h3 { margin-bottom: 8px; }
.process p { color: var(--fg-muted); font-size: .9375rem; }
.process .output { margin-top: auto; padding-top: 16px; color: var(--fg); font: 400 .8125rem/1.5 var(--mono); }

/* ---------- Experience ---------- */
.experience-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
.experience-grid .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin: 0; }
.profiles { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 16px; }
.timeline { border-left: 2px solid var(--rule); }
.timeline > li { position: relative; padding: 0 0 48px 32px; }
.timeline > li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; background: var(--block); outline: 3px solid var(--bg); }
.timeline > li:first-child::before { background: var(--accent); }
.period { font: 500 .8125rem/1.4 var(--mono); color: var(--accent-text); margin-bottom: 8px; }
.org { color: var(--fg-muted); font-weight: 600; margin: 2px 0 8px; }
.certs { border-top: 1px solid var(--rule); padding-top: 24px; }
.certs ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.certs li { padding: 14px 16px; background: var(--surface-raised); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius); font-size: .875rem; font-weight: 600; line-height: 1.45; }

/* ---------- Stack ---------- */
.stack { display: grid; gap: 32px; }
.stack-group { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px 32px; align-items: start; border-top: 1px solid var(--rule); padding-top: 24px; }
.stack-group h3 { font-size: 1rem; }
.stack-group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stack-group li { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 12px; background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--radius); font-size: .875rem; font-weight: 600; line-height: 1.3; transition: border-color .18s ease-out, transform .18s ease-out; }
.stack-group li:hover { border-color: var(--fg); transform: translateY(-2px); }
/* Logo marks sit on a light tile in both themes so third-party colours stay unaltered and legible. */
.mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius); color: var(--ink); }
.mark img { width: 30px; height: 30px; object-fit: contain; }
.mark .icon { width: 26px; height: 26px; }
.trademarks { margin-top: 32px; }

/* ---------- Contact: the single dark band, same in both themes ---------- */
.contact {
  --fg: var(--mist); --fg-muted: #B9CACC; --rule: #3A6670; --accent-text: var(--copper-soft); --focus: var(--copper-soft);
  --err: #FFB4AD; --ok: #8FDCB6;
  background: var(--grad-band); color: var(--fg); color-scheme: dark;
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.contact h2 { margin-bottom: 16px; }
.booking { margin-top: 28px; }
.direct { margin: 40px 0 0; }
.direct div { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; border-top: 1px solid var(--rule); min-height: 56px; }
.direct dt { font: 500 .75rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
.direct dd { margin: 0; overflow-wrap: anywhere; }
.direct a { display: inline-block; padding-block: 10px; color: var(--fg); font-weight: 600; }
.direct a:hover { color: var(--accent-text); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 32px; background: rgba(10, 35, 41, .55); border: 1px solid var(--rule); border-radius: var(--radius); }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 8px; font-weight: 600; font-size: .875rem; }
.optional { color: var(--fg-muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; background: var(--ink-deep); color: var(--fg); border: 1px solid var(--rule); border-radius: var(--radius); font: 400 1rem/1.4 var(--font); }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--err); border-width: 2px; }
.error { margin-top: 6px; color: var(--err); font-size: .8125rem; font-weight: 600; }
.error::before { content: "! "; font-family: var(--mono); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-foot p { max-width: 36ch; }
.form-status { min-height: 1.6em; font-weight: 600; }
.form-status[data-state="ok"] { color: var(--ok); }
.form-status[data-state="error"] { color: var(--err); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: var(--mist); border-top: 1px solid var(--teal); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
html:not(.js) [data-theme-toggle] { display: none; }
.footer-brand img { height: 48px; width: auto; margin-bottom: 16px; }
.footer-brand p, .footer-base { color: #9DB2B5; }
.site-footer h2 { margin-bottom: 12px; font: 500 .75rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--copper-soft); }
.site-footer li a, .site-footer .link-btn { display: inline-block; padding-block: 7px; color: var(--mist); font-size: .875rem; text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover, .site-footer .link-btn:hover { text-decoration: underline; text-decoration-color: var(--copper-soft); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--teal); font: 400 .75rem/1.6 var(--mono); }
.footer-base a { color: var(--mist); }

/* ---------- Consent ---------- */
.consent { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; max-width: 760px; margin-inline: auto; padding: 20px 24px; background: var(--surface-raised); border: 1px solid var(--fg); border-radius: var(--radius); font-size: .875rem; }
.consent p { flex: 1 1 340px; }
.consent div { display: flex; gap: 12px; }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { max-width: 720px; margin-inline: auto; padding: 64px var(--gutter) 96px; }
.page h1 { font-size: clamp(2rem, 3vw + 1rem, 2.75rem); margin-bottom: 24px; }
.page h2 { font-size: 1.375rem; margin: 40px 0 12px; }
.page p + p { margin-top: 12px; }
.page ul { margin-top: 12px; padding-left: 20px; list-style: square; }
.page li { margin-top: 6px; }
.page ul + p { margin-top: 12px; }
.footer-base:only-child { margin-top: 0; padding-top: 0; border-top: 0; }
.site-footer-slim { padding-block: 32px; }
.page-center { text-align: center; }
.page-center p { margin-inline: auto; }
.page-center .logo img { height: 96px; margin: 0 auto 32px; }
.page-center .logo-light { display: block; }
.page-center .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page-center .logo-light { display: none; }
  :root:not([data-theme="light"]) .page-center .logo-dark { display: block; }
}
:root[data-theme="dark"] .page-center .logo-light { display: none; }
:root[data-theme="dark"] .page-center .logo-dark { display: block; }
.page-center .btn { margin-top: 32px; }

/* ---------- Reveal on scroll (only when JavaScript runs) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .5s ease-out; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 48px; } }

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 1023px) {
  :root { --header-h: 60px; }
  .menu-btn { display: inline-grid; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto; background: var(--bg); border-bottom: 1px solid var(--rule); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .3s ease-out, transform .3s ease-out, visibility 0s .3s; }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .3s ease-out, transform .3s ease-out; }
  .site-nav ul { display: block; padding: 8px var(--gutter) 16px; }
  .site-nav a { display: flex; align-items: center; min-height: 56px; width: 100%; font-size: 1.125rem; border-bottom: 1px solid var(--rule); background: none; }
  .site-nav a[aria-current="true"] { color: var(--accent-text); }
  html:not(.js) .site-nav { position: static; visibility: visible; opacity: 1; transform: none; }
  html:not(.js) .site-header { position: static; }
  html:not(.js) .header-row { flex-wrap: wrap; height: auto; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .site-nav { order: 3; flex-basis: 100%; max-height: none; border: 0; }
  html:not(.js) .site-nav ul { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0 0 8px; }
  html:not(.js) .site-nav a { min-height: 44px; width: auto; font-size: .9375rem; border: 0; }
  html:not(.js) .header-row { padding-block: 8px; gap: 4px 16px; }
  .hero { padding-block: 48px 40px; }
  .hero-grid, .contact-grid, .experience-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-visual { max-width: 620px; width: 100%; margin-inline: auto; }
  .experience-grid .section-head { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts, .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { row-gap: 40px; }
  .process::before { display: none; }
  .loop { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .loop li { border-top-width: 1px; border-left: 3px solid var(--block); }
  .loop li:last-child { border-left-color: var(--accent); }
  .loop li:not(:last-child)::after { top: 100%; left: 28px; width: 2px; height: 21px; background: var(--accent); animation: none; }
  .delivered { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supporting ul { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .section { padding-block: 64px; }
  .section-head { margin-bottom: 40px; }
  .cards, .delivered, .process, .form, .certs ul { grid-template-columns: minmax(0, 1fr); }
  .stack-group { grid-template-columns: minmax(0, 1fr); }
  .stack-group ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form { padding: 20px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 559px) {
  .hero-visual text { font-size: 16px; }
  .header-cta { display: none; }
  .logo img { height: 32px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .stack-group li { gap: 8px; padding: 8px; font-size: .8125rem; }
  .mark { width: 38px; height: 38px; }
  .mark img { width: 26px; height: 26px; }
}

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

@media print {
  .site-header, .consent, .form { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
