/* =========================================================
   Yana Timokhina — fashion / portrait photographer portfolio
   Style reference: svetlanasedova.ru (wfolio "polina" theme) —
   black background, Ubuntu typeface, horizontal filmstrip
   galleries. Vanilla CSS, mobile-first, no frameworks.
   ========================================================= */

:root {
  --bg: #000000;
  --text: #c3c3c3;
  --text-dim: #8a8a8a;
  --text-strong: #ffffff;
  --nav-text: rgba(255, 255, 255, .75);
  --line: rgba(255, 255, 255, .15);
  --border: #c3c3c3;

  --font: 'Ubuntu', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-display: 'Archivo Black', var(--font);
  --font-serif: 'Newsreader', Georgia, serif;

  --header-h: 52px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 900px) {
  :root { --header-h: 64px; }
}

/* ---------- reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
input, textarea { font: inherit; color: inherit; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 700px) { .container { padding: 0 40px; } }

/* =========================================================
   PAGE TRANSITION VEIL — full-screen fade between pages,
   triggered by header nav clicks (see script.js pageTransition)
   ========================================================= */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  opacity: 1;
  pointer-events: none;
  transition: opacity .5s var(--ease);
}
.page-veil.is-hidden { opacity: 0; }
.page-veil.is-active { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .page-veil { transition: none; }
}

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(to bottom, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 100%);
  border-bottom: 0.5px solid rgba(255, 255, 255, .5);
}
@media (min-width: 700px) { .site-header { padding: 0 24px; } }

