﻿/* =========================================================
   Prieteni — альбом встречи
   Палитра и орнаменты в молдавском духе
   ========================================================= */

:root {
  --cream: #f7f0e1;
  --cream-2: #fbf6ea;
  --paper: #fffdf6;
  --wine: #7c1d2b;
  --wine-deep: #5e1420;
  --red: #a52a3a;
  --ink: #241a18;
  --ink-soft: #6a5650;
  --gold: #c39a4a;
  --gold-soft: #e0c383;
  --green: #3e5a3f;
  --line: rgba(124, 29, 43, .15);
  --shadow-sm: 0 2px 10px rgba(60, 24, 28, .09);
  --shadow-lg: 0 22px 44px rgba(60, 24, 28, .18);
  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1360px;
  --band-cream: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='24' viewBox='0 0 64 24'%3E%3Cg fill='none' stroke='%23f6eedd' stroke-width='1.8'%3E%3Cpath d='M16 3 L25 12 L16 21 L7 12 Z'/%3E%3Cpath d='M48 3 L57 12 L48 21 L39 12 Z'/%3E%3C/g%3E%3Cpath d='M32 8.5 L35.5 12 L32 15.5 L28.5 12 Z' fill='%23f6eedd'/%3E%3Cg fill='%23c39a4a'%3E%3Ccircle cx='16' cy='12' r='2'/%3E%3Ccircle cx='48' cy='12' r='2'/%3E%3C/g%3E%3Cg fill='%23f6eedd' opacity='.85'%3E%3Cpath d='M0 11.2h3v1.6H0z'/%3E%3Cpath d='M64 11.2h-3v1.6h3z'/%3E%3C/g%3E%3C/svg%3E");
  --band-wine: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='24' viewBox='0 0 64 24'%3E%3Cg fill='none' stroke='%237c1d2b' stroke-width='1.7'%3E%3Cpath d='M16 3 L25 12 L16 21 L7 12 Z'/%3E%3Cpath d='M48 3 L57 12 L48 21 L39 12 Z'/%3E%3C/g%3E%3Cpath d='M32 8.5 L35.5 12 L32 15.5 L28.5 12 Z' fill='%237c1d2b'/%3E%3Cg fill='%23c39a4a'%3E%3Ccircle cx='16' cy='12' r='1.8'/%3E%3Ccircle cx='48' cy='12' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(1200px 620px at 8% -8%, #fffaf0 0, rgba(255, 250, 240, 0) 62%),
    radial-gradient(900px 520px at 105% 4%, #f1e2c9 0, rgba(241, 226, 201, 0) 58%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.lb-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--wine); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- орнаментальные полосы ---------- */

.band {
  height: 24px;
  background-color: var(--wine);
  background-image: var(--band-cream);
  background-repeat: repeat-x;
  background-position: center;
  background-size: 64px 24px;
}

.band--top {
  height: 26px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: clamp(580px, 92vh, 900px);
  min-height: clamp(580px, 92svh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: -2%;
  z-index: -2;
  background: #1a1013 url("hero.webp") center 66% / cover no-repeat;
  transform: scale(1.02);
  filter: saturate(1.1) contrast(1.03);
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(82% 72% at 50% 46%, rgba(36, 8, 16, 0) 26%, rgba(36, 8, 16, .38) 100%),
    linear-gradient(180deg,
      rgba(44, 10, 20, .5) 0%,
      rgba(44, 10, 20, .18) 30%,
      rgba(40, 8, 16, .3) 50%,
      rgba(40, 8, 16, .12) 66%,
      rgba(247, 240, 225, .22) 90%,
      var(--cream) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(940px, 92vw);
  padding: 96px 16px 132px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .44em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .45);
}

.eyebrow-line {
  width: clamp(28px, 8vw, 62px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(74px, 13.5vw, 172px);
  line-height: .9;
  letter-spacing: .012em;
  color: #fbf3e2;
  text-shadow:
    0 18px 46px rgba(0, 0, 0, .48),
    0 2px 0 rgba(0, 0, 0, .18);
}

.hero__sub {
  margin: 20px auto 0;
  max-width: 560px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.45;
  color: #f4e7cf;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .55);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 30px 0 0;
}

.meta-pill {
  padding: 9px 18px;
  border: 1px solid rgba(246, 238, 221, .32);
  border-radius: 999px;
  background: rgba(28, 14, 17, .26);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #f7eeda;
  white-space: nowrap;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 15px 30px 16px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--wine);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .28);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.hero__cta svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s ease;
}

.hero__cta:hover { background: #fff8e9; transform: translateY(-2px); box-shadow: 0 20px 40px rgba(0, 0, 0, .32); }
.hero__cta:hover svg { transform: translateY(2px); }

.hero__band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background-color: var(--cream);
  background-image: var(--band-wine);
  background-repeat: repeat-x;
  background-position: center;
  background-size: 64px 24px;
  border-top: 1px solid rgba(124, 29, 43, .14);
}

/* ---------- панель фильтров ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 240, 225, .9);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.toolbar__inner {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 12px clamp(16px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid rgba(124, 29, 43, .26);
  border-radius: 999px;
  background: transparent;
  color: var(--wine);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.chip b {
  font-weight: 600;
  opacity: .62;
  font-variant-numeric: tabular-nums;
}

.chip:hover { background: rgba(124, 29, 43, .07); }

.chip.is-on {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--cream);
  box-shadow: 0 6px 16px rgba(124, 29, 43, .2);
}

.chip.is-on b { opacity: .8; }

.toolbar__hint {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- галерея ---------- */

.page {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 8px clamp(14px, 3vw, 28px) 96px;
}

.day { padding-top: 30px; }
.day.is-hidden { display: none; }

.day__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 14px 0 24px;
}

.day__num {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(124, 29, 43, .38);
}

.day__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
  color: var(--wine);
}

.day__rule {
  flex: 1 1 40px;
  min-width: 40px;
  height: 10px;
  align-self: center;
  background-image: var(--band-wine);
  background-repeat: repeat-x;
  background-position: center;
  background-size: 64px 24px;
  opacity: .45;
}

.day__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.masonry {
  columns: 4;
  column-gap: 18px;
}

/* ---------- карточки ---------- */

.card {
  margin: 0 0 18px;
  break-inside: avoid;
  page-break-inside: avoid;
  display: block;
}

.card.is-hidden { display: none; }

.card__open {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #eadcc0;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform .35s cubic-bezier(.2, .7, .3, 1), box-shadow .35s ease;
}

.card__open:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__media {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #e3d3b3;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}

.card__open:hover img { transform: scale(1.045); }

.card__shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(24, 12, 14, 0), rgba(24, 12, 14, .62));
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.card:hover .card__shade { opacity: 1; }

.card__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px 6px;
  border-radius: 999px;
  background: rgba(28, 14, 17, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f7eeda;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1;
}

.card__time {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  color: #f9f1de;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s ease, transform .3s ease;
}

.card:hover .card__time,
.card:focus-within .card__time { opacity: 1; transform: none; }

.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.card__play svg {
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 50%;
  background: rgba(247, 240, 225, .88);
  fill: var(--wine);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  transition: transform .3s ease, background .3s ease;
  backdrop-filter: blur(2px);
}

.card__open:hover .card__play svg {
  transform: scale(1.09);
  background: #fff8e9;
}

/* на сенсорных устройствах подписи видны сразу */
@media (hover: none) {
  .card__shade { opacity: .85; }
  .card__time { opacity: 1; transform: none; }
}

/* ---------- пусто ---------- */

.empty {
  margin: 60px auto;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
}

/* ---------- подвал ---------- */

.footer {
  position: relative;
  background: var(--wine);
  color: var(--cream);
  overflow: hidden;
}

.footer > .band {
  height: 26px;
  background-color: var(--cream);
  background-image: var(--band-wine);
}

.footer::after {
  content: "";
  position: absolute;
  inset: 40% -20% auto;
  height: 320px;
  background: radial-gradient(closest-side, rgba(255, 226, 178, .14), transparent);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 1;
  width: min(760px, 90vw);
  margin: 0 auto;
  padding: 54px 0 62px;
  text-align: center;
}

.footer__rosette {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  opacity: .95;
}

.footer__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: .02em;
}

