/* ============================================================
   Свадебное приглашение · Иван & Ирина · 26.08.2026
   Монохромная редакционная стилистика
   ============================================================ */

/* ---------- Шрифты (self-hosted, подмножество lat+cyr) ---------- */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marck Script';
  src: url('../fonts/marckscript.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Токены ---------- */
:root {
  --ink:        #0b0b0c;
  --ink-card:   #141416;
  --ink-inner:  #1d1d20;
  --paper:      #efefec;
  --paper-dim:  #d9d9d4;

  --on-paper:        #101011;
  --on-paper-muted:  #6c6c6e;
  --on-ink:          #f1f1ee;
  --on-ink-muted:    rgba(241, 241, 238, .58);

  --hair-light: rgba(241, 241, 238, .16);
  --hair-dark:  rgba(16, 16, 17, .14);

  --r-xl: 40px;
  --r-lg: 30px;
  --r-md: 20px;
  --r-sm: 12px;

  --gap:   14px;              /* расстояние между блоками */
  --pad:   clamp(22px, 6.2vw, 30px);
  --wrap:  560px;

  --ease: cubic-bezier(.22, .68, .22, 1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }   /* атрибут hidden должен быть сильнее display:grid/flex */
h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; }
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Зерно на всей странице ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background-image: var(--noise);
  background-size: 220px 220px;
  opacity: .22;
  mix-blend-mode: overlay;
}

/* ---------- Каркас ---------- */
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(26px, 7vw, 54px) clamp(12px, 3.6vw, 18px) 0;
}
.wrap > * + * { margin-top: var(--gap); }

/* ---------- Типографика ---------- */
.kicker {
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.script {
  font-family: 'Marck Script', cursive;
  font-weight: 400;
  line-height: 1.1;
}
.script--lg { font-size: clamp(30px, 8.6vw, 40px); }
.script--xl { font-size: clamp(36px, 11vw, 52px); }

.h-block {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(21px, 6.1vw, 27px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.lede { font-size: 15.5px; }
.muted { color: var(--on-ink-muted); }
.card--paper .muted { color: var(--on-paper-muted); }

/* ---------- Шапка ---------- */
.masthead { padding: 4px 6px 10px; }
.masthead__meta {
  font-family: 'Oswald', sans-serif;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hair-light);
}
.masthead__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(27px, 8.4vw, 38px);
  line-height: .98;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.pill {
  display: inline-block;
  line-height: 1.24;
  margin-top: 10px;
  padding: .34em .78em .4em;
  border-radius: 999px;
  background: var(--paper);
  color: var(--on-paper);
  font-size: .74em;
  letter-spacing: -.01em;
  white-space: nowrap;
}

/* ---------- Фото-рамки ---------- */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #171719;
}
.frame img {
  width: 100%;
  filter: grayscale(1) contrast(1.04);
}
.frame::after {            /* плёночное зерно поверх фото */
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  background-size: 190px 190px;
  opacity: .2;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero .frame { border-radius: var(--r-xl); }
.hero img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 28%; }
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(8,8,9,.58) 0%, rgba(8,8,9,0) 24%),
    linear-gradient(to top, rgba(8,8,9,.88) 0%, rgba(8,8,9,.34) 32%, rgba(8,8,9,0) 62%);
}
.hero__inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 5.6vw, 30px);
}
.hero__date {
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 14px rgba(8,8,9,.7);
}
.hero__names { text-align: left; }
.hero__title {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(25px, 8.1vw, 38px);
  line-height: 1.04;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 22px rgba(8,8,9,.45);
}
.hero__sub {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(23px, 7.2vw, 31px);
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
}
.hero__script {
  display: block;
  margin-top: 2px;
  font-size: clamp(26px, 8vw, 36px);
  color: rgba(255,255,255,.82);
}

/* ---------- Карточки ---------- */
.card {
  position: relative;
  padding: var(--pad);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card--paper { background: var(--paper); color: var(--on-paper); }
.card--ink   { background: var(--ink-card); color: var(--on-ink); border: 1px solid var(--hair-light); }
.card--ink::after,
.card--paper::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  background-size: 200px 200px;
  opacity: .1;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Приглашение */
.invite { text-align: center; }
.invite .kicker { color: var(--on-paper-muted); }
.invite__date {
  margin: 12px 0 4px;
  color: var(--on-paper);
}
.invite__rule {
  width: 34px;
  height: 1px;
  margin: 18px auto;
  background: rgba(16,16,17,.22);
}
.invite__text { max-width: 34ch; margin-inline: auto; }
.invite__figure {
  margin: 26px calc(var(--pad) * -1) calc(var(--pad) * -1);
  overflow: hidden;
  position: relative;
}
.invite__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 46%;
  filter: grayscale(1) contrast(1.03);
}
.invite__sign {
  margin-top: 20px;
  font-size: clamp(24px, 7vw, 30px);
}

