/* ==========================================================================
   UAB „TS Projects“ – pradinio puslapio maketas
   Firminė spalva išmatuota iš logotipo pikselių: #012A84 (12,61:1 ant balto)
   ========================================================================== */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-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;
}

:root {
  --brand: #012A84;        /* 12,61:1 ant balto */
  --brand-deep: #011C59;   /* užvedus – 16,00:1 ant balto */
  --brand-mid: #4361A4;    /* 6,00:1 ant balto, 5,49:1 ant --surface */
  --hero-eyebrow: #C7D0E4; /* ant hero tamsinimo – 4,73:1 net ant balto dangaus */

  --bg: #ffffff;
  --surface: #f2f5fa;
  --surface-2: #e5ebf4;
  --line: #d9e0ea;

  --ink: #0f1826;
  --ink-2: #32405a;
  --ink-dim: #566276;

  --dark: #0c1322;
  --dark-2: #141f35;
  --on-dark: #ffffff;
  --on-dark-dim: #bcc8dd;

  --wrap: 1240px;
  --gut: 28px;
  --hdr-h: 84px;
  /* Kampuotas stilius – jokių apvalinimų */
  --r: 0px;
  --r-lg: 0px;
  --shadow: 0 1px 2px rgba(15, 24, 38, .06), 0 10px 30px rgba(15, 24, 38, .07);
  --shadow-lg: 0 2px 6px rgba(15, 24, 38, .07), 0 24px 60px rgba(15, 24, 38, .14);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute; left: 16px; top: -200px; z-index: 200;
  background: var(--brand); color: #fff; padding: 14px 20px;
  border-radius: 0; font-weight: 700; text-decoration: none;
  transition: top .18s ease;
}
.skip:focus-visible { top: 0; }

/* ---------- bendri komponentai ---------- */

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}

.sec-head { max-width: 760px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(30px, 3vw, 40px); }
.sec-head-row {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.sec-nav { display: flex; align-items: center; gap: 22px; flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  background: var(--brand); color: #fff;
  border: 2px solid var(--brand); border-radius: 0;
  font: inherit; font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); transform: translateY(-1px); }
.btn .ar { transition: transform .18s ease; }
.btn:hover .ar { transform: translateX(3px); }
/* Permatomas mygtukas ant nuotraukos turi savo tamsų pagrindą – be jo baltas
   užrašas ant šviesesnės kadro vietos nebeįskaitomas */
