/* South — display šriftas vardui ir antraštėms. Failo nėra → krenta į Inter. */
@font-face {
  font-family: "South";
  src: url("../fonts/South.woff2") format("woff2"),
       url("../fonts/South.woff") format("woff"),
       url("../fonts/South.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* juozasrimkus.com — stiliai iš Figma (JuozasRimkus3D / WEBSITE_MASTER_EN) */

:root {
  --bg: #111110;
  --bg-2: #181817;
  --bg-nav: #131312;
  --line: #2d2d2a;
  --line-2: #3c3a37;
  --cream: #f2ede5;
  --cream-2: #e6dfd0;
  --line-cream: #c3b9a4;
  --muted: #9e9991;
  --muted-dark: #57503f;
  --soft: #c7c2ba;
  --soft-2: #d1ccc4;
  --ink: #111110;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Display šriftas vardui ir antraštėms — South (Eduard Chernov).
     Įdėk South.woff2 į fonts/ ir jis įsijungs automatiškai. */
  --font-display: "South", "Inter", system-ui, sans-serif;
  --nav-dim: #b8b0a3;
  --pad: clamp(24px, 6.25vw, 100px);
  --nav-h: 80px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
img, svg { display: block; }

/* ─────────────────────────── Nav ─────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 80px);
  border-bottom: 1px solid rgba(242,237,229,.06);
  background: rgba(12, 12, 12, .42);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background .5s ease, border-color .5s ease, box-shadow .5s ease, backdrop-filter .5s ease;
}
.nav.scrolled {
  background: rgba(19, 19, 18, .86);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav__brand { display: flex; flex-direction: column; gap: 2px; }
.nav__brand { flex-direction: row; align-items: center; gap: 14px; }
.nav__name {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 400; letter-spacing: 4.5px; text-transform: uppercase;
  color: #f0e8db; text-shadow: 0 1px 18px rgba(0,0,0,.7); line-height: 1;
}
.nav__brand::after {
  content: ""; order: 2; width: 1px; height: 18px; background: rgba(140,133,117,.3); flex: none;
}
.nav__tag { order: 3; }
.nav__tag { font-size: 11px; font-weight: 500; letter-spacing: 2.8px; text-transform: uppercase; color: #9e968a; line-height: 1; }
.nav__links {
  display: flex; gap: 40px; align-items: center;
  font-size: 13px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nav-dim); text-shadow: 0 1px 18px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.6);
}
.nav.scrolled .nav__links { text-shadow: none; font-weight: 400; }
.nav__links a { color: var(--nav-dim); transition: color .25s; }
.nav__links a:hover { color: #f0e8db; }
.nav__right { display: flex; align-items: center; gap: 40px; }
.nav__lang { font-size: 11px; letter-spacing: 1.5px; color: var(--muted); }
.nav__lang a { color: var(--muted); transition: color .25s; }
.nav__lang a:hover { color: var(--cream); }
.nav__lang b { color: var(--cream); font-weight: 500; }
.nav__lang b { font-weight: 400; color: var(--cream); }
.btn {
  display: inline-flex; align-items: center;
  padding: 9px 18px; border-radius: 5px;
  border: .5px solid var(--cream);
  font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 500; color: var(--cream);
  transition: background .3s, color .3s, border-color .3s;
}
.nav.scrolled .btn { background: var(--cream); color: var(--bg-nav); font-weight: 500; border-color: var(--cream); }
.btn:hover { background: var(--cream); color: var(--bg-nav); }

.nav__burger { display: none; }

@media (max-width: 960px) {
  .nav__links, .nav__lang { display: none; }
  .nav { height: 56px; }
  :root { --nav-h: 56px; }
}

/* ─────────────────────────── Hero ─────────────────────────── */
#track { position: relative; height: 100vh; }
#stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #0a0a0b; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#net { position: absolute; opacity: 0; pointer-events: none; z-index: 2; }
#net spline-viewer { width: 100%; height: 100%; display: block; background: transparent; }
#netstatus { position: absolute; right: 14px; top: 70px; z-index: 5; font: 12px/1.4 ui-monospace, monospace;
  color: rgba(241,238,232,.55); background: rgba(0,0,0,.45); padding: 6px 9px; border-radius: 4px; white-space: pre; }
#netstatus:empty { display: none; }

.hero-shade { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; }
.hero-shade--left { opacity: 1;
  background:
    linear-gradient(to bottom, rgba(10,10,10,0) 67%, rgba(10,10,10,.4) 100%),
    linear-gradient(to right, rgba(10,10,10,.72) 0%, rgba(10,10,10,.45) 45%, rgba(10,10,10,.08) 85%, rgba(10,10,10,0) 100%);
}
.hero-shade--right {
  background:
    linear-gradient(to bottom, rgba(10,10,10,0) 67%, rgba(10,10,10,.4) 100%),
    linear-gradient(to right, rgba(10,10,10,0) 0%, rgba(10,10,10,.08) 15%, rgba(10,10,10,.45) 55%, rgba(10,10,10,.72) 100%);
}
.hero-shade--top { opacity: 1; height: 170px; inset: 0 0 auto 0;
  background: linear-gradient(to bottom, rgba(8,8,8,.35) 0%, rgba(8,8,8,.15) 50%, rgba(8,8,8,0) 100%); }
.hero-shade--bottom {
  background:
    linear-gradient(to bottom, rgba(10,10,10,.1) 0%, rgba(10,10,10,.25) 35%, rgba(10,10,10,.65) 70%, rgba(10,10,10,.78) 100%);
}

/* Skyriai — vieta pagal Figma: 1–2 kairėje, 3 dešinėje, 4–5 centre; apatinis trečdalis */
.chapter::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -190px -420px -170px -260px;
  opacity: var(--bg-o, 0);
  /* tik ovalūs gradientai — jokių tiesių briaunų */
  background:
    radial-gradient(62% 78% at 30% 58%, rgba(8,8,8,.60) 0%, rgba(8,8,8,.44) 38%, rgba(8,8,8,.18) 68%, rgba(8,8,8,0) 100%),
    radial-gradient(95% 62% at 22% 78%, rgba(8,8,8,.34) 0%, rgba(8,8,8,.16) 55%, rgba(8,8,8,0) 100%);
}
.chapter { text-shadow: 0 2px 40px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.5); }
.chapter {
  position: absolute; z-index: 4;
  bottom: clamp(56px, 12vh, 110px);
  transform: translateY(var(--dy, 0px));
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  pointer-events: none;
}
.chapter--left   { left: clamp(24px, 5vw, 80px); }
.chapter--right  { left: 60%; }
.chapter--center { left: 31%; }
.hero__eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 1.32px; color: var(--muted); line-height: 14px; }
.chapter__title {
  font-size: clamp(32px, 3.5vw, 56px); font-weight: 300; letter-spacing: -1.5px;
  line-height: 1.1; color: var(--cream); margin: 0;
}
.chapter__title--xl { font-size: clamp(36px, 4vw, 64px); }
.chapter__title--md { font-size: clamp(30px, 3.25vw, 52px); }
.chapter__text { font-size: 16px; line-height: 26px; color: #c7c3bd; }
.hero__cta { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.btn--hero { padding: 14px 28px; border: .75px solid rgba(242,237,229,.7); font-size: 14px; border-radius: 5px; }
.link-arrow { display: inline-flex; gap: 8px; font-size: 14px; color: var(--muted); padding: 13px 0; transition: color .2s; }
.link-arrow:hover { color: var(--cream); }

#hero-counter {
  position: absolute; z-index: 4; right: clamp(20px, 5vw, 80px); top: calc(var(--nav-h) + 20px);
  font-size: 11px; letter-spacing: .66px; color: rgba(158,153,145,.5);
}

@media (max-width: 1100px) {
  .chapter--right, .chapter--center { left: clamp(24px, 5vw, 80px); }
}
@media (max-width: 700px) {
  .chapter { bottom: 64px; right: 24px; gap: 14px; }
  .chapter__text br { display: none; }
  .chapter__title br { display: none; }
}

/* Bėgis dešinėje: linija pildosi su scroll'u, aktyvus skyrius šviečia */
.rail {
  position: absolute; z-index: 4; right: clamp(20px, 5vw, 80px); top: calc(var(--nav-h) + 28px);
  display: flex; flex-direction: column; gap: 18px; padding-left: 18px;
}
.rail__line { position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: rgba(242,237,229,.14); }
.rail__fill { width: 100%; height: 100%; background: rgba(242,237,229,.7); transform-origin: top; transform: scaleY(0); }
.rail__step { display: flex; gap: 10px; align-items: baseline; font-size: 11px; letter-spacing: .5px; color: rgba(158,153,145,.45); transition: color .4s; cursor: pointer; }
.rail__step b { font-weight: 400; width: 16px; }
.rail__step span { opacity: 0; transform: translateX(-6px); transition: opacity .4s, transform .4s; }
.rail__step.on { color: var(--cream); }
.rail__step.on span, .rail:hover .rail__step span { opacity: 1; transform: none; }
@media (max-width: 960px) { .rail__step span { display: none; } .rail { gap: 16px; } }

/* Eyebrow su brūkšneliu, kuris nusibrėžia */
.hero__eyebrow { display: flex; align-items: center; gap: 12px; }
.hero__eyebrow i { display: block; width: 28px; height: 1px; background: var(--muted); transform-origin: left; transform: scaleX(var(--ln, 0)); }

/* Kiekvienas skyriaus elementas turi savo laiką ir kryptį */
.chapter > * { opacity: var(--o, 0); transform: translateY(var(--y, 0px)); will-change: opacity, transform; }

/* Pabaiga: scena nusileidžia į 01 sekcijos foną, ne kertasi */
.hero-end { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(17,17,16,0), var(--bg)); }