.footer__text {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(247, 238, 218, .82);
}

.footer__small {
  margin: 26px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- лайтбокс ---------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(22, 11, 14, .95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--cream);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s ease, visibility .26s ease;
}

.lb.is-open { opacity: 1; visibility: visible; }
.lb:focus { outline: none; }

.lb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(14px, 3vw, 26px);
  border-bottom: 1px solid rgba(246, 238, 221, .12);
}

.lb__caption {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.lb__kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-soft);
  white-space: nowrap;
}

.lb__date {
  font-size: 13px;
  font-weight: 500;
  color: rgba(246, 238, 221, .82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.lb__drive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid rgba(246, 238, 221, .28);
  border-radius: 999px;
  color: var(--cream);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
  white-space: nowrap;
}

.lb__drive:hover { background: rgba(246, 238, 221, .13); border-color: rgba(246, 238, 221, .5); }

.lb__drive svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb__close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 238, 221, .28);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: background .2s ease;
}

.lb__close:hover { background: rgba(246, 238, 221, .13); }

.lb__close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.lb__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 20px clamp(10px, 7vw, 92px);
}

.lb__frame {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 60px;
  min-height: 60px;
}

.lb__frame img {
  border-radius: 4px;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  max-height: calc(100svh - 210px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
  animation: lbIn .32s ease both;
}

.lb__frame.is-photo {
  background: #f7f0e1;
  padding: 9px 9px 0;
  border-radius: 3px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
}

.lb__frame.is-photo img {
  border-radius: 2px;
  box-shadow: none;
  max-height: calc(100vh - 262px);
  max-height: calc(100svh - 262px);
}

.lb__polaroid {
  display: block;
  padding: 9px 6px 11px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--wine);
  letter-spacing: .02em;
}

