/* Pixelplan — light landing (index, reverse-engineering, statyba, pramone), built from the
   light wireframes. Cool paper ground, ink-navy text, blue → cyan accents (brand ramp).
   Fonts: Space Grotesk (headings) + IBM Plex Sans (body), loaded by each page. */
:root {
  --bg: #f4f7fa;
  --card: #fbfcfe;
  --line: #d9e2ec;
  --line-soft: #e1e8f0;
  --ink: #0e1626;
  --body: #475569;
  --mute: #5b6877;
  --accent: #16b5c4;
  --accent-ink: #0b5fb0;
  --grad: linear-gradient(110deg, #1565c0 0%, #16b5c4 55%, #1fc9a0 100%);
  --slot: #e6eef6;
  --slot-line: #a9bacb;
  --late: #b3322a;
  --ok: #17805f;
  --f-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--body); font-family: var(--f-body); font-size: 17px; line-height: 1.5; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 20px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mk { height: 31px; width: auto; }
.brand .wm { font-weight: 700; font-size: 22px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; }
.main-nav a { color: var(--ink); text-decoration: none; padding-block: 6px; }
.main-nav a:hover, .main-nav a[aria-current="page"] {
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px;
}
.main-nav a[aria-current="page"] { font-weight: 700; }
.bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lang { display: inline-flex; align-items: center; gap: 4px; font: 600 14px var(--f-display); color: var(--ink); }
.lang button { border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--mute); padding: 6px 2px; }
.lang button.on { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.lang--plain { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 8px; border: 1.5px solid var(--ink); font: 600 16px var(--f-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1d2a40; }
.btn-outline { background: #fff; color: var(--ink); }
.btn-outline:hover { background: var(--slot); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; border-width: 2px; border-radius: 6px; }
.btn[disabled] { opacity: .6; cursor: default; }
.sec .btn-dark, .cta .btn-dark { padding-inline: 26px; min-height: 48px; }

/* ---------- sections ---------- */
section { border-bottom: 1px solid var(--line-soft); }
.sec { padding-block: 72px; }
.sec--tight { padding-block: 56px; }
.col { display: flex; flex-direction: column; gap: 40px; }
.col--sm { gap: 20px; }
.col--lg { gap: 56px; }
.sec-head { display: flex; flex-direction: column; gap: 8px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.sec-head--page h1 { font-size: clamp(32px, 4.6vw, 40px); line-height: 1.15; }
.sec-head--page .lead { font-size: 19px; max-width: 720px; }
.eyebrow { font: 600 15px var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow--sm { font-size: 14px; letter-spacing: .14em; }
.eyebrow--ink { color: var(--body); }
.sec-sub, .text { font-size: 19px; max-width: 860px; }
.sub { font-size: 26px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 40px; align-items: center; }
.split--top { align-items: stretch; }
.split--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: stretch; }
@media (min-width: 900px) { .split--wide { grid-template-columns: 2fr 1fr; } }
.stack { display: flex; flex-direction: column; gap: 28px; }
.block { display: flex; flex-direction: column; gap: 6px; }
.block h3 { font-size: 22px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row--center { align-items: center; gap: 12px; }
.note { font-size: 14px; color: var(--mute); }

/* ---------- hero ---------- */
/* full-width hero: the photo (admin: Hero nuotrauka) fills the section behind the text */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: max(520px, calc(100svh - 264px)); padding-block: 72px; background: #0a0e16; border-bottom: 0; }
.hero-bg { position: absolute; inset: 0; margin: 0; z-index: 0; }
.hero-bg img, .hero-bg video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(10, 14, 22, .7); }
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-text { display: flex; flex-direction: column; gap: 24px; min-width: 0; max-width: 640px; }
.hero .eyebrow--ink { color: #9fc2e6; }
.hero h1 { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.04; letter-spacing: -.03em; text-wrap: pretty; color: #fff; }
.hero h1::after { content: ""; display: block; width: 120px; height: 5px; margin-top: 24px; border-radius: 3px; background: var(--grad); }
.hero .lead { color: #d3deea; }
.hero .btn-dark { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn-dark:hover { background: #e6eef6; }
.hero .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 760px) {
  .hero { min-height: calc(100svh - 200px); padding-block: 56px; }
  .hero::after { background: rgba(10, 14, 22, .75); }
}
.lead { font-size: 19px; max-width: 720px; }
.eyebrow { font: 600 15px var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow--sm { font-size: 14px; letter-spacing: .14em; }
.eyebrow--ink { color: var(--body); }
.sec-sub, .text { font-size: 19px; max-width: 860px; }
.sub { font-size: 26px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 40px; align-items: center; }
.split--top { align-items: stretch; }
.split--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: stretch; }
@media (min-width: 900px) { .split--wide { grid-template-columns: 2fr 1fr; } }
.stack { display: flex; flex-direction: column; gap: 28px; }
.block { display: flex; flex-direction: column; gap: 6px; }
.block h3 { font-size: 22px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row--center { align-items: center; gap: 12px; }
.note { font-size: 14px; color: var(--mute); }

/* ---------- hero ---------- */
.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.45; max-width: 560px; }
.media { margin: 0; border-radius: 8px; overflow: hidden; min-width: 0; }
.media img { display: block; width: 100%; height: auto; }
.media--dark { background: #0a0e16; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.cards--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.cards--dir { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card h3 { font-size: 22px; line-height: 1.25; }
.card h4 { font-size: 20px; }
.card p { font-size: 16px; }
.card .n { font: 700 14px/1 var(--f-display); color: var(--accent-ink); }
.card h3 .n { font-size: inherit; color: var(--accent-ink); }
.card--icon { flex-direction: row; gap: 16px; }
.card--icon > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ico { flex: 0 0 48px; height: 48px; border-radius: 10px; background: var(--slot); display: flex; align-items: center; justify-content: center; }
.ico svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dir { position: relative; overflow: hidden; text-decoration: none; color: var(--body); padding: 34px 24px 24px; gap: 10px; transition: background .15s; }
.dir::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--grad); }
.dir:hover { background: #fff; }
.dir-n { font: 700 40px/1 var(--f-display); color: var(--ink); }
.more { font-weight: 600; color: var(--accent-ink); }
.dir .more { margin-top: auto; padding-top: 6px; }
.panel { gap: 12px; }
.panel .device { font-weight: 600; color: var(--ink); }
.check { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.task { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); font-size: 15px; background: #fff; }
.task b { color: var(--late); }
.task > span:last-child { white-space: nowrap; }
.nav-mobile { display: none; }

/* ---------- photo / video slots (replace <figcaption> with <img> or <video>) ---------- */
.slot {
  margin: 0; background: var(--slot); border: 2px dashed var(--slot-line); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; font-size: 15px; color: var(--body); min-width: 0; overflow: hidden;
}
.slot img, .slot video { display: block; width: 100%; height: 100%; object-fit: cover; }
.slot:has(img, video) { padding: 0; border: 0; }
.slot--170 { height: 170px; font-size: 14px; }
.slot--180 { min-height: 180px; font-size: 14px; }
.slot--300 { min-height: 300px; }
.slot--340 { min-height: 340px; }
.slot--380 { min-height: 380px; }
.slot--grow { flex: 1; }
/* a slot that holds an uploaded photo/video drops its placeholder height and keeps one shape */
.slot:has(img, video) { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
/* Leica page: photos keep their own shape (natural), portrait photos sit 4:5, rendered models on white */
.slot--natural:has(img, video) { aspect-ratio: auto; }
.slot--natural img { height: auto; }
.slot--white { background: #fff; }
.slot--tall:has(img, video) { aspect-ratio: 4 / 5; }
.cards--3x { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.cards--uses { grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .cards--uses { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards--uses { grid-template-columns: repeat(4, 1fr); } }
.slot video { background: #0a0e16; }
.media video { display: block; width: 100%; height: auto; }

/* ---------- before / after slider (fx.js turns .compare into .is-compare when both photos are set) ---------- */
.compare { position: relative; }
.compare:not(.is-compare) .compare-after { display: none; }
.compare.is-compare { --pos: 50%; border-radius: 8px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.compare.is-compare .compare-after { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; clip-path: inset(0 0 0 var(--pos)); }
.compare-bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); pointer-events: none; }
.compare-bar::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M17 22l6-6v12zM27 22l-6-6v12z' fill='%231f2937'/%3E%3C/svg%3E") center / 44px no-repeat; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare-range:focus-visible + .compare-bar::after { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.pp-edit .compare-range { pointer-events: none; }

/* ---------- reverse table ---------- */
.table-scroll { overflow-x: auto; }
table.get { width: 100%; min-width: 640px; border-collapse: collapse; background: var(--card); font-size: 16px; }
.get th { background: var(--ink); color: #eaf1f8; text-align: left; padding: 12px 16px; font-weight: 600; }
.get td { padding: 12px 16px; border: 1px solid var(--line); }

/* ---------- construction stages ---------- */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); column-gap: 24px; row-gap: 48px; align-items: start; }
/* rows of the three stages line up (mark, title, text, photo, points) via subgrid */
.stage { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 16px; align-content: start; min-width: 0; }
@supports not (grid-template-rows: subgrid) { .stage { display: flex; flex-direction: column; } }
.stage h3 { font-size: 22px; line-height: 1.25; }
.stage-mark { display: flex; align-items: center; }
.stage-mark b { flex: 0 0 44px; height: 44px; border-radius: 22px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.stage-mark .line { flex: 1; height: 3px; background: var(--grad); }

/* ---------- demo ---------- */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: stretch; }
@media (min-width: 900px) { .demo-grid { grid-template-columns: 2fr 1fr; } }
.demo-frame { border-radius: 8px; overflow: hidden; background: #0a0e16; min-width: 0; }
.demo-video { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 922; background: #0a0e16; }
.demo-iframe { display: block; width: 100%; height: min(70vh, 640px); border: 0; background: #0a0e16; }
.demo-bar { display: flex; justify-content: space-between; padding: 10px 16px; background: #121a2b; color: #b4c0d0; font-size: 14px; }
.demo-card { justify-content: center; gap: 16px; padding: 28px; }
.demo-card .btn { align-self: flex-start; }

/* ---------- stats ---------- */
.stat { text-align: center; padding: 28px; }
.stat .v { font: 700 clamp(36px, 5vw, 48px)/1.1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat p { margin-top: 8px; font-size: 17px; }

/* ---------- partners (logo + name; list edited in /admin/landing) ---------- */
.partner-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 16px; }
.partner { display: flex; min-width: 0; }
.partner-in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 124px; padding: 20px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: center; text-decoration: none; color: var(--ink); transition: background .15s, border-color .15s; }
a.partner-in:hover { background: #fff; border-color: var(--accent); }
.partner-logo { display: flex; align-items: center; justify-content: center; height: 64px; width: 100%; }
.partner-logo img { display: block; max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.partner-name { font: 600 16px/1.3 var(--f-display); overflow-wrap: anywhere; }

/* ---------- contact ---------- */
.cta { background: radial-gradient(ellipse at 85% 0%, rgba(22,181,196,.2), rgba(10,14,22,0) 55%), #0a0e16; color: #dbe4ee; border-bottom: 0; padding-block: 72px; }
.cta-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 48px; align-items: start; }
.cta-text { display: flex; flex-direction: column; gap: 20px; }
.cta h2 { color: #fff; font-size: clamp(30px, 4.5vw, 44px); line-height: 1.12; }
.cta .sub { font-size: 19px; color: #b4c0d0; max-width: 520px; }
.cta-lines { font-size: 17px; }
.cta-lines a { color: #e6eef6; }
.contact-form { background: var(--card); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 6px; color: var(--body); }
.contact-form label { font-weight: 600; color: var(--ink); margin-top: 10px; }
.contact-form label:first-of-type { margin-top: 0; }
.pp-input, .pp-textarea {
  min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font: 400 16px var(--f-body); color: var(--ink); width: 100%;
}
.pp-textarea { padding: 10px 12px; resize: vertical; }
.contact-form .btn { margin-top: 16px; width: 100%; min-height: 48px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-status { font-weight: 600; margin-top: 8px; }
.contact-status.ok { color: var(--ok); }
.contact-status.err { color: var(--late); }

/* ---------- footer ---------- */
.site-footer { background: #0a0e16; color: #b4c0d0; border-top: 1px solid #1c2638; padding-block: 28px; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer a { color: #e6eef6; }
.site-footer .lang { color: #e6eef6; }
.site-footer .lang button { color: #8a99ad; }
.site-footer .lang button.on { color: #fff; }
.footer-yt { display: inline-flex; align-items: center; vertical-align: middle; }
.footer-yt svg { width: 24px; height: 24px; }
.footer-yt .yt-body { fill: #ff0000; }
.footer-yt .yt-play { fill: #fff; }
.footer-yt:hover .yt-body { fill: #ff3b3b; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); }
/* back to top (bottom right) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.to-top {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30;
  width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; border: 1.5px solid #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(10, 14, 22, .25);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s, background .15s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #1d2a40; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1200px) and (min-width: 961px) {
  .bar { gap: 8px 14px; }
  .main-nav { gap: 8px 14px; font-size: 15px; }
  .bar-right { gap: 8px; }
  .bar-right .btn { padding: 0 12px; font-size: 15px; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .bar { flex-wrap: wrap; }
  .bar-right { order: 2; margin-left: auto; }
  .bar-right .btn { display: none; }
  .main-nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 8px; border-top: 1px solid var(--line); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
  .main-nav .nav-mobile { display: block; }
  .main-nav .nav-mobile--cta { margin-top: 12px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; text-align: center; font-weight: 600; }
}
@media (max-width: 640px) {
  .sec { padding-block: 48px; }
  .hero { padding-block: 40px 48px; }
  .split { gap: 28px; }
  .slot--380 { min-height: 240px; }
  .slot--340 { min-height: 220px; }
  .slot--300 { min-height: 200px; }
  .cta { padding-block: 48px; }
  .contact-form { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- layer toggles over the hall photo (/pramone): fx.js shows a [data-layer-g] group per checked [data-layer] box ---------- */
.layers-view { position: relative; min-width: 0; display: flex; }
.layers-view > .slot { flex: 1; }
.layers-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.layers-view:not(:has([data-media] img)) .layers-ov { display: none; }
.layers-ov .lg { display: none; fill: none; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; stroke: var(--c, #fff); filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.layers-ov .lg.on { display: block; animation: lgIn .25s ease; }
.layers-ov .lg circle { fill: var(--c, #fff); stroke: #fff; stroke-width: 7; }
.layers-ov .lg .ic { fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.lg-el { --c: #f5b700; } .lg-wa { --c: #1d7fe0; } .lg-he { --c: #e5484d; } .lg-ve { --c: #16b5c4; }
.lg-tr { --c: #7c5cff; } .lg-fi { --c: #1f9d55; } .lg-eq { --c: #3b4cca; }
@keyframes lgIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .layers-ov .lg.on { animation: none; } }
