/* ==========================================================================
   NEDA — site styles
   Port of the Altai (altailtd.com) design system, recoloured to the NEDA brand:
   white & cool-grey surfaces, ice-blue header, deep navy footer & dark bands,
   amber accent / call-to-action, NEDA blue for links, Montserrat throughout.
   Components and their markup: see FRONTEND.md and /ui-preview.
   Page-specific CSS goes in assets/css/pages/<name>.css (loaded on every page — scope it).
   ========================================================================== */

:root {
  /* brand */
  --ink: #06182E;          /* text on light, dark surfaces */
  --ink-2: #0B2540;
  --navy: #074679;
  --blue: #1D75BD;         /* links, secondary accent */
  --blue-2: #165E99;
  --blue-soft: rgba(29, 117, 189, .09);
  --amber: #EC9E23;        /* accent, CTAs */
  --amber-2: #C97F12;
  --amber-ink: #A8680A;    /* amber TEXT on white (AA contrast) */
  --amber-soft: rgba(236, 158, 35, .14);
  --grad: linear-gradient(135deg, #EC9E23 0%, #C97F12 100%);
  --grad-hover: linear-gradient(135deg, #F2AC3A 0%, #B9740F 100%);

  /* neutrals */
  --text: #23303F;
  --muted: #5D6B7C;
  --muted-dark: #A9BDD3;   /* body text on navy */
  --bg: #fff;
  --grey: #F3F6FA;         /* alternate section background */
  --grey-2: #E8EEF5;
  --line: #DDE5EE;
  --line-dark: rgba(255, 255, 255, .13);
  --ice: #E6F0FA;          /* light header */
  --ice-2: #D4E5F5;
  --ice-line: #BCD4EB;
  --silver: linear-gradient(180deg, #EEF5FC 0%, #D9E8F6 100%);   /* page hero + CTA panel (ice tint of NEDA blue) */
  --dark-bg: radial-gradient(120% 90% at 0% 0%, #0A4C82 0%, #073766 38%, #06182E 100%);
  --shadow: 0 2px 6px rgba(6, 24, 46, .04), 0 12px 32px -12px rgba(6, 24, 46, .18);
  --shadow-lg: 0 4px 10px rgba(6, 24, 46, .05), 0 28px 60px -20px rgba(6, 24, 46, .32);

  /* photo shade (Look & feel → "Shade over banner photos") */
  --sh-1: .86; --sh-2: .62; --sh-3: .14;

  --f-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-body: "Montserrat", "Segoe UI", system-ui, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
}
.shade-light { --sh-1: .72; --sh-2: .44; --sh-3: .04; }
.shade-strong { --sh-1: .92; --sh-2: .8; --sh-3: .42; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding-top: var(--header-h);
  font: 400 16px/1.7 var(--f-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
::selection { background: var(--amber); color: var(--ink); }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(820px + 2 * var(--gutter)); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--amber); color: var(--ink); font-weight: 600; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }

.ico { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .9em 1.6em; border-radius: 999px; border: 0;
  font: 600 .92rem/1 var(--f-body); letter-spacing: .01em; text-decoration: none;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  white-space: nowrap;
}
.btn .ico { width: 1.05em; height: 1.05em; transition: transform .25s var(--ease); }
.btn:hover .ico:last-child { transform: translateX(3px); }
.btn--primary { background: var(--grad); color: var(--ink); }
.btn--primary:hover { background: var(--grad-hover); box-shadow: 0 10px 24px -10px rgba(201, 127, 18, .75); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--navy); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-2); box-shadow: 0 10px 24px -10px rgba(29, 117, 189, .7); }
.btn--line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--sm { padding: .7em 1.2em; font-size: .84rem; }
.btn--block { width: 100%; }
button.btn:disabled { opacity: .55; cursor: not-allowed; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 600; font-size: .92rem; color: var(--blue); text-decoration: none;
}
.link-arrow:hover { color: var(--blue-2); }
.link-arrow .ico { width: 1em; transition: transform .25s var(--ease); }
.link-arrow:hover .ico, a:hover .link-arrow .ico { transform: translateX(4px); }
.dark .link-arrow { color: var(--amber); }
.dark .link-arrow:hover { color: #fff; }
button.link-arrow { padding: 0; border: 0; background: none; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: var(--ink); color: #fff; transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .5); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 100%; }
.brand { display: block; color: inherit; flex: none; }
.brand-logo { height: 46px; width: auto; }
.brand-logo--color { display: none; }
.theme-light .brand-logo--color { display: block; }
.theme-light .brand-logo--white { display: none; }
.nav { margin: 0 auto; }
.nav-list { display: flex; gap: 4px; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  position: relative; display: flex; align-items: center; gap: .3em; padding: .5em .95em;
  font-weight: 600; font-size: .86rem; text-decoration: none; color: rgba(255, 255, 255, .78); transition: color .2s; white-space: nowrap;
}
.nav-list > li > a:hover, .nav-list > li.is-active > a { color: #fff; }
.nav-list > li.is-active > a::after {
  content: ""; position: absolute; left: .95em; right: .95em; bottom: -2px; height: 2px; border-radius: 2px; background: var(--amber);
}
.nav-caret { width: .95em; height: .95em; opacity: .7; transition: transform .25s var(--ease); }
.has-sub:hover .nav-caret, .has-sub:focus-within .nav-caret, .has-sub.is-open .nav-caret { transform: rotate(180deg); }
.nav-contact, .nav-donate { display: none; }
.nav-toggle { display: none; }

/* dropdown (desktop) */
.sub {
  position: absolute; top: calc(100% + 10px); left: .3em; z-index: 5; min-width: 220px; padding: 8px;
  border-radius: 12px; background: #fff; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(6, 24, 46, .05);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.is-open > .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub.is-closed > .sub { opacity: 0; visibility: hidden; transform: translateY(6px); }
.sub a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: .65em .9em; border-radius: 8px;
  font-weight: 600; font-size: .86rem; text-decoration: none; color: var(--text); transition: background-color .2s, color .2s;
}
.sub a::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); opacity: 0; transition: opacity .2s; }
.sub a:hover, .sub a:focus-visible { background: var(--grey); color: var(--ink); }
.sub a:hover::after, .sub a[aria-current="page"]::after { opacity: 1; }
.sub a[aria-current="page"] { color: var(--ink); background: var(--amber-soft); }

@media (max-width: 1140px) {
  .header-inner { gap: 18px; }
  .nav-list > li > a { padding: .5em .7em; font-size: .82rem; }
  .nav-list > li.is-active > a::after { left: .7em; right: .7em; }
  .brand-logo { height: 40px; }
}

@media (max-width: 960px) {
  :root { --header-h: 66px; }
  .brand-logo { height: 38px; }
  .header-cta { margin-left: auto; }
  .nav-toggle {
    display: grid; place-content: center; gap: 6px; margin-left: auto;
    width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: inherit; cursor: pointer; flex: none;
  }
  .header-cta + .nav-toggle { margin-left: 0; }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
  .nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: -1; margin: 0; padding: 16px var(--gutter) 32px;
    display: flex; flex-direction: column; gap: 28px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--ink); color: #fff;
    opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s var(--ease), visibility .3s; visibility: hidden;
  }
  .nav-open .nav { opacity: 1; transform: none; visibility: visible; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line-dark); }
  .nav-list > li > a { font: 700 clamp(1.4rem, 6.5vw, 2rem)/1.2 var(--f-display); padding: .45em 0; color: #fff; white-space: normal; }
  .nav-list > li.is-active > a { color: var(--amber); }
  .nav-list > li.is-active > a::after, .nav-caret { display: none; }
  .sub, .has-sub.is-closed > .sub {
    position: static; min-width: 0; padding: 0 0 14px 2px; background: none; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; display: grid; gap: 2px;
  }
  .sub::before { display: none; }
  .sub a { justify-content: flex-start; padding: .35em 0; font-size: 1rem; font-weight: 500; color: rgba(255, 255, 255, .78); background: none; }
  .sub a::before { content: ""; width: 14px; height: 1.5px; background: currentColor; opacity: .5; }
  .sub a::after { display: none; }
  .sub a:hover, .sub a:focus-visible { background: none; color: #fff; }
  .sub a[aria-current="page"] { background: none; color: var(--amber); }
  .nav-donate { display: inline-flex; align-self: flex-start; }
  .nav-contact { display: grid; gap: 12px; margin-top: auto; color: var(--muted-dark); }
  .nav-contact a, .nav-contact span { display: flex; align-items: center; gap: 10px; font: 500 .95rem var(--f-body); text-decoration: none; color: var(--muted-dark); }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 359px) {
  .header-cta { display: none; }
  .header-cta + .nav-toggle { margin-left: auto; }
}

/* light (ice-blue) header — default; Admin → Site settings → Look & feel */
.theme-light .site-header {
  background: linear-gradient(180deg, var(--ice) 0%, var(--ice-2) 100%);
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--ice-line);
}
.theme-light .site-header.is-scrolled { box-shadow: inset 0 -1px 0 var(--ice-line), 0 8px 24px -12px rgba(6, 24, 46, .35); }
.theme-light .nav-list > li > a { color: #33475E; }
.theme-light .nav-list > li > a:hover, .theme-light .nav-list > li.is-active > a { color: var(--ink); }
@media (max-width: 960px) {
  .theme-light .nav-toggle { background: rgba(6, 24, 46, .08); }
  .theme-light .nav { background: var(--ice); color: var(--ink); }
  .theme-light .nav-list > li { border-bottom-color: var(--ice-line); }
  .theme-light .nav-list > li > a { color: var(--ink); }
  .theme-light .nav-list > li.is-active > a { color: var(--amber-ink); }
  .theme-light .sub a { color: #3F536B; }
  .theme-light .sub a:hover { color: var(--ink); }
  .theme-light .sub a[aria-current="page"] { color: var(--amber-ink); }
  .theme-light .nav-contact, .theme-light .nav-contact a, .theme-light .nav-contact span { color: #43566D; }
}

/* ---------- Shared ---------- */
.eyebrow { margin: 0 0 1rem; font: 600 .78rem/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--amber-ink); }
.dark { position: relative; background: var(--dark-bg); color: #D3DEEA; isolation: isolate; }
.section--grey { background: var(--grey); }
.section--ice { background: var(--silver); }

/* ---------- Hero (full-bleed banner) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(88vh, 820px); display: flex; align-items: center; background: var(--ink); color: #fff; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; animation: kenburns 26s ease-out both; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 24, 46, var(--sh-1)) 0%, rgba(6, 24, 46, var(--sh-2)) 38%, rgba(6, 24, 46, var(--sh-3)) 72%, rgba(6, 24, 46, 0) 100%),
    linear-gradient(0deg, rgba(6, 24, 46, .55) 0%, transparent 35%),
    linear-gradient(180deg, rgba(6, 24, 46, .35) 0%, transparent 18%);
}
.hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-top: clamp(72px, 11vw, 140px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero-copy { max-width: 780px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .7em; padding: .6em 1em; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: .72rem; color: #fff; }
.hero .eyebrow::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(236, 158, 35, .3); }
.hero-title { font: 800 clamp(2.4rem, 5.4vw, 4.6rem)/1.05 var(--f-display); letter-spacing: -.025em; margin: .3rem 0 1.3rem; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.hero-title em, .page-title em, .h2 em { font-style: normal; color: var(--blue); }
.hero-title em { color: #fff; background: linear-gradient(var(--amber), var(--amber)) 0 94% / 100% .09em no-repeat; padding-bottom: .04em; }
.hero-text { font-size: clamp(1rem, 1.3vw, 1.18rem); color: rgba(255, 255, 255, .86); max-width: 33em; text-wrap: pretty; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.2rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); font-size: .85rem; font-weight: 500; }
.hero-points li { display: inline-flex; align-items: center; gap: .5em; }
.hero-points .ico { width: 1.2em; height: 1.2em; color: var(--amber); }

/* glass card on the hero (Altai "ticket") */
.hero-card {
  flex: none; width: 340px; padding: 20px 22px; border-radius: 18px;
  background: rgba(255, 255, 255, .14); color: #fff;
  border: 1px solid rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6);
}
.hero-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: rgba(255, 255, 255, .8); font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.hero-card-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: ping 2s infinite; }
.hero-card-title { display: block; font: 700 1.25rem/1.25 var(--f-display); margin-bottom: 6px; }
.hero-card p { margin: 0; color: rgba(255, 255, 255, .82); font-size: .9rem; line-height: 1.55; }
.hero-card-bottom { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .78); font-size: .82rem; font-weight: 500; }

/* ---------- Category tiles ("focus areas") ---------- */
.modes { padding: clamp(48px, 6vw, 72px) 0; background: var(--bg); }
.modes-title { text-align: center; font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1.2 var(--f-display); color: var(--ink); margin-bottom: 28px; }
.mode-grid { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 12px; }
.mode {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 26px 12px 20px; height: 100%;
  border-radius: 10px; background: var(--grey); text-decoration: none; font-size: .86rem; font-weight: 500; line-height: 1.35; color: var(--text);
  transition: background-color .3s, box-shadow .3s, transform .3s var(--ease);
}
a.mode:hover { background: #fff; box-shadow: var(--shadow); transform: translateY(-3px); }
.mode-icon { display: grid; place-items: center; width: 64px; height: 64px; color: var(--navy); transition: color .3s, transform .4s var(--ease); }
.mode-icon .ico { width: 42px; height: 42px; stroke-width: 1.4; }
.mode-icon img { width: 52px; height: 52px; object-fit: contain; }
.mode:hover .mode-icon { color: var(--amber-2); transform: scale(1.06); }

/* ---------- Media frame ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--grey); box-shadow: var(--shadow); }
.media > img, .media > a > img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.media > a { display: block; height: 100%; cursor: zoom-in; }
.media:hover img { transform: scale(1.04); }
.media--wide { aspect-ratio: 16 / 10; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 4 / 5; }
.media--band { aspect-ratio: 3 / 1; }
.media--auto > img, .media--auto > a > img { height: auto; }
.media-badge { position: absolute; left: 16px; bottom: 16px; z-index: 1; display: inline-flex; align-items: center; gap: .5em; padding: .55em 1em; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .78rem; font-weight: 700; box-shadow: var(--shadow); }
.media-badge .ico { color: var(--amber-2); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head--left { margin-left: 0; text-align: left; }
.section-head--left .section-lead { margin-left: 0; }
.section-lead { color: var(--muted); font-size: 1rem; margin: 14px auto 0; max-width: 40em; }
.section-lead .link-arrow { margin-left: .4em; }
.dark .section-lead { color: var(--muted-dark); }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 .9rem; font: 600 .76rem/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--amber-ink); }
.kicker--dark, .dark .kicker { color: var(--amber); }
.kicker-ico { width: 20px; height: 20px; }
.h2 { font: 700 clamp(1.75rem, 3.2vw, 2.6rem)/1.18 var(--f-display); letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.dark .h2 { color: #fff; }
.dark .h2 em { color: var(--amber); }
.h2--sm { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.h3 { font: 700 1.2rem/1.3 var(--f-display); color: var(--ink); }
.prose > :last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.dark .prose strong { color: #fff; }
.prose ul, .prose ol { margin: 0 0 1em; display: grid; gap: .4em; }
.prose ul li { padding-left: 1.3em; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose ol li::marker { color: var(--amber-ink); font-weight: 700; }
.prose h2 { font: 700 1.45rem/1.3 var(--f-display); margin: 1.6em 0 .6em; color: var(--ink); }
.prose h3 { font: 700 1.1rem/1.35 var(--f-display); margin: 1.4em 0 .5em; color: var(--ink); }
.prose h4 { font: 700 1rem var(--f-display); margin: 1.2em 0 .4em; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--blue); text-underline-offset: 2px; }
.prose a:hover { color: var(--blue-2); }
.dark .prose a { color: var(--amber); }
.prose img { border-radius: 10px; margin: 1.5em 0; }
.prose blockquote { margin: 1.6em 0; padding: 1.2em 1.4em; border-radius: 12px; background: var(--grey); border-left: 4px solid var(--amber); font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .92rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--ink); }
.prose--lg { font-size: 1.05rem; }
.prose--muted { color: var(--muted); }

/* ---------- Stats ---------- */
.stats { background: var(--grey); }
.stats-grid { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; padding-top: 40px; padding-bottom: 40px; }
.stat { padding: 28px 20px; border-radius: 10px; background: #fff; text-align: center; }
.stat strong { display: block; font: 800 clamp(1.9rem, 3.4vw, 2.7rem)/1 var(--f-display); letter-spacing: -.02em; color: var(--ink); margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: .88rem; }
.stats--dark { background: var(--dark-bg); }
.stats--dark .stat { background: rgba(255, 255, 255, .05); border: 1px solid var(--line-dark); }
.stats--dark .stat strong { color: var(--amber); }
.stats--dark .stat span { color: var(--muted-dark); }

/* ---------- Intro (copy + image) ---------- */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.intro-grid--flip .intro-visual { order: 2; }
.intro-copy .h2 { margin-bottom: 1.2rem; }
.intro-copy .prose { color: var(--muted); margin-bottom: 1.8rem; }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.promises { display: grid; gap: 10px; margin-bottom: 1.8rem; }
.promises li { display: grid; grid-template-columns: 40px 150px 1fr; align-items: baseline; gap: 12px; padding: 16px 20px; border-radius: 10px; background: var(--grey); }
.promise-n { color: var(--amber-ink); font-weight: 700; font-size: .85rem; }
.promises strong { font-weight: 700; color: var(--ink); }
.promises li > span:last-child { color: var(--muted); font-size: .92rem; }
.promises--2 li { grid-template-columns: 40px 1fr; }
.promises--2 li > span:last-child { grid-column: 2; }

/* ---------- Feature / service cards ---------- */
.services-home { background: var(--grey); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 32px 28px 28px; border-radius: var(--radius);
  background: #fff; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(6, 24, 46, .05);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.section:not(.services-home):not(.section--grey):not(.dark) .service-card { box-shadow: 0 0 0 1px var(--line); }
a.service-card:hover, .service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.service-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); margin-bottom: 6px; transition: background .3s, color .3s; }
.service-icon .ico { width: 26px; height: 26px; }
.service-icon img { width: 30px; height: 30px; object-fit: contain; }
.service-card:hover .service-icon { background: var(--grad); color: var(--ink); }
.service-thumb { display: block; margin: -32px -28px 8px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--grey); }
.service-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.service-card:hover .service-thumb img { transform: scale(1.05); }
.service-card h3 { font: 700 1.1rem/1.3 var(--f-display); color: var(--ink); }
.service-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.service-n { position: absolute; top: 26px; right: 26px; font-weight: 700; font-size: .8rem; color: var(--amber-ink); }
.service-more { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-size: .88rem; color: var(--blue); }
.service-more .ico { width: 1em; transition: transform .3s var(--ease); }
.service-card:hover .service-more .ico { transform: translateX(5px); }
.dark .service-card { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-dark); }
.dark .service-card h3 { color: #fff; }
.dark .service-card p { color: var(--muted-dark); }
.dark .service-icon { background: rgba(236, 158, 35, .16); color: var(--amber); }
.dark .service-more { color: var(--amber); }

/* ---------- Process / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); gap: 10px; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 10px 18px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(6, 24, 46, .05); transition: box-shadow .3s, transform .3s var(--ease); }
.step:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.step-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--grey); color: var(--navy); transition: background .3s, color .3s; }
.step:hover .step-icon { background: var(--grad); color: var(--ink); }
.step-icon .ico { width: 24px; height: 24px; }
.step-n { color: var(--amber-ink); font-weight: 700; font-size: .75rem; }
.step-title { font-weight: 600; font-size: .86rem; line-height: 1.35; color: var(--ink); }
.step-text { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.process { background: var(--grey); }
.section:not(.process):not(.section--grey) .step { box-shadow: 0 0 0 1px var(--line); }

/* ---------- Image cards / project grid ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.project-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project { position: relative; display: flex; flex-direction: column; margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: box-shadow .35s, transform .35s var(--ease); }
.project:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.project-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--grey); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project:hover .project-media img { transform: scale(1.05); }
.project-body, .project figcaption { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }
.project-body .chip, .project figcaption .chip { align-self: flex-start; }
.project h3 { font: 700 1.05rem/1.3 var(--f-display); color: var(--ink); margin: 10px 0 6px; }
.project h3 a { color: inherit; text-decoration: none; }
.project--link h3 a::after { content: ""; position: absolute; inset: 0; }
.project p { color: var(--muted); font-size: .9rem; margin: 0; }
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.project.is-hidden, .news-card.is-hidden, [data-category].is-hidden { display: none; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-ink); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; text-decoration: none; }
.chip--blue { background: var(--blue-soft); color: var(--blue-2); }
.chip--dark { background: var(--ink); color: #fff; }
.chip--light { background: rgba(255, 255, 255, .14); color: #fff; }
a.chip:hover { background: var(--amber); color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.filter { padding: .55em 1.2em; border-radius: 999px; border: 1px solid #C3CFDC; background: #fff; color: var(--text); cursor: pointer; font-weight: 500; font-size: .86rem; text-decoration: none; transition: all .25s; }
.filter:hover { border-color: var(--ink); }
.filter.is-active, .filter[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Logos ---------- */
.logos-band { padding: 56px 0 64px; background: #fff; border-top: 1px solid var(--line); overflow: hidden; }
.logos-title { text-align: center; color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; margin: 0 0 30px; padding: 0 var(--gutter); }
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { flex: none; padding: 0 36px; }
.marquee-item img { height: 54px; width: auto; max-width: 190px; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .3s, opacity .3s; }
.marquee-item:hover img { filter: none; opacity: 1; }
.marquee-text { display: inline-flex; align-items: center; gap: 36px; font: 700 clamp(1.1rem, 2vw, 1.5rem) var(--f-display); color: var(--ink); white-space: nowrap; }
.marquee-text::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.logos-section { background: var(--grey); }
.logo-block { text-align: center; }
.logo-block + .logo-block { margin-top: 56px; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 20px; }
.logo-grid li { display: grid; place-items: center; min-height: 120px; padding: 24px; border-radius: 10px; background: #fff; }
.logo-grid img { max-height: 60px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.logo-grid li:hover img { filter: none; opacity: 1; }

/* ---------- CTA (ice gradient panel) ---------- */
.cta { padding: clamp(64px, 8vw, 104px) 0; background: #fff; }
.section--grey + .cta, .logos-band + .cta { padding-top: clamp(64px, 8vw, 104px); }
.cta-box {
  position: relative; overflow: hidden; display: grid; justify-items: center; gap: 24px; text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); border-radius: 20px; background: var(--silver);
}
.cta-box::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 2px, transparent 2px 10px); -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); opacity: .55; pointer-events: none; }
.cta-box > * { position: relative; z-index: 1; }
.cta .h2 { margin-bottom: .6rem; }
.cta-copy p { margin: 0 auto; font-size: 1.02rem; max-width: 34em; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; }
.cta-phone { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; text-decoration: none; color: var(--ink); }
.cta-phone .ico { color: var(--amber-2); }
.cta-box--dark { background: var(--dark-bg); color: #D3DEEA; }
.cta-box--dark::after { opacity: .08; }
.cta-box--dark .h2 { color: #fff; }
.cta-box--dark .h2 em { color: var(--amber); }
.cta-box--dark .cta-copy p { color: var(--muted-dark); }
.cta-box--dark .cta-phone { color: #fff; }
.cta-box--dark .btn--line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.cta-box--dark .btn--line:hover { box-shadow: inset 0 0 0 1.5px #fff; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); background: var(--silver); text-align: center; }
.page-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 2px, transparent 2px 10px); -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); opacity: .6; pointer-events: none; }
.page-hero .wrap { position: relative; z-index: 1; }
.page-title { font: 800 clamp(2rem, 4.6vw, 3.4rem)/1.12 var(--f-display); letter-spacing: -.02em; color: var(--ink); max-width: 18em; margin: 0 auto 1.1rem; text-wrap: balance; }
.page-lead { font-size: clamp(1rem, 1.3vw, 1.12rem); color: #4A5A6D; max-width: 40em; margin: 0 auto; }
.page-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin-top: 1.4rem; color: var(--muted); font-size: .88rem; font-weight: 500; }
.page-meta > span, .page-meta > time { display: inline-flex; align-items: center; gap: .45em; }
.page-meta .ico { width: 1.1em; height: 1.1em; color: var(--amber-2); }
.page-hero--image { background: var(--ink); color: #fff; padding: clamp(80px, 11vw, 150px) 0 clamp(64px, 9vw, 120px); }
.page-hero--image::after { display: none; }
.page-hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; animation: kenburns 26s ease-out both; }
.page-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 24, 46, calc(var(--sh-2) - .1)) 0%, rgba(6, 24, 46, var(--sh-1)) 100%); }
.page-hero--image .eyebrow { color: var(--amber); }
.page-hero--image .page-title { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.page-hero--image .page-title em { color: var(--amber); }
.page-hero--image .page-lead, .page-hero--image .page-meta { color: rgba(255, 255, 255, .86); }
.page-hero--image .crumbs, .page-hero--image .crumbs a { color: rgba(255, 255, 255, .8); }
.page-hero--image .crumbs a:hover { color: #fff; }
.page-hero--image .crumbs [aria-current] { color: rgba(255, 255, 255, .62); }
.page-hero--left { text-align: left; }
.page-hero--left .page-title, .page-hero--left .page-lead { margin-left: 0; }
.page-hero--left .crumbs ol, .page-hero--left .page-meta { justify-content: flex-start; }
.error-code { display: block; font: 800 clamp(5rem, 16vw, 10rem)/1 var(--f-display); letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .5rem; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 22px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.crumbs--center ol { justify-content: center; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 .55em; opacity: .5; }
.crumbs a { color: var(--blue); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--muted); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Story / about ---------- */
.story-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.story-copy .prose { color: var(--muted); }
.story-visual .media { max-width: 460px; margin-left: auto; }
.companies { background: var(--grey); }
.company-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.company { display: flex; flex-direction: column; padding: 30px; border-radius: var(--radius); background: #fff; transition: transform .35s var(--ease), box-shadow .35s; }
.company:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.company-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.company-logo { height: 56px; width: auto; }
.company-hex { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--amber-soft); }
.company-hex .ico { width: 22px; height: 22px; color: var(--amber-ink); }
.company-year { padding: 5px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 600; }
.company h3 { font: 700 1.05rem/1.3 var(--f-display); color: var(--ink); margin-bottom: 6px; }
.company p { color: var(--muted); font-size: .92rem; }
.company-city { margin: auto 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; font-weight: 500; }
.company-city .ico { width: 16px; height: 16px; color: var(--amber-2); }

/* ---------- Value / numbered list (two columns) ---------- */
.value-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.value { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding: 24px 26px; border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .3s, transform .3s var(--ease); }
.section--grey .value, .dark .value { box-shadow: none; }
.value:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.value-n { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); font-weight: 700; font-size: .85rem; }
.value-n .ico { width: 22px; height: 22px; }
.value h3 { font: 700 1.02rem/1.35 var(--f-display); color: var(--ink); align-self: center; }
.value p { margin: 0; color: var(--muted); font-size: .92rem; }
.dark .value { background: rgba(255, 255, 255, .05); border: 1px solid var(--line-dark); }
.dark .value h3 { color: #fff; }
.dark .value p { color: var(--muted-dark); }
.dark .value-n { background: rgba(236, 158, 35, .16); color: var(--amber); }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px 24px; }
.member { display: flex; flex-direction: column; }
.member-photo { position: relative; display: block; aspect-ratio: 1 / 1.1; margin-bottom: 18px; overflow: hidden; border-radius: var(--radius); background: linear-gradient(160deg, #0A4C82, var(--ink)); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform .7s var(--ease); }
.member:hover .member-photo img { transform: scale(1.05); }
.member-initials { position: absolute; inset: 0; display: grid; place-items: center; font: 800 2.4rem var(--f-display); color: #fff; }
.member-role { color: var(--amber-ink); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 6px; }
.member h3 { font: 700 1.05rem/1.3 var(--f-display); color: var(--ink); margin-bottom: 10px; }
.member h3 button { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.member h3 button:hover { color: var(--blue); }
.member h3 span { display: block; font: 400 .88rem var(--f-body); color: var(--muted); margin-top: 3px; }
.member > p { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.member-pos { display: grid; gap: 4px; font-size: .86rem; color: var(--muted); }
.member-pos li { padding-left: 14px; position: relative; }
.member-pos li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.member .link-arrow { margin-top: auto; align-self: flex-start; }
.member-photo-btn { padding: 0; border: 0; width: 100%; cursor: pointer; }
.dark .member-role { color: var(--amber); }
.dark .member h3 { color: #fff; }
.dark .member h3 span, .dark .member > p, .dark .member-pos { color: var(--muted-dark); }
.team-grid--lg { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* biography dialog */
.bio-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 20px; background: #fff; color: var(--text); box-shadow: 0 40px 100px -20px rgba(6, 24, 46, .55); overflow: auto; }
.bio-dialog[open] { animation: pop .35s var(--ease); }
.bio-dialog::backdrop { background: rgba(6, 24, 46, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.bio-dialog:not([open]) { display: none; }
.bio-dialog-in { position: relative; padding: clamp(26px, 4vw, 44px); }
.bio-close { position: sticky; top: 0; float: right; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px 0 12px; border: 0; border-radius: 50%; background: var(--grey); color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.bio-close:hover { background: var(--ink); color: #fff; }
.bio-head { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.bio-photo { flex: none; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #0A4C82, var(--ink)); display: grid; place-items: center; color: #fff; font: 800 1.8rem var(--f-display); }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.bio-name { font: 700 clamp(1.3rem, 2.4vw, 1.7rem)/1.2 var(--f-display); color: var(--ink); margin-bottom: 6px; }
.bio-role { margin: 0; color: var(--amber-ink); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.bio-body .prose { color: var(--muted); }
body.bio-lock { overflow: hidden; }

/* ---------- Certificates / documents ---------- */
.licence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.licence { margin: 0; }
.licence a { display: block; padding: 12px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s; }
.licence a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.licence img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 8px; }
.licence figcaption { padding: 14px 4px 0; display: grid; gap: 2px; }
.licence figcaption strong { font-weight: 700; color: var(--ink); }
.licence figcaption span { color: var(--muted); font-size: .9rem; }

/* ---------- Detail sections with sticky tabs (Altai services page) ---------- */
.service-tabs { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.service-tabs ul { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 0; }
.service-tabs ul::-webkit-scrollbar { display: none; }
.service-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: .5em 1.1em; border-radius: 999px; border: 1px solid #C3CFDC; white-space: nowrap; text-decoration: none; font-weight: 500; font-size: .84rem; color: var(--text); transition: all .25s; }
.service-tabs a .ico { color: var(--amber-2); width: 17px; height: 17px; }
.service-tabs a:hover, .service-tabs a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.service-tabs a.is-active .ico, .service-tabs a:hover .ico { color: var(--amber); }
.service-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); }
.service-block:first-child { padding-top: 0; }
.service-block:last-child { border-bottom: 0; padding-bottom: 0; }
.service-block.is-flipped .service-visual { order: 2; }
.service-placeholder { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: var(--radius); background: var(--silver); color: var(--navy); }
.service-placeholder .ico { width: 30%; height: 30%; stroke-width: 1; opacity: .8; }
.service-copy .h2 { margin-bottom: 1rem; }
.service-summary { font-size: 1.08rem; color: var(--ink); font-weight: 500; }
.service-copy .prose { color: var(--muted); margin-bottom: 1.6rem; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-bottom: 2rem; }
.checklist--1 { grid-template-columns: minmax(0, 1fr); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .92rem; color: var(--ink); }
.checklist .ico { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); stroke-width: 2.4; }
.dark .checklist li { color: #fff; }

.extras { background: var(--grey); }
.extra-grid { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 16px; }
.extra { padding: 26px 22px; border-radius: var(--radius); background: #fff; transition: transform .35s var(--ease), box-shadow .35s; }
.extra:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.extra-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); margin-bottom: 18px; }
.extra-icon .ico { width: 24px; height: 24px; }
.extra h3 { font: 700 .98rem/1.3 var(--f-display); color: var(--ink); margin-bottom: 8px; }
.extra p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ---------- Detail page with gallery (Altai product) ---------- */
.detail-page { padding-top: clamp(32px, 5vw, 56px); }
.product-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.product-main { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--grey); box-shadow: var(--shadow); cursor: zoom-in; }
.product-main img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.product-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--grey); cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s; }
.product-thumbs button:hover { opacity: 1; }
.product-thumbs button.is-active { border-color: var(--amber); opacity: 1; }
.product-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info .chip { margin-bottom: 4px; }
.product-title { font: 700 clamp(1.6rem, 3vw, 2.3rem)/1.18 var(--f-display); letter-spacing: -.015em; color: var(--ink); margin: 14px 0 10px; }
.product-lead { color: var(--muted); margin: 0 0 22px; font-size: 1.02rem; }
.specs { margin: 0 0 28px; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.specs dt { color: var(--muted); font-weight: 500; }
.specs dd { margin: 0; color: var(--ink); font-weight: 600; }
.specs dt:empty { display: none; }
.specs dt:empty + dd { grid-column: 1 / -1; }
.product-desc { max-width: 820px; margin-top: clamp(40px, 6vw, 72px); }
.product-h { font: 700 1.3rem var(--f-display); color: var(--ink); margin: 0 0 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--grey); cursor: zoom-in; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery-grid a:hover img { transform: scale(1.06); }

/* ---------- News (cards, list + sidebar, article, comments) ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.news-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: box-shadow .35s, transform .35s var(--ease); }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.news-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--grey); }
.news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.news-card:hover .news-media img { transform: scale(1.05); }
.news-media--empty { display: grid; place-items: center; background: var(--silver); }
.news-media--empty img { width: 30%; height: auto; object-fit: contain; opacity: .5; }
.news-card:hover .news-media--empty img { transform: none; }
.news-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.news-meta time { display: inline-flex; align-items: center; gap: .4em; }
.news-meta .ico { width: 1.05em; height: 1.05em; color: var(--amber-2); }
.news-card h3 { font: 700 1.08rem/1.35 var(--f-display); color: var(--ink); margin: 0 0 8px; }
.news-card h3 a { color: inherit; text-decoration: none; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.news-foot { margin-top: auto; padding-top: 16px; }
.news-card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.news-card--feature .news-media { aspect-ratio: auto; min-height: 320px; }
.news-card--feature .news-body { padding: clamp(24px, 4vw, 44px); justify-content: center; }
.news-card--feature h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.news-card--feature .news-foot { margin-top: 0; }

.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 4vw, 56px); align-items: start; }
.blog-layout .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.widget { padding: 24px; border-radius: var(--radius); background: var(--grey); }
.widget-title { font: 700 .82rem var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 999px; border: 1px solid #CBD6E2; background: #fff; font: inherit; font-size: .9rem; color: var(--text); }
.search-form input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(6, 24, 46, .08); }
.search-form button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; transition: background .2s; }
.search-form button:hover { background: var(--navy); }
.cat-list { display: grid; gap: 2px; }
.cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: .9rem; color: var(--text); transition: background .2s, color .2s; }
.cat-list a:hover { background: #fff; color: var(--ink); }
.cat-list a[aria-current="page"], .cat-list a.is-active { background: #fff; color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--amber); }
.cat-list span { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--muted); font-size: .74rem; font-weight: 600; text-align: center; }
.mini-posts { display: grid; gap: 14px; }
.mini-post { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; }
.mini-post img, .mini-post .mini-ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--grey-2); }
.mini-post strong { display: block; font-size: .88rem; line-height: 1.35; color: var(--ink); font-weight: 600; }
.mini-post:hover strong { color: var(--blue); }
.mini-post time { font-size: .76rem; color: var(--muted); }
.result-note { margin: 0 0 24px; color: var(--muted); }
.result-note strong { color: var(--ink); }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: clamp(36px, 5vw, 56px); }
.pager ol { display: flex; flex-wrap: wrap; gap: 6px; }
.pager a, .pager span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--text); background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: all .2s; }
.pager a:hover { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.pager .is-current { background: var(--ink); color: #fff; box-shadow: none; }
.pager .pager-btn { display: inline-flex; gap: .45em; padding: 0 18px; }
.pager .pager-btn .ico { width: 1em; height: 1em; }
.pager .is-disabled { opacity: .45; }
.pager .pager-gap { display: grid; place-items: center; min-width: 24px; color: var(--muted); }

.article { max-width: 800px; margin: 0 auto; }
.article-cover { margin: 0 0 clamp(28px, 4vw, 44px); }
.article-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-cover figcaption { margin-top: 10px; color: var(--muted); font-size: .84rem; text-align: center; }
.article-body { font-size: 1.05rem; line-height: 1.8; }
.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: clamp(32px, 5vw, 48px); padding-top: 24px; border-top: 1px solid var(--line); }
.share { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.share a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--grey); color: var(--ink); transition: background .2s, color .2s; }
.share a:hover { background: var(--ink); color: #fff; }
.share .ico { width: 17px; height: 17px; }

.comments { max-width: 800px; margin: clamp(48px, 7vw, 80px) auto 0; }
.comments-title { font: 700 clamp(1.3rem, 2.2vw, 1.6rem) var(--f-display); color: var(--ink); margin-bottom: 24px; }
.comments-title span { color: var(--muted); font-weight: 500; }
.comment-list { display: grid; gap: 12px; margin-bottom: clamp(32px, 5vw, 48px); }
.comment { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 22px; border-radius: var(--radius); background: var(--grey); }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--grad); color: var(--ink); font-weight: 800; font-size: 1.05rem; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.comment-head strong { color: var(--ink); font-weight: 700; }
.comment-head time { color: var(--muted); font-size: .8rem; }
.comment p { margin: 0; color: var(--text); font-size: .95rem; }
.comment-empty { color: var(--muted); margin-bottom: 32px; }

/* ---------- Contact & forms ---------- */
.contact { background: var(--grey); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-cards { display: grid; gap: 10px; margin-bottom: 32px; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; background: #fff; text-decoration: none; transition: box-shadow .3s, transform .3s var(--ease); word-break: break-word; }
a.contact-card:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.contact-card small { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-card > span:last-child { font-weight: 600; color: var(--ink); }
.cc-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); }
.cc-icon .ico { width: 20px; height: 20px; }
.offices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.office h3 { display: flex; align-items: center; gap: 8px; font: 700 .95rem var(--f-display); color: var(--ink); margin-bottom: 8px; }
.office h3 .ico { color: var(--amber-2); width: 18px; height: 18px; }
.office p { color: var(--muted); margin: 0; font-size: .92rem; }

.form-card { padding: clamp(26px, 4vw, 44px); border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); }
.form-card--flat { box-shadow: 0 0 0 1px var(--line); }
.form-title { font: 700 1.5rem var(--f-display); color: var(--ink); margin-bottom: 4px; }
.form-sub { color: var(--muted); font-size: .88rem; margin-bottom: 26px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.field { display: grid; gap: 7px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field > span, .field > label { font-size: .82rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--amber-ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #CBD6E2; background: #fff;
  font: inherit; font-size: .95rem; color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(6, 24, 46, .08); }
.field .help, .field-help { color: var(--muted); font-size: .8rem; }
.has-error input, .has-error textarea, .has-error select { border-color: #C2410C; }
.field-error, .field > .field-error { color: #B42318; font-size: .82rem; font-weight: 500; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.check input { margin-top: .3em; accent-color: var(--amber-2); }
.alert { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; background: #FDECEC; color: #8A1C1C; font-size: .92rem; }
.alert--success, .alert-success { background: #E7F6EC; color: #14532D; }
.alert--error, .alert-error { background: #FDECEC; color: #8A1C1C; }
.alert--info { background: var(--blue-soft); color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { text-align: center; padding: 30px 0; }
.success-icon { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--grad); color: var(--ink); margin-bottom: 20px; }
.success-icon .ico { width: 34px; height: 34px; stroke-width: 2.2; }
.form-success h2 { font: 700 1.5rem var(--f-display); color: var(--ink); margin-bottom: 10px; }
.form-success p { color: var(--muted); max-width: 28em; margin: 0 auto 20px; }
.map { line-height: 0; }
.map iframe { width: 100%; height: 420px; border: 0; filter: grayscale(.6); }

/* ---------- Empty state ---------- */
.empty-note { display: grid; justify-items: center; gap: 8px; max-width: 520px; margin: 0 auto; padding: clamp(32px, 5vw, 56px) 24px; border-radius: var(--radius); background: var(--grey); text-align: center; color: var(--muted); }
.empty-note h3 { font: 700 1.1rem var(--f-display); color: var(--ink); }
.empty-note p { margin: 0; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; background: #fff; color: var(--navy); }
.empty-icon .ico { width: 26px; height: 26px; }
.section--grey .empty-note { background: #fff; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--ink); color: var(--muted-dark); padding-top: clamp(56px, 7vw, 88px); font-size: .9rem; }
.theme-light .site-footer { background: var(--dark-bg); }
.footer-glow { position: absolute; right: -10%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(236, 158, 35, .1), transparent); pointer-events: none; }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.6fr repeat(var(--rest, 3), minmax(0, 1fr)); gap: 40px; padding-bottom: 48px; }
.footer-logo { display: block; width: 190px; margin-bottom: 20px; }
.footer-logo img { width: 100%; height: auto; }
.footer-brand p { max-width: 28em; }
.footer-brand strong { color: #fff; font-weight: 600; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; transition: background .25s, color .25s; }
.socials a:hover { background: var(--amber); color: var(--ink); }
.socials .ico { width: 18px; height: 18px; }
.footer-h { font: 700 .82rem var(--f-body); letter-spacing: .04em; color: #fff; margin-bottom: 16px; }
.footer-links { display: grid; gap: 9px; }
.footer-links a, .footer-contact a, .footer-bottom a { color: inherit; text-decoration: none; transition: color .2s; }
.footer-links a:hover, .footer-contact a:hover, .footer-bottom a:hover { color: #fff; }
.footer-contact { display: grid; gap: 14px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; word-break: break-word; }
.footer-contact .ico { color: var(--amber); width: 17px; height: 17px; margin-top: 3px; }
.footer-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 20px; padding-bottom: 24px; background: linear-gradient(var(--line-dark), var(--line-dark)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; font-size: .82rem; }
.footer-bottom p { margin: 0; }
.footer-credit a { color: #fff; font-weight: 600; }

/* ---------- Floating buttons ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .4); transition: transform .3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float .ico { width: 28px; height: 28px; }
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 39; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 12px 30px -10px rgba(6, 24, 46, .5);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s, transform .3s var(--ease), visibility .3s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--navy); }
.wa-float ~ .to-top { bottom: 88px; right: 25px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(6, 24, 46, .92); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(1200px, 100%); max-height: 82vh; border-radius: 10px; box-shadow: 0 40px 80px rgba(0, 0, 0, .5); }
.lightbox p { color: #fff; text-align: center; margin: 14px 0 0; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s; }
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev, .lightbox .lb-next { top: 50%; margin-top: -24px; }
.lightbox .lb-prev { left: 18px; }
.lightbox .lb-next { right: 18px; }
.lightbox [hidden] { display: none; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
/* failsafe: if site.js never runs, show everything after a moment */
.js:not(.reveal-ok) .reveal { animation: reveal-failsafe .6s 2.5s forwards; }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(236, 158, 35, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(236, 158, 35, 0); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

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

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .extra-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service-grid--4, .project-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .blog-layout .news-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .intro-grid, .story-grid, .contact-grid, .service-block, .product-grid, .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .intro-grid--flip .intro-visual { order: 0; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .service-grid, .service-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-grid, .licence-grid, .project-grid, .news-grid, .blog-layout .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-card--feature { grid-template-columns: minmax(0, 1fr); }
  .news-card--feature .news-media { min-height: 0; aspect-ratio: 16 / 10; }
  .service-block.is-flipped .service-visual { order: 0; }
  .service-visual { max-width: 520px; }
  .story-visual .media { margin: 0; max-width: 420px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { min-height: 0; }
  .hero-shade { background: linear-gradient(180deg, rgba(6, 24, 46, calc(var(--sh-2) - .02)), rgba(6, 24, 46, calc(var(--sh-1) - .08)) 45%, rgba(6, 24, 46, var(--sh-1))); }
  .hero-img { object-position: 78% 50%; }
  .hero-card { width: 100%; }
  .service-grid, .service-grid--2, .service-grid--4, .company-grid, .licence-grid, .project-grid, .project-grid--2, .project-grid--4,
  .news-grid, .news-grid--2, .blog-layout .news-grid, .checklist, .fields { grid-template-columns: minmax(0, 1fr); }
  .extra-grid, .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promises li { grid-template-columns: 32px 1fr; }
  .promises li > span:last-child { grid-column: 2; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .service-card { padding: 28px 22px; }
  .service-thumb { margin: -28px -22px 8px; }
  .wa-float { width: 50px; height: 50px; right: 14px; bottom: 14px; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .wa-float ~ .to-top { bottom: 74px; right: 18px; }
  .cta-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .bio-head { flex-direction: column; align-items: flex-start; }
  .bio-photo { width: 88px; height: 88px; }
  .comment { grid-template-columns: 1fr; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 18px; margin: 0; }
  .pager .pager-btn span { display: none; }
}

/* Social buttons on light backgrounds (e.g. contact page): add .socials--light */
.socials--light a { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.socials--light a:hover { background: var(--amber); color: var(--ink); box-shadow: none; }

/* rich text inside value cards; two-column team cards on phones */
.value .prose { grid-column: 2; }
.value .prose p { margin: 0; }
.value .prose p + p, .value .prose ul { margin-top: .8em; }
@media (max-width: 600px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .member h3 { font-size: .95rem; }
  .member-role { font-size: .64rem; letter-spacing: .1em; }
}
