/* OCA Media — галерея мероприятия
   Направление: торжественно, тепло, спокойно.
   Шрифты: Cormorant Garamond (заголовки) + Manrope (текст).
   Цвет: слоновая кость + глубокий синий из логотипа, акцент — градиент логотипа (только точечно). */

:root {
  --bg: #FBF8F3;
  --surface: #F3EEE6;
  --line: #E6DED2;
  --ink: #102A38;
  --ink-2: #4A5B66;
  --ink-3: #7D8A92;
  --night: #0C2230;
  --night-2: #15303F;
  --accent: #FF6100;
  --grad: linear-gradient(100deg, #FF1A3C 0%, #FF6100 50%, #FFA50A 100%);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  --gut: clamp(16px, 4vw, 48px);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #1B3D50; box-shadow: 0 8px 24px -10px rgba(16,42,56,.55); }
.btn--ghost { border: 1px solid var(--line); background: #fff; }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--ghost.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--accent { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -12px rgba(255,97,0,.7); }
.btn--accent:hover { box-shadow: 0 14px 34px -10px rgba(255,97,0,.85); }
.btn--line { border: 1px solid rgba(255,255,255,.25); color: #fff; }
.btn--line:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- Шапка ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 var(--gut);
  transition: background .3s ease, box-shadow .3s ease;
}
.topbar.is-solid { background: rgba(251,248,243,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 700; letter-spacing: .06em; font-size: 15px; }
.brand b { font-weight: 500; color: var(--ink-2); }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.6); }
.lang button { height: 30px; min-width: 40px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); }
.lang button.is-active { background: var(--ink); color: #fff; }

/* ---------- Первый экран ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 104px var(--gut) 40px; text-align: center;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(255,140,40,.10), transparent 70%),
    radial-gradient(50% 40% at 50% 100%, rgba(16,42,56,.05), transparent 70%),
    var(--bg);
}
.hero::before { /* тонкая рамка как у приглашения */
  content: ""; position: absolute; inset: 76px var(--gut) 20px; border: 1px solid var(--line); border-radius: 22px; pointer-events: none;
}
.hero__inner { position: relative; max-width: 820px; margin: auto 0; }
.eyebrow { margin: 0 0 22px; font-size: 12px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow--light { color: rgba(255,255,255,.55); }
.hero__title {
  margin: 0; font: 500 clamp(44px, 9vw, 104px)/1 var(--serif); letter-spacing: -.015em; color: var(--ink);
  text-wrap: balance;
}
.hero__meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin: 22px 0 0; font: italic 500 clamp(19px, 2.4vw, 24px)/1.3 var(--serif); color: var(--ink-2); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.rule { display: flex; justify-content: center; margin: 30px 0; }
.rule span { width: 72px; height: 2px; border-radius: 2px; background: var(--grad); }
.hero__lead { max-width: 520px; margin: 0 auto; color: var(--ink-2); font-size: 17px; text-wrap: pretty; }
.hero__actions { margin-top: 34px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 22px 0 0; font-size: 13px; color: var(--ink-3); }
.live b { color: var(--ink); font-weight: 700; }
.live__dot { width: 8px; height: 8px; border-radius: 50%; background: #22B573; box-shadow: 0 0 0 0 rgba(34,181,115,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(34,181,115,0); } 100% { box-shadow: 0 0 0 0 rgba(34,181,115,0); } }
.hero__credit { position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 40px 0 8px; font-size: 13px; color: var(--ink-3); }
.hero__credit img { height: 22px; width: auto; }
.hero__credit b { color: var(--ink); letter-spacing: .04em; }

/* ---------- Галерея ---------- */
.gallery { max-width: var(--max); margin: 0 auto; padding: 24px var(--gut) 96px; }
.toolbar {
  position: sticky; top: 64px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 calc(var(--gut) * -1); padding: 12px var(--gut);
  background: rgba(251,248,243,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.toolbar.is-stuck { border-bottom-color: var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; transition: all .2s;
}
.chip:hover { border-color: var(--ink-3); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip small { margin-left: 6px; font-weight: 500; opacity: .6; }
.toolbar__right { display: flex; align-items: center; gap: 14px; flex: none; }
.count { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.hint { margin: 14px 0 8px; font-size: 14px; color: var(--ink-3); }

.batch { margin-top: 40px; scroll-margin-top: 140px; }
.batch__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.batch__time { font: 600 34px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.batch__label { font-size: 13px; color: var(--ink-3); }
.batch__new { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--grad); }
.batch__line { flex: 1; height: 1px; background: var(--line); align-self: center; }

.grid { columns: 4 260px; column-gap: 14px; }
.tile {
  position: relative; break-inside: avoid; margin-bottom: 14px; border-radius: var(--r); overflow: hidden;
  background: var(--surface); cursor: zoom-in;
  opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease;
}
.tile.is-in { opacity: 1; transform: none; }
.tile img { width: 100%; height: auto; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .3s; }
.tile:hover img { transform: scale(1.03); }
.tile__dl {
  position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: all .25s ease; box-shadow: 0 6px 18px -8px rgba(0,0,0,.4);
}
.tile:hover .tile__dl { opacity: 1; transform: none; }
.tile__dl svg, .tile__check svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile__check {
  position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%;
  display: none; place-items: center; border: 2px solid #fff; background: rgba(0,0,0,.18); color: transparent;
}
.selecting .tile { cursor: pointer; }
.selecting .tile__check { display: grid; }
.selecting .tile__dl { display: none; }
.tile.is-picked .tile__check { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile.is-picked img { filter: brightness(.82); transform: scale(.97); }
.empty { text-align: center; padding: 80px 0; color: var(--ink-3); font: italic 500 22px var(--serif); }

@media (hover: none) { .tile__dl { opacity: 1; transform: none; width: 36px; height: 36px; } }

/* ---------- Блок студии ---------- */
.studio {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  padding: 104px var(--gut);
  background:
    radial-gradient(45% 60% at 85% 0%, rgba(255,97,0,.22), transparent 70%),
    radial-gradient(40% 50% at 10% 100%, rgba(255,26,60,.14), transparent 70%),
    var(--night);
}
.studio__inner { position: relative; max-width: 760px; margin: 0 auto; }
.studio__logo { margin: 0 auto 30px; height: auto; }
.studio__title { margin: 0; font: 500 clamp(40px, 6vw, 68px)/1.02 var(--serif); letter-spacing: -.01em; }
.studio__text { max-width: 520px; margin: 20px auto 0; color: rgba(255,255,255,.7); font-size: 17px; }
.studio__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.contacts {
  list-style: none; padding: 0; margin: 56px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,.1); border-radius: var(--r); overflow: hidden;
}
.contacts li { display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; background: var(--night-2); text-align: left; min-width: 0; }
.contacts span { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.contacts a { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.contacts a:hover { color: #FFB066; }

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding: 22px var(--gut); background: var(--night); color: rgba(255,255,255,.4); font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* ---------- Панель выбора и тост ---------- */
.selbar {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; gap: 24px; padding: 10px 10px 10px 22px;
  border-radius: 999px; background: #fff; box-shadow: 0 18px 50px -14px rgba(16,42,56,.4), 0 0 0 1px var(--line);
  animation: rise .3s ease; width: max-content; max-width: calc(100% - 32px);
}
.selbar > div { display: flex; gap: 8px; }
.selbar > span { white-space: nowrap; font-size: 14px; }
@media (max-width: 420px) { #selClear { display: none; } }
.toast {
  position: fixed; left: 50%; top: 76px; z-index: 60; transform: translateX(-50%);
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 14px 40px -12px rgba(16,42,56,.6); animation: drop .35s ease; white-space: nowrap;
}
.toast::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 16px); } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -12px); } }

/* ---------- Просмотр ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(8,20,28,.96);
  display: grid; grid-template-rows: auto 1fr; animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.lb__top { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gut); color: #fff; }
.lb__counter { font-size: 14px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.lb__tools { display: flex; gap: 8px; }
.lb__btn { height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; background: rgba(255,255,255,.08); font-weight: 600; font-size: 14px; }
.lb__btn:hover { background: rgba(255,255,255,.16); }
.lb__btn--dl { background: #fff; color: var(--ink); padding: 0 18px; }
.lb__btn--dl:hover { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.lb__btn svg, .lb__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb__stage { margin: 0; display: grid; place-items: center; padding: 0 72px 24px; min-height: 0; touch-action: pan-y; }
.lb__stage img { max-width: 100%; max-height: calc(100svh - 96px); border-radius: 6px; object-fit: contain; transition: opacity .25s; user-select: none; -webkit-user-drag: none; }
.lb__stage img.is-loading { opacity: .65; }
.lb__nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.08); }
.lb__nav:hover { background: rgba(255,255,255,.18); }
.lb__nav--prev { left: 12px; }
.lb__nav--next { right: 12px; }

/* ---------- Телефон ---------- */
@media (max-width: 720px) {
  .hero::before { inset: 72px 10px 10px; border-radius: 18px; }
  .hero__lead { font-size: 16px; }
  .toolbar { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .chip { height: 36px; padding: 0 14px; }
  .count { display: none; }
  .hint { font-size: 13px; }
  .grid { columns: 2; column-gap: 8px; }
  .tile { margin-bottom: 8px; border-radius: 10px; }
  .batch__time { font-size: 28px; }
  .contacts { grid-template-columns: 1fr 1fr; }
  .studio { padding: 80px var(--gut); }
  .studio__actions .btn { width: 100%; }
  .lb__stage { padding: 0 0 16px; }
  .lb__nav { display: none; }
  .lb__btn--dl span { display: none; }
  .lb__btn--dl { padding: 0 12px; }
  .selbar { gap: 14px; padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile { opacity: 1; transform: none; }
}
