/* ============================================================
   Coderia.it — Software House
   Design system "Editorial Engineering" — paper & ink, serif
   display, mono indices, hairline rules. No glow, no glass.
   ============================================================ */

/* ---------- Self-hosted fonts (latin + latin-ext, variable) ---------- */
@font-face{font-family:'Fraunces';font-style:normal;font-weight:600 700;font-display:swap;src:url('/fonts/fraunces-normal-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Fraunces';font-style:normal;font-weight:600 700;font-display:swap;src:url('/fonts/fraunces-normal-600-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Fraunces';font-style:italic;font-weight:600;font-display:swap;src:url('/fonts/fraunces-italic-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Fraunces';font-style:italic;font-weight:600;font-display:swap;src:url('/fonts/fraunces-italic-600-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:400 700;font-display:swap;src:url('/fonts/instrumentsans-normal-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:400 700;font-display:swap;src:url('/fonts/instrumentsans-normal-400-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('/fonts/jetbrainsmono-normal-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('/fonts/jetbrainsmono-normal-400-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
/* metric-compatible fallbacks: zero layout shift while woff2 arrives */
@font-face{font-family:'Fraunces Fallback';src:local('Georgia');ascent-override:92%;descent-override:24%;line-gap-override:0%;size-adjust:104%;}
@font-face{font-family:'Instrument Fallback';src:local('Arial');ascent-override:96%;descent-override:25%;line-gap-override:0%;size-adjust:99%;}

/* ---------- Tokens ---------- */
:root {
  --bg:            #f6f3ec;   /* warm paper */
  --bg-soft:       #efebe0;
  --bg-card:       #fdfbf5;
  --bg-card-2:     #faf7ef;
  --bg-input:      #fdfbf5;

  --ink:           #17140d;
  --border:        rgba(23,20,13,0.13);
  --border-strong: rgba(23,20,13,0.26);
  --border-hover:  rgba(23,20,13,0.62);

  --primary:       #2733d6;   /* ultramarine ink */
  --primary-600:   #1e28b4;
  --primary-400:   #3a47ec;
  --primary-300:   #2733d6;
  --primary-glow:  rgba(39,51,214,0.16);
  --brand:         #2733d6;

  --accent:        #c14a09;   /* burnt signal orange — sparing */
  --success:       #17714a;
  --warn:          #b07d08;

  --text:          #26231a;
  --text-dim:      #4c473a;
  --text-mute:     #6c6557;
  --text-faint:    #8f8877;
  --heading:       #17140d;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 48px);

  --shadow-card: 0 1px 2px rgba(23,20,13,0.04);
  --shadow-pop:  8px 8px 0 -1px rgba(23,20,13,0.10);
  --shadow-glow: 8px 8px 0 -1px var(--primary-glow);

  --font-display: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
  --font-body: 'Instrument Sans', 'Instrument Fallback', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  counter-reset: idx;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--heading); color: var(--bg); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide    { max-width: 1432px; }
.container--narrow  { max-width: 1000px; }
.container--reading { max-width: 820px; }
.section { position: relative; padding-block: clamp(72px, 11vw, 128px); border-top: 1px solid var(--border); }
.section--tight { padding-block: clamp(52px, 8vw, 88px); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--heading); color: var(--bg); padding: 10px 18px; border-radius: 8px;
  font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Background: paper grain + faint ruled grid ---------- */
.bg-field { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.bg-field::after {
  content: ""; position: absolute; inset: 0; opacity: 0.30; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-grid {
  position: absolute; inset: 0; opacity: 0.55;
  background-image: linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: clamp(120px, 25vw, 358px) 100%;
  background-position: center top;
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 70%, transparent);
  display: none;
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--heading);
  text-wrap: balance;
}
h1.display { font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: 1.02; }
h2.display { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; color: var(--heading); }

/* serif italic accent — the brand gesture (keeps legacy class name) */
.text-grad {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--primary);
}

/* mono index labels; every eyebrow inside a section gets a running number */
.eyebrow {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-mute);
}
.eyebrow::before {
  content: "(" counter(idx, decimal-leading-zero) ")";
  letter-spacing: 0.08em;
  color: var(--primary); font-weight: 600;
}
.section .eyebrow, .legal-header .eyebrow, .review-card .eyebrow { counter-increment: idx; }
.eyebrow--pill { padding: 0; border: 0; background: none; }

.lead { color: var(--text-dim); font-size: clamp(1.02rem, 1.5vw, 1.16rem); line-height: 1.7; }
.muted { color: var(--text-mute); }
strong, b { color: var(--heading); font-weight: 600; }

.section-head { max-width: 780px; margin-inline: 0; text-align: left; }
.section-head .eyebrow { margin-bottom: 22px; }
.section-head .lead { margin-top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 10px; font-weight: 600; font-size: 0.96rem;
  border: 1px solid transparent;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--heading); color: var(--bg); border-color: var(--heading); }
.btn--primary:hover {
  background: var(--primary); border-color: var(--primary); color: #fff;
  transform: translate(-2px, -2px); box-shadow: 5px 5px 0 -1px rgba(23,20,13,0.22);
}
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--heading); }
.btn--ghost:hover { border-color: var(--border-hover); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 -1px rgba(23,20,13,0.12); }
.btn--block { width: 100%; padding-block: 18px; font-size: 1rem; }

/* ---------- Card primitive ---------- */
.card {
  position: relative; background: var(--bg-card);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.card--hover { transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.card--hover:hover { transform: translate(-3px, -3px); border-color: var(--border-hover); box-shadow: var(--shadow-pop); }

/* Icon chip */
.icon-chip {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px;
  background: transparent; border: 1px solid var(--border-strong); color: var(--heading);
  flex: none;
}
.icon-chip svg { width: 23px; height: 23px; }

.num-chip {
  display: inline-grid; place-items: center; min-width: 46px; height: 36px; padding: 0 12px;
  border-radius: 9px; background: transparent; border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-weight: 600; color: var(--heading); font-size: 0.92rem;
}

/* Check list */
.check-list { display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); }
.check-list li::before {
  content: ""; flex: none; width: 21px; height: 21px; border-radius: 6px; margin-top: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232733d6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat;
  border: 1px solid var(--border-strong);
}
.check-list--strong li { color: var(--text); font-weight: 500; }
.arrow-list { display: grid; gap: 12px; }
.arrow-list li { display: flex; gap: 12px; font-weight: 500; color: var(--text); }
.arrow-list li::before { content: "\2192"; color: var(--primary); font-weight: 700; }

/* media slot frame */
.media-frame {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
}
.media-frame .frame-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  transition: background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}
.scroll-progress {
  position: absolute; left: 0; top: 0; height: 2px; width: 0%;
  background: var(--primary); z-index: 2;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.03em; color: var(--heading); }
.brand .dot { color: var(--primary); }
.brand-mark { width: 1.55em; height: 1.55em; border-radius: 8px; flex: none; display: block; color: var(--heading); transition: transform .3s var(--ease);
  --mark-stroke: var(--bg); --mark-dot: #97a2ff; }
[data-theme="dark"] .brand-mark { --mark-dot: #2733d6; }
.site-footer .brand-mark { --mark-stroke: #17140d; --mark-dot: #2733d6; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
.footer-brand .brand .brand-mark { border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 9px 13px; border-radius: 8px; color: var(--text-dim); font-size: 0.93rem; font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--heading); background: rgba(23,20,13,0.05); }
.nav-links a.is-current { color: var(--heading); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--primary); text-decoration-thickness: 2px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .btn { padding: 12px 20px; }
.lang-toggle {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--text-mute);
  border: 1px solid var(--border); padding: 8px 12px; border-radius: 9px; transition: .2s;
}
.lang-toggle:hover { color: var(--heading); border-color: var(--border-hover); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); align-items: center; justify-content: center; color: var(--heading); }
.nav-toggle svg { width: 22px; height: 22px; }

/* Language switcher (desktop dropdown) */
.lang-switch { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border-strong); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-trigger:hover, .lang-switch:focus-within .lang-trigger { color: var(--heading); border-color: var(--border-hover); }
.lang-trigger > svg:first-child { width: 16px; height: 16px; }
.lang-trigger .caret { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.lang-switch:hover .caret, .lang-switch:focus-within .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px; padding: 6px; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.lang-switch:hover .lang-menu, .lang-switch:focus-within .lang-menu, .lang-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text-dim); font-size: 0.92rem; transition: background .18s, color .18s; }
.lang-menu a:hover { background: rgba(23,20,13,0.06); color: var(--heading); }
.lang-menu a.is-active { color: var(--primary); }
.lang-menu .lang-code { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; min-width: 26px; }

/* Mobile drawer */
.mobile-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(23,20,13,0.45); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.mobile-backdrop.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001; width: min(420px, 90vw);
  background: var(--bg); border-left: 1px solid var(--border-strong);
  box-shadow: -30px 0 80px -40px rgba(23,20,13,0.5); display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .42s var(--ease); will-change: transform;
}
.mobile-menu.is-open { transform: none; }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); border-bottom: 1px solid var(--border); }
.mobile-menu__head .brand { font-size: 1.2rem; }
.m-close { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--heading); transition: .2s; }
.m-close:hover { background: var(--heading); border-color: var(--heading); color: var(--bg); transform: rotate(90deg); }
.m-close svg { width: 22px; height: 22px; }
.mobile-menu__links { flex: 1; overflow-y: auto; padding: 12px var(--gutter); display: flex; flex-direction: column; counter-reset: mnav; }
.mobile-menu__links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 4px; min-height: 56px; color: var(--heading); font-family: var(--font-display); font-weight: 600; font-size: 1.22rem;
  border-bottom: 1px solid var(--border); transition: color .2s, padding-left .2s;
  opacity: 0; transform: translateX(16px);
  counter-increment: mnav;
}
.mobile-menu__links a span::before {
  content: counter(mnav, decimal-leading-zero); margin-right: 14px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; color: var(--primary); vertical-align: 3px;
}
.mobile-menu.is-open .mobile-menu__links a { animation: mlink .5s var(--ease) forwards; animation-delay: calc(var(--i) * 0.045s + 0.12s); }
@keyframes mlink { to { opacity: 1; transform: none; } }
.mobile-menu__links a svg { width: 20px; height: 20px; color: var(--text-faint); transition: transform .2s, color .2s; }
.mobile-menu__links a:hover, .mobile-menu__links a:active { color: var(--primary); padding-left: 10px; }
.mobile-menu__links a:hover svg { color: var(--primary); transform: translateX(3px); }
.mobile-menu__foot { padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: grid; gap: 16px; }
.m-lang { display: flex; gap: 8px; }
.m-lang-opt { flex: 1; text-align: center; padding: 12px 0; border-radius: 9px; border: 1px solid var(--border-strong); font-family: var(--font-mono); font-weight: 600; font-size: 0.86rem; color: var(--text-dim); transition: .2s; }
.m-lang-opt:hover { border-color: var(--border-hover); color: var(--heading); }
.m-lang-opt.is-active { background: var(--heading); border-color: var(--heading); color: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  .mobile-menu__links a { opacity: 1; transform: none; animation: none !important; }
}