.btn-ghost { background: rgba(6, 15, 23, .55); border-color: rgba(255, 255, 255, .8); color: #fff; }
.btn-ghost:hover { background: rgba(6, 15, 23, .75); border-color: #fff; transform: translateY(-1px); }

.lnk {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px;
  color: var(--brand); font-weight: 700; text-decoration: none;
}
.lnk:hover { text-decoration: underline; }
.lnk .ar { transition: transform .18s ease; }
.lnk:hover .ar { transform: translateX(3px); }

/* ---------- antraštė ---------- */

.hdr {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.hdr.is-scrolled { box-shadow: 0 6px 24px rgba(15, 24, 38, .09); }
/* Slenkant antraštė šiek tiek susitraukia – daugiau vietos turiniui */
.hdr-in, .hdr-logo img { transition: min-height .28s ease, height .28s ease; }
.hdr.is-scrolled .hdr-in { min-height: 70px; }
.hdr.is-scrolled .hdr-logo img { height: 46px; }

/* Trys stulpeliai 1fr / auto / 1fr: meniu centruojamas pagal visą antraštę,
   o ne pagal likusią vietą – todėl logotipo ir mygtukų plotis nesvarbus */
.hdr-in {
  min-height: var(--hdr-h);
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px;
}
.hdr-logo { display: block; justify-self: start; line-height: 0; }
/* Logotipą dydiname per aukštį – plotį apskaičiuoja naršyklė pagal proporcijas */
.hdr-logo img { height: 56px; width: auto; }

.nav { justify-self: center; }
.nav-l {
  display: flex; align-items: center; gap: 4px;
  margin: 0; padding: 0; list-style: none;
}
.nav-l > li { position: relative; }
.nav-l > li > a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px;
  color: var(--ink); font-size: 15.5px; font-weight: 700; text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
  transition: color .16s ease, background .16s ease;
}
.nav-l > li > a:hover { color: var(--brand); background: var(--surface); }
.caret { flex: 0 0 auto; opacity: .55; transition: transform .18s ease; }
.has-sub:hover > a > .caret { transform: rotate(180deg); }

.sub {
  position: absolute; top: 100%; left: 0;
  min-width: 268px; margin: 0; padding: 8px;
  list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.has-sub:hover > .sub,
.has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.sub a {
  display: flex; align-items: center; min-height: 44px; padding: 6px 14px;
  color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: none;
  border-radius: 0; line-height: 1.35;
}
.sub a:hover { background: var(--surface); color: var(--brand); }

.hdr-act { display: flex; align-items: center; gap: 10px; justify-self: end; }
/* Poskyrių mygtukas reikalingas tik siaurame ekrane – kompiuteryje pomeniu
   atsidaro užvedus pelę, o rodyklė rodoma pačioje nuorodoje */
.sub-toggle { display: none; }

/* Kontaktai antraštėje – tik ikonos, kad neužgožtų meniu.
   Taikinys 46x46 px, pavadinimas skaitytuvams per aria-label. */
.ico-btn {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); background: #fff;
  border: 1.5px solid var(--line);
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.ico-btn:hover { background: var(--surface); border-color: var(--brand); }
.ico-btn-fill { background: var(--brand); border-color: var(--brand); color: #fff; }
.ico-btn-fill:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - var(--hdr-h)));
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--dark);
}
.hero-bg { position: absolute; inset: 0; }
.hero-img {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-img.is-on { opacity: 1; }
.hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}
.hero-img.is-on img { animation: kb 13s ease-out forwards; }
@keyframes kb {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(-1.2%, -1%, 0); }
}
/* Tamsinimas laikomas ties mažiausiu, kuris dar išlaiko tekstą įskaitomą:
   blogiausiu atveju (visiškai baltas dangus po tekstu) eyebrow duoda 4,74:1,
   įvadas 6,17:1, antraštė 7,32:1. Tamsi juosta tęsiasi iki 58 % pločio, nes
   įvado tekstas baigiasi ties ~54 %; toliau nuotrauka atsiveria beveik laisvai. */
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(6, 15, 23, .74) 0%, rgba(6, 15, 23, .70) 58%, rgba(6, 15, 23, .34) 76%, rgba(6, 15, 23, .06) 100%),
    linear-gradient(to top, rgba(6, 15, 23, .30) 0%, rgba(6, 15, 23, 0) 42%);
}

