/* ==========================================================================
   Lehigh Technology Systems — site styles
   Theme colors live in the two token blocks below (light, then dark).
   ========================================================================== */

/* ---------- Fonts (self-hosted Barlow, SIL Open Font License) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/barlow-latin-800-normal.woff2") format("woff2"); }

/* ---------- Design tokens: LIGHT ---------- */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-muted: #F3F6FA;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --border: #DEE5EE;
  --fg: #0F1D30;
  --fg-strong: #0B2545;
  --fg-muted: #4A5A6F;
  --brand: #1767CC;          /* buttons, links (passes 4.5:1 with white) */
  --brand-hover: #12539F;
  --brand-contrast: #FFFFFF;
  --accent: #1C7CF2;         /* logo accent / highlights */
  --accent-soft: rgba(28, 124, 242, 0.10);
  --grid-line: rgba(11, 37, 69, 0.06);
  --hero-bars: rgba(11, 37, 69, 0.06);
  --hero-bars-accent: rgba(28, 124, 242, 0.16);
  --shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 8px 24px rgba(11, 37, 69, 0.06);
  --header-bg: rgba(255, 255, 255, 0.82);
  --focus: #1767CC;
  --success: #17803D;
  --danger: #B42318;

  /* Logo colors */
  --logo-main: #0B2545;
  --logo-accent: #1C7CF2;
  --logo-tag: #2A3F5C;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 84px;
  --header-h-scrolled: 64px;
  --font: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Design tokens: DARK ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1220;
  --bg-muted: #0E1727;
  --surface: #121C2E;
  --surface-2: #0F1828;
  --border: #1F2B40;
  --fg: #E6ECF4;
  --fg-strong: #FFFFFF;
  --fg-muted: #9EAEC3;
  --brand: #4B9BFF;
  --brand-hover: #74B2FF;
  --brand-contrast: #0B1220;
  --accent: #4B9BFF;
  --accent-soft: rgba(75, 155, 255, 0.12);
  --grid-line: rgba(185, 198, 214, 0.06);
  --hero-bars: rgba(185, 198, 214, 0.06);
  --hero-bars-accent: rgba(75, 155, 255, 0.20);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
  --header-bg: rgba(11, 18, 32, 0.80);
  --focus: #74B2FF;
  --success: #4ADE80;
  --danger: #FF8A80;
  --logo-main: #FFFFFF;
  --logo-accent: #4B9BFF;
  --logo-tag: #B9C6D6;
}
/* No-JavaScript fallback: follow the device setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0B1220; --bg-muted: #0E1727; --surface: #121C2E; --surface-2: #0F1828; --border: #1F2B40;
    --fg: #E6ECF4; --fg-strong: #FFFFFF; --fg-muted: #9EAEC3;
    --brand: #4B9BFF; --brand-hover: #74B2FF; --brand-contrast: #0B1220;
    --accent: #4B9BFF; --accent-soft: rgba(75, 155, 255, 0.12);
    --grid-line: rgba(185, 198, 214, 0.06); --hero-bars: rgba(185, 198, 214, 0.06); --hero-bars-accent: rgba(75, 155, 255, 0.20);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
    --header-bg: rgba(11, 18, 32, 0.80); --focus: #74B2FF; --success: #4ADE80; --danger: #FF8A80;
    --logo-main: #FFFFFF; --logo-accent: #4B9BFF; --logo-tag: #B9C6D6;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h-scrolled) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { color: var(--fg-strong); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--brand); color: var(--brand-contrast); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; color: var(--brand-contrast); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--font); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--brand); color: var(--brand-contrast); box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--brand) 60%, transparent); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-contrast); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg-strong); border-color: var(--border); }
.btn-ghost:hover { color: var(--fg-strong); border-color: var(--brand); background: var(--accent-soft); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .95rem; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease), backdrop-filter .45s;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); transition: height .45s var(--ease); }
.site-header.is-scrolled { background: var(--header-bg); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); border-bottom-color: var(--border); box-shadow: 0 4px 20px -12px rgba(0,0,0,.25); }
.site-header.is-scrolled .container { height: var(--header-h-scrolled); }

/* --- Animated logo ---
   Top of page: full ridge + wordmark + tagline.
   Scrolled: ridge bars settle into a compact "signal strength" meter, the
   tagline folds away and the wordmark centers. Each bar has its own target
   scale (--s) and a staggered delay (--d), set in the HTML. */