/* ============================================================
   HERO — full-width editorial statement
   ============================================================ */
.hero { padding-top: clamp(128px, 16vw, 188px); padding-bottom: clamp(36px, 6vw, 64px); }
.hero-kicker {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-mute);
  display: flex; align-items: center; gap: 14px; margin-bottom: clamp(22px, 3vw, 34px);
}
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: var(--heading); }
.hero h1 { max-width: 21ch; margin-bottom: clamp(34px, 5vw, 56px); }
.hero h1 .text-grad { display: inline-block; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 80px);
  align-items: center; padding-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--border);
}
.hero .lead { max-width: 56ch; }
.hero .lead + .check-list { margin-top: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-media { position: relative; }

/* legacy float cards (kept harmless) */
.hero-badges { position: absolute; }
.float-card {
  position: absolute; background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-pop);
  display: flex; align-items: center; gap: 12px;
}
.float-card .icon-chip { width: 40px; height: 40px; border-radius: 10px; }
.float-card .icon-chip svg { width: 19px; height: 19px; }
.float-card b { display: block; font-size: 0.96rem; }
.float-card span { font-size: 0.78rem; color: var(--text-mute); }
.float-card--tl { top: 18px; left: -22px; }
.float-card--br { bottom: 22px; right: -18px; }

/* trust marquee — ticker between double hairlines */
.trust { border-block: 1px solid var(--border); position: relative; margin-top: clamp(40px, 6vw, 72px); }
.trust::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: var(--border); }
.trust-marquee {
  overflow: hidden;
  padding-block: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.trust-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: trust-scroll 38s linear infinite;
  will-change: transform;
}
.trust-marquee:hover .trust-track { animation-play-state: paused; }
.trust-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding-inline: clamp(20px, 2.6vw, 40px);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s;
}
.trust-item::after {
  content: "/";
  margin-left: clamp(20px, 2.6vw, 40px);
  color: var(--primary);
  opacity: .55;
}
.trust-item:hover { color: var(--heading); }
@keyframes trust-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .trust-marquee { -webkit-mask-image: none; mask-image: none; }
  .trust-track { animation: none; width: 100%; flex-wrap: wrap; justify-content: center; row-gap: 14px; }
  .trust-track .trust-item[aria-hidden="true"] { display: none; }
}