.header-social {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
}
.header-spacer { flex: 1 1 0; }
.header-social a {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--nav-text);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.header-social a:hover { color: #fff; border-color: #fff; }
.header-social svg { width: 14px; height: 14px; }

/* mobile only, all pages: drop the Telegram/Instagram icon buttons —
   the empty .header-social box is left in place (not display:none)
   since its flex:1 1 0 is what balances .header-spacer to keep the
   nav row centered */
@media (max-width: 699px) {
  .header-social a { display: none; }
}

.nav-menu {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
@media (min-width: 460px) { .nav-menu { gap: 22px; } }
@media (min-width: 700px) { .nav-menu { gap: 40px; } }

/* "Main" is shorter than "Contacts" — without equal footprints the
   dropdown between them (the one that should read as centered) drifts
   toward the short side. Pad both edge links to the same width. */
.nav-menu > a:first-child,
.nav-menu > a:last-child {
  min-width: 68px;
  text-align: center;
}
@media (min-width: 700px) {
  .nav-menu > a:first-child,
  .nav-menu > a:last-child { min-width: 76px; }
}

.nav-link {
  position: relative;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nav-text);
  padding: 6px 0;
  white-space: nowrap;
  transition: color .25s var(--ease);
}
@media (min-width: 700px) { .nav-link { font-size: 12px; } }
.nav-link:hover, .nav-link.is-active { color: #fff; }

.nav-item-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown-toggle::after {
  content: "";
  width: 5px; height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .8;
}
/* .dropdown-menu-bridge sits immediately under the toggle with no gap
   (the visual 18px gap is padding-top INSIDE it, not a margin outside),
   so the hoverable area is continuous from toggle to menu — moving the
   mouse straight down never crosses dead space and drops out of :hover
   mid-way, which was causing the menu to flicker/fade out and back in. */
.nav-item-dropdown:hover .dropdown-menu-bridge,
.nav-item-dropdown:focus-within .dropdown-menu-bridge,
.nav-item-dropdown.is-open-click .dropdown-menu-bridge {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu,
.nav-item-dropdown.is-open-click .dropdown-menu {
  transform: translateY(0);
}
.dropdown-menu-bridge {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s var(--ease), visibility .3s;
}
/* on very narrow screens the toggle sits off-center enough that a
   centered 230px-wide menu can run past the viewport edge — anchor it
   to the toggle's right edge instead so it always stays on-screen */
@media (max-width: 360px) {
  .dropdown-menu-bridge { left: auto; right: 0; transform: none; }
}
.dropdown-menu {
  min-width: 230px;
  padding: 16px 20px;
  background: #0a0a0a;
  border: 1px solid var(--line);
  transform: translateY(6px);
  transition: transform .3s var(--ease);
}
.dropdown-menu li + li { margin-top: 12px; }
.dropdown-menu a {
  display: block;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
  transition: color .25s var(--ease);
}
.dropdown-menu a:hover { color: #fff; }

/* =========================================================
   HOME — FULLSCREEN HERO
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  height: 100vh;
  overflow: hidden;
  background: #000;
}
/* 100vh on mobile includes the area hidden behind the browser's address
   bar, so the bottom-anchored down-arrow ends up below the actually
   visible viewport until that bar auto-hides — 100svh is the real
   visible height and keeps it on screen from the first paint */
@media (max-width: 699px) {
  .hero { height: 100svh; }
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-pos-x, 0%) var(--hero-pos-y, 19%);
  will-change: transform;
}
/* phone crops are much narrower relative to the photo's height than
   desktop, so the same left-anchored framing pushes the face almost
   out of frame — recenter it just for phones */
@media (max-width: 699px) {
  :root { --hero-pos-x: 46%; }
}
.hero-slide--static img {
  filter: grayscale(1) brightness(0.65);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to top, #000 0%, rgba(0,0,0,.65) 10%, rgba(0,0,0,0) 46%);
}

.hero-title-block {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 5;
  width: 100%;
}
.hero-name-solo {
  width: 100%;
  padding: 0 6px;
  overflow: hidden;
}
@media (min-width: 600px) { .hero-name-solo { padding: 0 10px; } }
.hero-name-text {
  display: inline-block;
  white-space: nowrap;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  line-height: .92;
  font-size: clamp(2.2rem, 17vw, 4.6rem);
}
@media (min-width: 600px) {
  .hero-name-text { font-size: clamp(3.4rem, 16vw, 14.5rem); }
}
.hero-tag {
  margin: 22px auto 0;
  width: fit-content;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, .35);
  padding: 8px 16px;
}
@media (min-width: 700px) {
  .hero-tag { font-size: 14px; margin-top: 30px; padding: 10px 20px; }
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: .7;
  transition: opacity .3s var(--ease);
}
.hero-arrow:hover { opacity: 1; }
.hero-arrow svg { width: 16px; height: 16px; }
.hero-arrow--prev { left: 6px; }
.hero-arrow--next { right: 6px; }
@media (min-width: 700px) {
  .hero-arrow--prev { left: 20px; }
  .hero-arrow--next { right: 20px; }
}

.hero-progress {
  position: absolute;
  z-index: 6;
  left: 50%;
  transform: translateX(-50%);
  bottom: 74px;
  display: flex;
  gap: 8px;
}
.hero-progress button {
  width: 22px; height: 2px;
  background: rgba(255,255,255,.3);
  position: relative;
  overflow: hidden;
}
.hero-progress button::after {
  content: ""; position: absolute; inset: 0; background: #fff;
  transform: scaleX(0); transform-origin: left; transition: transform .3s linear;
}
.hero-progress button.is-active::after { transform: scaleX(1); }

.hero-down {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  color: #fff;
  opacity: .8;
  animation: hero-down-bounce 2.2s ease-in-out infinite;
}
.hero-down svg { width: 18px; height: 18px; }
@keyframes hero-down-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* =========================================================
   HOME — SCROLL-DRIVEN GALLERY PANEL (flush after hero)
   A black panel rises to cover the hero as the visitor scrolls
   past it (js/script.js: scrollGalleryPanel), then pins while an
   internal grid of photos scrolls past underneath it, each card
   scaling in as it enters the viewport and back out as it
   leaves. Ends on a full-screen outro (booking CTA + category
   links + footer). Degrades to a plain static grid — no pin, no
   scaling, outro shown as normal in-flow content — when the
   visitor prefers reduced motion (scrollGalleryPanel bails out
   and leaves the base CSS below exactly as it is).
   ========================================================= */
.scroll-spacer {
  position: relative;
  width: 100%;
  background: #000;
}

.gallery-panel {
  position: relative;
  width: 100%;
  background: #000;
}
.gallery-panel.is-pinned-mode {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  will-change: transform;
}

.gallery-panel-inner { width: 100%; padding-top: calc(var(--header-h) + 4px); }
.gallery-panel.is-pinned-mode .gallery-panel-inner { will-change: transform; }

.gallery-panel-heading { padding: 0 20px 18px; text-align: center; }
@media (min-width: 700px) { .gallery-panel-heading { padding: 0 40px 26px; } }
/* fades in slightly before the panel finishes rising (see HEADING_LEAD
   in script.js) — the heading is already below the panel's leading edge
   at that point, so it's on solid black, not over the hero */
.gallery-panel.is-pinned-mode .gallery-panel-heading { opacity: 0; transition: opacity .5s var(--ease); }
.gallery-panel.is-pinned-mode .gallery-panel-heading.is-visible { opacity: 1; }

.gallery-eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Masonry via CSS multi-column: items flow down each column in
   DOM order, each keeping its own natural aspect ratio (portrait
   and landscape frames side by side) instead of being cropped
   into uniform cells — real masonry, not a fixed mosaic. Pure CSS,
   so it works identically with or without JS / under reduced motion. */
.gallery-grid {
  column-count: 1;
  column-gap: clamp(3px, .6vw, 8px);
  padding: 0 20px 20px;
}
@media (min-width: 700px) { .gallery-grid { column-count: 3; padding: 0 30px 30px; } }
@media (min-width: 1024px) { .gallery-grid { column-count: 4; padding: 0 40px 40px; } }

/* phones get a shorter, single-column edit of the grid — one big photo
   per row instead of a dense 2-up mosaic, and a curated 14-photo subset
   instead of the full set, so the scroll before the footer stays short */
@media (max-width: 699px) {
  .gallery-card:nth-child(n+15) { display: none; }
}

.gallery-card {
  position: relative;
  display: block;
  break-inside: avoid;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: clamp(3px, .6vw, 8px);
}
.gallery-panel.is-pinned-mode .gallery-card { will-change: transform; }
.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0);
  transition: filter .6s var(--ease), transform .5s var(--ease);
}

