/* ============================================================================
   DD BŪVE — SHARED DESIGN SYSTEM
   SIA "DD Būve" · Saldus novads · būvniecība un remontdarbi
   ----------------------------------------------------------------------------
   Blue construction identity. Confident, capable, honest.
   Synthesis of bold-template ENERGY rendered original in DD's blue.
   All builders consume THIS file. Markup contract enforced by class names.
   Palette: OKLCH, AA+ contrast verified. Motion: transform/opacity only.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. TOKENS  (the single source of truth — never hardcode a colour downstream)
   ---------------------------------------------------------------------------- */
:root {
  /* --- BLUE identity (sampled from the DD logo) --------------------------- */
  --blue:        oklch(0.585 0.122 236);   /* brand blue — the logo cyan-blue   */
  --blue-deep:   oklch(0.470 0.110 244);   /* deeper press / hover              */
  --blue-bright: oklch(0.690 0.135 232);   /* single confident accent (links,   */
                                           /*  underlines, active markers)      */
  --blue-tint:   oklch(0.955 0.018 236);   /* faint blue wash for light bands   */
  --blue-glass:  oklch(0.585 0.122 236 / 0.10);

  /* --- Deep ink (near-black with a blue cast, never pure #000) ------------ */
  --ink:         oklch(0.205 0.022 245);   /* primary dark surface              */
  --ink-2:       oklch(0.265 0.024 245);   /* raised card on dark               */
  --ink-line:    oklch(0.340 0.022 245);   /* hairline on dark                  */

  /* --- Warm paper (the light side — warm, not clinical white) ------------- */
  --paper:       oklch(0.984 0.006 85);    /* page background, warm off-white   */
  --paper-2:     oklch(0.962 0.008 80);    /* alt light band / card             */
  --paper-line:  oklch(0.905 0.010 80);    /* hairline on light                 */

  /* --- Text ---------------------------------------------------------------- */
  --text:        oklch(0.255 0.018 245);   /* body on paper — AA on --paper     */
  --text-soft:   oklch(0.460 0.016 245);   /* secondary on paper                */
  --text-inv:    oklch(0.975 0.004 240);   /* body on ink                       */
  --text-inv-soft: oklch(0.800 0.010 240); /* secondary on ink                  */

  /* --- Type ramp (confident pairing: Fraunces display + Hanken Grotesk) ---- */
  --font-display: "Archivo", system-ui, -apple-system, sans-serif;  /* solid architectural grotesque, correct LV diacritics */
  --font-sans:    "Archivo", system-ui, -apple-system, sans-serif;  /* solid grotesque, not the soft Hanken */

  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.80rem, 1.55rem + 1.25vw, 2.70rem);
  --step-4:  clamp(2.25rem, 1.80rem + 2.25vw, 3.80rem);
  --step-5:  clamp(2.85rem, 2.05rem + 4.00vw, 5.60rem);

  /* --- Space scale --------------------------------------------------------- */
  --s-1: 0.5rem; --s-2: 0.75rem; --s-3: 1rem;   --s-4: 1.5rem;
  --s-5: 2rem;   --s-6: 3rem;    --s-7: 4.5rem; --s-8: 6.5rem; --s-9: 9rem;

  /* --- Geometry: DD's OWN signature shape system --------------------------- */
  /* The "build corner" — one squared 90° notch + one soft radius. A drawn-edge
     motif that reads as a blueprint corner. Used on cards, media, buttons.    */
  --r:        2px;                                    /* crisp structural edge */
  --r-lg:     4px;
  --notch:    18px;                                   /* the squared cut       */
  --shape-corner: var(--r) var(--r) var(--r) 0;       /* 3 soft, 1 square      */
  --shape-card:   polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch),
                          100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));

  --maxw: 1240px;
  --gutter: clamp(1.1rem, 4vw, 3rem);

  --shadow-1: 0 1px 2px oklch(0.205 0.022 245 / 0.06),
              0 8px 24px oklch(0.205 0.022 245 / 0.07);
  --shadow-2: 0 2px 6px oklch(0.205 0.022 245 / 0.10),
              0 22px 48px oklch(0.205 0.022 245 / 0.14);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

/* ----------------------------------------------------------------------------
   2. RESET
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
/* Progressive-enhancement safety: if GSAP fails to load, app.js's fallback
   adds .is-in — make sure that actually reveals the content (never invisible). */
