/* Baikal Studios
   Concept: a nautical chart of Lake Baikal. Paper and ink, one vermilion
   "sounding" accent, mono annotations for data, contour lines for depth.
   Type: Bricolage Grotesque (display) / Manrope (text) / JetBrains Mono (data). */

:root {
  --paper: #edece7;
  --paper-2: #e4e3dd;
  --ink: #0f1214;
  --ink-2: #474d51;
  --ink-3: #7b8186;
  --line: rgba(15, 18, 20, .14);
  --line-strong: rgba(15, 18, 20, .82);
  --signal: #e4432a;
  --signal-ink: #b8301b;
  --lake: #2e5a68;

  --deep: #0b0e10;
  --deep-2: #14181b;
  --deep-ink: #e6e8e4;
  --deep-ink-2: #9aa1a4;
  --deep-line: rgba(230, 232, 228, .13);

  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --text: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1rem, 3.2vw, 2.5rem);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
/* Past roughly 1,100 m the page is dark enough that the ink tokens flip to light (set by site.js). */
html[data-dark] {
  --ink: #e9ece9; --ink-2: #bcc7ca; --ink-3: #8fa1a6;
  --line: rgba(233, 236, 233, .16); --line-strong: rgba(233, 236, 233, .7);
  --paper: #0f1b21; --paper-2: #18272e;
}
body { transition: color .4s; }
/* Surfaces that stay light at any depth keep dark ink. */
.harbour .ph figcaption, .harbour .ph figcaption b,
.strata .layer:nth-child(2), .strata .layer:nth-child(3) { color: #0f1214 !important; }
.profile .diver * { fill: #0f1214 !important; }
.profile .bed { stroke: #0f1214 !important; }
.profile .stn { fill: #edece7 !important; }
body {
  margin: 0;
  background-color: var(--bg, var(--paper));
  color: var(--ink);
  font: 400 clamp(1rem, .96rem + .18vw, 1.075rem)/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; }
.skip:focus { left: .5rem; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; font-feature-settings: "zero" 1; }
.muted { color: var(--ink-3); }

/* Paper grain: a faint chart-paper grid, no gradients or glow */
.grid-paper {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: -1px -1px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg, var(--paper)) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; font: 700 1.2rem/1 var(--display); letter-spacing: -.02em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand-coords { margin-left: .35rem; color: var(--ink-3); }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); font-size: .92rem; font-weight: 500; }
.nav a:not(.btn) { position: relative; color: var(--ink-2); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--ink); position: relative; transition: background .2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-btn span::before { top: -7px; } .menu-btn span::after { top: 7px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: .7rem;
  min-height: 44px; padding: .8rem 1.25rem;
  background: var(--bg); color: var(--fg);
  font: 600 .95rem/1 var(--text); letter-spacing: -.005em;
  border: 1px solid var(--bg); border-radius: 2px;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { --bg: var(--signal); }
.btn .arr { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { --bg: var(--ink); --fg: var(--paper); border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: .55rem .95rem; font-size: .88rem; }

/* ---------- Depth gauge (signature) ---------- */
/* Full-height depth gauge. On desktop it replaces the browser scrollbar: click or drag it to scroll. */
.gauge {
  position: fixed; right: .9rem; top: 5.5rem; bottom: 1.25rem;
  z-index: 40; width: 96px;
  display: flex; flex-direction: column; align-items: flex-end;
  mix-blend-mode: difference; color: #fff; user-select: none; touch-action: none;
}
.gauge-scale { position: relative; flex: 1; width: 100%; cursor: ns-resize; }
.gauge-scale::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: currentColor; opacity: .35; }
.gauge-scale i { position: absolute; right: 0; height: 1.5px; background: currentColor; opacity: .55; }
.gauge-scale i.major { opacity: 1; height: 2px; }
.gauge-scale b { position: absolute; right: 26px; transform: translateY(-50%); font: 600 .74rem/1 var(--mono); opacity: .85; }
.gauge-mark { position: absolute; right: -6px; width: 52px; height: 4px; border-radius: 2px; background: #1bbcd5; transform: translateY(-2px); transition: top .12s linear; }
.gauge-mark::after { content: ""; position: absolute; right: -2px; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #1bbcd5; transform: translateY(-50%); }
.gauge.drag .gauge-mark { transition: none; }
.gauge-read { margin-top: .9rem; font: 700 .95rem/1 var(--mono); white-space: nowrap; }
@media (min-width: 1101px) and (hover: hover) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-chart { position: absolute; inset: 0; z-index: -1; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,.3) 30%, #000 55%); mask-image: linear-gradient(90deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,.3) 30%, #000 55%); }
.hero-chart canvas { display: block; width: 100%; height: 100%; }
.hero .wrap { min-height: calc(100svh - 4.25rem); display: grid; grid-template-rows: auto 1fr auto; padding-block: clamp(1.5rem, 4vw, 3rem) 0; }
.hero { background: radial-gradient(40rem 22rem at 30% 92%, rgba(46, 90, 104, .16), transparent 65%), radial-gradient(30rem 18rem at 78% 96%, rgba(228, 67, 42, .08), transparent 65%); }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem; color: var(--ink); font-size: .92rem; font-weight: 500; }
.hero-meta > span { padding: .55rem 1rem; border: 1px solid var(--line-strong); border-radius: 99px; background: rgba(255, 255, 255, .55); }
.hero-meta .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: .55rem; vertical-align: 1px; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0%,100% { box-shadow: 0 0 0 0 rgba(228,67,42,.45); } 60% { box-shadow: 0 0 0 7px rgba(228,67,42,0); } }
.hero-main { align-self: center; padding-block: clamp(3rem, 8vh, 6rem); }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(4.1rem, 1.6rem + 10vw, 11.5rem);
  line-height: .88; letter-spacing: -.042em;
  font-variation-settings: "opsz" 96, "wdth" 92;
}
.hero h1 .thin { font-weight: 200; letter-spacing: -.035em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero h1 .line > span { display: inline-block; }
.hero h1 .sig { color: var(--signal); }
.hero-sub { display: grid; grid-template-columns: minmax(0, 34rem) auto; gap: 2rem; align-items: end; justify-content: space-between; margin-top: clamp(2rem, 5vh, 3.5rem); }
.hero-sub p { margin: 0; font-size: clamp(1.05rem, 1rem + .35vw, 1.3rem); line-height: 1.5; color: var(--ink-2); }
.hero-sub p strong { color: var(--ink); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
/* Liquid glass tiles (stormaref/LiquidGlassSkill): near-clear tint, polished rim,
   refraction from assets/glass.js in Chromium, blur fallback elsewhere. */
.hero-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 0 0 clamp(1rem, 3vw, 2rem); }
.hero-strip div {
  padding: 1.15rem 1.4rem 1.3rem; border-radius: 20px;
  border: 1px solid rgba(30, 33, 45, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(179, 179, 179, .06));
  box-shadow: 0 10px 30px rgba(30, 33, 45, .1), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(3px) saturate(125%); backdrop-filter: blur(3px) saturate(125%);
}
.hero-strip dt { color: var(--ink-2); margin-bottom: .35rem; display: flex; align-items: center; gap: .5rem; }
.hero-strip dt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.hero-strip dd { margin: 0; font-weight: 700; font-size: 1rem; color: var(--ink); }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.sec { padding-block: clamp(4.5rem, 10vw, 9rem); }
.sec-head { display: grid; grid-template-columns: 11rem 1fr; gap: 1.5rem 2rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.sec-num { color: var(--ink-2); padding-top: .9rem; border-top: 1px solid var(--line-strong); font-size: .9rem; font-weight: 500; }
.sec-num em { font-style: normal; color: var(--signal); font-weight: 700; }
.sec-head h2 {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(2.2rem, 1.2rem + 4.2vw, 5.4rem); line-height: .98; letter-spacing: -.035em;
  font-variation-settings: "opsz" 96, "wdth" 95; max-width: 16ch;
}
.sec-head h2 .thin { font-weight: 200; }
.sec-head p { grid-column: 2; margin: 0; max-width: 40rem; color: var(--ink-2); font-size: 1.08rem; }

/* ---------- Case studies ---------- */
.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line-strong); }
.case + .case { margin-top: clamp(2rem, 5vw, 4rem); }
.case-info { display: flex; flex-direction: column; }
.case-top { display: flex; justify-content: space-between; color: var(--ink-3); margin-bottom: 1.6rem; }
.case h3 { margin: 0 0 .4rem; font: 700 clamp(2rem, 1.3rem + 2.6vw, 3.6rem)/.95 var(--display); letter-spacing: -.045em; }
.case .kind { margin: 0 0 1.5rem; color: var(--ink-2); }
.case .desc { margin: 0 0 1.75rem; font-size: 1.04rem; max-width: 34rem; }
.facts { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.facts li span:first-child { color: var(--ink-3); padding-top: .15rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.tag { padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); }
.case-link { margin-top: auto; align-self: flex-start; }

.shot { position: relative; align-self: start; }
.browser { background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgba(15,18,20,.35); }
.browser-bar { display: flex; align-items: center; gap: .9rem; height: 34px; padding: 0 .8rem; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink-3); display: inline-block; margin-right: 4px; }
.browser-bar .url { flex: 1; text-align: center; color: var(--ink-3); margin-right: 40px; }
.browser img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; transition: transform 1.2s var(--ease); }
.case:hover .browser img { transform: scale(1.015); }
.phone {
  position: absolute; right: clamp(-1rem, -1.5vw, -.5rem); bottom: -2.5rem; width: 24%;
  border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: #000; padding: 5px;
  box-shadow: 0 30px 50px -25px rgba(15,18,20,.5);
}
.phone img { border-radius: 13px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.shot-cap { margin-top: .9rem; color: var(--ink-3); }

/* ---------- Systems ledger ---------- */
.ledger { border-top: 1px solid var(--line-strong); }
.ledger-head, .row-sum { display: grid; grid-template-columns: 4rem minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, 1.3fr) 2.5rem; gap: 1.5rem; align-items: baseline; }
.ledger-head { padding: .85rem 1.25rem; color: var(--deep-ink-2); background: var(--ink); }
.row { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 82%, transparent); transition: background .3s, box-shadow .3s; }
.row[data-open] { background: #fff; box-shadow: inset 3px 0 0 var(--signal), 0 18px 40px -28px rgba(15, 18, 20, .35); position: relative; z-index: 1; }
.row[data-open] .row-sum:hover { background: transparent; }
.row-sum { width: 100%; text-align: left; padding: 1.5rem 1.25rem; transition: background .25s; }
.row-sum:hover { background: color-mix(in srgb, var(--paper-2) 70%, transparent); }
.row-sum .n { color: var(--ink-3); }
.row-sum .t { font: 700 clamp(1.25rem, 1rem + .9vw, 1.75rem)/1.1 var(--display); letter-spacing: -.03em; }
.row-sum .t small { display: block; margin-top: .35rem; font: 500 .72rem/1.3 var(--mono); letter-spacing: .02em; color: var(--ink-3); }
.row-sum .d { color: var(--ink-2); }
.row-sum .s { color: var(--ink-2); }
.row-sum .pm { justify-self: end; width: 22px; height: 22px; position: relative; }
.row-sum .pm::before, .row-sum .pm::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease); }
.row-sum .pm::after { transform: rotate(90deg); }
.row[data-open] .pm::after { transform: rotate(0); }
.row[data-open] .row-sum .n { color: var(--signal); }
.row-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.row[data-open] .row-body { grid-template-rows: 1fr; }
.row-body > div { overflow: hidden; }
.row-inner { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.5rem; padding: .25rem 1.25rem 2.25rem; }
.row-inner ul { margin: 0; padding: 0; list-style: none; grid-column: 2; }
.row-inner li { padding: .55rem 0 .55rem 1.4rem; position: relative; font-size: .95rem; border-top: 1px solid var(--line); }
.row-inner li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 8px; height: 1px; background: var(--signal); }
.diagram { grid-column: 3; border: 1px solid var(--line); background: var(--paper-2); padding: 1rem; border-radius: 2px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram text { font: 500 10.5px var(--mono); fill: var(--ink-2); }
.diagram .box { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.diagram .box.hot { fill: var(--ink); }
.diagram .hot-t { fill: var(--paper); }
.diagram .wire { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.diagram .wire-s { fill: none; stroke: var(--signal); stroke-width: 1.4; }
.diagram-cap { margin-top: .6rem; color: var(--ink-3); }

/* ---------- Dark: studio photography ---------- */
.deep { background: var(--deep); color: var(--deep-ink); }
.deep .sec-num { color: var(--deep-ink-2); border-top-color: var(--deep-ink); }
.deep .sec-head p { color: var(--deep-ink-2); }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(70px, 8vw, 118px); gap: clamp(.5rem, 1vw, .9rem); }
.ph { position: relative; overflow: hidden; background: var(--deep-2); cursor: zoom-in; border-radius: 2px; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; filter: saturate(.92); }
.ph:hover img { transform: scale(1.04); filter: saturate(1.05); }
.ph figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 1rem;
  padding: 2.5rem .9rem .8rem; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease);
}
.ph:hover figcaption, .ph:focus-visible figcaption { opacity: 1; transform: none; }
.ph figcaption b { font: 600 .95rem/1.2 var(--text); }
.g1 { grid-column: 1 / span 5; grid-row: span 6; }
.g2 { grid-column: 6 / span 4; grid-row: span 3; }
.g3 { grid-column: 10 / span 3; grid-row: span 4; }
.g4 { grid-column: 6 / span 4; grid-row: span 3; }
.g5 { grid-column: 10 / span 3; grid-row: span 2; }
.g6 { grid-column: 1 / span 12; grid-row: span 3; }
.g6 img { object-position: 50% 42%; }