/* first couple of screens' worth of the grid render in black &
   white, easing into color further down (js/script.js marks
   .is-bw by measuring each card's position against the viewport
   height, so it holds at any breakpoint) */
.gallery-card.is-bw img { filter: grayscale(1); }

/* soft tint at rest that lifts on hover, so the frame brightens as
   the photo inside it zooms in — the card's own transform is driven
   by scroll (JS, see scrollGalleryPanel), the img's hover-zoom is
   plain CSS on a different element, so the two never fight */
.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .15);
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .gallery-card:hover img { transform: scale(1.08); }
  .gallery-card:hover::after { opacity: 0; }
}
.gallery-card:focus-visible img { transform: scale(1.08); }
.gallery-card:focus-visible::after { opacity: 0; }

.gallery-outro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 90px 20px 56px;
  text-align: center;
}

.gallery-outro-btn {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 24px 46px;
  border: 1px solid #fff;
  color: #fff;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background-color .4s var(--ease), color .4s var(--ease), transform .15s var(--ease);
}
.gallery-outro-btn-text { transition: letter-spacing .4s var(--ease); }
.gallery-outro-btn:hover .gallery-outro-btn-text, .gallery-outro-btn:focus-visible .gallery-outro-btn-text { letter-spacing: .22em; }
.gallery-outro-btn-arrow {
  display: flex;
  transition: transform .4s var(--ease);
}
.gallery-outro-btn-arrow svg { width: 16px; height: 16px; display: block; }
.gallery-outro-btn:hover, .gallery-outro-btn:focus-visible { background: #fff; color: #000; }
.gallery-outro-btn:hover .gallery-outro-btn-arrow, .gallery-outro-btn:focus-visible .gallery-outro-btn-arrow { transform: translateX(7px); }
.gallery-outro-btn:active { transform: scale(.97); }

.gallery-outro-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}
.gallery-outro-links a { transition: color .2s var(--ease); }
.gallery-outro-links a:hover, .gallery-outro-links a:focus-visible { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .gallery-card { will-change: auto; }
}

/* =========================================================
   HORIZONTAL STRIPS (portfolio category filmstrips)
   ========================================================= */
