:root {
  --bg: #000;
  --fg: #f5f5f7;
  --muted: #86868b;
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(28, 28, 30, .72);
  --ease: cubic-bezier(.22, .8, .2, 1);
  --pad: clamp(18px, 5vw, 72px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lb-open { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; -webkit-tap-highlight-color: transparent;
}
img, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid #2997ff; outline-offset: 3px; border-radius: 6px; }
::selection { background: #2997ff; color: #fff; }

.wrap { width: min(1400px, 100%); margin-inline: auto; padding-inline: var(--pad); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 6px 0 0; font-size: clamp(40px, 7vw, 96px); line-height: 1; letter-spacing: -.035em; font-weight: 650; }
section[id] { scroll-margin-top: 0; }

/* ---------- nav ---------- */
.nav-wrap { position: fixed; z-index: 50; inset: max(12px, env(safe-area-inset-top)) 0 auto 0; display: flex; justify-content: center; padding-inline: 10px; pointer-events: none; }
.nav {
  pointer-events: auto; display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 16px; border-radius: 999px; max-width: 100%;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; letter-spacing: -.01em; margin-right: 8px; white-space: nowrap; }
.brand-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.22); }
.nav ul { display: flex; gap: 2px; }
.nav li a { display: block; padding: 8px 12px; font-size: 13.5px; font-weight: 500; line-height: 1.2; color: rgba(245,245,247,.72); border-radius: 999px; transition: color .2s, background .2s; white-space: nowrap; }
.nav li a.active { color: #fff; background: rgba(255,255,255,.14); }
.lang { margin-left: 2px; width: 38px; height: 34px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .05em; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.lang [data-l] { grid-area: 1/1; }
html[lang="en"] .lang [data-l="ru"], html[lang="ru"] .lang [data-l="en"] { display: none; }
@media (hover: hover) {
  .nav li a:hover { color: #fff; }
  .lang:hover { background: rgba(255,255,255,.2); }
}
@media (max-width: 760px) {
  .brand span { display: none; }
  .brand { margin-right: 4px; }
}
@media (max-width: 520px) {
  .brand { display: none; }
  .nav { padding-left: 6px; gap: 2px; }
  .nav li a { padding: 13px 8px; font-size: 12.5px; }
  .lang { width: 38px; height: 42px; }
}
@media (max-width: 370px) {
  .nav li a { padding: 13px 5px; font-size: 11.5px; }
}

/* ---------- hero ---------- */
.hero { position: relative; height: 220vh; height: 220svh; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.hero-media { position: absolute; inset: 0; overflow: hidden; background: #0b0b0c; transform-origin: 50% 50%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,var(--dim, 0)); pointer-events: none; }
.hero-media picture, .hero-media img { width: 100%; height: 100%; }
.hero-media img { object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.08) 40%, rgba(0,0,0,.5)); pointer-events: none; }
.hero-copy { position: relative; text-align: center; padding-inline: var(--pad); }
.hero-title, .hero-sub { animation: fade-up .8s var(--ease) both; }
.hero-sub { animation-delay: .12s; }
.hero-title { margin: 0; font-weight: 700; font-size: clamp(54px, 13.5vw, 230px); line-height: .92; letter-spacing: -.055em; text-shadow: 0 2px 40px rgba(0,0,0,.4); }
.hero-title .line { display: block; }
.hero-sub { margin: clamp(14px, 2.4vw, 28px) 0 0; font-size: clamp(14px, 1.8vw, 24px); letter-spacing: .32em; text-transform: uppercase; font-weight: 500; color: rgba(255,255,255,.88); }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
.hero-next { position: absolute; left: 50%; top: 50%; width: min(900px, 86vw); margin: 0; text-align: center; font-size: clamp(28px, 5vw, 68px); line-height: 1.06; letter-spacing: -.035em; font-weight: 650; opacity: 0; translate: -50% -50%; text-shadow: 0 2px 40px rgba(0,0,0,.6); }
html:not(.static) .hero-media, html:not(.static) .reel-track { will-change: transform; }

/* ---------- reel ---------- */
.reel { position: relative; height: 400vh; }
.reel-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(16px, 3vh, 32px); padding-top: 74px; }
.reel-head { display: flex; justify-content: space-between; align-items: baseline; padding-inline: var(--pad); }
.reel-hint { font-size: 13px; color: var(--muted); }
.h-touch { display: none; }
.reel-view { overflow: hidden; }
.reel-track { position: relative; display: flex; width: max-content; gap: clamp(12px, 2.2vw, 32px); padding-inline: var(--pad); --h: min(64vh, 64svh); }
.reel-item { flex: none; margin: 0; width: min(calc(var(--h) * var(--r)), 86vw); }
.reel-item .tile { display: block; width: 100%; }
.reel-item .ph { position: relative; width: 100%; aspect-ratio: var(--r); border-radius: 16px; overflow: hidden; background-size: cover; background-position: center; }
.reel-item .ph picture, .reel-item .ph img { width: 100%; height: 100%; }
.reel-item .ph img { object-fit: cover; }
.reel-item figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.reel-bar { margin: 0 var(--pad); height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.reel-bar i { display: block; height: 100%; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; }

/* desktop: every frame fits the window whole (never cropped), between the nav and the progress bar */
html:not(.static) .reel-pin { justify-content: flex-start; gap: 14px; padding: 80px 0 28px; }
html:not(.static) .reel-view { flex: 1; min-height: 0; display: flex; align-items: center; }
html:not(.static) .reel-track { --avail: max(240px, calc(100vh - 170px)); --avail: max(240px, calc(100svh - 170px)); align-items: center; gap: clamp(28px, 5vw, 80px); }
html:not(.static) .reel-item { --ih: min(var(--avail), calc((100vw - 2 * var(--pad)) / var(--r))); width: calc(var(--ih) * var(--r)); }
html:not(.static) .reel-item .ph { width: 100%; height: var(--ih); aspect-ratio: auto; }
html:not(.static) .reel-item figcaption { display: none; }

/* ---------- gallery ---------- */
.index { padding: clamp(80px, 14vh, 180px) 0 clamp(60px, 10vh, 140px); }
.index-head { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; margin-bottom: clamp(24px, 4vw, 48px); }
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; min-height: 40px; padding: 9px 16px; font-size: 14px; font-weight: 550; border-radius: 999px; color: rgba(245,245,247,.62); transition: color .25s; }
.seg button[aria-selected="true"] { color: #000; }
.seg-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: #f5f5f7; transition: transform .3s var(--ease), width .3s var(--ease); }

.grid { position: relative; transition: opacity .16s linear; }
.grid.swap { opacity: 0; }
.cell { position: absolute; left: 0; top: 0; }
.cell.off { display: none; }
.cell .tile { display: block; position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background-size: cover; background-position: center; }
.cell .tile picture, .cell .tile img { width: 100%; height: 100%; }
.cell .tile img { object-fit: cover; }
.cell .no { position: absolute; left: 10px; bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; opacity: 0; text-shadow: 0 1px 10px rgba(0,0,0,.6); z-index: 1; pointer-events: none; transition: opacity .25s; }
.tile[data-open] { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .cell .tile img { transition: transform .6s var(--ease), opacity .4s; }
  .cell .tile:hover img { transform: scale(1.04); }
  .cell .tile:hover .no { opacity: 1; }
}

/* ---------- blog placeholder ---------- */
.blog { padding: clamp(70px, 11vh, 130px) 0; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); margin-bottom: 10px; }
.blog-card { margin-top: clamp(22px, 4vw, 44px); padding: clamp(32px, 7vw, 80px) var(--pad); border: 1px dashed rgba(255,255,255,.22); border-radius: 24px; text-align: center; background: rgba(255,255,255,.03); }
.blog-lead { margin: 0; font-size: clamp(24px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -.03em; font-weight: 650; }
.blog-sub:empty, .about-body p:empty, .contact-sub:empty { display: none; }
.blog-sub { margin: 10px 0 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 21px); }

/* ---------- about ---------- */
.about { padding: clamp(50px, 9vh, 120px) 0 clamp(70px, 12vh, 160px); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 6vw, 100px); }
.about-side { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.about-side .h2 { margin: 0; }
.ava { width: clamp(104px, 12vw, 160px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #111; box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 20px 50px -20px rgba(0,0,0,.8); }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.about-body { max-width: 760px; }
.about-body .lead { margin: 0 0 24px; font-size: clamp(24px, 3vw, 40px); line-height: 1.18; letter-spacing: -.025em; font-weight: 600; }
.about-body p { color: rgba(245,245,247,.72); margin: 0 0 32px; font-size: clamp(16px, 1.5vw, 21px); }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.facts a { border-bottom: 1px solid rgba(255,255,255,.4); }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- contact + footer ---------- */
.contact { padding: clamp(80px, 16vh, 220px) 0 clamp(60px, 10vh, 120px); text-align: center; }
.mega { margin: 0; font-size: clamp(42px, 11vw, 190px); line-height: .96; letter-spacing: -.055em; font-weight: 700; text-wrap: balance; }
.contact-sub { margin: 24px 0 36px; color: var(--muted); font-size: clamp(16px, 1.8vw, 24px); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 48px); }
.contact-sub:not(:empty) + .cta-row { margin-top: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 16px; background: #f5f5f7; color: #000; transition: transform .25s var(--ease), background .2s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: rgba(255,255,255,.1); color: var(--fg); border: 1px solid var(--line); }
@media (hover: hover) {
  .btn:hover { transform: scale(1.04); background: #fff; }
  .btn.ghost:hover { background: rgba(255,255,255,.18); }
}
.foot { border-top: 1px solid var(--line); padding: 24px 0 max(24px, env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- reveal + image fade ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
img.lz { opacity: 0; transition: opacity .4s ease; }
img.lz.ld { opacity: 1; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; }
.lb[hidden] { display: none; }
.lb-bg { position: absolute; inset: 0; background: rgba(0,0,0,.95); opacity: 0; transition: opacity .35s ease; }
.lb.show .lb-bg { opacity: 1; }
.lb-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-slide { position: absolute; border-radius: 6px; overflow: hidden; background-size: cover; background-position: center; will-change: transform, opacity; }
.lb-slide picture, .lb-slide img { width: 100%; height: 100%; }
.lb-slide img { object-fit: cover; }
.lb-ui { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s .1s ease; }
.lb.show .lb-ui { opacity: 1; }
.lb-btn { pointer-events: auto; position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(60,60,64,.7); border: 1px solid var(--line); }
@media (hover: hover) { .lb-btn:hover { background: rgba(255,255,255,.24); } }
.lb-close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lb-prev, .lb-next { bottom: max(22px, env(safe-area-inset-bottom)); }
.lb-prev { left: calc(50% - 58px); }
.lb-next { left: calc(50% + 12px); }
.lb-count { position: absolute; top: max(26px, calc(env(safe-area-inset-top) + 12px)); left: 20px; font-size: 14px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.8); }
@media (min-width: 900px) {
  .lb-prev, .lb-next { bottom: auto; top: 50%; margin-top: -23px; }
  .lb-prev { left: 22px; }
  .lb-next { left: auto; right: 22px; }
}

/* ---------- static mode: phones, touch devices, reduced motion ---------- */
.static .hero { height: 100vh; height: 100svh; }
.static .hero-media { transform: none !important; border-radius: 0 !important; }
.static .hero-next { display: none; }
.static .reel { height: auto !important; }
.static .reel-pin { position: static; height: auto; justify-content: flex-start; padding: 72px 0 24px; }
.static .reel-view { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.static .reel-view::-webkit-scrollbar { display: none; }
.static .reel-track { transform: none !important; --h: min(62vh, 62svh, 560px); }
.static .reel-item { scroll-snap-align: center; }
.static .reel-bar, .static .h-desk { display: none; }
.static .h-touch { display: inline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  img.lz { opacity: 1; }
}