.lb__frame iframe {
  display: block;
  width: min(1120px, 86vw);
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
  animation: lbIn .32s ease both;
}

.lb__frame.is-portrait iframe {
  width: min(420px, 86vw);
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 200px);
  max-height: calc(100svh - 200px);
}

@keyframes lbIn {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: none; }
}

.lb__spin {
  position: absolute;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(246, 238, 221, .22);
  border-top-color: var(--gold-soft);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 238, 221, .22);
  border-radius: 50%;
  background: rgba(24, 12, 14, .45);
  color: var(--cream);
  cursor: pointer;
  z-index: 2;
  transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}

.lb__nav:hover { background: rgba(246, 238, 221, .15); border-color: rgba(246, 238, 221, .45); }

.lb__nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb__nav--prev { left: clamp(8px, 2vw, 26px); }
.lb__nav--next { right: clamp(8px, 2vw, 26px); }
.lb__nav[hidden] { display: none; }

.lb__foot {
  padding: 10px 20px 18px;
  text-align: center;
}

.lb__counter {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  font-variant-numeric: tabular-nums;
  color: rgba(246, 238, 221, .6);
}

/* ---------- адаптив ---------- */

@media (max-width: 1100px) {
  .masonry { columns: 3; }
}

@media (max-width: 760px) {
  .masonry { columns: 2; column-gap: 12px; }
  .card { margin-bottom: 12px; }
  .toolbar__hint { display: none; }
  .day__head { flex-wrap: wrap; row-gap: 2px; margin-bottom: 18px; }
  .day__rule { flex-basis: 100%; order: 3; height: 8px; }
  .day__count { margin-left: auto; }
  .lb__bar { gap: 10px; }
  .lb__date { font-size: 12px; }
  .lb__frame.is-photo img { max-height: calc(100vh - 240px); max-height: calc(100svh - 240px); }
  .lb__nav { width: 42px; height: 42px; }
  .lb__nav--prev { left: 6px; }
  .lb__nav--next { right: 6px; }
}

@media (max-width: 560px) {
  .hero__inner { padding: 84px 14px 118px; }
  .hero__sub br { display: none; }
  .hero__meta { margin-top: 24px; gap: 8px; }
  .meta-pill { padding: 8px 13px; font-size: 10.5px; letter-spacing: .06em; }
  .hero__cta { margin-top: 28px; padding: 14px 24px 15px; font-size: 12.5px; }
  .lb__drive-text { display: none; }
  .lb__drive { padding: 10px; }
  .lb__frame.is-photo img { max-height: calc(100vh - 225px); max-height: calc(100svh - 225px); }
  .card__play svg { width: 46px; height: 46px; padding: 11px; }
  .day__num { display: none; }
  .day__head h2 { font-size: 21px; }
  .page { padding-bottom: 64px; }
  .footer__inner { padding: 42px 0 48px; }
}

@media (max-width: 340px) {
  .masonry { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