.reveal.is-in { opacity: 1; transform: none; }
html { overflow-x: clip; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
p { text-wrap: pretty; }
:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ----------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   ---------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }

.section { padding-block: clamp(3.5rem, 8vw, var(--s-9)); position: relative; }
.section--dark { background: var(--ink); color: var(--text-inv); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--text-inv); }
.section--tint { background: var(--blue-tint); }
.section--paper2 { background: var(--paper-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}
.section--dark .eyebrow { color: var(--blue-bright); }
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: currentColor; display: inline-block;
}
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, var(--s-7)); }
.section-head h2 { font-size: var(--step-4); margin-top: 0.5rem; }
.section-head p { margin-top: 1rem; color: var(--text-soft); font-size: var(--step-1); }
.section--dark .section-head p { color: var(--text-inv-soft); }

/* ----------------------------------------------------------------------------
   4. BUTTONS  (DD shape-corner motif baked in)
   ---------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--blue); --btn-fg: var(--paper);
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.7em;
  font-family: var(--font-sans);
  font-weight: 700; font-size: var(--step-0); line-height: 1;
  letter-spacing: 0.01em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 2px solid transparent;
  border-radius: var(--shape-corner);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color .25s, box-shadow .25s;
  will-change: transform;
}
.btn:hover { background: var(--blue-deep); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(-1px); }
.btn .btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--ink);
  border-color: var(--paper-line);
}
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); border-color: var(--ink); }
.section--dark .btn--ghost { --btn-fg: var(--text-inv); border-color: var(--ink-line); }
.section--dark .btn--ghost:hover { --btn-bg: var(--paper); --btn-fg: var(--ink); border-color: var(--paper); }

.btn--lg { padding: 1.1em 2.1em; font-size: var(--step-1); }

/* Hero secondary button — the hero is NOT .section--dark, so the default ghost
   (dark ink text on a faint light border) vanished against the dark photo.
   Give it a frosted glass body + light text so it reads as a real button.     */
.hero .btn--ghost {
  --btn-fg: var(--text-inv);
  background: oklch(0.99 0.004 240 / 0.10);
  border-color: oklch(0.99 0.004 240 / 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero .btn--ghost:hover {
  background: var(--paper); --btn-fg: var(--ink); border-color: var(--paper);
}

/* ----------------------------------------------------------------------------
   5. STICKY NAV + MOBILE MENU
   ---------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: oklch(0.984 0.006 85 / 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.nav.is-stuck {
  border-bottom-color: var(--paper-line);
  box-shadow: var(--shadow-1);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  min-height: 76px;
}
.nav__brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 800; }
.nav__brand img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.nav__brand-name { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav__link {
  position: relative; font-weight: 600; font-size: var(--step-0); color: var(--text);
  padding-block: 0.4rem;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--blue-bright); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta { margin-left: 0.4rem; }

.nav__toggle {
  display: none; width: 46px; height: 46px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--paper-line);
  border-radius: 11px; cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav__toggle span::before { transform: translateY(-7px); }
.nav__toggle span::after  { transform: translateY(5px); }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after  { transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--paper-line);
    padding: var(--s-3) var(--gutter) var(--s-5);
    box-shadow: var(--shadow-2);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .25s;
  }
  .nav.is-open .nav__links { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__link { padding: 0.95rem 0; border-bottom: 1px solid var(--paper-line); font-size: var(--step-1); }
  .nav__link::after { display: none; }
  .nav__cta { margin: var(--s-3) 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; }
}

/* ----------------------------------------------------------------------------
   6. HERO  (original, layered, blue — confident, not a template clone)
   ----------------------------------------------------------------------------
   Layers: ink base → atmosphere media (clip-revealed) → blue grade wash →
   giant faded word → content. Photo never captioned as a specific project.    */
.hero {
  position: relative; isolation: isolate;
  background: var(--ink); color: var(--text-inv);
  overflow: clip;
  padding-block: clamp(4.5rem, 11vw, 9rem);
  min-height: min(90vh, 760px);
  display: flex; align-items: center;
}
.hero__media {
  position: absolute; inset: 0; z-index: -3;
  /* clip-reveal handled by JS via --hero-clip (inset). Defaults open for no-JS */
  clip-path: inset(0 0 0 0);
}
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 35%;
  transform: scale(1.06); /* gentle parallax headroom */
  filter: saturate(0.85);
}
.hero__grade { /* blue grade + readability wash, layered over media */
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, oklch(0.205 0.022 245 / 0.55) 0%, oklch(0.205 0.022 245 / 0.78) 60%, var(--ink) 100%),
    linear-gradient(105deg, oklch(0.470 0.110 244 / 0.55) 0%, transparent 58%);
}
.hero__bigword {  /* DD signature: giant faded background word — fully in-frame */
  position: absolute; z-index: -1;
  left: 50%; bottom: 0.04em; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(4.5rem, 18vw, 16rem); line-height: 0.78;
  letter-spacing: -0.04em; white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px oklch(0.690 0.135 232 / 0.18);
  pointer-events: none; user-select: none;
}
.hero__inner { position: relative; max-width: 780px; }
.hero h1 {
  color: var(--text-inv);
  font-size: var(--step-5);
  margin: 1.1rem 0 1.3rem;
}
.hero h1 .accent { color: var(--blue-bright); font-weight: 800; }
.hero__lead { font-size: var(--step-1); color: var(--text-inv-soft); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }

/* ----------------------------------------------------------------------------
   7. TRUST / FACTS BAND  (HONEST — no inflated numbers, framed as commitments)
   ----------------------------------------------------------------------------
   Reads as a compact strip. Builders pass real, verifiable values only.        */
.facts { background: var(--ink); color: var(--text-inv); }
.facts__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--ink-line);
  border: 1px solid var(--ink-line); border-radius: var(--r-lg); overflow: hidden;
}
.fact { background: var(--ink); padding: clamp(1.1rem, 2.4vw, 1.8rem); min-width: 0; }
.fact__num {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-3); color: var(--blue-bright); line-height: 1.04;
  display: flex; align-items: baseline; gap: 0.12em; flex-wrap: wrap;
  overflow-wrap: break-word;
}
.fact__num small { font-size: 0.42em; color: var(--text-inv-soft); font-family: var(--font-sans); font-weight: 700; }
.fact__label { margin-top: 0.5rem; color: var(--text-inv-soft); font-size: var(--step--1); }
/* the word-fact ("Kurzeme") would dwarf the single-digit facts at full size —
   size it down so all four read at the same visual weight */
.fact:last-child .fact__num { font-size: var(--step-1); letter-spacing: -0.02em; align-self: center; }
/* MOBILE: stays 2-up, never single column — shrink type so long words
   like "Kurzeme" wrap inside the cell instead of bleeding off-screen.        */
@media (max-width: 720px) {
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 1rem 0.9rem; }
  .fact__num { font-size: var(--step-2); }
}

/* ----------------------------------------------------------------------------
   8. LINE-ICON SERVICE GRID
   ---------------------------------------------------------------------------- */
.services__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.8rem, 1.6vw, 1.2rem);
}
.svc {
  position: relative;
  background: var(--paper); border: 1px solid var(--paper-line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .3s;
  overflow: hidden; will-change: transform;
}
.section--dark .svc { background: var(--ink-2); border-color: var(--ink-line); }
.svc::before { /* corner accent that grows on hover */
  content: ""; position: absolute; top: 0; right: 0;
  width: 46px; height: 46px;
  background: var(--blue-glass);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  transition: width .4s var(--ease), height .4s var(--ease), background-color .3s;
}
.svc:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: var(--shadow-2); }
.svc:hover::before { width: 78px; height: 78px; background: oklch(0.585 0.122 236 / 0.18); }
.svc__icon {
  width: 56px; height: 56px; margin-bottom: var(--s-4);
  display: grid; place-items: center;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: var(--shape-corner);
}
.section--dark .svc__icon { color: var(--blue-bright); border-color: var(--blue-bright); }
.svc__icon svg { width: 28px; height: 28px; stroke-width: 1.9; }
.svc h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.section--dark .svc h3 { color: var(--text-inv); }
.svc p { color: var(--text-soft); font-size: var(--step-0); }
.section--dark .svc p { color: var(--text-inv-soft); }
.svc__more {
  display: inline-flex; align-items: center; gap: 0.4em; margin-top: var(--s-3);
  font-weight: 700; color: var(--blue); font-size: var(--step-0);
}
.section--dark .svc__more { color: var(--blue-bright); }
.svc__more svg { transition: transform .3s var(--ease); }
.svc:hover .svc__more svg { transform: translateX(4px); }