.filmstrip {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 58vh;
  min-height: 320px;
}
.filmstrip::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .filmstrip { height: 72vh; } }
.filmstrip-item {
  flex: 0 0 auto;
  height: 100%;
  scroll-snap-align: start;
  cursor: pointer;
  overflow: hidden;
}
/* progressive cascade as each frame scrolls into view (uses the shared
   .fade-up/.in-view reveal); capped so a long strip doesn't leave later
   frames waiting on an active scroll gesture */
.filmstrip-item.fade-up { transition-delay: min(calc(var(--i, 0) * 40ms), 240ms); }
.filmstrip-item img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  transition: transform 450ms var(--ease);
}
.filmstrip-item:active img { transition-duration: 120ms; transform: scale(.985); }
.filmstrip-item:focus-visible img { transform: scale(1.03); }
@media (hover: hover) and (pointer: fine) {
  .filmstrip-item:hover img { transform: scale(1.03); }
  .filmstrip-item:hover:active img { transform: scale(.985); }
}

/* row controls: "<─────" "─────>" */
.row-controls {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 26px 20px;
}
.row-controls button {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: color .25s var(--ease), transform 120ms var(--ease);
  width: 130px;
}
.row-controls button:hover { color: #fff; }
.row-controls button:active { transform: scale(.94); }
.row-controls button:disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}
.row-controls .line { flex: 1; height: 1px; background: currentColor; }
.row-controls svg { width: 14px; height: 14px; flex-shrink: 0; }

/* =========================================================
   MAGNETIC CAROUSEL — ported from an Originkit React/Framer
   component (macOS-dock-style hover magnify + click-to-expand).
   Hover magnify runs on a JS rAF lerp loop for smooth cursor
   tracking (no CSS transition fighting it); a CSS transition
   takes over only for the open/close animation — see
   magneticCarousel() in script.js.
   ========================================================= */
/* separate from .magnetic-carousel itself: an absolutely positioned
   child of the scrolling element scrolls away WITH its content (its
   containing block is the scrolled box), so the pinned arrow overlay
   has to live in this non-scrolling outer wrapper instead */
.magnetic-carousel-wrap { position: relative; }
.magnetic-carousel {
  position: relative;
  display: flex;
  align-items: center;
  /* flex-start, not center: with overflowing content, a centered flex
     row leaves scrollLeft unable to reach the items hanging off the
     start edge (it can't go negative) — they'd be permanently
     unreachable on narrow viewports. Matches .filmstrip's convention. */
  justify-content: flex-start;
  gap: 5px;
  /* tall enough to fit the hover-grown state (bars grow to HOVER_H in
     script.js) plus a little breathing room, so growth never clips
     against overflow-y: hidden. Matches the two tile-size tiers there —
     keep both in sync if either changes. */
  height: 360px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* no horizontal padding — tiles bleed edge to edge, the first/last
     ones running off past the viewport, so you page through with the
     arrows instead of everything sitting inset in a gutter */
  padding: 0;
}
.magnetic-carousel::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .magnetic-carousel { height: 510px; } }