/* Harbour: the studio photos as plates pinned to a chart table at night */
.harbour {
  --sea: #0c2733;
  background:
    radial-gradient(circle at 78% 18%, transparent 0 120px, rgba(190, 220, 228, .07) 121px 122px, transparent 123px 190px, rgba(190, 220, 228, .06) 191px 192px, transparent 193px 270px, rgba(190, 220, 228, .05) 271px 272px, transparent 273px),
    linear-gradient(rgba(190, 220, 228, .06) 1px, transparent 1px) -1px -1px / 120px 120px,
    linear-gradient(90deg, rgba(190, 220, 228, .06) 1px, transparent 1px) -1px -1px / 120px 120px,
    var(--sea);
}
.harbour .sec-num { border-top-color: #d8c9a3; }
.harbour .sec-num em { color: #d8c9a3; }
.harbour .gallery { gap: clamp(.9rem, 1.6vw, 1.4rem); }
.harbour .ph {
  display: flex; flex-direction: column; margin: 0; padding: 9px 9px 0; border-radius: 1px;
  background: #f3efe4; overflow: visible;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 22px 36px -18px rgba(0, 0, 0, .7);
  transform: rotate(var(--tilt, 0deg)); transition: transform .5s var(--ease), box-shadow .5s;
}
.harbour .ph:nth-child(odd) { --tilt: -.7deg; }
.harbour .ph:nth-child(even) { --tilt: .6deg; }
.harbour .ph:hover, .harbour .ph:focus-visible { transform: rotate(0) translateY(-4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 30px 48px -20px rgba(0, 0, 0, .8); }
.harbour .ph picture { display: block; flex: 1; min-height: 0; overflow: hidden; background: var(--deep-2); }
.harbour .ph:hover img { transform: scale(1.03); }
/* brass photo corners */
.harbour .ph::before, .harbour .ph::after { content: ""; position: absolute; top: 3px; width: 18px; height: 18px; z-index: 2; pointer-events: none; }
.harbour .ph::before { left: 3px; background: linear-gradient(135deg, #b89a5b 0 50%, transparent 50%); }
.harbour .ph::after { right: 3px; background: linear-gradient(225deg, #b89a5b 0 50%, transparent 50%); }
.harbour .ph figcaption {
  position: static; opacity: 1; transform: none; background: none; color: var(--ink);
  padding: .5rem .15rem .6rem; flex-direction: column; gap: .1rem;
}
.harbour .ph figcaption b { font: 600 .9rem/1.2 var(--text); }
.harbour .ph figcaption .mono { color: var(--lake); text-transform: uppercase; letter-spacing: .08em; font-size: .64rem; }

.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 4vmin; background: rgba(6,8,9,.94); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.lightbox.on { opacity: 1; visibility: visible; transition: opacity .3s; }
.lightbox img { max-width: 100%; max-height: 86vh; width: auto; object-fit: contain; }
.lightbox p { color: var(--deep-ink-2); margin: 1rem 0 0; text-align: center; }
.lb-close { position: absolute; top: 1rem; right: 1rem; color: var(--deep-ink); padding: .7rem 1rem; border: 1px solid var(--deep-line); }

/* ---------- Services ---------- */
/* Strata: each service is a deeper layer of the lake, with an iceberg breaking the surface */
.strata { position: relative; margin-top: 5.5rem; border-radius: 8px; }
.strata .layer { position: relative; z-index: 1; display: grid; grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: baseline; padding: 1.4rem clamp(1rem, 2.5vw, 2rem); padding-right: clamp(1rem, 24vw, 330px); color: #fff; transition: padding .4s var(--ease); }
.strata .layer:hover { padding-block: 2rem; }
.strata .layer .mono { opacity: .75; }
.strata .layer h3 { margin: 0; font: 700 1.5rem/1.1 var(--display); letter-spacing: -.03em; }
.strata .layer p { margin: 0; opacity: .88; font-size: .95rem; }
.strata .layer:nth-child(2) { background: #a9cdd4; color: var(--ink); border-radius: 8px 8px 0 0; }
.strata .layer:nth-child(3) { background: #7fadb8; color: var(--ink); }
.strata .layer:nth-child(4) { background: #4d8696; }
.strata .layer:nth-child(5) { background: #2e5a68; }
.strata .layer:nth-child(6) { background: #1a3f4d; }
.strata .layer:nth-child(7) { background: #0c2733; border-radius: 0 0 8px 8px; }
.strata .layer:nth-child(2)::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: repeating-linear-gradient(90deg, #fff 0 18px, transparent 18px 26px); opacity: .7; border-radius: 8px 8px 0 0; }
.iceberg { position: absolute; z-index: 2; right: clamp(.5rem, 3vw, 3rem); top: -80px; width: clamp(130px, 22vw, 300px); height: auto; pointer-events: none; animation: drift 7s ease-in-out infinite alternate; }
@keyframes drift { to { translate: -10px 4px; } }
.iceberg .ice-tip { fill: #fff; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.iceberg .ice-shade { fill: #d4e6ea; }
.iceberg .ice-under { fill: rgba(255, 255, 255, .22); stroke: rgba(255, 255, 255, .7); stroke-width: 1.2; stroke-linejoin: round; }
.iceberg .ice-under-l { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 1; }

/* Section headers with a visual on the right (Work fan, Systems feed) */
.sec-head.has-vis { grid-template-columns: 11rem minmax(0, 1fr) minmax(0, .9fr); }
.sec-head.has-vis > .fan, .sec-head.has-vis > .feed { grid-column: 3; grid-row: 1 / span 2; align-self: end; }
/* Work: label sits above the heading, so the picture gets the width */
.sec-head.has-vis.stack { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 1.25rem 3rem; }
.sec-head.stack > .fan figure { width: 66%; }
.sec-head.stack > .sec-num { grid-column: 1; grid-row: 1; max-width: 11rem; }
.sec-head.stack > h2 { grid-column: 1; grid-row: 2; }
.sec-head.stack > p { grid-column: 1; grid-row: 3; }
.sec-head.has-vis.stack > .fan { grid-column: 2; grid-row: 1 / span 3; height: clamp(360px, 44vw, 620px); }
.fan { position: relative; height: clamp(240px, 24vw, 330px); border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, transparent 0 60px, rgba(255,255,255,.35) 61px 62px, transparent 63px 110px, rgba(255,255,255,.28) 111px 112px, transparent 113px 165px, rgba(255,255,255,.2) 166px 167px, transparent 168px 225px, rgba(255,255,255,.14) 226px 227px, transparent 228px),
    linear-gradient(160deg, #d9e8ea, #8fb7c0 70%, #6d9ca7); }
.fan figure { position: absolute; margin: 0; width: 62%; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 30px 50px -24px rgba(15, 18, 20, .55); transition: transform .6s var(--ease); }
.fan figure img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.fan figure:nth-child(1) { left: 7%; top: 18%; transform: rotate(-5deg); }
.fan figure:nth-child(2) { right: 6%; top: 30%; transform: rotate(4deg); }
.fan:hover figure:nth-child(1) { transform: rotate(-8deg) translateX(-14px); }
.fan:hover figure:nth-child(2) { transform: rotate(6deg) translateX(12px); }
.feed { border-radius: 10px; background: var(--deep); color: var(--deep-ink); padding: 1rem 1.1rem; min-height: 250px; box-shadow: 0 30px 50px -30px rgba(15, 18, 20, .6); }
.feed-top { display: flex; justify-content: space-between; color: var(--deep-ink-2); padding-bottom: .7rem; border-bottom: 1px solid var(--deep-line); margin-bottom: .5rem; }
.feed-top i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ccf7a; margin-right: .5rem; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.feed ol { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .7rem; padding: .36rem 0; border-bottom: 1px dashed rgba(230, 232, 228, .08); animation: drop .5s var(--ease) both; }
.feed li span:first-child { color: var(--deep-ink-2); }
.feed li .ok { color: #3ccf7a; } .feed li .hot { color: #ff8a73; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* Case cards, night chart: deep-water card, slow contour orbit behind, tilted devices */
.case.night { position: relative; isolation: isolate; overflow: hidden; border-top: 0; border-radius: 14px; background: #0c2733; color: var(--deep-ink); padding: clamp(1.5rem, 3.5vw, 3rem); }
.case.night .case-sea { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .6; }
.case.night .facts li span:first-child { color: #9fc3cc; }
.case.night .case-top { color: #d3e6ea; font-size: .9rem; font-weight: 500; }
.case.night .kind { color: #d3e6ea; font-size: .92rem; font-weight: 500; }
.case.night .desc { color: #c9d3d6; }
.case.night .facts, .case.night .facts li { border-color: rgba(230, 232, 228, .16); }
.case.night .tag { border-color: rgba(230, 232, 228, .22); color: #c9d3d6; }
.case.night .btn-ghost { --fg: var(--ink); --bg: #f3efe4; border-color: #f3efe4; }
.case.night .btn-ghost:hover { --bg: var(--signal); --fg: #fff; border-color: var(--signal); }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(230, 232, 228, .2); margin: 0 0 1.75rem; }
.nums div { padding: .9rem .8rem 0 0; }
.nums div + div { padding-left: .8rem; border-left: 1px solid rgba(230, 232, 228, .2); }
.nums b { display: block; font: 800 clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem)/1 var(--display); letter-spacing: -.04em; color: #fff; }
.nums span { color: #9fc3cc; font-size: .66rem; }
.case.night .shot { align-self: center; }
.case.night .browser { border-color: rgba(255, 255, 255, .25); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .8); transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); transition: transform .8s var(--ease); }
.case.night:hover .browser { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.case.night .browser-bar { background: #e9e6dd; }
.case.night .phone { border-color: #000; box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .8); }

/* ---------- Process: depth profile ---------- */
.profile { position: relative; }
.profile svg { width: 100%; height: auto; display: block; overflow: visible; }
.profile svg { border-radius: 4px; overflow: hidden; }
.profile .ground { fill: #d6cfbc; }
.profile .ground.silt { fill: url(#silt); opacity: .7; }
.profile .bed { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.profile .lvl { stroke: rgba(255, 255, 255, .25); stroke-width: 1; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.profile .drop { stroke: rgba(255, 255, 255, .7); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.profile .stn { fill: var(--paper); stroke: var(--signal); stroke-width: 2; vector-effect: non-scaling-stroke; }
.profile .rays path { fill: url(#ray); opacity: .35; animation: sway 7s ease-in-out infinite alternate; transform-origin: 50% 0; transform-box: fill-box; }
.profile .rays path:nth-child(2n) { animation-duration: 9s; animation-delay: -3s; }
@keyframes sway { from { transform: skewX(-4deg); opacity: .2; } to { transform: skewX(5deg); opacity: .42; } }
.profile .surface path { fill: none; stroke: #fff; stroke-width: 2; opacity: .85; vector-effect: non-scaling-stroke; }
.profile .surface { animation: swell 3.2s linear infinite; }
@keyframes swell { to { transform: translateX(80px); } }
.profile .bubbles circle { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* Old brass-helmet diver on an air hose */
.profile .hose { fill: none; stroke: #2a2620; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.profile .hull { fill: #5b3b22; } .profile .cabin { fill: #f3efe4; } .profile .mast { stroke: #2a2620; stroke-width: 1.2; }
.profile .boat { animation: bob 2.6s ease-in-out infinite alternate; }
@keyframes bob { to { translate: 0 1.5px; } }
/* Diver: solid black silhouette that walks down to the treasure as the section scrolls */
.profile .diver * { fill: var(--ink); stroke: none; }
.profile .diver { animation: sway-diver 3.4s ease-in-out infinite alternate; }
@keyframes sway-diver { from { translate: 0 0; } to { translate: 0 -2px; } }
.profile .leg { transform-box: fill-box; transform-origin: 50% 0; }
.profile .walking .leg { animation: step .45s ease-in-out infinite alternate; }
.profile .walking .leg-r { animation-delay: -.45s; }
@keyframes step { from { rotate: -14deg; } to { rotate: 14deg; } }
/* Treasure chest at the deepest point; opens when the diver reaches it */
.profile .chest-base { fill: #6b4423; stroke: #2a1a0c; stroke-width: .8; }
.profile .chest-band { fill: #d9a441; }
.profile .coins circle { fill: #f2c94c; stroke: #a8771d; stroke-width: .5; opacity: 0; transition: opacity .4s .25s; }
.profile .chest-glow { fill: #f2c94c; opacity: 0; transition: opacity .6s; filter: blur(8px); }
.profile .chest-lid { transform-box: fill-box; transform-origin: 0% 100%; transition: rotate .7s var(--ease); }
.profile .chest.open .chest-lid { rotate: -62deg; }
.profile .chest.open .coins circle { opacity: 1; }
.profile .chest.open .chest-glow { opacity: .55; animation: glow 1.8s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .35; } to { opacity: .7; } }
.profile .sparkles circle { fill: #ffe08a; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin-top: 2.25rem; }
.steps li { list-style: none; border-top: 1px solid var(--line-strong); padding-top: 1rem; }
.steps { padding: 0; }
.steps .mono { color: var(--ink-3); display: flex; justify-content: space-between; }
.steps h3 { margin: .8rem 0 .5rem; font: 700 1.35rem/1.15 var(--display); letter-spacing: -.03em; }
.steps p { margin: 0; color: var(--ink-2); font-size: .96rem; }

/* ---------- Why Baikal ---------- */
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.why-big { font: 800 clamp(5rem, 2rem + 14vw, 15rem)/.82 var(--display); letter-spacing: -.045em; font-variation-settings: "opsz" 96, "wdth" 88; }
.why-big small { font-size: .22em; letter-spacing: -.02em; font-weight: 300; margin-left: .15em; }
.why-cap { margin-top: 1.25rem; color: var(--deep-ink-2); }
.why-copy p { font-size: clamp(1.15rem, 1rem + .55vw, 1.5rem); line-height: 1.45; margin: 0 0 2rem; }
.why-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--deep-line); }
.why-stats div { padding: 1rem 1rem 0 0; }
.why-stats div + div { padding-left: 1rem; border-left: 1px solid var(--deep-line); }
.why-stats b { display: block; font: 700 1.9rem/1 var(--display); letter-spacing: -.04em; margin-bottom: .4rem; }
.why-stats span { color: var(--deep-ink-2); }

/* ---------- Contact ---------- */
.contact { padding-block: clamp(5rem, 12vw, 10rem) clamp(3rem, 6vw, 5rem); }
.contact h2 { margin: 0 0 2rem; font: 800 clamp(3rem, 1rem + 9vw, 10rem)/.86 var(--display); letter-spacing: -.045em; font-variation-settings: "opsz" 96, "wdth" 92; }
.contact h2 .thin { font-weight: 200; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; padding-top: 2rem; border-top: 1px solid var(--line-strong); }
.contact-row p { margin: 0; max-width: 34rem; color: var(--ink-2); font-size: 1.1rem; }
.mail { display: inline-flex; align-items: baseline; gap: .8rem; font: 600 clamp(1.3rem, 1rem + 1.6vw, 2.4rem)/1.1 var(--display); letter-spacing: -.035em; border-bottom: 2px solid var(--ink); padding-bottom: .3rem; transition: color .25s, border-color .25s; }
.mail:hover { color: var(--signal); border-color: var(--signal); }
.copy-btn { margin-top: 1rem; color: var(--ink-3); display: inline-flex; align-items: center; gap: .5rem; min-height: 32px; }
.copy-btn:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 1.75rem 2.25rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; justify-content: space-between; color: var(--ink-3); }
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(3rem, 8vw, 6rem); }
.legal .wrap { max-width: 52rem; }
.legal h1 { margin: 1rem 0 .5rem; font: 800 clamp(2.6rem, 1.4rem + 5vw, 5rem)/.92 var(--display); letter-spacing: -.05em; }
.legal h2 { margin: 2.75rem 0 .6rem; font: 700 1.35rem/1.2 var(--display); letter-spacing: -.025em; display: flex; gap: 1rem; align-items: baseline; }
.legal h2 .mono { color: var(--signal); }
.legal p { color: var(--ink-2); margin: 0; }
.legal .lead { font-size: 1.15rem; color: var(--ink); margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line-strong); }
.legal a.inline { border-bottom: 1px solid currentColor; }

/* ---------- Reveal motion ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.js-off .rv { opacity: 1; transform: none; }
.hero h1 .line > span { transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .gauge { display: none; }
  .ledger-head { display: none; }
  .row-sum { grid-template-columns: 3rem minmax(0, 1fr) 2rem; }
  .row-sum .d, .row-sum .s { display: none; }
  .row-inner { grid-template-columns: 3rem minmax(0, 1fr); }
  .diagram { grid-column: 2; }
}
@media (max-width: 900px) {
  .hero-chart { -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.45)); mask-image: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.45)); }
  .profile { display: none; }
  .nav { display: none; position: fixed; inset: 4.25rem 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.5rem; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav a:not(.btn) { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; color: var(--ink); }
  .nav .btn { margin-top: 1rem; justify-content: center; }
  .menu-open .nav { display: flex; }
  .menu-btn { display: inline-flex; }
  .brand-coords { display: none; }
  .hero-sub { grid-template-columns: 1fr; }
  .hero-strip { grid-template-columns: 1fr 1fr; }
  .hero-strip { gap: .6rem; }
  .hero-strip div { padding: 1rem 1.1rem 1.1rem; border-radius: 16px; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head p { grid-column: 1; }
  .sec-num { max-width: 11rem; }
  .case { grid-template-columns: 1fr; }
  .case .shot { order: -1; margin-bottom: 2rem; }
  .sec-head.has-vis { grid-template-columns: 1fr; }
  .sec-head.has-vis > .fan, .sec-head.has-vis > .feed { grid-column: 1; grid-row: auto; margin-top: 1rem; }
  .sec-head.has-vis.stack { grid-template-columns: 1fr; }
  .sec-head.has-vis.stack > .fan { grid-column: 1; grid-row: 4; height: clamp(280px, 78vw, 460px); }
  .sec-head.stack > .fan figure { width: 74%; }
  .strata { margin-top: 4.5rem; }
  .strata .layer { grid-template-columns: 1fr; gap: .4rem; padding-right: clamp(1rem, 2.5vw, 2rem); }
  .strata .layer:nth-child(2), .strata .layer:nth-child(3) { padding-right: 140px; }
  .iceberg { top: -60px; width: 120px; }
  .case.night .shot { margin-bottom: 2.5rem; }
  .steps { grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; }
  .why { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .g1 { grid-column: span 2; grid-row: span 3; }
  .g2, .g3, .g4, .g5 { grid-column: span 1; grid-row: span 2; }
  .g6 { grid-column: span 2; grid-row: span 2; }
  .ph figcaption { opacity: 1; transform: none; padding: 2rem .7rem .6rem; }
  .ph figcaption .mono { display: none; }
  .steps { grid-template-columns: 1fr; }
  .why-stats { grid-template-columns: 1fr; }
  .why-stats div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--deep-line); padding-top: 1rem; margin-top: 1rem; }
  .facts li { grid-template-columns: 1fr; gap: .2rem; }
  .phone { width: 30%; bottom: -1.75rem; right: -.25rem; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
}