.hero-in { position: relative; z-index: 2; padding-block: 108px 118px; }
.hero-eyebrow {
  margin: 0 0 20px;
  color: var(--hero-eyebrow);
  font-size: 13.5px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
}
.hero-h1 {
  max-width: 17ch;
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(40px, 4.6vw, 62px);
  line-height: 1.08;
}
.hero-lead {
  max-width: 60ch;
  margin: 0 0 36px;
  color: #e3edf5;
  font-size: 18.5px; line-height: 1.6;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-dots {
  position: absolute; z-index: 2; left: 50%; bottom: 34px;
  transform: translateX(-50%);
  width: 100%; max-width: var(--wrap);
  padding-inline: var(--gut);
  display: flex; gap: 10px;
}
.hero-dot {
  width: 46px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  display: flex; align-items: center;
}
.hero-dot::before {
  content: ''; display: block;
  width: 46px; height: 3px; border-radius: 0;
  background: rgba(255, 255, 255, .38);
  transition: background .25s ease;
}
.hero-dot.is-on::before { background: #fff; }
.hero-dot:hover::before { background: rgba(255, 255, 255, .72); }

/* ---------- apie įstaigą ---------- */

.apie { padding-block: 104px; }
.apie-grid {
  display: grid; grid-template-columns: 1fr 520px; gap: 72px; align-items: stretch;
}
.apie-txt h2 { font-size: clamp(30px, 3vw, 40px); margin-bottom: 22px; }
.apie-txt p { color: var(--ink-2); }

.fakt { margin: 32px 0 30px; padding: 0; list-style: none; display: grid; gap: 16px; }
.fakt li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.fakt svg { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 1px; color: var(--brand); }
.fakt strong { color: var(--ink); font-weight: 800; }

/* Nuotrauka tempiasi per visą kairės skilties aukštį – po ja lieka tik parašas */
.apie-foto { margin: 0; display: flex; flex-direction: column; }
.apie-foto picture {
  display: block; flex: 1 1 auto; min-height: 320px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.apie-foto img { width: 100%; height: 100%; object-fit: cover; }
.apie-foto figcaption {
  margin-top: 14px;
  color: var(--ink-dim); font-size: 14px; line-height: 1.45;
}

/* ---------- paslaugos ---------- */

.pasl { padding-block: 104px; background: var(--surface); border-block: 1px solid var(--line); }
.pasl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.pasl-c {
  position: relative;
  display: flex; flex-direction: column;
  padding: 36px 32px 34px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pasl-c:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c7d6e4; }
.pasl-n {
  display: block; margin-bottom: 18px;
  color: var(--brand-mid); font-size: 15px; font-weight: 800; letter-spacing: .08em;
}
.pasl-c h3 { font-size: 22px; line-height: 1.25; margin-bottom: 18px; }
.pasl-c h3 a { color: var(--ink); text-decoration: none; }
.pasl-c h3 a:hover { color: var(--brand); }
.pasl-c ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.pasl-c ul li {
  position: relative; padding-left: 26px;
  color: var(--ink-2); font-size: 15.5px; line-height: 1.5;
}
.pasl-c ul li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px;
  background: var(--brand-mid);
}
.pasl-misija { color: var(--ink-2); font-size: 15.5px; }

/* ---------- naujausi projektai ---------- */

.proj { padding-block: 104px; }

/* Projektų kategorijos – tiesiai iš svetainės „Projektai“ meniu.
   Vientisa juosta per visą plotį: lygios dalys, plonos skiriamosios linijos. */
.kat {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin: 0 0 48px; padding: 0; list-style: none;
  border-block: 1px solid var(--line);
}
.kat li { display: flex; }
.kat a {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 78px; padding: 16px 18px;
  border-left: 1px solid var(--line);
  color: var(--ink-2); font-size: 14.5px; font-weight: 700; line-height: 1.35;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.kat li:first-child a { border-left: 0; }
.kat a:hover { background: var(--brand); color: #fff; }

.p-kat {
  display: block; margin-bottom: 9px;
  color: var(--brand-mid); font-size: 12.5px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
}
.proj-sw, .nauj-sw { overflow: hidden; padding-bottom: 54px; }
.proj-sw .swiper-slide, .nauj-sw .swiper-slide { height: auto; }

.sw-btns { display: flex; gap: 10px; }
.sw-btn {
  width: 50px; height: 50px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--brand);
  border: 1px solid var(--line); border-radius: 0;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.sw-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.sw-btn.swiper-button-disabled { opacity: .35; cursor: default; }
.sw-btn.swiper-button-disabled:hover { background: #fff; color: var(--brand); border-color: var(--line); }

.p-card {
  height: 100%;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.p-media { display: block; background: var(--surface-2); overflow: hidden; }
.p-media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform .5s ease;
}
.p-card:hover .p-media img { transform: scale(1.04); }
.p-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1 1 auto; }
.p-body h3 { font-size: 21px; margin-bottom: 16px; }
.p-body h3 a { color: var(--ink); text-decoration: none; }
.p-body h3 a:hover { color: var(--brand); }
.p-meta { margin: auto 0 0; padding: 0; list-style: none; display: grid; gap: 0; }
.p-meta li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.p-meta span { color: var(--ink-dim); font-size: 14.5px; }
.p-meta b { color: var(--ink); font-size: 15.5px; font-weight: 800; white-space: nowrap; }

/* ---------- naujienos ---------- */

.nauj { padding-block: 104px; background: var(--surface); border-top: 1px solid var(--line); }

.n-card {
  height: 100%;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.n-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.n-media { display: block; background: #fff; overflow: hidden; }
.n-media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform .5s ease;
}
.n-card:hover .n-media img { transform: scale(1.04); }
.n-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1 1 auto; }
.n-body time {
  display: block; margin-bottom: 11px;
  color: var(--brand); font-size: 13.5px; font-weight: 800; letter-spacing: .07em;
}
.n-body h3 { font-size: 19.5px; line-height: 1.3; margin-bottom: 12px; }
.n-body h3 a { color: var(--ink); text-decoration: none; }
.n-body h3 a:hover { color: var(--brand); }
.n-body p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; margin-bottom: 20px; }
.n-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto;
  color: var(--brand); font-weight: 700; font-size: 15px;
}
.n-card:hover .n-more .ar { transform: translateX(3px); }
.n-more .ar { transition: transform .18s ease; }

/* Swiper puslapiavimas */
.swiper-pagination { bottom: 0 !important; }
.swiper-pagination-bullet {
  width: 22px; height: 4px;
  border-radius: 0;
  background: var(--ink-dim); opacity: .28;
  transition: opacity .2s ease, background .2s ease;
}
.swiper-pagination-bullet-active { background: var(--brand); opacity: 1; }

/* mygtukas po sąrašu */
.sec-more {
  display: flex; justify-content: center;
  margin-top: 40px;
}

/* ---------- poraštė ---------- */

.ft { background: var(--dark); color: var(--on-dark-dim); padding-block: 80px 0; }
.ft h2 {
  margin: 0 0 18px;
  color: #fff; font-size: 15px; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
}
.ft a { color: var(--on-dark-dim); text-decoration: none; }
.ft a:hover { color: #fff; text-decoration: underline; }

.ft-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr .9fr; gap: 56px;
  padding-bottom: 44px;
}
/* Originalus logotipas dedamas ant šviesaus rėmelio – ant tamsaus fono jo juodas
   rėmelis ir tamsiai mėlynas kvadratas kitaip beveik nesimato (1,06:1 ir 1,47:1) */
.ft-brand img {
  height: 92px; width: auto;
  display: block;
  background: #fff;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.ft-brand p { color: var(--on-dark-dim); font-size: 15.5px; line-height: 1.6; max-width: 34ch; }

.ft-col address { font-style: normal; font-size: 15.5px; line-height: 2.05; }
/* Inline elemento aukščio line-height nekeičia – tel./el. pašto nuorodoms reikia
   inline-block su vidiniu tarpu, kad taikinys pasiektų WCAG 2.2 AA 24 px */
.ft-col address a { display: inline-block; padding-block: 4px; }
.ft-hrs { margin: 16px 0 0; color: #8fa9bf; font-size: 14.5px; }

/* Nuorodų aukštis 32 px: sąrašas neišsitempia, o taikinys lieka virš WCAG 2.2 AA
   reikalaujamų 24 px */
.ft-nav { margin: 0; padding: 0; list-style: none; }
.ft-nav a { display: inline-flex; align-items: center; min-height: 32px; font-size: 15.5px; }

/* Partneriai – apatinėje eilutėje, prispausti prie dešinės */
.ft-partners { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.ft-partners h2 { margin: 0; flex: 0 0 auto; white-space: nowrap; color: #8fa9bf; font-size: 13px; }
.ft-partners ul {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0; padding: 0; list-style: none;
}
.ft-partners a {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 5px 9px;
  background: rgba(255, 255, 255, .9); line-height: 0;
  opacity: .72; transition: opacity .18s ease, background .18s ease;
}
.ft-partners a:hover { opacity: 1; background: #fff; }
.ft-partners img { width: 78px; height: 30px; object-fit: contain; }

.ft-bot {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding-block: 20px 26px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 14.5px;
}
.ft-bot p { margin: 0; color: #8fa9bf; flex: 0 0 auto; }

/* ---------- pasirodymo animacijos ----------
   Santūru: trumpas kilimas ir išryškėjimas, be šuolių ir atšokimų.
   Judesys nedidelis (18 px), kad puslapis neatrodytų neramus. */

.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .65s ease, transform .65s cubic-bezier(.22, .68, .3, 1);
}

/* Elementai eilėje pasirodo vienas po kito – 70 ms skirtumu */
.js .stagger > * { opacity: 0; transform: translateY(14px); }
.js .stagger.in > * {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22, .68, .3, 1);
}
.js .stagger.in > *:nth-child(1) { transition-delay: .04s; }
.js .stagger.in > *:nth-child(2) { transition-delay: .11s; }
.js .stagger.in > *:nth-child(3) { transition-delay: .18s; }
.js .stagger.in > *:nth-child(4) { transition-delay: .25s; }
.js .stagger.in > *:nth-child(5) { transition-delay: .32s; }
.js .stagger.in > *:nth-child(6) { transition-delay: .39s; }
.js .stagger.in > *:nth-child(7) { transition-delay: .46s; }
.js .stagger.in > *:nth-child(8) { transition-delay: .53s; }

/* Nuotrauka lėtai nurimsta iš padidinimo – ramus, „kino“ pojūtis */
.js .apie-foto picture { overflow: hidden; }
.js .apie-foto img { transform: scale(1.06); }
.js .apie-foto.in img {
  transform: none;
  transition: transform 1.5s cubic-bezier(.2, .7, .25, 1);
}

/* Po sekcijos antrašte išauga plona firminė linija */
.eyebrow { position: relative; padding-bottom: 14px; }
.eyebrow::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 46px; height: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: left center;
}
.js .reveal.in .eyebrow::after { transform: scaleX(1); transition: transform .7s cubic-bezier(.22, .68, .3, 1) .2s; }
html:not(.js) .eyebrow::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal,
  .js .stagger > * { opacity: 1; transform: none; }
  .js .apie-foto img { transform: none; }
  .eyebrow::after { transform: scaleX(1); }
  .hdr.is-scrolled .hdr-in { min-height: var(--hdr-h); }
  .hdr.is-scrolled .hdr-logo img { height: 56px; }
  .hero-img img { animation: none; transform: scale(1.02); }
}

/* ==========================================================================
   RESPONSYVUMAS
   Laužimo taškai parinkti pagal turinį, o ne pagal įrenginių dydžius:
   1140 px – meniu nebetelpa šalia logotipo; 980 px – dviejų skilčių sekcijos;
   720 px – trys kortelės eilėje; 520 px – smulkūs telefonai.
   ========================================================================== */

/* Burger mygtukas – matomas tik kai meniu suskleistas */
.burger {
  display: none;
  width: 46px; height: 46px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: #fff; border: 1.5px solid var(--line);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.burger:hover { background: var(--surface); border-color: var(--brand); }
.burger span {
  display: block; width: 20px; height: 2px; background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1140px) {
  .hdr-in { display: flex; align-items: center; gap: 16px; }
  .hdr-logo { flex: 0 0 auto; }
  /* Mygtukai stumiami į dešinę patys – ne per nav, nes nav išimtas iš srauto */
  .hdr-act { margin-left: auto; flex: 0 0 auto; }
  .burger { display: flex; }

  /* Meniu kabinamas prie <header> (jis lipnus, todėl pozicionuotas), o ne prie
     .wrap su šoniniu padding'u – kitaip reikėtų neigiamų ofsetų ir atsirastų
     horizontalus slinkimas. Iš srauto išimtas meniu nestumia hero žemyn.
     Selektorius su .hdr – kad niekas neperrašytų pozicionavimo. */
  .hdr .nav {
    position: absolute; top: 100%; left: 0; right: 0; width: 100%;
    /* justify-self galioja ir absoliučiai pozicionuotiems elementams – su
       „center“ meniu buvo centruojamas ir susitraukdavo iki turinio pločio */
    justify-self: stretch;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(15, 24, 38, .16);
    max-height: calc(100vh - var(--hdr-h));
    overflow-y: auto;
    display: none;
  }
  .hdr .nav.is-open { display: block; }

  .nav-l { flex-direction: column; align-items: stretch; gap: 0; }
  /* Pirmo lygio punktas: nuoroda + rodyklės mygtukas vienoje eilutėje,
     pomeniu – per visą plotį po jais */
  .nav-l > li { border-bottom: 1px solid var(--line); position: static; }
  .nav-l > li:last-child { border-bottom: 0; }
  .has-sub { display: flex; flex-wrap: wrap; align-items: center; }
  /* Specifiškumas turi viršyti .nav-l > li > a, kitaip width:100 % nustumtų
     rodyklės mygtuką į kitą eilutę */
  .nav-l > li.has-sub > a { flex: 1 1 auto; width: auto; }

  /* Nuoroda užima visą punkto plotį – paspaudžiama visur, ne tik ant teksto.
     Tarpas dedamas į padding'ą, kad kraštinė eitų per visą plotį. */
  .nav-l > li > a {
    display: flex; width: 100%;
    min-height: 56px; padding: 0 var(--gut);
    font-size: 16px; justify-content: flex-start;
  }
  .sub a { display: flex; width: 100%; }
  .nav-l > li > a:hover { background: var(--surface); }
  /* Rodyklė nuorodos viduje nereikalinga – ją pakeičia atskiras mygtukas */
  .nav-l > li > a > .caret { display: none; }

  .sub-toggle {
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
    width: 60px; align-self: stretch; min-height: 56px; padding: 0;
    background: none; border: 0; border-left: 1px solid var(--line);
    color: var(--brand); cursor: pointer;
  }
  .sub-toggle svg { transition: transform .25s ease; }
  .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .sub-toggle:hover { background: var(--surface); }

  /* Pomeniu suskleistas, kol nepaspaudžiama rodyklė */
  .sub {
    position: static; min-width: 0; margin: 0; padding: 0;
    flex: 1 0 100%;
    background: var(--surface); border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
    display: none;
  }
  .has-sub:hover > .sub,
  .has-sub:focus-within > .sub { display: none; }
  .sub.is-open,
  .has-sub:hover > .sub.is-open { display: block; padding: 4px 0 10px; }
  .sub a { min-height: 48px; padding: 6px var(--gut) 6px calc(var(--gut) + 18px); font-size: 15px; }
}

@media (max-width: 980px) {
  :root { --gut: 22px; }
  .hero-in { padding-block: 84px 96px; }
  .hero-h1 { max-width: none; }
  .hero-lead { max-width: none; }

  /* Siauresniame ekrane tekstas užima visą plotį, todėl tamsinimas – vertikalus.
     Kad nuotrauka nebūtų per tamsi, tekstas čia baltesnis – tada užtenka
     gerokai silpnesnio tamsinimo. Blogiausiu atveju (visiškai baltas dangus)
     mažiausias kontrastas – 5,16:1 ties „eyebrow“. */
  .hero-veil {
    background:
      linear-gradient(to top, rgba(6, 15, 23, .72) 0%, rgba(6, 15, 23, .64) 55%, rgba(6, 15, 23, .60) 100%);
  }
  .hero-eyebrow { color: #fff; }
  .hero-lead { color: #f2f6fc; }

  .apie { padding-block: 72px; }
  .apie-grid { grid-template-columns: 1fr; gap: 36px; }
  .apie-foto picture { min-height: 0; }
  .apie-foto img { aspect-ratio: 4 / 3; height: auto; }

  .pasl, .proj, .nauj { padding-block: 72px; }
  .pasl-grid { grid-template-columns: 1fr 1fr; }
  .kat { grid-template-columns: repeat(3, 1fr); }
  .kat li:nth-child(n+4) a { border-top: 1px solid var(--line); }
  .kat li:nth-child(4) a { border-left: 0; }

  .ft { padding-block: 60px 0; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 36px 40px; padding-bottom: 36px; }
  .ft-bot { flex-wrap: wrap; gap: 18px; }
}

@media (max-width: 720px) {
  .sec-head { margin-bottom: 28px; }
  .sec-head-row { flex-direction: column; align-items: flex-start; gap: 18px; }
  /* Telefone karuselė stumdoma pirštu, todėl rodyklės nereikalingos */
  .sec-nav, .sw-btns { display: none; }

  /* Kategorijos atsiduria po karusele ir rodomos kaip plytelės */
  .proj { display: flex; flex-direction: column; }
  .proj > .wrap:first-child { order: 1; }
  .proj > .wrap.reveal { order: 2; }
  .kat-wrap { order: 3; margin-top: 36px; }
  .more-wrap { order: 4; }

  .kat {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    border: 0; margin: 0;
  }
  .kat a {
    min-height: 76px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--line);
    font-size: 14px; line-height: 1.3;
  }
  /* Penktoji plytelė viena nelieka – ji užima visą eilutę */
  .kat li:last-child { grid-column: 1 / -1; }
  .kat a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

  .hero { min-height: 0; }
  .hero-in { padding-block: 72px 88px; }
  .hero-h1 { font-size: clamp(30px, 8vw, 40px); }
  .hero-lead { font-size: 16.5px; }
  .hero-btns .btn { flex: 1 1 auto; justify-content: center; }
  .hero-dots { bottom: 26px; }

  .pasl-grid { grid-template-columns: 1fr; }
  .apie-foto img { aspect-ratio: 3 / 2; }
  .fakt li { font-size: 15.5px; }

  .ft-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Antraštė „Partneriai“ atsistoja virš logotipų, logotipai laužiasi į eilutes */
  .ft-partners { flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; }
  .ft-partners ul { width: 100%; }
  .ft-bot { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 520px) {
  :root { --gut: 16px; }
  .hdr-logo img { height: 46px; }
  .hdr.is-scrolled .hdr-logo img { height: 40px; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { width: 100%; }
  .sec-head h2, .apie-txt h2 { font-size: 26px; }
  .p-body, .n-body { padding: 20px 20px 22px; }
  .pasl-c { padding: 28px 22px 26px; }
  .kat { gap: 8px; }
  .kat a { min-height: 68px; font-size: 13.5px; padding: 12px 12px; }
  .ft-partners ul { gap: 6px; }
  .ft-partners img { width: 68px; height: 26px; }
}