@media (max-width: 920px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }
/* MOBILE: stays 2-up, scaled down — NOT single column */
@media (max-width: 560px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .svc { padding: 1.15rem; border-radius: var(--r); }
  .svc__icon { width: 44px; height: 44px; margin-bottom: var(--s-3); }
  .svc__icon svg { width: 22px; height: 22px; }
  .svc h3 { font-size: var(--step-1); }
  .svc p { font-size: var(--step--1); line-height: 1.5; }
  .svc__more { font-size: var(--step--1); }
}

/* ----------------------------------------------------------------------------
   9. TWO-PHOTO SPLIT  (the genuine "this is us" proof block)
   ----------------------------------------------------------------------------
   One real photo (dd-real-00) + content. THIS is where the credibility lives.   */
.split {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, var(--s-7)); align-items: center;
}
.split--rev { direction: rtl; }
.split--rev > * { direction: ltr; }
.split__media { position: relative; }
.split__media .frame {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-2);
  aspect-ratio: 4 / 5;
}
.split__media .frame img { width: 100%; height: 100%; object-fit: cover; }
.split__media .frame--real::after { /* honest "real photo" chip */
  content: "Mūsu komanda objektā";
  position: absolute; left: 0; bottom: 0;
  background: var(--blue); color: var(--paper);
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.02em;
  padding: 0.6em 1.1em; border-radius: 0 var(--r) 0 0;
}
.split__badge { /* floating DD shape badge */
  position: absolute; bottom: -22px; right: -16px;
  background: var(--ink); color: var(--text-inv);
  padding: 1.1rem 1.4rem; border-radius: var(--shape-corner);
  box-shadow: var(--shadow-2); max-width: 220px;
}
.split__badge strong { color: var(--blue-bright); font-family: var(--font-display); font-size: var(--step-2); }
.split__badge span { display: block; font-size: var(--step--1); color: var(--text-inv-soft); margin-top: 0.2rem; }
.split__body h2 { font-size: var(--step-3); }
.split__body p { margin-top: 1.1rem; color: var(--text-soft); }
.split__list { margin-top: var(--s-4); display: grid; gap: 0.8rem; }
.split__list li { position: relative; padding-left: 1.9rem; color: var(--text); }
.split__list li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 12px; height: 12px; background: var(--blue);
  clip-path: polygon(0 0, 100% 0, 100% 100%); /* DD triangle tick */
}
@media (max-width: 820px) {
  /* text-heavy side-by-side: OK to stack (this is the exception, not gallery) */
  .split { grid-template-columns: 1fr; gap: var(--s-6); }
  .split--rev { direction: ltr; }
  .split__media .frame { aspect-ratio: 16 / 12; max-height: 60vh; }
  .split__badge { right: 12px; bottom: -18px; }
}

/* ----------------------------------------------------------------------------
   10. PROJECT GRID  (gallery — real photos swap into these slots)
   ----------------------------------------------------------------------------
   Editorial: lead tile spans 2 cols. Hover zoom. Designed so client's future
   real photos drop straight into .proj slots.                                  */
.gallery__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr; gap: clamp(0.8rem, 1.6vw, 1.2rem);
}
.proj {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--ink-2);
  aspect-ratio: 4 / 3;
}
.proj--lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.proj img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease), filter .5s;
  will-change: transform;
}
.proj:hover img { transform: scale(1.07); filter: saturate(1.05); }
.proj__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, oklch(0.205 0.022 245 / 0.82) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(1rem, 2.5vw, 1.6rem);
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.proj:hover .proj__overlay, .proj:focus-within .proj__overlay { opacity: 1; transform: translateY(0); }
.proj__tag {
  align-self: flex-start; background: var(--blue); color: var(--paper);
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.04em;
  padding: 0.35em 0.8em; border-radius: 999px; margin-bottom: 0.6rem;
}
.proj__title { color: var(--text-inv); font-family: var(--font-display); font-size: var(--step-1); }
.proj__meta { color: var(--text-inv-soft); font-size: var(--step--1); margin-top: 0.2rem; }