/* Таймер */
.countdown { margin: 20px 0 2px; }
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.countdown__cell {
  position: relative;
  padding: 0 2px;
}
.countdown__cell + .countdown__cell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 32%;
  width: 1px;
  background: rgba(16, 16, 17, .16);
}
.countdown__num {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-weight: 250;
  font-size: clamp(27px, 8.4vw, 36px);
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  display: block;
  margin-top: 7px;
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--on-paper-muted);
}
.countdown__done {
  font-size: clamp(28px, 8.6vw, 38px);
  text-align: center;
}

/* Локация — арочная карточка */
.location {
  border-radius: 50% 50% var(--r-lg) var(--r-lg) / 30% 30% var(--r-lg) var(--r-lg);
  padding-top: clamp(60px, 16vw, 82px);
  text-align: center;
}
.location__script { color: var(--on-ink); }
.location__name { margin: 6px 0 10px; }
.location__addr { max-width: 26ch; margin-inline: auto; }
.location .btn { margin-top: 24px; }

/* Кнопки */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn--light { background: var(--paper); color: var(--on-paper); }
.btn--ink   { background: var(--ink-card); color: var(--on-ink); }
.btn:active { transform: scale(.985); }
@media (hover: hover) {
  .btn--light:hover { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 1px var(--paper); }
  .btn--ink:hover   { background: transparent; color: var(--on-paper); box-shadow: inset 0 0 0 1px var(--ink-card); }
}
.btn svg { width: 15px; height: 15px; flex: none; }

/* Тайминг */
.timing__head { text-align: center; margin-bottom: 26px; }
.timing__script { color: var(--on-ink); }
.timeline { position: relative; }
.timeline li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 20px;
  bottom: 4px;
  width: 1px;
  background: var(--hair-light);
}
.timeline li:last-child::after { display: none; }
.timeline li {
  position: relative;
  padding: 0 0 26px 30px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
}
.timeline li:last-child::before { background: transparent; box-shadow: inset 0 0 0 1px var(--paper); }
.timeline__time {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 23px;
  line-height: 1;
  letter-spacing: .06em;
}
.timeline__title {
  margin-top: 7px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.timeline__note {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--on-ink-muted);
}

/* Фото-пауза */
.plate img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.plate figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 22px;
  font-family: 'Oswald', sans-serif;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  background: linear-gradient(to top, rgba(8,8,9,.72), rgba(8,8,9,0));
}

/* Чат с фото */
.photochat { text-align: center; }
.photochat__script { margin-bottom: -4px; }
.photochat__text { max-width: 32ch; margin: 14px auto 24px; }

/* Важная информация */
.info__head { text-align: center; margin-bottom: 22px; }
.info__rule {
  width: 34px;
  height: 1px;
  margin: 4px auto 22px;
  background: var(--hair-light);
}
.info__text p {
  font-size: 14.8px;
  line-height: 1.72;
  color: rgba(241, 241, 238, .72);
}
.info__text p + p { margin-top: 14px; }

/* Контакты */
.contacts__figure {
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) var(--pad);
  position: relative;
  overflow: hidden;
}
.contacts__figure img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 50% 26%;
  filter: grayscale(1) contrast(1.04);
}
.contacts .kicker { color: var(--on-paper-muted); }
.contacts__title { margin: 10px 0 12px; }
.contacts__text { max-width: 32ch; }
.contact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--hair-dark);
  border-bottom: 1px solid var(--hair-dark);
  text-decoration: none;
}
.contact__role {
  font-family: 'Oswald', sans-serif;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--on-paper-muted);
}
.contact__value {
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1;
  min-height: 50px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(16,16,17,.2);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.social svg { width: 17px; height: 17px; }
@media (hover: hover) {
  .social a:hover { background: var(--on-paper); color: var(--paper); }
}
.contacts__thanks {
  margin-top: 20px;
  font-size: 14px;
  color: var(--on-paper-muted);
}

/* Футер */
.footer {
  padding: 46px 10px 52px;
  text-align: center;
}
.footer__script { color: var(--on-ink); }
.footer__names {
  margin-top: 16px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 6vw, 26px);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.footer__meta {
  margin-top: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
}
.footer__rule {
  width: 100%;
  height: 1px;
  margin: 30px 0 16px;
  background: var(--hair-light);
}
.footer__sign {
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(241,241,238,.34);
}

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .95s var(--ease), transform .95s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* Анимация загрузки hero */
.hero__date,
.hero__names > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.is-loaded .hero__date { opacity: 1; transform: none; transition-delay: .25s; }
.is-loaded .hero__title { opacity: 1; transform: none; transition-delay: .4s; }
.is-loaded .hero__sub   { opacity: 1; transform: none; transition-delay: .5s; }
.is-loaded .hero__script  { opacity: 1; transform: none; transition-delay: .62s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .hero__date,
  .hero__names > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Крупные экраны ---------- */
@media (min-width: 720px) {
  body { font-size: 16px; }
  :root { --gap: 16px; }
  .wrap { padding-top: 60px; }
}