/* ============================================================
   STATS — ledger row, serif numerals
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stats-grid .stat {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  border-left: 1px solid var(--border-strong);
  padding: 10px 28px; text-align: left;
}
.stat .num { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 4.6vw, 3.6rem); color: var(--heading); letter-spacing: -0.02em; line-height: 1; }
.stat .num .suffix { color: var(--primary); font-style: italic; }
.stat .label { margin-top: 12px; color: var(--text-mute); font-size: 0.94rem; max-width: 24ch; }

/* ============================================================
   SERVICES — editorial rows on hairlines
   ============================================================ */
.service-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  border-top: 1px solid var(--border);
  padding: clamp(36px, 5vw, 64px) 0;
}
.service-row:not(:last-child) { margin-bottom: 0; }
.service-row.is-reverse .service-text { order: 2; }
.service-row.is-reverse .service-media { order: 1; }
.service-text .num-chip { margin-bottom: 22px; }
.service-text h3 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin-bottom: 18px; }
.service-text .lead { margin-bottom: 26px; }

/* ============================================================
   PROCESS (legacy card grid)
   ============================================================ */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }
.process-card { padding: 30px 26px; display: flex; flex-direction: column; }
.process-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.process-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.process-card p { color: var(--text-mute); font-size: 0.96rem; margin-bottom: 22px; flex: 1; }
.process-card .mini { padding-top: 20px; border-top: 1px solid var(--border); }
.process-card .mini li { font-size: 0.88rem; }
.process-card .mini li::before { width: 18px; height: 18px; background-size: 11px; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.price-card { padding: 34px 30px; display: flex; flex-direction: column; }
.price-card.is-featured { border: 2px solid var(--heading); box-shadow: var(--shadow-glow); }
.price-card.is-featured::before { content: none; }
.price-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.badge {
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 7px; white-space: nowrap; border: 1px solid transparent;
}
.badge--green { background: var(--success); color: #f4fbf7; }
.badge--amber { background: #8a6403; color: #fdf8ec; }
.badge--violet { background: var(--primary); color: #fff; }
.badge--soft { background: transparent; color: var(--heading); border-color: var(--border-strong); }
.price-card .kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); font-weight: 600; }
.price-card h3 { font-size: 1.5rem; margin: 6px 0 18px; }
.price-card .desc { color: var(--text-mute); font-size: 0.95rem; margin-bottom: 24px; }
.price-card .from { font-family: var(--font-mono); margin-bottom: 24px; }
.price-card .from b { font-size: 2rem; color: var(--heading); font-family: var(--font-display); font-weight: 600; }
.price-card .from span { color: var(--text-mute); font-size: 0.85rem; }
.price-card .scope-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 16px; }
.price-card .check-list { margin-bottom: 28px; flex: 1; }
.price-card .check-list li { font-size: 0.93rem; }
.price-card .btn { margin-top: auto; }
.price-card.is-promo { border-color: var(--accent); }
.price-card .promo-flag {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: var(--accent); color: #fff; font-family: var(--font-mono); font-weight: 600;
  font-size: 0.76rem; letter-spacing: .03em; padding: 6px 11px; border-radius: 7px;
}
.from--promo s { display: block; color: var(--text-faint); font-size: 0.95rem; font-family: var(--font-mono); margin-bottom: 2px; text-decoration-color: var(--accent); }
.from--promo b { color: var(--accent); }
.freebie { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; color: var(--primary);
  border: 1px solid var(--border-strong); padding: 6px 12px; border-radius: 7px; background: transparent; }

/* ============================================================
   TECH SPECTRUM
   ============================================================ */
.tech-considerations { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1080px; margin: 0 0 64px; }
.consideration { display: flex; gap: 18px; padding: 26px 28px; }
.consideration h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; margin-bottom: 8px; color: var(--heading); }
.consideration p { color: var(--text-mute); font-size: 0.95rem; }

.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.tech-card { padding: 30px 28px; }
.tech-card .tech-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.tech-card .tech-name { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--heading); }
.tech-card .tech-name svg { width: 26px; height: 26px; }
.tag { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--border-strong); color: var(--text-dim); }
.tag--violet { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.tag--red { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.meter { margin-bottom: 18px; }
.meter .meter-top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 9px; font-weight: 600; }
.meter .meter-top b { color: var(--heading); }
.meter .bar { height: 6px; border-radius: 3px; background: rgba(23,20,13,0.08); overflow: hidden; }
.meter .fill { height: 100%; border-radius: inherit; width: 0; transition: width 1.1s var(--ease); }
.fill--violet { background: var(--primary); }
.fill--red { background: var(--accent); }
.fill--blue { background: #0e7490; }
.tech-card .check-list { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.tech-card .check-list li { font-size: 0.9rem; color: var(--text-dim); }

.tech-quote { max-width: 1080px; margin: 56px 0 0; padding: 44px clamp(28px, 5vw, 56px); }
.tech-quote::before { content: "\201E"; display: block; font-family: var(--font-display); font-size: 3.4rem; line-height: 0.4; color: var(--primary); margin-bottom: 18px; }
.tech-quote p { font-size: clamp(1.15rem, 2vw, 1.5rem); font-style: italic; color: var(--heading); line-height: 1.5; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.tech-quote .cite { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-weight: 600; }
.tech-quote .cite::before { content: ""; width: 34px; height: 1px; background: var(--heading); }

/* ============================================================
   TEAM
   ============================================================ */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 56px; }
.member { padding: 28px 26px 30px; text-align: left; display: flex; flex-direction: column; }
.member-idx { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--primary); letter-spacing: 0.08em; }
.member .role { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.member h3 { font-size: 1.22rem; margin: 8px 0 12px; }
.member p { color: var(--text-mute); font-size: 0.9rem; line-height: 1.6; }
.member .socials { display: flex; gap: 10px; margin-top: 18px; }
.member .socials a { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--text-mute); transition: .2s; }
.member .socials a:hover { color: var(--bg); border-color: var(--heading); background: var(--heading); }
.member .socials svg { width: 17px; height: 17px; }

.team-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.value { display: flex; gap: 16px; padding: 26px 28px; align-items: flex-start; }
.value h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; margin-bottom: 6px; color: var(--heading); }
.value p { color: var(--text-mute); font-size: 0.92rem; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; align-items: start; }
.testi { padding: 32px 30px; display: flex; flex-direction: column; gap: 20px; }
.testi .stars { display: flex; gap: 3px; color: #d98e04; }
.testi .stars svg { width: 17px; height: 17px; }
.testi blockquote { color: var(--text); font-size: 1.04rem; line-height: 1.65; }
.testi blockquote::before { content: "\201E"; display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 0.3; color: var(--primary); margin-bottom: 14px; }
.testi .who { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.testi .who .visual { width: 48px; height: 48px; flex: none; }
.testi .who .n { font-weight: 600; font-size: 0.96rem; color: var(--heading); }
.testi .who .c { color: var(--text-mute); font-size: 0.82rem; font-family: var(--font-mono); }
.testi.is-tall { grid-row: span 1; }
.testi .stars .star-off { display: inline-flex; opacity: 0.22; }
.testi .who .testi-logo { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: contain; background: #fff; padding: 6px; border: 1px solid var(--border-strong); }
.avatar-mono { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--primary); background: var(--bg-soft); border: 1px solid var(--border-strong); }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio-viewport { overflow: hidden; margin-top: 56px; }
.portfolio-track { display: flex; transition: transform .6s var(--ease); }
.work {
  flex: 0 0 100%; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 4vw, 44px);
  background: transparent; border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: none;
}
.work .kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); font-weight: 600; margin-bottom: 14px; }
.work h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 16px; }
.work p { color: var(--text-dim); margin-bottom: 24px; }
.work .stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.work .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 40px; }
.carousel-nav button.arrow { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; transition: .2s; color: var(--heading); }
.carousel-nav button.arrow:hover { background: var(--heading); border-color: var(--heading); color: var(--bg); transform: scale(1.05); }
.carousel-nav button.arrow svg { width: 20px; height: 20px; }
.dots { display: flex; gap: 9px; }
.dots button { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); transition: .25s; }
.dots button.is-active { background: var(--heading); width: 26px; border-radius: 5px; }

/* ============================================================
   BLOG
   ============================================================ */
.blog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 44px; }
.blog-scroller { display: flex; gap: 24px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding-bottom: 4px; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; overscroll-behavior-x: contain; }
.blog-scroller::-webkit-scrollbar { width: 0; height: 0; display: none; }
.post-card { flex: 0 0 min(420px, 84vw); scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; padding: 0; }
.post-card .visual { width: 100%; aspect-ratio: 16 / 9; pointer-events: none; }
.post-card .post-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-mute); margin-bottom: 14px; }
.post-cat { color: var(--primary); font-weight: 600; }
.post-card h3 { font-size: 1.32rem; line-height: 1.22; margin-bottom: 12px; transition: color .2s; }
.post-card:hover h3 { color: var(--primary); }
.post-card p { color: var(--text-mute); font-size: 0.95rem; flex: 1; }
.post-readmore { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--primary); font-size: 0.92rem; }
.post-readmore svg { width: 16px; height: 16px; transition: transform .2s; }
.post-card:hover .post-readmore svg { transform: translateX(4px); }
.blog-controls { display: flex; gap: 12px; }
.blog-controls button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; transition: .2s; color: var(--heading); }
.blog-controls button:hover { background: var(--heading); border-color: var(--heading); color: var(--bg); }
.blog-controls button svg { width: 18px; height: 18px; }

/* Article modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(23,20,13,0.5); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center; padding: clamp(16px, 5vw, 64px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); overflow-y: auto;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; width: min(760px, 100%); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--r-xl); overflow: hidden;
  transform: translateY(24px) scale(.98); transition: transform .4s var(--ease); box-shadow: 0 50px 120px -30px rgba(23,20,13,0.55);
  margin-block: auto;
}
.modal-overlay.is-open .modal { transform: none; }
.modal-cover { width: 100%; aspect-ratio: 16 / 7; }
.modal-close {
  position: absolute; top: 18px; right: 18px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--heading);
  transition: .2s;
}
.modal-close:hover { background: var(--heading); border-color: var(--heading); color: var(--bg); transform: rotate(90deg); }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: clamp(28px, 4vw, 48px); }
.modal-body .post-meta { margin-bottom: 18px; }
.modal-body h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3.5vw, 2.5rem); line-height: 1.08; letter-spacing: -0.015em; color: var(--heading); margin-bottom: 24px; }
.modal-author { display: flex; align-items: center; gap: 12px; padding-bottom: 26px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.modal-author .visual { width: 46px; height: 46px; flex: none; }
.modal-author .n { font-weight: 600; font-size: 0.94rem; color: var(--heading); }
.modal-author .r { font-size: 0.82rem; color: var(--text-mute); font-family: var(--font-mono); }
.article-content > * + * { margin-top: 20px; }
.article-content p { color: var(--text-dim); line-height: 1.75; }
.article-content h3 { font-size: 1.4rem; color: var(--heading); margin-top: 36px; }
.article-content ul { display: grid; gap: 12px; padding-left: 0; }
.article-content ul li { display: flex; gap: 12px; color: var(--text-dim); }
.article-content ul li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 10px; }
.article-content blockquote { border-left: 2px solid var(--primary); padding: 6px 0 6px 22px; color: var(--heading); font-style: italic; font-size: 1.12rem; font-family: var(--font-display); }
.article-content code { font-family: var(--font-mono); font-size: 0.88em; background: rgba(39,51,214,0.08); padding: 2px 7px; border-radius: 6px; color: var(--primary); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.contact-copy h2 { margin-bottom: 24px; }
.contact-copy .lead { margin-bottom: 32px; }
.contact-meta { display: grid; gap: 18px; margin-top: 36px; }
.contact-meta .row { display: flex; align-items: center; gap: 14px; }
.contact-meta .icon-chip { width: 44px; height: 44px; border-radius: 11px; }
.contact-meta .icon-chip svg { width: 19px; height: 19px; }
.contact-meta b { display: block; font-size: 0.96rem; }
.contact-meta span { font-size: 0.84rem; color: var(--text-mute); }

.form-card { padding: clamp(28px, 4vw, 44px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field.is-full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; }
.field input, .field textarea, .field select {
  background: transparent; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 14px 16px; font-family: var(--font-body); font-size: 0.95rem; color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c6557' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 40px; cursor: pointer; }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; }
.consent input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.consent label { font-size: 0.84rem; color: var(--text-mute); line-height: 1.5; font-family: var(--font-body); letter-spacing: 0; text-transform: none; }
.form-status { grid-column: 1 / -1; font-size: 0.9rem; font-weight: 600; min-height: 1px; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--accent); }

/* ============================================================
   NEWSLETTER — inverted ink block
   ============================================================ */
.newsletter { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 68px) clamp(28px, 5vw, 72px);
  background: #17140d; border: 1px solid #17140d; border-radius: var(--r-xl); color: #d8d2c0; }
.newsletter::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(246,243,236,0.14); pointer-events: none; }
.newsletter .eyebrow { color: #a39c87; }
.newsletter .eyebrow::before { color: #97a2ff; }
.newsletter-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.newsletter h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 14px; color: #f6f2e4; }
.newsletter p { color: #c0b9a4; max-width: 46ch; }
.newsletter-form { display: flex; gap: 12px; flex-wrap: wrap; }
.newsletter-form .ns-input { flex: 1; min-width: 220px; background: rgba(246,243,236,0.07); border: 1px solid rgba(246,243,236,0.3); border-radius: 10px; padding: 16px 22px; font-size: 0.96rem; color: #f6f2e4; }
.newsletter-form .ns-input::placeholder { color: #97917e; }
.newsletter-form .ns-input:focus { outline: none; border-color: #97a2ff; box-shadow: 0 0 0 3px rgba(151,162,255,0.2); }
.newsletter-form .btn--primary { background: #f6f2e4; border-color: #f6f2e4; color: #17140d; }
.newsletter-form .btn--primary:hover { background: #97a2ff; border-color: #97a2ff; color: #11101e; box-shadow: 5px 5px 0 -1px rgba(0,0,0,0.5); }
.newsletter-note { margin-top: 16px; font-size: 0.8rem; color: #97917e; }
.newsletter-status { margin-top: 14px; font-weight: 600; font-size: 0.9rem; min-height: 1px; }
.newsletter-status.ok { color: #4cc38a; }
.newsletter-status.err { color: #ff9162; }

/* ============================================================
   FOOTER — ink slab
   ============================================================ */
.site-footer { border-top: 1px solid #17140d; padding-block: clamp(56px, 7vw, 88px) 40px; background: #17140d; color: #c0b9a4; }
.site-footer .brand { color: #f6f2e4; }
.site-footer .brand .dot { color: #97a2ff; }
.site-footer .brand-mark { color: #f6f2e4; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand .brand { font-size: 1.5rem; margin-bottom: 18px; }
.footer-brand p { color: #a39c87; font-size: 0.94rem; max-width: 32ch; margin-bottom: 22px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(246,243,236,0.22); display: grid; place-items: center; color: #a39c87; transition: .2s; }
.footer-social a:hover { color: #17140d; border-color: #f6f2e4; background: #f6f2e4; }
.footer-social svg { width: 18px; height: 18px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: #97917e; margin-bottom: 20px; }
.footer-col ul { display: grid; gap: 13px; }
.footer-col a { color: #c0b9a4; font-size: 0.94rem; transition: color .2s; }
.footer-col a:hover { color: #f6f2e4; }
.footer-col .row { display: flex; align-items: center; gap: 11px; color: #c0b9a4; font-size: 0.94rem; margin-bottom: 13px; }
.footer-col .row svg { width: 17px; height: 17px; color: #97a2ff; flex: none; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(246,243,236,0.14); color: #97917e; font-size: 0.85rem; }
.footer-bottom .links { display: flex; gap: 22px; }
.footer-bottom a:hover { color: #f6f2e4; }

/* ============================================================
   COOKIE BANNER + BACK TO TOP
   ============================================================ */
.cookie {
  position: fixed; left: 22px; bottom: 22px; z-index: 150; width: min(380px, calc(100vw - 44px));
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-pop);
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: .4s var(--ease);
}
.cookie.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.cookie .icon-chip { margin-bottom: 18px; }
.cookie h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; margin-bottom: 10px; color: var(--heading); }
.cookie p { color: var(--text-mute); font-size: 0.88rem; margin-bottom: 14px; }
.cookie .policy-links { display: flex; gap: 14px; align-items: center; font-size: 0.84rem; font-weight: 600; color: var(--primary); margin-bottom: 18px; }
.cookie .policy-links span { color: var(--text-faint); }
.cookie .cookie-actions { display: flex; gap: 10px; }
.cookie .cookie-actions .btn { flex: 1; padding: 13px 16px; font-size: 0.88rem; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 140; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--bg-card);
  display: grid; place-items: center; color: var(--heading); opacity: 0; pointer-events: none;
  transition: .3s var(--ease); transform: translateY(12px);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--heading); border-color: var(--heading); color: var(--bg); }
.to-top svg { width: 22px; height: 22px; }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 520px; }
  .tech-grid { grid-template-columns: 1fr; max-width: 520px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta, .lang-switch, .lang-toggle { display: none; }
  .nav-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: 2; }
  .hero-copy { order: 1; }
  .service-row, .work { grid-template-columns: 1fr; }
  .service-row.is-reverse .service-text, .service-row.is-reverse .service-media { order: 0; }
  .service-media, .work-media { order: -1; }
  .tech-considerations { grid-template-columns: 1fr; }
  .team-values { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .newsletter-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .float-card--tl { left: 8px; }
  .float-card--br { right: 8px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .stats-grid, .process-grid, .team-grid { grid-template-columns: 1fr; }
  .stats-grid .stat { border-left: 0; border-top: 1px solid var(--border-strong); padding: 22px 4px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .to-top { right: 12px; bottom: 12px; }
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 9px; border: 1px solid var(--border-strong);
  display: grid; place-items: center; color: var(--text-dim); transition: .2s; flex: none;
}
.theme-toggle:hover { color: var(--heading); border-color: var(--border-hover); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ============================================================
   ARCHITECTURE & INDUSTRIES
   ============================================================ */
.arch-feature { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px,5vw,64px); align-items: center; padding: clamp(30px,4vw,52px); margin-top: 56px; }
.arch-feature .badge { margin-bottom: 30px; white-space: normal; display: inline-block; max-width: 100%; line-height: 1.5; }
.arch-feature .kicker { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--primary); font-weight: 600; margin-bottom: 16px; }
.arch-feature h3 { font-size: clamp(1.6rem,2.8vw,2.2rem); margin-bottom: 16px; }
.arch-feature .lead { margin-bottom: 26px; }
.arch-feature .stack-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }

.arch-diagram { display: flex; flex-direction: column; align-items: center; gap: 0; }
.arch-row { display: flex; gap: 16px; width: 100%; }
.arch-node {
  flex: 1; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border-strong); width: 100%;
}
.arch-node .icon-chip { width: 42px; height: 42px; border-radius: 10px; }
.arch-node .icon-chip svg { width: 20px; height: 20px; }
.arch-node > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arch-node b { display: block; font-size: 0.95rem; color: var(--heading); line-height: 1.2; }
.arch-node span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-mute); }
.arch-node--api .icon-chip { background: var(--heading); color: var(--bg); border-color: transparent; }
.arch-connector { width: 1px; height: 30px; background: var(--border-hover); position: relative; }
.arch-connector::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 8px; height: 8px; border-right: 1px solid var(--border-hover); border-bottom: 1px solid var(--border-hover); transform: translateX(-50%) rotate(45deg); }

.arch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.arch-card { padding: 28px 30px; }
.arch-card .top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.arch-card h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; color: var(--heading); }
.arch-card p { color: var(--text-mute); font-size: 0.94rem; margin-bottom: 18px; }
.arch-card .stack-line { display: flex; flex-wrap: wrap; gap: 7px; }

.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.industry { display: flex; gap: 14px; padding: 22px 24px; align-items: flex-start; }
.industry .icon-chip { width: 44px; height: 44px; border-radius: 10px; }
.industry .icon-chip svg { width: 20px; height: 20px; }
.industry h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 5px; color: var(--heading); }
.industry p { color: var(--text-mute); font-size: 0.88rem; line-height: 1.55; }

@media (max-width: 980px) {
  .arch-feature { grid-template-columns: 1fr; }
  .arch-grid { grid-template-columns: 1fr; }
  .industry-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .arch-row { flex-direction: column; } }

/* ============================================================
   PROCESS TIMELINE (scroll-driven)
   ============================================================ */
.timeline { position: relative; max-width: 1080px; margin: clamp(56px,8vw,88px) auto 0; }
.timeline-line {
  position: absolute; left: 50%; top: 12px; bottom: 12px; width: 1px; transform: translateX(-50%);
  background: var(--border-strong);
}
.timeline-progress {
  position: absolute; inset: 0 0 auto 0; height: 0;
  background: var(--primary);
  transition: height .25s cubic-bezier(0.22,1,0.36,1);
}
.tl-step {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,5vw,80px);
  align-items: center; padding-block: clamp(34px,4.5vw,62px);
}
.tl-step.reveal { opacity: 1; transform: none; }
.tl-content { grid-column: 1; }
.tl-visual { grid-column: 2; }
.tl-step:nth-of-type(even) .tl-content { grid-column: 2; }
.tl-step:nth-of-type(even) .tl-visual { grid-column: 1; }

.tl-content, .tl-visual {
  opacity: 0; will-change: transform, opacity;
  transition: opacity .85s cubic-bezier(0.22,1,0.36,1), transform .85s cubic-bezier(0.22,1,0.36,1);
}
.tl-content { transform: translateX(-46px); }
.tl-visual { transform: translateX(46px); }
.tl-step:nth-of-type(even) .tl-content { transform: translateX(46px); }
.tl-step:nth-of-type(even) .tl-visual { transform: translateX(-46px); }
.tl-step.is-in .tl-content, .tl-step.is-in .tl-visual { opacity: 1; transform: none; }
.tl-step.is-in .tl-visual { transition-delay: .12s; }

.tl-node {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 3;
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--border-strong);
  font-family: var(--font-display); font-weight: 600; color: var(--text-mute);
  transition: border-color .5s var(--ease), color .5s var(--ease), background .5s var(--ease), transform .5s var(--ease);
}
.tl-node .n { font-size: 1.15rem; line-height: 1; }
.tl-step.is-active .tl-node {
  border-color: var(--heading); color: var(--bg);
  background: var(--heading);
  transform: translate(-50%,-50%) scale(1.08);
}

.tl-card { padding: clamp(26px,3vw,38px); }
.tl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.tl-duration {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); border: 1px solid var(--border-strong); padding: 6px 12px; border-radius: 7px;
}
.tl-card h3 { font-size: clamp(1.5rem,2.4vw,2rem); margin-bottom: 14px; }
.tl-card .tl-desc { color: var(--text-dim); margin-bottom: 22px; line-height: 1.7; }
.tl-card .check-list { padding-top: 22px; border-top: 1px solid var(--border); }
.tl-card .check-list li { font-size: 0.93rem; }
.tl-visual .media-frame { transition: transform .85s cubic-bezier(0.22,1,0.36,1); }
.tl-visual .visual { width: 100%; aspect-ratio: 4 / 3; }
.tl-visual .vlabel {
  position: absolute; left: 16px; bottom: 16px; z-index: 2; font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.08em; color: var(--heading);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border: 1px solid var(--border-strong); padding: 7px 13px; border-radius: 7px; backdrop-filter: blur(6px);
}

@media (max-width: 860px) {
  .timeline-line { left: 28px; }
  .tl-step { grid-template-columns: 1fr; gap: 22px; padding-left: 70px; padding-block: 30px; }
  .tl-content, .tl-visual,
  .tl-step:nth-of-type(even) .tl-content, .tl-step:nth-of-type(even) .tl-visual { grid-column: 1; transform: translateY(34px); }
  .tl-step.is-in .tl-content, .tl-step.is-in .tl-visual { transform: none; }
  .tl-node { left: 28px; top: 30px; transform: translate(-50%,0); width: 56px; height: 56px; }
  .tl-step.is-active .tl-node { transform: translate(-50%,0) scale(1.06); }
}

/* ============================================================
   CSS/SVG VISUALS
   ============================================================ */
.visual {
  position: relative; width: 100%; display: block; overflow: hidden;
  background: var(--bg-soft);
  border-radius: inherit; isolation: isolate;
}
.visual::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 120% at 12% 0%, rgba(39,51,214,0.07), transparent 55%);
}
.visual::after {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.6;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
}
.visual__art {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 9%;
  color: var(--primary);
}
.visual--round { border-radius: 50%; }
.visual--round .visual__art { padding: 16%; }

/* Blog post cover */
.post-card .post-cover { width: 100%; aspect-ratio: 16 / 9; display: block; overflow: hidden; border-bottom: 1px solid var(--border); }
.post-card .post-cover svg, .post-card .post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-cover svg, .modal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-cover { display: block; overflow: hidden; }

/* Skeleton */
.post-skeleton { flex: 0 0 min(420px, 84vw); border-radius: var(--r-md); overflow: hidden; min-height: 360px;
  background: var(--bg-card); border: 1px solid var(--border); position: relative; }
.post-skeleton::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(23,20,13,0.04), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .post-skeleton::after { animation: none; } }

/* ============================================================
   FLOATING ACTIONS
   ============================================================ */
.fab-stack { position: fixed; right: 22px; bottom: 22px; z-index: 140; display: flex; flex-direction: column; gap: 12px; }
.fab-stack .to-top, .fab-stack .fab-call { position: static; right: auto; bottom: auto; }
.fab-call {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--heading);
  background: var(--heading); color: var(--bg);
  display: grid; place-items: center;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.fab-call:hover { transform: translateY(-2px) scale(1.04); background: var(--primary); border-color: var(--primary); color: #fff; }
.fab-call svg { width: 22px; height: 22px; }
.fab-call::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1;
  box-shadow: 0 0 0 0 rgba(39,51,214,0.4); animation: callpulse 2.4s var(--ease) infinite;
}
@keyframes callpulse { 0% { box-shadow: 0 0 0 0 rgba(39,51,214,0.35); } 70%,100% { box-shadow: 0 0 0 16px rgba(39,51,214,0); } }
@media (prefers-reduced-motion: reduce) { .fab-call::after { animation: none; } }
@media (max-width: 560px) { .fab-stack { right: 12px; bottom: 12px; } }
body.menu-open .fab-stack { opacity: 0; visibility: hidden; pointer-events: none; }

/* ============================================================
   CONTACT — responsiveness hardening
   ============================================================ */
.contact-grid { min-width: 0; }
.form-grid, .field { min-width: 0; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; max-width: 100%; }
.contact-meta .row { min-width: 0; }
.contact-meta b, .contact-meta span { overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; gap: clamp(28px, 5vw, 44px); }
}
@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .form-card { padding: 22px 16px; }
  .contact-meta .icon-chip { width: 40px; height: 40px; }
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--border-strong); }
.faq-item { background: transparent; border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; overflow: hidden; transition: background .25s var(--ease); }
.faq-item:hover { background: rgba(23,20,13,0.025); }
.faq-item[open] { background: transparent; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 8px; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--heading); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-ico { width: 22px; height: 22px; flex: none; color: var(--primary); transition: transform .3s var(--ease); }
.faq-item[open] .faq-ico { transform: rotate(135deg); }
.faq-answer { padding: 0 8px 26px; color: var(--text-dim); line-height: 1.72; }
.faq-answer p { margin: 0; max-width: 68ch; }

/* ============================================================
   ARCHITECTURE FEATURE — flagship panel
   ============================================================ */
.arch-feature--modern {
  position: relative; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--r-xl);
  margin-top: 56px;
  background: var(--bg-card);
  box-shadow: var(--shadow-pop);
}
.arch-feature--modern::before { content: none; }
.arch-feature--modern .arch-diagram { gap: 0; width: 100%; }
.arch-feature--modern .arch-row { gap: 18px; }
.arch-feature--modern .arch-node {
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 24px 26px; min-height: 100px; gap: 18px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.arch-feature--modern .arch-node .icon-chip { width: 52px; height: 52px; border-radius: 12px; }
.arch-feature--modern .arch-node .icon-chip svg { width: 25px; height: 25px; }
.arch-feature--modern .arch-node b { font-size: 1.08rem; }
.arch-feature--modern .arch-node span { font-size: 0.78rem; }
.arch-feature-cta { margin-top: 30px; }
.arch-feature--modern .arch-node:hover { transform: translate(-2px,-2px); border-color: var(--border-hover); box-shadow: 5px 5px 0 -1px rgba(23,20,13,0.1); }
.arch-feature--modern .arch-node--api { border-color: var(--heading); position: relative; }
.arch-feature--modern .arch-connector {
  width: 1px; height: 64px; position: relative; overflow: visible;
  background: var(--border-hover);
}
.arch-feature--modern .arch-connector::before {
  content: ""; position: absolute; left: 50%; top: -2px; width: 6px; height: 6px; border-radius: 50%;
  transform: translateX(-50%); background: var(--primary);
  animation: flowdot 2.2s linear infinite;
}
@keyframes flowdot { 0% { top: -2px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 60px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .arch-feature--modern .arch-connector::before { animation: none; }
}

/* ============================================================
   OVERFLOW SAFETY
   ============================================================ */
html, body { max-width: 100%; overflow-x: clip; }
@media (max-width: 480px) {
  .float-card { display: none; }
  .hero-cta .btn { flex: 1 1 100%; }
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-page { padding: clamp(120px, 16vw, 180px) 0 clamp(72px, 10vw, 120px); position: relative; }
.legal-container { max-width: 860px; margin-inline: auto; }
.legal-header { margin-bottom: clamp(40px, 6vw, 64px); text-align: left; border-bottom: 1px solid var(--border-strong); padding-bottom: clamp(28px, 4vw, 40px); }
.legal-title { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; color: var(--heading); margin-bottom: 14px; }
.legal-date { color: var(--text-mute); font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.legal-content { background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 60px); box-shadow: var(--shadow-card); }
.legal-content h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; color: var(--heading); margin: 44px 0 14px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--text-dim); line-height: 1.75; margin-bottom: 18px; }
.legal-content ul { display: grid; gap: 10px; margin-bottom: 18px; padding-left: 4px; }
.legal-content ul li { display: flex; gap: 12px; color: var(--text-dim); line-height: 1.7; }
.legal-content ul li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 11px; }
.legal-content a { color: var(--primary); font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }

/* ============================================================
   BLOG ARTICLE — server-rendered page
   ============================================================ */
.article-page { padding: clamp(110px, 15vw, 160px) 0 clamp(64px, 9vw, 110px); }
.article-wrap { max-width: 820px; margin-inline: auto; }
.article-hero-cover { width: 100%; aspect-ratio: 16 / 7; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border-strong); margin-bottom: 32px; box-shadow: var(--shadow-pop); }
.article-hero-cover svg, .article-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-page h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.08; letter-spacing: -0.015em; color: var(--heading); margin: 20px 0 22px; }
.article-back { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 600; font-size: 0.92rem; margin-bottom: 28px; }
.article-back svg { width: 16px; height: 16px; }

/* ============================================================
   REVIEWS
   ============================================================ */
.review-page { padding: clamp(120px, 16vw, 184px) 0 clamp(72px, 10vw, 120px); position: relative; }
.review-card { padding: clamp(30px, 5vw, 52px); }
.review-card .eyebrow { margin-bottom: 14px; display: inline-flex; }
.review-card .display { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 14px; }
.review-card .lead { margin-bottom: 30px; }
.review-card--center { text-align: center; }
.review-card--center .btn { margin-top: 26px; }
.review-form { display: flex; flex-direction: column; gap: 22px; }
.review-form .btn { align-self: flex-start; }
.review-note { color: var(--text-mute); font-size: 0.85rem; margin-top: -6px; }
.review-error { background: rgba(193,74,9,0.08); border: 1px solid rgba(193,74,9,0.4); color: var(--accent); border-radius: 10px; padding: 12px 16px; margin-bottom: 22px; font-size: 0.92rem; }

.rating-field { border: 0; padding: 0; margin: 0; }
.rating-field legend { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; margin-bottom: 10px; padding: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-start; gap: 6px; }
.star-input input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; color: var(--border-strong); line-height: 0; transition: color .15s, transform .15s; }
.star-input label svg { width: 40px; height: 40px; display: block; }
.star-input label:hover { transform: scale(1.12); }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #d98e04; }
.star-input input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.review-check { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; margin-bottom: 8px; color: var(--bg); background: var(--heading); }
.review-check svg { width: 36px; height: 36px; }

/* ============================================================
   HERO SLIDER — framed photographs with caption bar
   ============================================================ */
.hero-slider {
  position: relative; width: 100%; aspect-ratio: 4 / 3.2; border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  box-shadow: var(--shadow-pop);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .9s var(--ease), visibility .9s var(--ease);
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 0; }
.hero-slide.is-active .hero-slide-img { animation: kenburns 9s ease-out both; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,13,8,0.08) 0%, rgba(15,13,8,0) 34%, rgba(15,13,8,0.5) 72%, rgba(15,13,8,0.86) 100%);
}
.hero-slide-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: clamp(20px,3.4vw,30px) clamp(20px,3.4vw,28px);
}
.hero-slide-kicker {
  display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #c8d0ff; font-weight: 600; margin-bottom: 8px;
}
.hero-slide-cap p { color: #fff; font-size: clamp(0.98rem,1.5vw,1.08rem); line-height: 1.5; font-weight: 500; max-width: 38ch; text-shadow: 0 1px 12px rgba(0,0,0,0.45); }
.hero-slider-dots { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; z-index: 3; }
.hero-slider-dots button {
  width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.55); cursor: pointer;
  transition: width .3s var(--ease), background .3s var(--ease);
}
.hero-slider-dots button:hover { background: rgba(255,255,255,0.8); }
.hero-slider-dots button.is-active { width: 24px; border-radius: 5px; background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity .25s linear; transform: none; }
}

/* ============================================================
   RESPONSIVE OVERFLOW FIXES
   ============================================================ */
.contact-grid > *,
.arch-feature > *,
.tl-step > *,
.newsletter-grid > *,
.form-grid > * { min-width: 0; }

.form-card { min-width: 0; max-width: 100%; }
.arch-feature-text, .arch-diagram-wrap { min-width: 0; }
.tl-content, .tl-visual { min-width: 0; }

.field input, .field select, .field textarea { width: 100%; max-width: 100%; min-width: 0; }
.media-frame, .frame-img { max-width: 100%; }

.tl-card, .arch-node b, .arch-node span, .form-card, .contact-meta { overflow-wrap: break-word; }

/* ============================================================
   DARK THEME — inverted ink
   ============================================================ */
[data-theme="dark"] {
  --bg:            #141209;
  --bg-soft:       #1a1810;
  --bg-card:       #1d1a11;
  --bg-card-2:     #211e14;
  --bg-input:      #1d1a11;

  --border:        rgba(243,238,222,0.13);
  --border-strong: rgba(243,238,222,0.24);
  --border-hover:  rgba(243,238,222,0.6);

  --primary:       #97a2ff;
  --primary-600:   #7c89ff;
  --primary-400:   #aeb7ff;
  --primary-300:   #bcc3ff;
  --primary-glow:  rgba(151,162,255,0.16);
  --brand:         #97a2ff;

  --accent:        #ff9162;
  --success:       #4cc38a;
  --warn:          #e2b93b;

  --text:          #e9e4d3;
  --text-dim:      #c8c2ae;
  --text-mute:     #9d967f;
  --text-faint:    #6f6957;
  --heading:       #f6f2e4;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-pop:  8px 8px 0 -1px rgba(0,0,0,0.45);
  --shadow-glow: 8px 8px 0 -1px var(--primary-glow);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .bg-field::after { opacity: 0.18; mix-blend-mode: screen; }
[data-theme="dark"] ::selection { background: var(--heading); color: var(--bg); }
[data-theme="dark"] .btn--primary:hover { background: var(--primary); border-color: var(--primary); color: #11101e; box-shadow: 5px 5px 0 -1px rgba(0,0,0,0.5); }
[data-theme="dark"] .btn--ghost:hover { box-shadow: 5px 5px 0 -1px rgba(0,0,0,0.4); }
[data-theme="dark"] .nav-links a:hover { background: rgba(243,238,222,0.06); }
[data-theme="dark"] .lang-menu a:hover { background: rgba(243,238,222,0.07); }
[data-theme="dark"] .check-list li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a2ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
[data-theme="dark"] .field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239d967f' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
[data-theme="dark"] .meter .bar { background: rgba(243,238,222,0.1); }
[data-theme="dark"] .faq-item:hover { background: rgba(243,238,222,0.03); }
[data-theme="dark"] .fill--blue { background: #22d3ee; }
[data-theme="dark"] .badge--amber { background: var(--warn); color: #2c2200; }
[data-theme="dark"] .badge--green { background: var(--success); color: #04251a; }
[data-theme="dark"] .badge--violet { background: var(--primary); color: #11101e; }
[data-theme="dark"] .promo-flag { color: #2c1000; }
[data-theme="dark"] .testi .stars { color: #e2b93b; }
[data-theme="dark"] .star-input input:checked ~ label,
[data-theme="dark"] .star-input label:hover,
[data-theme="dark"] .star-input label:hover ~ label { color: #e2b93b; }
[data-theme="dark"] .arch-node--api .icon-chip { color: var(--bg); }
[data-theme="dark"] .hero-slide::after {
  background: linear-gradient(180deg, rgba(8,7,3,0.12) 0%, rgba(8,7,3,0) 34%, rgba(8,7,3,0.55) 72%, rgba(8,7,3,0.9) 100%);
}
/* footer + newsletter stay ink in both themes; add separation line in dark */
[data-theme="dark"] .site-footer { border-top-color: var(--border-strong); }
[data-theme="dark"] .newsletter { border-color: var(--border-strong); }