/* MOBILE: stays MULTI-COLUMN — lead tile full-width, rest 2-up. NOT single. */
@media (max-width: 620px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 0.55rem; }
  .proj { border-radius: var(--r); }
  .proj--lead { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 10; }
  .proj__overlay { opacity: 1; transform: none; padding: 0.85rem; } /* show on tap-less mobile */
  .proj__title { font-size: var(--step-0); }
}

/* ----------------------------------------------------------------------------
   11. WHY / FEATURE BAND  (giant faded word + feature list)
   ---------------------------------------------------------------------------- */
.why { position: relative; overflow: clip; }
.why__bigword {
  position: absolute; z-index: 0; right: clamp(0.5rem, 2vw, 2rem); top: 50%;
  transform: translateY(-50%); max-width: calc(100% - 1rem);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3.4rem, 13vw, 12rem); line-height: 0.78; white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px oklch(0.585 0.122 236 / 0.11);
  pointer-events: none; user-select: none; letter-spacing: -0.04em;
}
.section--dark .why__bigword { -webkit-text-stroke-color: oklch(0.690 0.135 232 / 0.12); }
.why__inner { position: relative; z-index: 1;
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, var(--s-7)); align-items: start; }
.why__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.8rem); }
.feat { }
.feat__k {
  font-family: var(--font-display); font-size: var(--step-2);
  color: var(--blue); display: flex; align-items: center; gap: 0.5rem;
}
.section--dark .feat__k { color: var(--blue-bright); }
.feat__k::before { content: ""; width: 14px; height: 14px; background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%); }
.feat h3 { font-size: var(--step-1); margin: 0.7rem 0 0.4rem; }
.feat p { color: var(--text-soft); font-size: var(--step-0); }
.section--dark .feat p { color: var(--text-inv-soft); }
.section--dark .feat h3 { color: var(--text-inv); }

@media (max-width: 860px) {
  .why__inner { grid-template-columns: 1fr; gap: var(--s-5); }
}
/* MOBILE: feature grid stays 2-up */
@media (max-width: 560px) {
  .why__grid { gap: 0.9rem 0.8rem; }
  .feat h3 { font-size: var(--step-0); }
  .feat p { font-size: var(--step--1); }
}

/* ----------------------------------------------------------------------------
   12. FAQ ACCORDION  (native details/summary — no JS required)
   ---------------------------------------------------------------------------- */
.faq { max-width: 860px; margin-inline: auto; }
.faq__item {
  border-bottom: 1px solid var(--paper-line);
}
.section--dark .faq__item { border-bottom-color: var(--ink-line); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.1rem, 2.5vw, 1.6rem) 0;
  font-family: var(--font-display); font-size: var(--step-1); color: var(--ink);
  transition: color .25s;
}
.section--dark .faq__item summary { color: var(--text-inv); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--blue); }
.section--dark .faq__item summary:hover { color: var(--blue-bright); }
.faq__icon {
  flex: none; width: 30px; height: 30px; position: relative;
  border: 2px solid var(--blue); border-radius: 8px;
  transition: transform .35s var(--ease), background-color .25s;
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; background: var(--blue);
  left: 50%; top: 50%; transition: transform .35s var(--ease), opacity .25s;
}
.faq__icon::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.faq__icon::after  { width: 2px; height: 12px; transform: translate(-50%, -50%); }
.faq__item[open] .faq__icon { transform: rotate(180deg); background: var(--blue); }
.faq__item[open] .faq__icon::before { background: var(--paper); }
.faq__item[open] .faq__icon::after { opacity: 0; }
.faq__answer {
  padding: 0 0 clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--text-soft); max-width: 68ch; font-size: var(--step-0);
}
.section--dark .faq__answer { color: var(--text-inv-soft); }
.faq__item[open] .faq__answer { animation: faqReveal .4s var(--ease) both; }
@keyframes faqReveal { from { opacity: 0; transform: translateY(-6px); } to { opacity:1; transform:none; } }

/* ----------------------------------------------------------------------------
   13. CTA BAND  (confident close, blue, layered)
   ---------------------------------------------------------------------------- */