.brand { display: inline-flex; align-items: center; flex: none; color: inherit; text-decoration: none; border-radius: 8px; }
.brand-logo { height: 54px; width: auto; overflow: visible; transition: height .45s var(--ease); }
.site-header.is-scrolled .brand-logo { height: 38px; }
.brand-logo .bar { fill: var(--logo-main); transform-box: fill-box; transform-origin: 50% 100%; transition: transform .55s var(--ease) var(--d, 0ms), fill .3s; }
.brand-logo .bar.is-accent { fill: var(--logo-accent); }
.brand-logo .word { fill: var(--logo-main); transition: transform .45s var(--ease), fill .3s; }
.brand-logo .tag { fill: var(--logo-tag); transition: opacity .3s ease, transform .45s var(--ease), fill .3s; }
/* Per-bar scroll target (--s: ridge -> rising signal meter) and stagger (--d) */
.brand-logo .b1  { --s: 1.222; --d: 0ms; }
.brand-logo .b2  { --s: 0.933; --d: 30ms; }
.brand-logo .b3  { --s: 0.739; --d: 60ms; }
.brand-logo .b4  { --s: 0.645; --d: 90ms; }
.brand-logo .b5  { --s: 0.920; --d: 120ms; }
.brand-logo .b6  { --s: 1.368; --d: 150ms; }
.brand-logo .b7  { --s: 1.036; --d: 180ms; }
.brand-logo .b8  { --s: 0.842; --d: 210ms; }
.brand-logo .b9  { --s: 0.761; --d: 240ms; }
.brand-logo .b10 { --s: 1.086; --d: 270ms; }
.brand-logo .b11 { --s: 1.864; --d: 300ms; }
.brand-logo .bar { --s-now: 1; }
.site-header.is-scrolled .brand-logo .bar { --s-now: var(--s); transform: scaleY(var(--s, 1)); }
.site-header.is-scrolled .brand-logo .word { transform: translateY(11.5px); }
.site-header.is-scrolled .brand-logo .tag { opacity: 0; transform: translateY(8px); }
/* Load-in: bars rise one after another */
.js .brand-logo .bar { animation: bar-rise .7s var(--ease) backwards; animation-delay: calc(var(--d, 0ms) * 2 + 80ms); }
@keyframes bar-rise { from { transform: scaleY(0); } }
/* Hover: a quick signal pulse */
.js .brand:hover .brand-logo .bar { animation: bar-pulse .6s var(--ease); animation-delay: var(--d, 0ms); }
@keyframes bar-pulse { 40% { transform: scaleY(calc(var(--s-now, 1) * .55)); } }

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link { position: relative; padding: 8px 12px; border-radius: 8px; color: var(--fg); font-weight: 500; text-decoration: none; transition: color .2s, background-color .2s; }
.nav-link:hover { color: var(--brand); }
.nav-link[aria-current="page"] { color: var(--fg-strong); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--fg-muted); cursor: pointer; transition: color .2s, background-color .2s, border-color .2s; }
.icon-btn:hover { color: var(--fg-strong); background: var(--accent-soft); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav { margin-left: auto; }
.nav .btn { margin-left: 8px; }
.nav .theme-toggle { margin-left: 6px; }

/* "Proud" flag badge (right of "Get in touch") */
.proud { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; flex: none; margin-left: -4px; user-select: none; }
.proud-flag { width: 32px; height: auto; border-radius: 2px; }
.proud-flag .flag-edge { stroke: rgba(11, 37, 69, 0.18); stroke-width: 1; vector-effect: non-scaling-stroke; }
:root[data-theme="dark"] .proud-flag .flag-edge { stroke: rgba(255, 255, 255, 0.12); }
.proud-text { color: var(--fg-muted); font-size: 11px; font-style: italic; font-weight: 600; letter-spacing: .08em; line-height: 1; }
.header-actions { display: none; align-items: center; gap: 8px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }

@media (max-width: 860px) {
  :root { --header-h: 76px; }
  .brand-logo { height: 46px; }
  .header-actions { display: flex; order: 3; }
  .proud { order: 2; margin-left: auto; }
  .site-header .container { gap: 12px; }
}
@media (max-width: 420px) {
  .brand-logo { height: 40px; }
  .site-header.is-scrolled .brand-logo { height: 34px; }
}
/* Very small phones: move the theme button into the menu to make room for the flag */
@media (max-width: 360px) {
  .header-actions .theme-toggle { display: none; }
  .site-header .nav .theme-toggle { display: inline-flex; margin: 8px 0 0; }
}
@media (max-width: 860px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 30px -20px rgba(0,0,0,.3);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-link { padding: 12px 8px; font-size: 1.1rem; }
  .nav-link[aria-current="page"]::after { left: 8px; right: auto; width: 24px; }
  .nav .btn { margin: 10px 0 0; }
  .nav .theme-toggle { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-muted { background: var(--bg-muted); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--brand); font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head .eyebrow::after { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head.left .eyebrow::after { display: none; }
.h2 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; }
.lede { margin-top: 16px; color: var(--fg-muted); font-size: clamp(1.06rem, 1.6vw, 1.2rem); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 12vw, 150px) 0 clamp(64px, 9vw, 110px); text-align: center; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
}
.hero-ridge { position: absolute; left: 50%; bottom: 0; z-index: -1; width: max(1400px, 120vw); height: auto; transform: translateX(-50%); pointer-events: none; }
.hero-ridge rect { fill: var(--hero-bars); }
.hero-ridge rect.is-accent { fill: var(--hero-bars-accent); }
.hero .eyebrow { margin-bottom: 22px; }
h1, h2, .h2 { text-wrap: balance; }
.section-cta { padding-top: 0; }
.section-muted + .section-cta { padding-top: clamp(64px, 9vw, 112px); }
@media (max-width: 700px) { .br-lg { display: none; } }
.hero h1 { max-width: 14em; margin-inline: auto; font-size: clamp(2.6rem, 6.6vw, 5rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; }
.hero h1 .hl { color: var(--accent); }
.hero .lede { max-width: 680px; margin: 26px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }

/* Stat / highlight cards */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: clamp(56px, 8vw, 88px); }
.stat { padding: 22px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 85%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-align: center; }
.stat-value { display: block; color: var(--fg-strong); font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-label { display: block; margin-top: 6px; color: var(--fg-muted); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

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

.card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); transition: transform .25s var(--ease), border-color .25s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.card h3 { font-size: 1.3rem; font-weight: 700; }
.card p { color: var(--fg-muted); }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.card-icon svg { width: 24px; height: 24px; }
.card-link { margin-top: auto; padding-top: 6px; font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* Split layout (about teaser etc.) */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split .lede + .btn, .split .lede + .text-link { margin-top: 28px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.text-link svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-weight: 500; }
.checklist svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--accent); }

/* CTA band */
.cta { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 72px); border-radius: 28px; border: 1px solid var(--border); background: var(--surface); text-align: center; isolation: isolate; box-shadow: var(--shadow); }
.cta .hero-ridge { width: 1100px; opacity: .9; }
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta .lede { max-width: 600px; margin-inline: auto; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--border); isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%); mask-image: linear-gradient(to bottom, #000, transparent 90%); }
.page-hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.8rem); font-weight: 800; letter-spacing: -0.02em; }
.page-hero .lede { max-width: 680px; }

/* Placeholder blocks (About page) — remove the class once real content is in */
.placeholder { border-style: dashed; }
.ph-tag { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--brand); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.avatar svg { width: 34px; height: 34px; }
.role { margin-top: -6px; color: var(--brand) !important; font-weight: 600; }
.prose-block { max-width: 760px; }
.prose-block p + p { margin-top: 16px; }
.prose-block p { color: var(--fg-muted); font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: minmax(0, 1fr); } }
.contact-cards { display: grid; gap: 16px; }
.contact-card { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.contact-card h2 { font-size: 1.15rem; font-weight: 700; }
.contact-card p { color: var(--fg-muted); font-size: .98rem; }
.contact-card a { display: inline-block; margin-top: 6px; font-weight: 600; font-size: 1.05rem; word-break: break-all; }
.form-card { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.6rem; font-weight: 700; }
.form-card > p { margin-top: 6px; color: var(--fg-muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: .95rem; color: var(--fg-strong); }
.field .opt { color: var(--fg-muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--fg);
  font: 400 1rem/1.4 var(--font); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--fg-muted); }
.consent input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.hp { display: none !important; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 8px; }
.form-status { font-weight: 600; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; }
.legal .meta { color: var(--fg-muted); margin-top: 10px; }
.legal h2 { margin: 44px 0 12px; font-size: 1.5rem; font-weight: 700; }
.legal h3 { margin: 26px 0 8px; font-size: 1.15rem; font-weight: 700; }
.legal p, .legal li { color: var(--fg); }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 1.3em; margin: 12px 0; }
.legal li + li { margin-top: 6px; }
.legal .toc { margin-top: 28px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-muted); }
.legal .toc ol { margin: 8px 0 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .legal .toc ol { columns: 1; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--bg-muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, .9fr); gap: 40px; padding-block: 56px 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-logo { width: 230px; height: auto; }
.footer-logo-dark { display: none; }
:root[data-theme="dark"] .footer-logo-light { display: none; }
:root[data-theme="dark"] .footer-logo-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .footer-logo-light { display: none; } :root:not([data-theme]) .footer-logo-dark { display: block; } }
.footer-brand p { margin-top: 18px; max-width: 380px; color: var(--fg-muted); font-size: .98rem; }
.footer-col h2 { margin-bottom: 14px; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; border-top: 1px solid var(--border); color: var(--fg-muted); font-size: .92rem; }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a { color: var(--fg-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-block: clamp(80px, 14vw, 160px); }
.not-found .code { color: var(--brand); font-weight: 700; letter-spacing: .2em; }
.not-found h1 { margin-top: 10px; font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; }
.not-found .hero-actions { margin-top: 30px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
