/* SARGIS · sargis.eu
 * Layout concept: an operational map surface. The live app window is the hero;
 * everything else sits on a quiet grid framed by the logo's four viewfinder corners. */

@font-face { font-family: "Geist"; src: url(fonts/geist-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url(fonts/geist-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  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: "Geist Mono"; src: url(fonts/geistmono-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; src: url(fonts/geistmono-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  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; }

:root {
  /* colour — light: cool paper + the app's navy as ink */
  --bg: #f5f7fa;
  --bg-2: #edf1f6;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --line: #e1e7ef;
  --line-strong: #cbd5e2;
  --fg: #0b1628;
  --fg-2: #33435c;
  --muted: #66768f;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: #e7efff;
  /* the logo's four corners */
  --red: #dc3b2f;
  --blue: #2f6fdc;
  --yellow: #d99a00;
  --green: #18945a;
  --red-soft: #fdeceb;
  --yellow-soft: #fdf4dc;
  --green-soft: #e3f5ec;
  /* map */
  --map-bg: #f1f4ef;
  --map-contour: rgba(84, 98, 72, 0.22);
  --map-index: rgba(84, 98, 72, 0.42);
  --map-forest: rgba(76, 140, 88, 0.10);
  --map-water: #7fb2e8;
  --map-road: #ffffff;
  --map-road-edge: rgba(11, 22, 40, 0.18);
  --map-label: #2b3a52;
  --glass: rgba(255, 255, 255, 0.78);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 18px 40px -20px rgba(16, 24, 40, 0.28), 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow-3: 0 50px 100px -40px rgba(11, 22, 40, 0.45), 0 20px 40px -24px rgba(11, 22, 40, 0.25);
  --glow: rgba(37, 99, 235, 0.16);

  /* type */
  --f-sans: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --t-display: clamp(2.7rem, 1.4rem + 5.4vw, 6rem);
  --t-mega: clamp(3rem, 1.2rem + 7.6vw, 8.5rem);
  --t-h2: clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
  --t-h3: 1.1875rem;
  --t-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-mono: 0.75rem;

  /* motion */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060e1c; --bg-2: #0a1528; --surface: #0d1a2e; --surface-2: #11213a; --line: #1a2d4a; --line-strong: #253f63;
    --fg: #f2f6fc; --fg-2: #b8c8de; --muted: #7c97b8; --accent: #5b9dff; --accent-ink: #061226; --accent-soft: rgba(91, 157, 255, 0.13);
    --red: #ff6b5e; --blue: #5b9dff; --yellow: #f7bd2a; --green: #3fd48b;
    --red-soft: rgba(255, 107, 94, 0.13); --yellow-soft: rgba(247, 189, 42, 0.13); --green-soft: rgba(63, 212, 139, 0.12);
    --map-bg: #0a1628; --map-contour: rgba(122, 160, 210, 0.16); --map-index: rgba(122, 160, 210, 0.34); --map-forest: rgba(63, 212, 139, 0.05);
    --map-water: #2c6bc0; --map-road: #22385a; --map-road-edge: rgba(0, 0, 0, 0.4); --map-label: #c3d3ea;
    --glass: rgba(13, 26, 46, 0.78);
    --shadow-1: none; --shadow-2: 0 20px 40px -20px rgba(0, 0, 0, 0.7); --shadow-3: 0 60px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(91, 157, 255, 0.08);
    --glow: rgba(91, 157, 255, 0.2);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060e1c; --bg-2: #0a1528; --surface: #0d1a2e; --surface-2: #11213a; --line: #1a2d4a; --line-strong: #253f63;
  --fg: #f2f6fc; --fg-2: #b8c8de; --muted: #7c97b8; --accent: #5b9dff; --accent-ink: #061226; --accent-soft: rgba(91, 157, 255, 0.13);
  --red: #ff6b5e; --blue: #5b9dff; --yellow: #f7bd2a; --green: #3fd48b;
  --red-soft: rgba(255, 107, 94, 0.13); --yellow-soft: rgba(247, 189, 42, 0.13); --green-soft: rgba(63, 212, 139, 0.12);
  --map-bg: #0a1628; --map-contour: rgba(122, 160, 210, 0.16); --map-index: rgba(122, 160, 210, 0.34); --map-forest: rgba(63, 212, 139, 0.05);
  --map-water: #2c6bc0; --map-road: #22385a; --map-road-edge: rgba(0, 0, 0, 0.4); --map-label: #c3d3ea;
  --glass: rgba(13, 26, 46, 0.78);
  --shadow-1: none; --shadow-2: 0 20px 40px -20px rgba(0, 0, 0, 0.7); --shadow-3: 0 60px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(91, 157, 255, 0.08);
  --glow: rgba(91, 157, 255, 0.2);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--t-body)/1.6 var(--f-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip; font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* language: the root carries data-lang; JS swaps strings. English readers
   would otherwise see Slovenian for a frame; the failsafe shows the page anyway. */
html.js[data-lang="en"]:not(.i18n-ready) body { visibility: hidden; animation: failsafe 0s 1.2s forwards; }
@keyframes failsafe { to { visibility: visible; } }
.is-swapping [data-i18n] { opacity: 0; filter: blur(4px); }
[data-i18n] { transition: opacity 200ms var(--ease), filter 200ms var(--ease); }

/* ---------- type ---------- */
.display {
  font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.045em; font-weight: 600; text-wrap: balance; max-width: 13ch;
}
.h2 { font-size: var(--t-h2); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; text-wrap: balance; max-width: 20ch; }
.h3 { font-size: var(--t-h3); line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--fg-2); max-width: 46ch; text-wrap: pretty; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font: 500 var(--t-mono)/1 var(--f-mono);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.sec__lead { font-size: var(--t-lead); color: var(--fg-2); max-width: 54ch; text-wrap: pretty; }

/* the logo's corners, small: used as the eyebrow marker */
.vf-mini { position: relative; width: 12px; height: 12px; flex: none; }
.vf-mini i { position: absolute; width: 5px; height: 5px; border: 1.75px solid; }
.vf-mini i:nth-child(1) { left: 0; top: 0; border-color: var(--red); border-right: 0; border-bottom: 0; }
.vf-mini i:nth-child(2) { right: 0; top: 0; border-color: var(--blue); border-left: 0; border-bottom: 0; }
.vf-mini i:nth-child(3) { left: 0; bottom: 0; border-color: var(--yellow); border-right: 0; border-top: 0; }
.vf-mini i:nth-child(4) { right: 0; bottom: 0; border-color: var(--green); border-left: 0; border-top: 0; }

/* ---------- buttons ---------- */
.btn {
  --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: 0.95rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap; position: relative; isolation: isolate;
  transition: transform 220ms var(--ease), background-color 200ms ease, border-color 200ms ease, box-shadow 220ms var(--ease), color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--sm { --h: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn--lg { --h: 52px; padding: 0 24px; font-size: 1rem; }
.btn--primary { background: var(--fg); color: var(--bg); box-shadow: 0 8px 20px -10px var(--fg); }
.btn--primary:hover { box-shadow: 0 14px 30px -12px var(--fg); }
.btn--primary .ic { transition: transform 260ms var(--ease); }
.btn--primary:hover .ic { transform: translateX(3px); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg-2); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; position: relative; overflow: hidden; transition: border-color 200ms ease, transform 200ms var(--ease);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .ic { position: absolute; transition: transform 500ms var(--ease), opacity 300ms ease; }
.ic--moon { transform: translateY(0) rotate(0); }
.ic--sun { transform: translateY(140%) rotate(-90deg); opacity: 0; }
:root[data-theme="dark"] .ic--moon { transform: translateY(-140%) rotate(90deg); opacity: 0; }
:root[data-theme="dark"] .ic--sun { transform: none; opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic--moon { transform: translateY(-140%) rotate(90deg); opacity: 0; }
  :root:not([data-theme="light"]) .ic--sun { transform: none; opacity: 1; }
}

/* segmented language switch */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg__b {
  position: relative; z-index: 1; border: 0; background: none; height: 28px; min-width: 38px; padding: 0 10px; border-radius: 999px;
  font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.06em; color: var(--muted); cursor: pointer; transition: color 250ms ease;
}
.seg__b[aria-pressed="true"] { color: var(--fg); }
.seg__thumb {
  position: absolute; top: 3px; left: 3px; height: 28px; width: 38px; border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--line); transition: transform 420ms var(--ease);
}
:root[data-lang="en"] .seg__thumb { transform: translateX(38px); }

/* ---------- progress + nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 25% 50%, var(--yellow) 50% 75%, var(--green) 75%);
}
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px);
  transition: transform 450ms var(--ease), background-color 300ms ease, border-color 300ms ease, backdrop-filter 300ms ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-bottom-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__in { height: var(--nav-h); display: flex; align-items: center; gap: 24px; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand__name { font-weight: 700; letter-spacing: 0.06em; font-size: 0.95rem; }
.nav__links { display: flex; gap: 4px; margin-inline: auto; }
.nav__links a {
  position: relative; padding: 8px 12px; border-radius: 999px; font-size: 0.875rem; color: var(--fg-2); text-decoration: none; transition: color 200ms ease, background-color 200ms ease;
}
.nav__links a:hover { color: var(--fg); background: var(--surface-2); }
.nav__links a.is-active { color: var(--fg); }
.nav__links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
.nav__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav__links + .nav__tools { margin-left: 0; }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(40px, 8vw, 104px)); padding-bottom: 40px; overflow-x: clip; }
.hero__glow {
  position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 50% at 70% 40%, var(--glow), transparent 70%),
    radial-gradient(30% 40% at 20% 10%, color-mix(in srgb, var(--red) 9%, transparent), transparent 70%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  mask-image: radial-gradient(70% 55% at 50% 30%, #000 0%, transparent 80%); -webkit-mask-image: radial-gradient(70% 55% at 50% 30%, #000 0%, transparent 80%);
  opacity: 0.6;
}
.hero__head { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.hero__text { display: grid; gap: 28px; min-width: 0; }
.hero__aside { display: grid; gap: 24px; min-width: 0; padding-bottom: 8px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__for { font-size: var(--t-small); color: var(--muted); }

/* headline split into words by JS */
.display .w { display: inline-block; overflow: clip; overflow-clip-margin: 0.12em; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.display .w > span { display: inline-block; }
.js .display .w > span { transform: translateY(105%); filter: blur(8px); animation: wordUp 1100ms var(--ease) forwards; animation-delay: calc(120ms + var(--i) * 70ms); }
@keyframes wordUp { to { transform: none; filter: none; } }
.js .rise { opacity: 0; transform: translateY(14px); animation: rise 900ms var(--ease) forwards; animation-delay: calc(var(--d) * 80ms + 200ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* stage: the app window with perspective that flattens on scroll */
.stage {
  --t: 1; position: relative; margin-top: clamp(48px, 7vw, 88px); perspective: 2000px;
}
.app {
  position: relative; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-3);
  overflow: hidden; transform-origin: 50% 0;
  transform: rotateX(calc(var(--t) * 14deg)) scale(calc(1 - var(--t) * 0.04)) translateY(calc(var(--t) * 10px));
  will-change: transform;
}
.js .app { opacity: 0; animation: appIn 1400ms var(--ease) 550ms forwards; }
@keyframes appIn { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
.stage__note { margin-top: 14px; font-size: 0.7rem; color: var(--muted); text-align: right; }

/* the viewfinder: the logo's four corners frame the app */
.vf { position: absolute; inset: -18px; pointer-events: none; z-index: 2; }
.vf i { position: absolute; width: clamp(28px, 4vw, 54px); height: clamp(28px, 4vw, 54px); border: 4px solid; border-radius: 3px; }
.vf__r { left: 0; top: 0; border-color: var(--red) !important; border-right: 0 !important; border-bottom: 0 !important; border-top-left-radius: 10px !important; }
.vf__b { right: 0; top: 0; border-color: var(--blue) !important; border-left: 0 !important; border-bottom: 0 !important; border-top-right-radius: 10px !important; }
.vf__y { left: 0; bottom: 0; border-color: var(--yellow) !important; border-right: 0 !important; border-top: 0 !important; border-bottom-left-radius: 10px !important; }
.vf__g { right: 0; bottom: 0; border-color: var(--green) !important; border-left: 0 !important; border-top: 0 !important; border-bottom-right-radius: 10px !important; }
.js .stage .vf i { opacity: 0; animation: vfIn 1200ms var(--ease) forwards; animation-delay: 1250ms; }
.js .stage .vf__r { --dx: -40px; --dy: -40px; }
.js .stage .vf__b { --dx: 40px; --dy: -40px; animation-delay: 1330ms; }
.js .stage .vf__y { --dx: -40px; --dy: 40px; animation-delay: 1410ms; }
.js .stage .vf__g { --dx: 40px; --dy: 40px; animation-delay: 1490ms; }
@keyframes vfIn { from { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3); } to { opacity: 1; transform: none; } }
.stage .vf { transition: inset 600ms var(--ease); }
.stage:hover .vf { inset: -12px; }

.app__bar {
  height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line);
  background: var(--surface); font-size: 0.78rem; position: relative; z-index: 2;
}
.app__dots { display: flex; gap: 6px; margin-right: 6px; }
.app__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.app__logo { width: 18px; height: 18px; border-radius: 4px; }
.crumbs { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0 0 0 10px; list-style: none; color: var(--muted); border-left: 1px solid var(--line); white-space: nowrap; }
.crumbs .ic { width: 12px; height: 12px; }
.crumbs__here { color: var(--fg); font-weight: 500; }
.chip-live {
  display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 999px; min-width: 0;
  background: var(--red-soft); color: var(--red); font-weight: 500; white-space: nowrap; overflow: hidden;
}
.chip-live span { overflow: hidden; text-overflow: ellipsis; }
.chip-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; box-shadow: 0 0 0 0 var(--red); animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.app__clock { margin-left: auto; color: var(--muted); }

.app__body { display: grid; grid-template-columns: 52px 1fr; height: clamp(460px, 52vw, 640px); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 12px; border-right: 1px solid var(--line); background: var(--surface); z-index: 2; }
.rail__b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.rail__b.is-on { background: var(--accent-soft); color: var(--accent); }
.map { position: relative; overflow: hidden; background: var(--map-bg); cursor: crosshair; }
.map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.alert {
  position: absolute; top: 14px; left: 50%; width: min(380px, calc(100% - 28px)); translate: -50% 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px 14px;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); overflow: hidden;
}
.js .alert { opacity: 0; transform: translateY(-24px) scale(0.96); animation: alertIn 800ms var(--ease) 2100ms forwards; }
@keyframes alertIn { to { opacity: 1; transform: none; } }
.alert__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--red); color: #fff; }
.alert__txt { display: grid; line-height: 1.3; min-width: 0; }
.alert__txt b { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); }
.alert__txt span { font-size: 0.875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert__t { font-size: 0.7rem; color: var(--muted); }
.alert__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.alert__bar i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; animation: countdown 12s linear 2.4s infinite; }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.loc {
  position: absolute; top: 14px; right: 14px; width: 272px; padding: 14px; display: grid; gap: 12px;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); font-size: 0.8rem;
}
.js .loc { opacity: 0; transform: translateX(24px); animation: locIn 900ms var(--ease) 2700ms forwards; }
@keyframes locIn { to { opacity: 1; transform: none; } }
.loc__hd { display: grid; gap: 2px; }
.loc__k { font: 500 0.65rem/1.2 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.loc__addr { font-size: 0.95rem; letter-spacing: -0.01em; }
.loc__c { font-size: 0.7rem; color: var(--muted); }
.loc__warn { display: flex; flex-wrap: wrap; gap: 6px; }
.loc__rows { margin: 0; display: grid; }
.loc__rows div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.loc__rows dt { color: var(--muted); }
.loc__rows dd { margin: 0; font-weight: 500; text-align: right; }
.js .loc__rows div, .js .loc__warn .tag { opacity: 0; transform: translateY(6px); animation: rise 600ms var(--ease) forwards; }
.js .loc__warn .tag:nth-child(1) { animation-delay: 3050ms; }
.js .loc__warn .tag:nth-child(2) { animation-delay: 3130ms; }
.js .loc__rows div:nth-child(1) { animation-delay: 3210ms; }
.js .loc__rows div:nth-child(2) { animation-delay: 3290ms; }
.js .loc__rows div:nth-child(3) { animation-delay: 3370ms; }
.js .loc__rows div:nth-child(4) { animation-delay: 3450ms; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 500; white-space: nowrap; }
.tag .ic { width: 13px; height: 13px; }
.tag--ok { background: var(--green-soft); color: var(--green); }
.tag--warn { background: var(--yellow-soft); color: var(--yellow); }

.cbar {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 0; display: flex; align-items: center; gap: 2px; padding: 4px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); font-size: 0.75rem; white-space: nowrap;
}
.cbar > * { padding: 6px 10px; border-radius: 8px; }
.cbar__sys { border: 0; background: var(--accent-soft); color: var(--accent); font-weight: 600; cursor: pointer; }
.cbar__v { min-width: 21ch; }
.cbar__h, .cbar__s { color: var(--muted); border-left: 1px solid var(--line); border-radius: 0; }

/* ---------- stats ---------- */
.stats-sec { padding-block: clamp(48px, 7vw, 88px) 0; }
.stats__t { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); }
.stat { display: grid; gap: 6px; align-content: start; padding: 26px 24px 0 0; min-width: 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat dt { font-size: clamp(2.4rem, 1.6rem + 3vw, 4.25rem); line-height: 1; font-weight: 500; letter-spacing: -0.05em; }
.stat dd { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 22ch; }
.stat:nth-child(1) dt { color: var(--red); }
.stat:nth-child(2) dt { color: var(--blue); }
.stat:nth-child(3) dt { color: var(--yellow); }
.stat:nth-child(4) dt { color: var(--green); }

/* ---------- manifesto ---------- */
.manifest { padding-block: clamp(96px, 14vw, 200px) 0; }
.manifest__pre { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.manifest__t {
  font-size: clamp(2.6rem, 1.2rem + 5.6vw, 6.5rem); line-height: 1; letter-spacing: -0.05em; font-weight: 600;
  text-wrap: balance; max-width: 15ch; display: grid; gap: 0.08em;
}
.manifest__t > span { display: block; }
.sw { color: var(--fg); opacity: 0.14; transition: opacity 450ms var(--ease), color 450ms var(--ease); }
.sw.is-lit { opacity: 1; }
.manifest__b .sw.is-lit { color: var(--accent); }

/* ---------- sections ---------- */
.sec { padding-block: clamp(80px, 11vw, 160px) 0; }
.sec__hd { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 72px); }
.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 900ms var(--ease), transform 1000ms var(--ease), filter 900ms var(--ease); transition-delay: var(--rd, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* ---------- flow (sticky story) ---------- */
.flow__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 96px); }
.flow__vis { position: relative; min-width: 0; }
.fv {
  position: sticky; top: calc(var(--nav-h) + 40px); aspect-ratio: 4 / 3; max-width: 100%; border-radius: 20px; overflow: hidden;
  background: var(--map-bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2);
}
.fv__s { position: absolute; inset: 0; opacity: 0; transform: scale(1.04); filter: blur(10px); transition: opacity 700ms var(--ease), transform 900ms var(--ease), filter 700ms var(--ease); pointer-events: none; }
.fv__s.is-on { opacity: 1; transform: none; filter: none; }
.fv__map {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 62% 68%, color-mix(in srgb, var(--red) 18%, transparent) 0 40px, transparent 41px),
    repeating-radial-gradient(circle at 30% 120%, transparent 0 22px, var(--map-contour) 22px 23px),
    var(--map-bg);
}
.ping { position: absolute; left: var(--x); top: var(--y); width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--surface); }
.ping::before, .ping::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--red); animation: ping 2.4s var(--ease) infinite; }
.ping::after { animation-delay: 1.2s; }
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(5); opacity: 0; } }
.fv-muted { color: var(--muted); font-size: 0.78rem; }
.fv-alert {
  position: absolute; left: 50%; top: 9%; width: min(84%, 380px); translate: -50% 0; padding: 18px 18px 22px; display: grid; gap: 8px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); overflow: hidden;
}
.fv-alert__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.fv-alert__t { font-size: 1.15rem; letter-spacing: -0.02em; }
.fv-alert__units { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.unit { font: 500 0.72rem/1 var(--f-mono); padding: 6px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.fv-alert__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.fv-alert__bar i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; animation: countdown 12s linear infinite; }
.badge { font: 600 0.66rem/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; }
.badge--red { background: var(--red); color: #fff; }
.fv-card {
  position: absolute; inset: 7% 9%; padding: 20px; display: grid; align-content: start; gap: 12px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); font-size: 0.85rem;
}
.fv-card__k { font: 500 0.66rem/1.2 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fv-card__t { font-size: 1.15rem; letter-spacing: -0.02em; margin-top: -6px; }
.fv-card__tags { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fv-card__rows { margin: 0; display: grid; }
.fv-card__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.fv-card__rows dt { color: var(--muted); }
.fv-card__rows dd { margin: 0; font-weight: 500; text-align: right; }
.fv__s .fv-card__rows div, .fv__s .fv-card__tags .tag { opacity: 0; transform: translateX(-8px); transition: opacity 500ms var(--ease), transform 600ms var(--ease); }
.fv__s.is-on .fv-card__rows div, .fv__s.is-on .fv-card__tags .tag { opacity: 1; transform: none; }
.fv__s.is-on .fv-card__tags .tag:nth-child(2) { transition-delay: 80ms; }
.fv__s.is-on .fv-card__rows div:nth-child(1) { transition-delay: 160ms; }
.fv__s.is-on .fv-card__rows div:nth-child(2) { transition-delay: 220ms; }
.fv__s.is-on .fv-card__rows div:nth-child(3) { transition-delay: 280ms; }
.fv__s.is-on .fv-card__rows div:nth-child(4) { transition-delay: 340ms; }

.fv-sitac { position: absolute; inset: 0; width: 100%; height: 100%; }
.fv-sitac .s-bg { fill: var(--map-bg); }
.fv-sitac .s-cont path { fill: none; stroke: var(--map-contour); stroke-width: 1.2; }
.fv-sitac .s-fire { fill: color-mix(in srgb, var(--red) 22%, transparent); stroke: var(--red); stroke-width: 2; stroke-dasharray: 6 4; }
.fv-sitac .s-front { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; }
.fv-sitac .s-hose { fill: none; stroke: var(--blue); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 10 7; animation: flowDash 1.2s linear infinite; }
@keyframes flowDash { to { stroke-dashoffset: -17; } }
.fv-sitac .s-sym rect, .fv-sitac .s-sym path, .fv-sitac .s-sym circle { fill: var(--surface); stroke: var(--blue); stroke-width: 2.2; }
.fv-sitac .s-sym--4 circle, .fv-sitac .s-sym--4 path { stroke: var(--red); }
.fv-sitac .s-sym text { font: 700 12px var(--f-mono); fill: var(--blue); text-anchor: middle; }
.fv-sitac .s-sector { fill: none; stroke: var(--fg-2); stroke-width: 1.5; stroke-dasharray: 3 5; opacity: 0.6; }
.fv-sitac .s-lbl { font: 600 12px var(--f-sans); fill: var(--fg-2); }
.fv__s .s-sym { opacity: 0; transform: scale(0.4); transform-box: fill-box; transform-origin: center; transition: opacity 500ms var(--ease), transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.fv__s.is-on .s-sym { opacity: 1; transform: none; }
.fv__s.is-on .s-sym--2 { transition-delay: 120ms; }
.fv__s.is-on .s-sym--3 { transition-delay: 240ms; }
.fv__s.is-on .s-sym--4 { transition-delay: 360ms; }
.fv-legend {
  position: absolute; left: 14px; bottom: 14px; display: grid; gap: 6px; padding: 10px 12px; font-size: 0.75rem;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 12px;
}
.fv-legend > span { display: flex; align-items: center; gap: 8px; }
.lg { width: 18px; height: 4px; border-radius: 2px; }
.lg--red { background: var(--red); }
.lg--blue { background: repeating-linear-gradient(90deg, var(--blue) 0 6px, transparent 6px 9px); }

.fv__s[data-s="4"] { display: grid; place-items: center; background: var(--bg-2); }
.paper {
  width: 82%; aspect-ratio: 1.414; background: #fff; color: #0b1628; border-radius: 4px; padding: 3.2% 3.2% 2.6%;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.06); display: grid; grid-template-rows: auto 1fr auto; gap: 8px;
  transform: rotate(-2deg) translateY(16px); transition: transform 900ms var(--ease);
}
.fv__s.is-on .paper { transform: rotate(-1deg); }
.paper__title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.paper__title div { display: grid; line-height: 1.2; }
.paper__title b { font-size: clamp(0.7rem, 1.4vw, 0.95rem); }
.paper__title span { font-size: clamp(0.55rem, 1vw, 0.68rem); color: #5b6880; }
.paper__map {
  position: relative; border: 1.5px solid #0b1628; overflow: hidden;
  background: repeating-radial-gradient(circle at 70% 120%, #f6f8f3 0 16px, #d6dccd 16px 17px), #f6f8f3;
}
.paper__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(11, 22, 40, 0.25) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 22, 40, 0.25) 1px, transparent 1px); background-size: 25% 33.3%; }
.paper__fire { position: absolute; left: 50%; top: 34%; width: 22%; height: 26%; border-radius: 48% 52% 40% 60%; background: rgba(220, 59, 47, 0.28); border: 2px solid #dc3b2f; }
.paper__inset { position: absolute; left: 4%; top: 6%; width: 20%; height: 26%; background: #fff; border: 1px solid #0b1628; }
.paper__inset::after { content: ""; position: absolute; left: 50%; top: 40%; width: 18%; height: 22%; border: 1.5px solid #dc3b2f; }
.paper__qr { position: absolute; right: 4%; bottom: 6%; width: 16%; aspect-ratio: 1; background: #fff; padding: 3px; display: grid; grid-template-columns: repeat(21, 1fr); }
.paper__qr i { background: #0b1628; }
.paper__qr i.o { background: transparent; }
.paper__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: clamp(0.5rem, 1vw, 0.66rem); color: #33435c; }
.paper__scale { display: flex; width: 26%; height: 5px; border: 1px solid #0b1628; }
.paper__scale i { flex: 1; }
.paper__scale i:nth-child(odd) { background: #0b1628; }

.flow__steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step {
  min-height: 62vh; display: grid; align-content: center; gap: 14px; padding-left: 28px; border-left: 1px solid var(--line); position: relative;
  color: var(--muted); transition: color 500ms var(--ease);
}
.step::before {
  content: ""; position: absolute; left: -1px; top: calc(50% - 60px); height: 120px; width: 2px; background: var(--fg);
  transform: scaleY(0); transition: transform 600ms var(--ease);
}
.step.is-on { color: var(--fg); }
.step.is-on::before { transform: scaleY(1); }
.step__n { font-size: 0.75rem; letter-spacing: 0.1em; }
.step .h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); letter-spacing: -0.03em; }
.step p { max-width: 42ch; font-size: 1.0625rem; line-height: 1.6; color: inherit; opacity: 0.85; }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card {
  --mx: 50%; --my: 50%; position: relative; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 2.6vw, 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; isolation: isolate;
  transition: border-color 300ms ease, transform 500ms var(--ease), box-shadow 500ms var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 400ms ease; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--glow), transparent 60%);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.card:hover::before { opacity: 1; }
.card > p { color: var(--fg-2); max-width: 52ch; font-size: 0.975rem; text-wrap: pretty; }
.card__hd { display: flex; align-items: center; gap: 12px; }
.card__ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.card__ic--blue { background: var(--accent-soft); color: var(--blue); }
.card__ic--green { background: var(--green-soft); color: var(--green); }
.card__ic--red { background: var(--red-soft); color: var(--red); }
.card__ic--yellow { background: var(--yellow-soft); color: var(--yellow); }
/* corners of the logo find the card you point at */
.card__vf { position: absolute; inset: 10px; pointer-events: none; }
.card__vf i { position: absolute; width: 16px; height: 16px; border: 2.5px solid; opacity: 0; transition: opacity 300ms ease, transform 500ms var(--ease); }
.card__vf i:nth-child(1) { left: 0; top: 0; border-color: var(--red); border-right: 0; border-bottom: 0; border-top-left-radius: 6px; transform: translate(-8px, -8px); }
.card__vf i:nth-child(2) { right: 0; top: 0; border-color: var(--blue); border-left: 0; border-bottom: 0; border-top-right-radius: 6px; transform: translate(8px, -8px); }
.card__vf i:nth-child(3) { left: 0; bottom: 0; border-color: var(--yellow); border-right: 0; border-top: 0; border-bottom-left-radius: 6px; transform: translate(-8px, 8px); }
.card__vf i:nth-child(4) { right: 0; bottom: 0; border-color: var(--green); border-left: 0; border-top: 0; border-bottom-right-radius: 6px; transform: translate(8px, 8px); }
.card:hover .card__vf i, .card:focus-within .card__vf i { opacity: 1; transform: none; }

.card--water { grid-column: span 7; }
.card--sar { grid-column: span 5; }
.card--3d { grid-column: span 12; padding: 0; }

/* water */
.water { margin: auto 0 0; display: grid; gap: 16px; }
.water__svg { width: 100%; height: 190px; overflow: visible; }
.water__grid path { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.water__terrain { fill: none; stroke: var(--fg-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.water__press { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-dasharray: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.water__pumps circle { fill: var(--surface); stroke: var(--blue); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.water__pumps text { font: 600 13px var(--f-mono); fill: var(--fg); text-anchor: middle; }
.water__pumps g { opacity: 0; transition: opacity 500ms var(--ease); transition-delay: calc(500ms + var(--i) * 260ms); }
.is-in .water__pumps g { opacity: 1; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2200ms var(--ease-io); }
.is-in .draw { stroke-dashoffset: 0; }
.water__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.water__stats span { display: grid; gap: 2px; min-width: 0; }
.water__stats b { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 500; letter-spacing: -0.03em; }
.water__stats small { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }

/* SAR */
.sar { width: 100%; flex: 1; min-height: 240px; display: block; }
.sar__legend { display: flex; gap: 16px; font-size: 0.72rem; color: var(--muted); }
.sar__legend span { display: inline-flex; align-items: center; gap: 6px; }
.sar__legend i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); }

/* 3D */
.m3 { display: grid; grid-template-columns: 1fr 1.25fr; min-height: 440px; }
.m3__txt { padding: clamp(24px, 3.2vw, 44px); display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.m3__txt p { color: var(--fg-2); max-width: 48ch; }
.m3__list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; font-size: 0.95rem; }
.m3__list li { display: flex; align-items: center; gap: 10px; }
.m3__list .ic { color: var(--green); width: 16px; height: 16px; }
.m3__vis { position: relative; min-width: 0; min-height: 360px; background: radial-gradient(80% 80% at 60% 40%, var(--surface-2), var(--bg-2)); border-left: 1px solid var(--line); overflow: hidden; }
.m3__vis canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.m3__chip {
  position: absolute; display: grid; gap: 1px; padding: 8px 12px; font-size: 0.7rem; color: var(--muted);
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-2);
  animation: float 6s ease-in-out infinite;
}
.m3__chip b { font-size: 0.95rem; color: var(--fg); font-weight: 500; }
.m3__chip b.ok { color: var(--green); }
.m3__chip--a { left: 8%; top: 12%; }
.m3__chip--b { right: 7%; top: 30%; animation-delay: -2s; }
.m3__chip--c { left: 14%; bottom: 12%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* building floor by floor */
.card--fp { grid-column: span 12; padding: 0; }
.fp { display: grid; grid-template-columns: 1.25fr 1fr; min-height: 460px; }
.fp__txt { padding: clamp(24px, 3.2vw, 44px); display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.fp__txt p { color: var(--fg-2); max-width: 48ch; }
.fp__vis {
  position: relative; min-width: 0; min-height: 420px; overflow: hidden; border-right: 1px solid var(--line);
  background: radial-gradient(80% 80% at 50% 45%, var(--surface-2), var(--bg-2));
}
.fp__vis canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rail3d {
  position: absolute; left: 18px; top: 50%; translate: 0 -50%; list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2);
}
.rail3d li {
  width: 30px; height: 28px; display: grid; place-items: center; border-radius: 8px; font: 600 0.72rem/1 var(--f-mono); color: var(--muted);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.rail3d li.is-on { background: var(--accent); color: var(--accent-ink); }
.unit-tip {
  position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; max-width: calc(100% - 100px);
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2);
  transition: opacity 300ms var(--ease), transform 400ms var(--ease);
}
.unit-tip.is-swap { opacity: 0; transform: translateY(6px); }
.unit-tip__sw { width: 12px; height: 12px; border-radius: 4px; flex: none; background: var(--sw, var(--muted)); }
.unit-tip__txt { display: grid; line-height: 1.3; min-width: 0; }
.unit-tip__txt b { font-size: 0.85rem; }
.unit-tip__txt span { font-size: 0.7rem; color: var(--muted); }
.fp-alert {
  position: absolute; right: 18px; top: 18px; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 0.74rem; font-weight: 600;
}
.fp-alert .ic { width: 13px; height: 13px; }
.is-in .fp-alert { animation: fpPulse 2.4s ease-out 600ms infinite; }
@keyframes fpPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.use-legend { position: absolute; left: 18px; bottom: 18px; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.7rem; color: var(--muted); }
.use-legend li { display: flex; align-items: center; gap: 7px; transition: opacity 300ms ease; }
.use-legend li.is-dim { opacity: 0.35; }
.use-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }

/* building scene inside the flow */
.fv__s--bld .fp__vis { position: absolute; inset: 0; min-height: 0; border: 0; }

/* fire spread + traffic */
.card--fire { grid-column: span 7; }
.card--traffic { grid-column: span 5; }
.sim {
  position: relative; flex: 1; min-height: 300px; margin-top: auto; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--map-bg);
}
.sim canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sim__chip {
  position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: 0.72rem; font-weight: 500;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-1);
}
.sim__arrow { width: 14px; height: 14px; color: var(--blue); transform: rotate(-45deg); }
.sim__chip--jam { left: auto; top: auto; transition: left 300ms ease, top 300ms ease; }
.sim__time {
  position: absolute; right: 12px; top: 12px; padding: 6px 10px; font-size: 0.95rem; font-weight: 600; color: var(--red);
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 10px;
}
.sim__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.72rem; color: var(--muted); }
.sim__legend > span { display: inline-flex; align-items: center; gap: 6px; }
.iso { width: 16px; height: 0; border-top: 2px dashed var(--red); }
.iso--2 { opacity: 0.75; }
.iso--3 { opacity: 0.5; }
.tl { width: 16px; height: 4px; border-radius: 2px; }
.tl--g { background: var(--green); }
.tl--y { background: var(--yellow); }
.tl--r { background: var(--red); }

/* live feed */
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot--green { background: var(--green); animation: blink 2s ease-in-out infinite; }
.dot--yellow { background: var(--yellow); }
.dot--blue { background: var(--blue); }
.dot--red { background: var(--red); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes feedIn { from { background: var(--accent-soft); } }

/* "Še več": the smaller tools, one line each */
.more { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 18px; }
.more__t { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.more__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.more__list li { display: flex; flex-direction: column; gap: 12px; padding: 22px 20px 0 0; min-width: 0; }
.more__list li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.more__list .card__ic { width: 34px; height: 34px; border-radius: 10px; }
.more__list .card__ic .ic { width: 16px; height: 16px; }
.more__list div { display: grid; gap: 4px; }
.more__list b { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.more__list div span { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }

/* ---------- sources ---------- */
.src-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.src {
  display: grid; align-content: start; gap: 10px; padding: clamp(20px, 2.4vw, 32px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  min-height: 170px; position: relative; transition: background-color 300ms ease;
}
.src:hover { background: var(--surface); }
.src b { font-size: 1.35rem; letter-spacing: -0.03em; font-weight: 600; }
.src span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; max-width: 30ch; }

/* ---------- truth ---------- */
.truth__in { display: grid; gap: clamp(32px, 4vw, 56px); }
.truth__in > * { min-width: 0; }
.mega { font-size: var(--t-mega); line-height: 0.92; letter-spacing: -0.055em; font-weight: 600; text-wrap: balance; }
.mega__em { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .mega__em {
    -webkit-text-stroke: 0; color: transparent;
    background: linear-gradient(100deg, var(--red), var(--yellow) 30%, var(--green) 60%, var(--blue) 90%);
    background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; animation: sheen 9s ease-in-out infinite alternate;
  }
}
@keyframes sheen { to { background-position: 100% 0; } }
.truth__demo .cbar--static { position: static; translate: none; display: inline-flex; flex-wrap: wrap; max-width: 100%; white-space: normal; }
.cbar__h--none { display: inline-flex; gap: 10px; color: var(--yellow); }
.cbar__h--none .dash { color: var(--fg); font-weight: 600; }
.typed { border-right: 1.5px solid currentColor; padding-right: 2px; animation: caret 900ms steps(1) infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.truth__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); padding-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--line); }
.truth__cols > div { display: grid; gap: 10px; align-content: start; }
.truth__cols p { color: var(--fg-2); }

/* ---------- field ---------- */
.field { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.spec { display: flex; flex-direction: column; gap: 12px; padding: 26px 22px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.spec__ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); margin-bottom: 6px; }
.spec p { color: var(--fg-2); font-size: 0.95rem; }
.spec__k { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-strong); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.02em; }
.reveal:nth-child(2) { --rd: 80ms; }
.reveal:nth-child(3) { --rd: 160ms; }
.reveal:nth-child(4) { --rd: 240ms; }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(80px, 10vw, 140px); }
.cta {
  position: relative; border-radius: 28px; background: var(--fg); color: var(--bg); overflow: hidden; isolation: isolate;
  padding: clamp(40px, 7vw, 104px) clamp(24px, 6vw, 88px);
}
.cta__bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; }
.cta__in { display: grid; gap: 22px; max-width: 760px; }
.cta .eyebrow { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.cta .sec__lead { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.vf--cta { inset: 18px; }
.vf--cta i { width: 34px; height: 34px; border-width: 3px; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; }
.mail__addr {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-size: clamp(1.6rem, 1rem + 3vw, 3.2rem); font-weight: 600; letter-spacing: -0.04em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 500ms var(--ease); padding-bottom: 4px;
  user-select: all; word-break: break-all;
}
.mail__addr:hover { background-size: 100% 2px; }
.mail__addr .ic { width: 0.8em; height: 0.8em; stroke-width: 1.6; }
.cta .btn--ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.cta .btn--ghost:hover { border-color: var(--bg); }
.mail__copy .ic--ok { display: none; }
.mail__copy.is-done .ic--ok { display: block; color: var(--green); }
.mail__copy.is-done .ic--copy { display: none; }
.mail__done { min-height: 1em; font-size: 0.75rem; color: color-mix(in srgb, var(--bg) 65%, transparent); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.brand--foot img { width: 24px; height: 24px; border-radius: 6px; }
.foot__txt { display: grid; gap: 4px; min-width: 0; }
.foot__t { color: var(--muted); font-size: 0.875rem; }
.foot__fun { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.8rem; opacity: 0.85; }
.cup { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.cup__steam { animation: steam 2.4s ease-in-out infinite; }
.cup__steam--2 { animation-delay: 1.2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(2px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-3px); } }
.foot__c { margin-left: auto; color: var(--muted); font-size: 0.75rem; }
.foot__c a { text-decoration: none; }
.foot__c a:hover { color: var(--fg); }

/* ---------- theme transition (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); animation: vtReveal 750ms var(--ease-io) forwards; }
@keyframes vtReveal { to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0)); } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__links + .nav__tools { margin-left: auto; }
  .hero__head { grid-template-columns: 1fr; align-items: start; }
  .display { max-width: 14ch; }
  .card--water, .card--sar { grid-column: span 12; }
  .sar { min-height: 280px; }
  .card--fire, .card--traffic { grid-column: span 12; }
  .src-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .more__list { grid-template-columns: repeat(3, 1fr); }
  .more__list li:nth-child(4) { padding-left: 0; border-left: 0; }
  .more__list li:nth-child(n+4) { margin-top: 22px; border-top: 1px solid var(--line); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
  .field { grid-template-columns: repeat(2, 1fr); }
  .loc { width: 240px; }
}
@media (max-width: 860px) {
  .flow__grid { grid-template-columns: 1fr; gap: 0; }
  .flow__vis { position: sticky; top: calc(var(--nav-h) + 8px); z-index: 3; }
  .fv { position: relative; top: auto; aspect-ratio: auto; height: min(52vh, 380px); }
  .step { min-height: 46vh; padding-left: 20px; }
  .step:first-child { padding-top: 32px; }
  .m3 { grid-template-columns: 1fr; }
  .m3__vis { border-left: 0; border-top: 1px solid var(--line); min-height: 340px; }
  .fp { grid-template-columns: 1fr; }
  .use-legend { display: none; }
  .truth__cols { grid-template-columns: 1fr; }
  .app__body { grid-template-columns: 1fr; height: 520px; }
  .rail { display: none; }
  .crumbs li:not(.crumbs__here) { display: none; }
  .crumbs { padding-left: 8px; }
  .loc { top: auto; bottom: 64px; right: 10px; left: 10px; width: auto; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px; }
  .loc__rows, .loc__c { display: none; }
  .loc__warn { flex-direction: column; align-items: flex-end; }
  .alert { top: 10px; }
}
@media (max-width: 600px) {
  :root { --nav-h: 58px; }
  .nav__cta { display: none; }
  .nav .brand__name { display: none; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .app__dots, .app__clock { display: none; }
  .chip-live { font-size: 0.7rem; }
  .app__body { height: 460px; }
  .cbar__s { display: none; }
  .cbar__v { min-width: 0; }
  .cbar { font-size: 0.68rem; }
  .cbar > * { padding: 5px 7px; }
  .loc { grid-template-columns: 1fr; }
  .loc__warn { flex-direction: row; align-items: flex-start; }
  .water__stats { grid-template-columns: repeat(2, 1fr); }
  .src-grid, .field { grid-template-columns: 1fr; }
  .more__list { grid-template-columns: 1fr; border-top: 0; }
  .more__list li:nth-child(n) { flex-direction: row; align-items: center; padding: 14px 0; margin: 0; border-left: 0; border-top: 1px solid var(--line); }
  .src { min-height: 0; }
  .vf { inset: -10px; }
  .stage__note { text-align: left; }
  .foot__c { margin-left: 0; }
  .fv-card { inset: 4% 4%; padding: 14px; gap: 8px; font-size: 0.78rem; }
  .fv-card__rows div { padding: 6px 0; }
  .fv-card__tags .tag { white-space: normal; height: auto; padding-block: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  html { scroll-behavior: auto; }
  .app { transform: none !important; }
  .marquee__row { animation: none; }
}