.magnetic-bar {
  flex: none;
  position: relative;
  z-index: 2;
  width: 160px;
  height: 320px;
  overflow: hidden;
  cursor: pointer;
  will-change: width, height;
}
@media (min-width: 700px) { .magnetic-bar { width: 220px; height: 440px; } }
.magnetic-bar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.magnetic-bar:focus-visible { outline: 1px solid #fff; outline-offset: 2px; }

/* small pinned prev/next controls, overlaid on the carousel itself
   instead of sitting in a row underneath it */
.carousel-arrows {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  /* the wrapper only exists to position two small buttons — everything
     else (hover magnify, scroll) must pass through to the carousel */
  pointer-events: none;
}
@media (min-width: 700px) { .carousel-arrows { padding: 0 20px; } }
.carousel-arrow {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform 120ms var(--ease), opacity .25s var(--ease);
}
.carousel-arrow svg { width: 15px; height: 15px; }
.carousel-arrow:hover { background: rgba(0, 0, 0, .75); border-color: #fff; }
.carousel-arrow:active { transform: scale(.92); }
.carousel-arrow:disabled { opacity: .3; pointer-events: none; }

.project-label {
  padding: 20px 20px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}
@media (min-width: 700px) { .project-label { padding: 28px 40px 0; } }
.project-label.project-label-center {
  text-align: center;
  color: var(--nav-text);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0;
  padding-top: 20px;
  padding-bottom: 4px;
}
@media (min-width: 700px) { .project-label.project-label-center { font-size: 12px; padding-top: 28px; padding-bottom: 6px; } }

.portfolio-main { padding-top: var(--header-h); background: #000; }

.filmstrip-section {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* on phones the label + (shorter) carousel are nowhere near tall enough
   to fill min-height, so centering leaves a big blank band above the
   text — pack it against the header instead */
@media (max-width: 699px) {
  .filmstrip-section { justify-content: flex-start; min-height: 0; }
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-figure {
  max-width: 92vw; max-height: 86vh;
  transform: scale(.96); opacity: 0;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.lightbox.is-open .lightbox-figure { opacity: 1; transform: scale(1); }
.lightbox-figure img {
  max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain;
}
/* opacity transition is scoped to this class, applied only for the
   fresh-open reveal (js/script.js: revealImageOnLoad) — if it stayed on
   permanently, it would linger behind the separate, much quicker
   Web Animations crossfade used for next/prev and show up as a drag
   on every arrow press */
.lightbox-figure img.is-revealing { transition: opacity .9s var(--ease); }
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  color: #fff; font-size: 30px; line-height: 1; font-weight: 300; z-index: 2;
  opacity: .7;
  transition: opacity .2s ease, transform 120ms var(--ease);
}
.lightbox-close:hover { opacity: 1; }
.lightbox-close:active { transform: scale(.88); }
@media (min-width: 700px) { .lightbox-close { top: 24px; right: 40px; } }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center; opacity: .7;
  transition: opacity .2s ease, transform 120ms var(--ease);
}
.lightbox-arrow:hover { opacity: 1; }
.lightbox-arrow:active { transform: translateY(-50%) scale(.88); }
.lightbox-arrow svg { width: 18px; height: 18px; }
.lightbox-arrow--prev { left: 6px; }
.lightbox-arrow--next { right: 6px; }
@media (min-width: 700px) {
  .lightbox-arrow--prev { left: 20px; }
  .lightbox-arrow--next { right: 20px; }
}
.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: var(--text); font-size: 11px; letter-spacing: .14em;
}

/* =========================================================
   CONTACTS PAGE
   ========================================================= */
.contacts-main {
  background: #000;
  min-height: 100svh;
  padding: calc(var(--header-h) + 56px) 20px 90px;
}
.contacts-inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.contacts-location {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 44px;
}
.contact-pills {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}
.contacts-divider {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 30px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 240px;
  border: 1px solid var(--border);
  padding: 17px 30px;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.pill svg { width: 16px; height: 16px; }
.pill:hover { background: #fff; color: #000; border-color: #fff; }

.contact-form-minimal { text-align: left; }
.field { margin-bottom: 30px; }
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: #fff;
  padding: 12px 2px;
  font-size: 16px;
  transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus { outline: none; border-color: #fff; }
.field input::placeholder, .field textarea::placeholder { color: var(--text); opacity: .85; font-size: 13px; }

.btn-solid {
  display: block;
  width: 100%;
  background: #8f8f8f;
  color: #0a0a0a;
  padding: 17px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  transition: background-color .25s var(--ease);
}
@media (min-width: 500px) { .btn-solid { width: auto; padding: 17px 42px; margin: 0 auto; } }
@media (max-width: 699px) { .btn-solid { width: auto; padding: 13px 26px; font-size: 10.5px; margin: 0 auto; } }
.btn-solid:hover { background: #fff; }
.form-note { margin-top: 14px; font-size: 12px; color: var(--text-dim); min-height: 1.4em; text-align: center; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #000;
  padding: 0 20px clamp(56px, 9vw, 96px);
  text-align: center;
  overflow: hidden;
}

/* bold diagonal band that opens the footer — the separation from
   whatever comes before it, instead of a plain border line */
.footer-shapes {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 4vw, 60px);
  height: clamp(60px, 9vw, 130px);
  margin: 0 -20px clamp(20px, 4vw, 40px);
}
.footer-shapes span {
  flex: 1 1 0;
  max-width: 640px;
  background: #fff;
}
.footer-shapes span:first-child { clip-path: polygon(28% 0, 100% 0, 72% 100%, 0 100%); }
.footer-shapes span:last-child { clip-path: polygon(0 0, 72% 0, 100% 100%, 28% 100%); }

.footer-headline {
  font-family: var(--font-display);
  font-size: clamp(44px, 10vw, 128px);
  line-height: .92;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 clamp(28px, 5vw, 48px);
}

.footer-cta {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.8vw, 19px);
  color: var(--text);
  max-width: 46ch;
  margin: 0 auto clamp(28px, 5vw, 40px);
}
.footer-cta a { text-decoration: underline; text-underline-offset: 3px; color: var(--text-strong); transition: opacity .2s var(--ease); }
.footer-cta a:hover, .footer-cta a:focus-visible { opacity: .7; }

/* the "Записаться" button, relocated here from .gallery-outro — reuses
   the .gallery-outro-btn look as-is, just needs its own spacing in the
   footer's stacked layout */
.footer-btn { margin: 0 0 clamp(28px, 5vw, 40px); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-links a { transition: color .2s var(--ease); }
.footer-links a:hover, .footer-links a:focus-visible { color: #fff; }
.footer-links span { color: var(--text-dim); }

.footer-meta { display: block; margin-top: 22px; font-size: 13px; color: var(--text); }
.footer-copy { display: block; margin-top: 10px; font-size: 11px; color: var(--text-dim); }

/* infinite marquee credit — flat-line equivalent of the Originkit TextPath
   component (waveFrequency/waveHeight are 0, so its sine path is a straight
   line); reproduced with a duplicated-track CSS loop instead of SVG since
   this is a static site with no React/Framer runtime. Speed is kept in sync
   with the source component's px/sec via script.js. */
.footer-marquee {
  position: relative;
  overflow: hidden;
  margin-top: clamp(48px, 9vw, 88px);
  margin-left: -20px;
  margin-right: -20px;
  /* cancels .site-footer's own bottom padding so the marquee sits flush
     against the actual bottom edge of the page instead of leaving that
     gap below it */
  margin-bottom: clamp(-96px, -9vw, -56px);
}
/* static edge fade via overlays, not a mask on the moving element — a
   mask on an animated layer forces the browser to repaint it every frame
   instead of just compositing a transform, which is what was causing the
   stutter */
.footer-marquee::before, .footer-marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(40px, 8vw, 120px);
  z-index: 1;
  pointer-events: none;
}
.footer-marquee::before { left: 0; background: linear-gradient(to right, #000, transparent); }
.footer-marquee::after { right: 0; background: linear-gradient(to left, #000, transparent); }
.footer-marquee-track {
  display: flex;
  width: max-content;
  animation: footer-marquee-scroll 30s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.footer-marquee-set {
  flex-shrink: 0;
  white-space: pre;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 5vw, 40px);
  line-height: 1.5;
  letter-spacing: 1px;
  color: var(--text-strong);
}
@keyframes footer-marquee-scroll {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .footer-marquee-track { animation: none; }
}

/* utility: fade-in on scroll */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fade-up { transition: none; opacity: 1; transform: none; }
  .moodboard-item img { transition: none; }
  .moodboard-item:hover img, .moodboard-item:focus-visible img { transform: none; }
  .filmstrip-item img { transition: none; }
  .filmstrip-item:hover img, .filmstrip-item:focus-visible img, .filmstrip-item:active img { transform: none; }
  .gallery-card img, .gallery-card::after { transition: none; }
  .gallery-card:hover img, .gallery-card:focus-visible img { transform: none; }
  .row-controls button:active { transform: none; }
  .lightbox-figure img { transition: none; }
  .lightbox-close:active, .lightbox-arrow:active { transform: translateY(0) scale(1); }
  .lightbox-arrow:active { transform: translateY(-50%); }
}