/* Replay — švytintis žiedas, pasirodo pabaigoje */
.replay {
  position: absolute; z-index: 6; right: clamp(20px, 5vw, 80px); bottom: clamp(28px, 6vh, 56px);
  display: flex; align-items: center; gap: 14px;
  background: rgba(10,10,10,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(242,237,229,.12); border-radius: 999px; padding: 6px 18px 6px 6px;
  cursor: pointer; color: var(--cream);
  opacity: 0; pointer-events: none; transition: opacity .6s ease;
}
.replay.on { opacity: 1; pointer-events: auto; }
.replay svg { position: absolute; left: 21px; }
.replay__ring {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(242,237,229,.55); flex: none;
  box-shadow: 0 0 0 0 rgba(242,237,229,.35), 0 0 24px rgba(255,240,214,.18);
  animation: ringpulse 2.6s ease-out infinite;
  transition: border-color .3s, box-shadow .3s;
}
.replay:hover .replay__ring { border-color: var(--cream); box-shadow: 0 0 0 6px rgba(242,237,229,.12), 0 0 32px rgba(255,240,214,.35); }
.replay__label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(242,237,229,.7); }
@keyframes ringpulse {
  0%   { box-shadow: 0 0 0 0 rgba(242,237,229,.35), 0 0 24px rgba(255,240,214,.18); }
  70%  { box-shadow: 0 0 0 14px rgba(242,237,229,0), 0 0 24px rgba(255,240,214,.18); }
  100% { box-shadow: 0 0 0 14px rgba(242,237,229,0), 0 0 24px rgba(255,240,214,.18); }
}
@media (prefers-reduced-motion: reduce) { .replay__ring { animation: none; } }

.hero-sep {
  position: absolute; z-index: 4; left: clamp(24px, 5vw, 80px); right: clamp(24px, 5vw, 80px); bottom: 0;
  height: 1px; background: rgba(158,153,145,.18);
}
#hero-progress { height: 100%; width: 100%; background: rgba(242,237,229,.55); transform-origin: left; transform: scaleX(0); }

#boot {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center;
  background: #0a0a0b; color: rgba(241,238,232,.4);
  font-size: 12px; letter-spacing: .1em; transition: opacity .8s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
#hint {
  position: absolute; left: 50%; bottom: 14px; z-index: 4; transform: translateX(-50%);
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, rgba(241,238,232,.5));
  transition: opacity .5s ease;
}
#hint.gone { opacity: 0; }

@media (max-width: 700px) {
  #track { height: 100vh; }
}

/* ─────────────────────────── Sections ─────────────────────────── */
.section { padding: clamp(80px, 8.75vw, 140px) var(--pad); }
.section--dark { background: var(--bg); color: var(--cream); }
.section--cream { background: var(--cream); color: var(--ink); }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.section--cream .eyebrow { color: var(--muted-dark); }

.h2 {
  font-size: clamp(32px, 3vw, 48px); font-weight: 300; letter-spacing: -1.5px; line-height: 1.17;
  color: var(--cream); max-width: 700px; margin: 0;
}
.section--cream .h2 { color: var(--ink); }
.h2--xl { font-size: clamp(38px, 3.5vw, 56px); letter-spacing: -2px; line-height: 1.1; }

.lead { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 540px; }
.section--cream .lead { color: var(--muted-dark); }

.rule { height: 1px; background: var(--line); width: 100%; }
.section--cream .rule { background: var(--line-cream); }

.head { display: flex; flex-direction: column; gap: 24px; }
.head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.head__aside { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.head__aside p { font-size: 14px; line-height: 22px; color: var(--muted); text-align: right; }
.head__aside .rule { width: 240px; }

/* Reveal on scroll — lengvas judesys, be scroll-jacking */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* 01 — See how I think */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 80px; }
.case { display: flex; flex-direction: column; gap: 24px; }
.case__panel {
  height: 260px; padding: 16px; border: 1px solid var(--line); border-radius: 1px;
  background:
    linear-gradient(90deg, rgba(17,17,16,.15), rgba(17,17,16,.15)),
    linear-gradient(126deg, #1f1f1c 0%, #292926 50%, #1a1a17 100%);
  transition: transform .5s ease, border-color .5s ease;
}
.case:hover .case__panel { transform: translateY(-4px); border-color: var(--line-2); }
.case__tag { display: inline-block; background: var(--bg); opacity: .85; padding: 4px 10px; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--cream); }
.case__meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.case__meta span:first-child { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; }
.case__meta span:last-child { font-size: 14px; font-weight: 300; }
.case__body { display: flex; flex-direction: column; gap: 16px; }
.case__title { font-size: 22px; font-weight: 300; line-height: 30px; color: var(--cream); }
.case__text { font-size: 14px; line-height: 22px; color: var(--muted); }
.case__link { display: inline-flex; gap: 8px; align-items: center; padding: 12px 0; font-size: 13px; color: var(--cream); }
.case__link b { font-weight: 500; letter-spacing: .5px; }
.section__note { margin-top: 80px; font-size: 16px; line-height: 26px; color: #c7c3bd; max-width: 540px; }

@media (max-width: 960px) { .cases { grid-template-columns: 1fr; gap: 48px; margin-top: 56px; } }

/* 02 — Thesis */
.thesis { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 640px); justify-content: space-between; gap: 60px; }
.thesis__copy { display: flex; flex-direction: column; gap: 48px; }
.thesis__list { display: flex; flex-direction: column; gap: 24px; }
.thesis__list li { list-style: none; display: flex; gap: 16px; align-items: center; font-size: 20px; font-weight: 300; line-height: 28px; color: var(--ink); }
.thesis__list li::before { content: ""; width: 6px; height: 6px; background: var(--line-cream); flex: none; }
.thesis__list { padding: 0; margin: 0; }
.thesis__after { font-size: 18px; line-height: 28px; color: var(--muted-dark); }

.fig {
  background: var(--cream-2); border: 1px solid var(--line-cream); border-radius: 2px;
  padding: 40px; display: flex; flex-direction: column; justify-content: space-between; min-height: 600px;
}
.fig__head { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-dark); }
.fig__head b { font-weight: 600; letter-spacing: 2px; }
.fig__foot { display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--muted-dark); }
.fig__foot::before { content: ""; width: 8px; height: 8px; background: var(--line-cream); }
.fig svg { width: 100%; height: auto; }
.fig .node rect { fill: var(--ink); stroke: var(--cream); }
.fig .node text { fill: var(--cream); font: 600 12px/1 var(--font); letter-spacing: 1px; }
.fig .node--light rect { fill: var(--cream); stroke: var(--ink); }
.fig .node--light text { fill: var(--ink); font-weight: 500; font-size: 10px; letter-spacing: 0; }
.fig .node--sys rect { stroke: var(--line-cream); stroke-width: 1.5; }
.fig .node--sys text { fill: #1e1d1b; font-weight: 600; }
.fig .edge { stroke: var(--ink); stroke-width: 1; fill: none; }
.fig .edge--soft { stroke: var(--line-cream); }
/* line-draw animacija */
.fig .edge { stroke-dasharray: 400; stroke-dashoffset: 400; }
.fig .node { opacity: 0; transform: translateY(6px); }
.in .fig .edge { animation: draw 1.1s ease forwards; }
.in .fig .node { animation: pop .6s ease forwards; }
.in .fig .edge:nth-of-type(2) { animation-delay: .15s } .in .fig .edge:nth-of-type(3) { animation-delay: .3s }
.in .fig .edge:nth-of-type(4) { animation-delay: .45s } .in .fig .edge:nth-of-type(5) { animation-delay: .6s }
.in .fig .edge:nth-of-type(6) { animation-delay: .75s }
.in .fig .node:nth-of-type(1) { animation-delay: .1s } .in .fig .node:nth-of-type(2) { animation-delay: .3s }
.in .fig .node:nth-of-type(3) { animation-delay: .5s } .in .fig .node:nth-of-type(4) { animation-delay: .7s }
.in .fig .node:nth-of-type(5) { animation-delay: .9s } .in .fig .node:nth-of-type(6) { animation-delay: 1s }
.in .fig .node:nth-of-type(7) { animation-delay: 1.1s } .in .fig .node:nth-of-type(8) { animation-delay: 1.2s }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fig .edge { stroke-dashoffset: 0; } .fig .node { opacity: 1; transform: none; } }

@media (max-width: 1100px) { .thesis { grid-template-columns: 1fr; } .fig { min-height: 0; } }

/* 03 — What I analyse */
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; margin-top: 100px; }
.layer { display: flex; flex-direction: column; gap: 32px; }
.layer__head { display: flex; flex-direction: column; gap: 16px; }
.layer__id { font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--muted); }
.layer__title { font-size: clamp(24px, 2vw, 32px); font-weight: 300; color: var(--cream); line-height: 1.2; }
.layer__card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 1px;
  height: 220px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between;
}
.layer__card svg { width: 100%; height: 130px; }
.layer__card .l { stroke: var(--line-2); stroke-width: 1; fill: none; }
.layer__card .l--strong { stroke: var(--muted); }
.layer__card .lbl { fill: var(--cream); font: 400 10px/1 var(--font); }
.layer__card .lbl--muted { fill: var(--muted); }
.layer__card .dot { fill: var(--muted-dark); }
.layer__card .l { stroke-dasharray: 340; stroke-dashoffset: 340; }
.in .layer__card .l { animation: draw 1s ease forwards; }
.layer__cap { font-size: 11px; color: var(--muted); }
.layer__text { font-size: 15px; line-height: 24px; color: var(--muted); }
.evidence { display: flex; flex-direction: column; gap: 12px; }
.evidence b { font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--cream); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid var(--line); padding: 6px 10px; font-size: 12px; color: var(--muted); }

@media (max-width: 1100px) { .layers { grid-template-columns: 1fr; gap: 56px; margin-top: 64px; } }


.footer__lang a { color: var(--muted); }
.footer__lang a:hover { color: var(--cream); }


/* ═══════════ Navigacijos juosta: niekada nesilaužo į dvi eilutes ═══════════ */
.nav { gap: clamp(16px, 2vw, 40px); flex-wrap: nowrap; }
.nav__brand { flex: 0 0 auto; min-width: 0; }
.nav__name, .nav__tag { white-space: nowrap; }
.nav__links {
  flex: 0 1 auto; min-width: 0;
  gap: clamp(16px, 2.2vw, 40px);
  white-space: nowrap;
}
.nav__links a { white-space: nowrap; }
.nav__right { flex: 0 0 auto; gap: clamp(12px, 1.6vw, 32px); white-space: nowrap; }
.nav .btn { white-space: nowrap; }

/* Siauriau — pirmiausia dingsta antraeiliai elementai, ne meniu */
@media (max-width: 1400px) {
  .nav__tag { font-size: 10px; letter-spacing: 2.2px; }
  .nav__brand { gap: 11px; }
}
@media (max-width: 1150px) {
  .nav__brand::after, .nav__tag { display: none; }
}
@media (max-width: 1240px) {
  .nav__links { font-size: 12px; letter-spacing: 1.1px; }
  .nav .btn { font-size: 9px; letter-spacing: 1.2px; padding: 8px 14px; }
}
@media (max-width: 1080px) {
  .nav__lang { display: none; }
}

/* Vokiški žodžiai ilgesni — pradedam traukti anksčiau */
html[lang="de"] .nav__links { gap: clamp(14px, 1.8vw, 32px); }
html[lang="de"] .nav__tag { font-size: 10px; letter-spacing: 2.2px; }
@media (max-width: 1500px) {
  html[lang="de"] .nav__links { font-size: 12px; letter-spacing: 1.1px; }
  html[lang="de"] .nav .btn { font-size: 9px; letter-spacing: 1.2px; padding: 8px 14px; }
}
@media (max-width: 1180px) {
  html[lang="de"] .nav__lang { display: none; }
}

/* ═══════════ MOBILUS ═══════════ */
.nav__burger { display: none; }

@media (max-width: 860px) {
  :root { --nav-h: 64px; --pad: 22px; }

  /* meniu: vardas kairėje, burgeris dešinėje, likusieji į panelę */
  .nav { padding: 0 22px; }
  .nav__brand::after, .nav__tag { display: none; }
  .nav__name { font-size: 17px; letter-spacing: 3.5px; }
  .nav__burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 40px; height: 40px; background: none; border: 0; cursor: pointer; padding: 8px;
    margin-left: auto; order: 3;
  }
  .nav__burger span { display: block; height: 1px; background: var(--cream); transition: transform .3s, opacity .3s; }
  .nav.open .nav__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.open .nav__burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav__links, .nav__right {
    position: fixed; left: 0; right: 0; z-index: 49;
    background: rgba(12,12,12,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    display: none; flex-direction: column; align-items: flex-start;
  }
  .nav__links { top: var(--nav-h); padding: 28px 22px 8px; gap: 22px; font-size: 15px; letter-spacing: 1.4px; }
  .nav__right { top: auto; padding: 8px 22px 28px; gap: 18px; border-bottom: 1px solid var(--line); }
  .nav.open .nav__links, .nav.open .nav__right { display: flex; }
  .nav.open .nav__right { top: calc(var(--nav-h) + 200px); }
  .nav__lang { display: block !important; }
  .nav .btn { display: inline-flex; font-size: 11px; letter-spacing: 1.6px; padding: 12px 18px; }

  /* hero */
  .rail { display: none; }
  .chapter { left: 22px; right: 22px; bottom: 72px; width: auto; max-width: none; }
  .chapter__title { font-size: 30px; letter-spacing: -1px; }
  .chapter__title--xl { font-size: 32px; }
  .chapter__text { font-size: 15px; line-height: 23px; }
  .hero__cta { gap: 16px; }
  .replay { right: 22px; bottom: 20px; }
  .replay__label { display: none; }
  .replay { padding: 6px; }
  .hero-sep { left: 22px; right: 22px; }

  /* sekcijos */
  .section { padding: 72px var(--pad); }
  .section::after, .section::before { display: none; }
  .section .head::before { display: none; }
  .head__row { flex-direction: column; gap: 20px; }
  .head__lead { max-width: none; }
  .h2 { font-size: 30px; letter-spacing: -1px; }
  .h2--44, .h2--xl { font-size: 28px; }
  .eyebrow { font-size: 11px; letter-spacing: 2px; }

  .cases, .doors, .offers, .layers, .grades, .verdicts__grid, .thesis, .rnd, .about { grid-template-columns: 1fr; gap: 40px; margin-top: 48px; }
  .case__panel, .case__panel--lib { height: auto; aspect-ratio: 800 / 520; }
  .case__panel--lib { aspect-ratio: 800 / 640; }
  .door { min-height: 0; padding: 28px; }
  .offer { padding: 28px; }
  .offer__title { font-size: 24px; line-height: 30px; }
  .offer__price b { font-size: 28px; }
  .layer__card { padding: 0; }
  .rnd__stats { flex-wrap: wrap; gap: 20px; }
  .rnd__stats i { display: none; }
  .mono__head, .fig__head { padding: 20px 20px 0; }
  .mono__foot { padding: 0 20px 20px; }
  .about__img { height: auto; aspect-ratio: 5 / 6; max-width: 100%; }
  .about__meta { flex-direction: column; align-items: flex-start; gap: 24px; }
  .evidence-foot { flex-direction: column; align-items: flex-start; }
  .evidence-foot p { font-size: 20px; }
  .filters { gap: 12px; }
  .chip { padding: 6px 12px; font-size: 12px; }

  .final__title { font-size: 32px; letter-spacing: -1px; }
  .final__btns { flex-direction: column; width: 100%; }
  .final__btns .btn { justify-content: center; }
  .footer { padding: 64px var(--pad) 40px; gap: 48px; }
  .footer__row, .footer__cols { flex-direction: column; gap: 32px; }
  .footer__col--contact { width: auto; }
  .footer__legal { flex-direction: column; gap: 14px; }

  /* subgrid ant vienos kolonos nebereikalingas */
  .case, .layer, .door, .offer, .grade, .verdict { display: flex; flex-direction: column; gap: 0; }
}

@media (max-width: 420px) {
  .chapter__title, .chapter__title--xl { font-size: 27px; }
  .nav__name { font-size: 17px; letter-spacing: 2.8px; }
}