.cta {
  position: relative; isolation: isolate; overflow: clip;
  background: var(--blue-deep); color: var(--paper);
  text-align: center;
}
.cta::before { /* faded shape pattern */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 18% 120%, oklch(0.690 0.135 232 / 0.5), transparent 45%),
    radial-gradient(circle at 85% -20%, oklch(0.205 0.022 245 / 0.4), transparent 50%);
}
.cta h2 { color: var(--paper); font-size: var(--step-4); max-width: 18ch; margin-inline: auto; }
.cta p { color: oklch(0.97 0.01 240 / 0.9); font-size: var(--step-1); margin: 1rem auto 0; max-width: 52ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; margin-top: var(--s-5); }
.cta .btn--primary { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.cta .btn--primary:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); }
.cta .btn--ghost { --btn-fg: var(--paper); border-color: oklch(0.97 0.01 240 / 0.4); }
.cta .btn--ghost:hover { --btn-bg: var(--paper); --btn-fg: var(--ink); border-color: var(--paper); }

/* ----------------------------------------------------------------------------
   14. CONTACT FORM  (honest: phone-led, form secondary)
   ---------------------------------------------------------------------------- */
.contact__grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(2rem, 5vw, var(--s-7)); align-items: start; }
.contact__aside .lead-line { font-size: var(--step-2); font-family: var(--font-display); color: var(--ink); }
.section--dark .contact__aside .lead-line { color: var(--text-inv); }
.contact__channels { margin-top: var(--s-5); display: grid; gap: 0.9rem; }
.channel {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.2rem; border: 1px solid var(--paper-line); border-radius: var(--r);
  background: var(--paper); transition: border-color .25s, transform .3s var(--ease);
}
.section--dark .channel { background: var(--ink-2); border-color: var(--ink-line); }
.channel:hover { border-color: var(--blue); transform: translateX(4px); }
.channel__icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--paper); background: var(--blue); border-radius: var(--shape-corner); }
.channel__icon svg { width: 22px; height: 22px; }
.channel__k { font-size: var(--step--1); color: var(--text-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.section--dark .channel__k { color: var(--text-inv-soft); }
.channel__v { font-weight: 700; font-size: var(--step-1); color: var(--ink); }
.section--dark .channel__v { color: var(--text-inv); }
.channel--primary { border-color: var(--blue); box-shadow: var(--shadow-1); }
.contact__note { /* honest disclosure about how the form sends */
  margin-top: var(--s-4); font-size: var(--step--1); color: var(--text-soft);
  padding: 0.9rem 1rem; background: var(--blue-tint); border-radius: var(--r);
  border-left: 3px solid var(--blue);
}
.section--dark .contact__note { background: var(--ink-2); color: var(--text-inv-soft); }

.form { background: var(--paper); border: 1px solid var(--paper-line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3.5vw, 2.5rem); box-shadow: var(--shadow-1); }
.section--dark .form { background: var(--ink-2); border-color: var(--ink-line); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.field { display: grid; gap: 0.45rem; margin-bottom: var(--s-3); }
.field label { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
.section--dark .field label { color: var(--text-inv-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--paper-2); border: 1px solid var(--paper-line); border-radius: var(--r);
  color: var(--text); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.section--dark .field input, .section--dark .field textarea, .section--dark .field select {
  background: var(--ink); border-color: var(--ink-line); color: var(--text-inv); }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glass);
}
.field--full { grid-column: 1 / -1; }
.form__consent { display: flex; gap: 0.6rem; align-items: flex-start; margin: var(--s-3) 0;
  font-size: var(--step--1); color: var(--text-soft); }
.section--dark .form__consent { color: var(--text-inv-soft); }
.form__consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.form__consent a { color: var(--blue); text-decoration: underline; }
.section--dark .form__consent a { color: var(--blue-bright); }
.form .btn { width: 100%; justify-content: center; }

@media (max-width: 820px) {
  .contact__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------------
   15. MARQUEE  (capabilities ticker — energy, not a claim)
   ---------------------------------------------------------------------------- */
.marquee {
  background: var(--blue); color: var(--paper);
  padding-block: 0.9rem; overflow: hidden; white-space: nowrap;
  border-block: 1px solid oklch(0.470 0.110 244 / 0.5);
}
.marquee__track {
  display: inline-flex; gap: 2.4rem; align-items: center;
  will-change: transform; /* translated by JS */
}
.marquee__item {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 600;
  letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 2.4rem;
  color: inherit; cursor: pointer;
  text-decoration-color: transparent; text-underline-offset: 5px;
  transition: opacity .2s, text-decoration-color .2s;
}
a.marquee__item:hover, a.marquee__item:focus-visible {
  opacity: 0.82; text-decoration: underline; text-decoration-color: currentColor;
}
.marquee__item::after { content: "✦"; color: oklch(0.97 0.01 240 / 0.6); font-size: 0.7em; }

/* Hash-scroll targets clear the sticky nav (so the clicked section's heading
   isn't hidden underneath it). */
:where(section[id], article[id]) { scroll-margin-top: 92px; }

/* ----------------------------------------------------------------------------
   16. FOOTER  (LV imprint — legally required)
   ---------------------------------------------------------------------------- */
.footer { background: var(--ink); color: var(--text-inv-soft); padding-block: var(--s-7) var(--s-5); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); }
.footer__brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: var(--s-3); }
.footer__brand img { width: 46px; height: 46px; border-radius: 10px; }
.footer__brand-name { font-family: var(--font-display); font-size: 1.25rem; color: var(--text-inv); }
.footer__brand-desc { max-width: 34ch; }
.footer__col h4 { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue-bright); margin-bottom: var(--s-3); font-family: var(--font-sans); font-weight: 800; }
.footer__col a, .footer__col li { display: block; padding-block: 0.32rem; transition: color .2s; }
.footer__col a:hover { color: var(--text-inv); }
.footer__imprint {
  margin-top: var(--s-6); padding-top: var(--s-4);
  border-top: 1px solid var(--ink-line);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; justify-content: space-between; align-items: center;
  font-size: var(--step--1);
}
.footer__imprint .reg { color: var(--text-inv-soft); }
.footer__imprint .reg strong { color: var(--text-inv); }
.footer__legal-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer__legal-links a { text-decoration: underline; text-underline-offset: 3px; }
.footer__legal-links a:hover { color: var(--blue-bright); }
@media (max-width: 760px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
  .footer__brand-desc { grid-column: 1 / -1; }
  .footer__imprint { flex-direction: column; align-items: flex-start; }
}

/* ----------------------------------------------------------------------------
   17. COOKIE-CONSENT BANNER  (GDPR — shown until accepted via localStorage)
   ---------------------------------------------------------------------------- */
.cookie {
  position: fixed; z-index: 120; left: 50%; bottom: clamp(0.8rem, 3vw, 1.6rem);
  transform: translateX(-50%) translateY(140%);
  width: min(680px, calc(100% - 2rem));
  background: var(--ink); color: var(--text-inv);
  border: 1px solid var(--ink-line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: clamp(1.1rem, 3vw, 1.5rem);
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); align-items: center;
  transition: transform .5s var(--ease), opacity .4s;
  opacity: 0;
}
.cookie.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.cookie__text { font-size: var(--step--1); color: var(--text-inv-soft); }
.cookie__text strong { color: var(--text-inv); display: block; margin-bottom: 0.2rem; font-family: var(--font-display); font-size: var(--step-0); }
.cookie__text a { color: var(--blue-bright); text-decoration: underline; }
.cookie__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie .btn { padding: 0.7em 1.2em; font-size: var(--step--1); }
.cookie .btn--ghost { --btn-fg: var(--text-inv); border-color: var(--ink-line); }
.cookie .btn--ghost:hover { --btn-bg: var(--paper); --btn-fg: var(--ink); border-color: var(--paper); }
@media (max-width: 560px) {
  .cookie { grid-template-columns: 1fr; }
  .cookie__actions .btn { flex: 1; justify-content: center; }
}

/* ----------------------------------------------------------------------------
   18. REVEAL  (GSAP target — JS sets visible; CSS is the no-JS / reduced-motion
   safe default: ALWAYS visible unless JS opts the element into the hidden state)
   ---------------------------------------------------------------------------- */
.reveal { opacity: 1; }            /* visible by default — progressive enhancement */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ----------------------------------------------------------------------------
   19. LEGAL PAGES  (privacy + cookie policy — long-form readable text)
   ---------------------------------------------------------------------------- */
.legal { max-width: 68ch; }
.legal h2 {
  font-size: var(--step-2); margin-top: var(--s-6); margin-bottom: 0.6rem;
}
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--text-soft); margin-bottom: 0.9rem; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--blue-deep); }
.legal__updated {
  margin-top: var(--s-6); padding-top: var(--s-4);
  border-top: 1px solid var(--paper-line);
  font-size: var(--step--1); color: var(--text-soft);
}

/* small utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.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;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--text-inv); padding: 0.8rem 1.2rem; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }
