/* ============================================================
   MB VN SERVISAS — lauko inžineriniai tinklai
   Dizaino sistema: industrinis / inžinerinis
   ============================================================ */

/* ---- Tokens ---- */
:root {
  /* type */
  --font-display: "Saira", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* dark theme (default) */
  --bg:        oklch(0.165 0.012 250);
  --bg-2:      oklch(0.205 0.014 250);
  --bg-3:      oklch(0.245 0.016 250);
  --ink:       oklch(0.94 0.008 80);
  --ink-dim:   oklch(0.74 0.010 250);
  --ink-faint: oklch(0.56 0.012 250);
  --line:      oklch(0.32 0.014 250);
  --line-soft: oklch(0.27 0.013 250);

  /* brand */
  --blue:    oklch(0.62 0.135 250);
  --blue-deep: oklch(0.50 0.13 252);
  --accent:  oklch(0.83 0.165 92);   /* hi-vis yellow */
  --accent-ink: oklch(0.22 0.03 92);

  /* layout */
  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 84px);
  --radius: 3px;

  --shadow: 0 24px 60px -28px rgba(0,0,0,0.7);
  --transition: 220ms cubic-bezier(0.22,0.61,0.36,1);
}

html.theme-light {
  --bg:        oklch(0.965 0.006 85);
  --bg-2:      oklch(0.995 0.004 85);
  --bg-3:      oklch(0.93 0.008 85);
  --ink:       oklch(0.22 0.014 255);
  --ink-dim:   oklch(0.42 0.014 255);
  --ink-faint: oklch(0.56 0.012 255);
  --line:      oklch(0.84 0.01 85);
  --line-soft: oklch(0.89 0.008 85);
  --blue:      oklch(0.52 0.14 252);
  --blue-deep: oklch(0.44 0.14 252);
  --accent:    oklch(0.80 0.17 90);
  --accent-ink: oklch(0.22 0.03 92);
  --shadow: 0 24px 50px -30px rgba(20,30,45,0.35);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---- Utilities ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); width: 100%; }
.mono { font-family: var(--font-mono); }
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; background: var(--accent);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 0.98; letter-spacing: -0.02em; }
.display {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(44px, 8.5vw, 132px); line-height: 0.9;
  letter-spacing: -0.035em; text-transform: uppercase;
}
.section-head { font-size: clamp(34px, 5.4vw, 76px); text-transform: uppercase; }

.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  transition: background var(--transition), border-color var(--transition), padding var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
  opacity: 1; transition: opacity var(--transition);
}
.site-header.scrolled::before { opacity: 0; }
.site-header:not(.scrolled) .nav a { color: rgba(255,255,255,0.86); }
.site-header:not(.scrolled) .brand-name b,
.site-header:not(.scrolled) .brand-name { color: #fff; }
.site-header.scrolled {
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 900;
  font-size: 19px; letter-spacing: -0.04em; border-radius: var(--radius);
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: 0.01em; line-height: 1; }
.brand-name b { color: var(--ink); }
.brand-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; color: var(--ink-faint); text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: 14.5px; color: var(--ink-dim); transition: color var(--transition); position: relative; }
.nav a:hover { color: var(--ink); }
.nav a::after { content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0; background: var(--accent); transition: width var(--transition); }
.nav a:hover::after { width: 100%; }
.header-cta { display: inline-flex; align-items: center; gap: 9px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; font-weight: 600; font-size: 15px;
  border-radius: var(--radius); transition: all var(--transition);
  letter-spacing: 0.01em; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.btn-arrow svg { width: 16px; height: 16px; transition: transform var(--transition); }
.btn:hover .btn-arrow svg { transform: translateX(3px); }
.btn-sm { padding: 10px 16px; font-size: 13.5px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 70%, transparent) 0%, transparent 26%, transparent 42%, color-mix(in oklab, var(--bg) 86%, transparent) 78%, var(--bg) 100%),
    linear-gradient(90deg, color-mix(in oklab, var(--bg) 78%, transparent) 0%, transparent 60%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(48px, 8vh, 96px); padding-top: 140px; }
.hero h1 { margin-top: 24px; color: #fff; max-width: 18ch; }
html.theme-light .hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { margin-top: 26px; max-width: 56ch; font-size: clamp(16px, 1.7vw, 20px); color: rgba(255,255,255,0.86); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta {
  position: absolute; z-index: 2; top: 110px; right: var(--pad);
  text-align: right; display: none;
}
.region-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; padding: 9px 14px; border: 1px solid rgba(255,255,255,0.35); border-radius: 100px;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(6px);
}
.region-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 30%, transparent); }

/* depth ruler novelty */
.depth-ruler {
  position: absolute; z-index: 2; left: var(--pad); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0; pointer-events: none;
}
.depth-ruler .tick {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: rgba(255,255,255,0.5);
  padding: 9px 0 9px 14px; border-left: 1px solid rgba(255,255,255,0.22); position: relative;
}
.depth-ruler .tick::before { content:""; position:absolute; left:0; top:50%; width:8px; height:1px; background: rgba(255,255,255,0.35); }
@media (max-width: 860px){ .depth-ruler { display: none; } }

/* ============================================================
   MARQUEE / VALUE BAND
   ============================================================ */
.valueband { background: var(--accent); color: var(--accent-ink); border-block: 1px solid var(--accent-ink); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.valueband-track { display: flex; width: max-content; flex-wrap: nowrap; animation: marquee var(--vb-dur, 60s) linear infinite; will-change: transform; }
.valueband:hover .valueband-track { animation-play-state: paused; }
.vb-group { display: flex; flex-wrap: nowrap; flex: none; }
.vb-item { font-family: var(--font-display); font-weight: 800; font-size: clamp(15px, 2vw, 22px); text-transform: uppercase; letter-spacing: 0.01em; display: inline-flex; align-items: center; padding: 16px 26px; white-space: nowrap; }
.vb-item::after { content: "/"; opacity: 0.4; margin-left: 26px; }
@keyframes marquee { to { transform: translateX(calc(-1 * var(--vb-shift, 50%))); } }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-copy .section-head { margin: 18px 0 28px; }
.about-copy p { color: var(--ink-dim); font-size: 18px; max-width: 56ch; }
.about-copy p + p { margin-top: 18px; }
.about-points { margin-top: 34px; display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
.about-point { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.about-point .n { font-family: var(--font-mono); font-size: 12px; color: var(--blue); letter-spacing: 0.1em; }
.about-point .t { font-weight: 600; }
.about-point .t span { display: block; color: var(--ink-faint); font-weight: 400; font-size: 14.5px; margin-top: 3px; }
.about-media { position: relative; }
.about-media .frame { position: relative; aspect-ratio: 3/4; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); }
.about-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.about-media .badge {
  position: absolute; left: -18px; bottom: 28px; background: var(--bg-2); border: 1px solid var(--line);
  padding: 16px 20px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 220px;
}
.about-media .badge .big { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--ink); line-height: 1; }
.about-media .badge .small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }

/* ============================================================
   SERVICES
   ============================================================ */
.services { background: var(--bg-2); }
.sec-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: clamp(40px, 6vw, 72px); flex-wrap: wrap; }
.sec-top .lead { max-width: 40ch; color: var(--ink-dim); font-size: 17px; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.svc {
  background: var(--bg-2); padding: 30px 26px 34px; min-height: 240px;
  display: flex; flex-direction: column; transition: background var(--transition); position: relative;
}
.svc:hover { background: var(--bg-3); }
.svc .num { font-family: var(--font-mono); font-size: 12px; color: var(--blue); letter-spacing: 0.1em; }
.svc .ic { width: 34px; height: 34px; margin-top: 26px; color: var(--ink); }
.svc h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.05; text-transform: uppercase; margin-top: auto; padding-top: 26px; letter-spacing: -0.01em; }
.svc p { color: var(--ink-faint); font-size: 14px; margin-top: 10px; }
.svc .corner { position: absolute; top: 26px; right: 26px; width: 8px; height: 8px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); opacity: 0; transition: opacity var(--transition); }
.svc:hover .corner { opacity: 1; }

/* ============================================================
   WORKS / GALLERY
   ============================================================ */
.works-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 14px; }
.work { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); cursor: pointer; background: var(--bg-3); }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(0.22,0.61,0.36,1); }
.work:hover img { transform: scale(1.06); }
.work .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.78), transparent);
  color: #fff; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  opacity: 0; transform: translateY(8px); transition: all var(--transition);
}
.work:hover .cap { opacity: 1; transform: translateY(0); }
.work .cap .plus { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,0.6); border-radius: 50%; display: grid; place-items: center; flex: none; }
.work.big { grid-column: span 2; grid-row: span 2; }
.work.tall { grid-column: span 2; grid-row: span 2; }
.work.wide { grid-column: span 1; grid-row: span 1; }
.work.std { grid-column: span 1; grid-row: span 1; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8,10,14,0.94); display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 86vh; object-fit: contain; border-radius: var(--radius); }
.lightbox .lb-close { position: absolute; top: 24px; right: 28px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; color: #fff; border: 1px solid rgba(255,255,255,0.4); padding: 9px 16px; border-radius: var(--radius); }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 1px solid rgba(255,255,255,0.35); border-radius: 50%; color: #fff; display: grid; place-items: center; }
.lightbox .lb-prev { left: 28px; } .lightbox .lb-next { right: 28px; }

/* ============================================================
   CONTACT CTA + FOOTER
   ============================================================ */
.cta { background: var(--blue-deep); color: #fff; position: relative; overflow: hidden; }
.cta::before { content:""; position:absolute; inset:0; background: radial-gradient(120% 120% at 90% 0%, color-mix(in oklab, var(--blue) 60%, transparent), transparent 60%); }
.cta-inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.cta h2 { font-size: clamp(36px, 5.5vw, 78px); text-transform: uppercase; color: #fff; line-height: 1.08; }
.cta h2 em { font-style: normal; color: var(--accent); }
.cta .lead { margin-top: 22px; color: rgba(255,255,255,0.82); font-size: 18px; max-width: 46ch; }
.cta-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
.cta-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--radius); padding: 30px; backdrop-filter: blur(8px); }
.cta-card .row { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.cta-card .row:last-child { border-bottom: none; padding-bottom: 0; }
.cta-card .row:first-child { padding-top: 0; }
.cta-card .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.cta-card .v { font-size: 19px; font-weight: 600; color: #fff; }

.footer { background: var(--bg); border-top: 1px solid var(--line-soft); padding-block: 64px 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer p.desc { color: var(--ink-faint); max-width: 38ch; margin-top: 18px; font-size: 15px; }
.footer h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; font-weight: 500; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a, .footer ul li { color: var(--ink-dim); font-size: 14.5px; transition: color var(--transition); }
.footer ul a:hover { color: var(--ink); }
.footer-bottom { margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom .tag { font-size: 11.5px; }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms cubic-bezier(0.22,0.61,0.36,1), transform 700ms cubic-bezier(0.22,0.61,0.36,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px){
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(4, 1fr); }
  .work.big { grid-column: span 2; }
}
@media (max-width: 920px){
  .nav { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px){
  body { font-size: 16px; }
  .services-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .work.big, .work.tall, .work.wide, .work.std { grid-column: span 2; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-cta .btn span.lbl { display: none; }
}
