/* СибМарин · юбилей. Композиция по рефу yacht club (Грызлова), цвета компании: белый, серый, синий */
:root {
  --paper: #ffffff;
  --bg: #eceff2;
  --plus: #c9d0d8;
  --ink: #15253c;
  --ink-2: #5e6876;
  --line: #d9dee4;
  --soft: #f5f6f8;
  --serif: "Playfair Display", Georgia, serif;
  --sans: Geologica, system-ui, sans-serif;
  --gap: 20px;
  --ease: cubic-bezier(.19, 1, .22, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font: 300 15px/1.55 var(--sans);
  color: var(--ink);
  background-color: var(--bg);
}
/* фон в мелкий крестик, как у рефа */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, transparent 13.5px, var(--plus) 13.5px, var(--plus) 14.5px, transparent 14.5px) 0 0 / 30px 30px,
    linear-gradient(transparent 13.5px, var(--plus) 13.5px, var(--plus) 14.5px, transparent 14.5px) 0 0 / 30px 30px;
  -webkit-mask: radial-gradient(circle at 14px 14px, #000 4.5px, transparent 5px) 0 0 / 30px 30px;
          mask: radial-gradient(circle at 14px 14px, #000 4.5px, transparent 5px) 0 0 / 30px 30px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { text-wrap: balance; font-weight: 400; }
body, h1, h2, b, span, p { font-variant-numeric: lining-nums; }
p { text-wrap: pretty; }

/* Заставка */
.preloader {
  position: fixed; inset: 0; z-index: 50; background: var(--paper);
  display: grid; place-content: center; justify-items: center; gap: 18px;
  animation: preOut .5s ease 2.2s forwards;
  transition: opacity .5s ease, visibility .5s;
}
.preloader img { width: 64px; }
.preloader__line { width: 120px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.preloader__line::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; animation: preLine 1.1s var(--ease) forwards; }
.preloader.is-out { opacity: 0; visibility: hidden; }
@keyframes preLine { to { transform: scaleX(1); } }
@keyframes preOut { to { opacity: 0; visibility: hidden; } }

/* Лист */
.sheet { background: var(--paper); max-width: 1320px; margin: 0 auto; overflow: clip; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gap);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
}
.top__mark { font: italic 500 20px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.top__nav { display: none; }
.top__nav a, .top__rsvp { font-size: 12px; text-decoration: none; color: var(--ink-2); transition: color .2s; }
.top__nav a::before { content: "• "; }
.top__rsvp { margin-left: auto; color: var(--ink); border: 1px solid var(--ink); border-radius: 99px; padding: 6px 14px; transition: background .2s, color .2s; }

/* Общее */
.tag {
  display: inline-block; padding: 2px 6px 1px;
  background: var(--ink); color: #fff;
  font: 500 11px/1.3 var(--sans); letter-spacing: .04em; text-transform: uppercase;
}
.big { font: italic 400 clamp(54px, 13vw, 132px)/.92 var(--serif); letter-spacing: -.045em; }
.mid { font: italic 400 clamp(40px, 8vw, 76px)/.98 var(--serif); letter-spacing: -.035em; }
.sub { color: var(--ink-2); margin-top: 10px; }
.sec { padding: 72px var(--gap); border-top: 1px solid var(--line); }
.wide { margin: 40px calc(var(--gap) * -1) 0; }
.wide img, .wide video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.link { font-size: 13px; font-weight: 500; text-underline-offset: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px; border: 1px solid var(--ink); border-radius: 99px;
  background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  font: 500 14px/1 var(--sans); letter-spacing: .01em;
  transition: background .25s, color .25s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn--line { background: transparent; color: var(--ink); min-height: 44px; padding: 0 22px; }

/* 1. Обложка: мобилка стопкой, всё в первом экране */
.hero { display: flex; flex-direction: column-reverse; min-height: calc(100svh - 58px); }
.hero__photo { flex: 1 1 0; min-height: 180px; overflow: hidden; }
.hero__photo video, .hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero__text { padding: 8px var(--gap) 20px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__row { display: flex; justify-content: space-between; width: 100%; font-size: 11px; color: var(--ink-2); }
.hero__row--top { display: none; }
.hero .tag { margin-top: 4px; }
.hero__title { font: italic 400 clamp(52px, 15vw, 150px)/.86 var(--serif); letter-spacing: -.05em; margin-top: 10px; }
.hero__title .ln { display: inline-block; overflow: hidden; padding: 0 .06em .08em; }
.hero__title .ln > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.hero__title .ln:nth-child(2) > span { transition-delay: .08s; }
.is-ready .hero__title .ln > span { transform: none; }
.hero__lead { font: italic 400 17px/1.3 var(--serif); margin-top: 10px; max-width: 26ch; }
.hero__port { display: none; }
.hero__meta { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.hero__meta span:nth-child(3) { display: none; }
.hero__cta { width: 100%; margin-top: 14px; }

/* 2. Обращение */
.hello { text-align: center; }
.hello .big { margin-top: 18px; text-transform: uppercase; font-size: clamp(46px, 11vw, 120px); }
.hello__text { font: italic 400 18px/1.4 var(--serif); max-width: 34ch; margin: 22px auto 0; }
.hello__sign { margin-top: 16px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }

/* 3. Дата */
.date .big { margin-top: 18px; }
.date__timer { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.date__timer div { padding: 18px 0 14px; text-align: center; }
.date__timer div + div { border-left: 1px solid var(--line); }
.date__timer b { display: block; font: italic 400 clamp(38px, 9vw, 72px)/1 var(--serif); letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; }
.date__timer span { font-size: 11px; color: var(--ink-2); }
.date__ics { display: inline-block; margin-top: 18px; }

/* 4. Программа: строки как в «services» у рефа */
.program { text-align: center; }
.program .mid { margin-top: 18px; }
.program__list { list-style: none; margin-top: 36px; border-top: 1px solid var(--line); }
.program__list li {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.program__list small { font-size: 11px; color: var(--ink-2); }
.program__list small:first-child { text-align: left; }
.program__list small:last-child { text-align: right; }
.program__list span { font: italic 400 clamp(28px, 7vw, 58px)/1.05 var(--serif); letter-spacing: -.03em; transition: color .35s; }

/* 5. Место: карточка поверх кадра Енисея */
.place { position: relative; padding: 0 0 48px; }
.place__bg img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.place__card { position: relative; margin: -64px var(--gap) 0; background: var(--paper); padding: 28px 20px; border: 1px solid var(--line); text-align: center; }
.place .mid { margin-top: 16px; }
.place__addr { margin-top: 10px; color: var(--ink-2); }
.map { margin-top: 22px; aspect-ratio: 4 / 3; background: var(--soft); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.place__links { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* 6. Дресс-код */
.dress .mid { margin-top: 18px; }
.scarf { color: inherit; text-decoration: none; display: flex; gap: 16px; align-items: center; margin-top: 28px; padding: 18px; background: var(--soft); border-left: 2px solid var(--ink); }
.scarf p { font-size: 14px; }
.scarf b { font-weight: 500; }
.scarf__ico {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: url(assets/img/scarf.jpg) center / 180% no-repeat;
  border: 1px solid var(--line);
}
.looks { list-style: none; display: grid; gap: 30px; margin-top: 36px; }
.looks__name { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.looks__name i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 1px solid #c3c9d0; }
.looks__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.looks__pair img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .6s var(--ease); }


/* 6а. Фирменный платок */
.knot { background: var(--soft); }
.knot__head { display: grid; gap: 28px; }
.knot .mid { margin-top: 18px; }
.knot__lead { margin-top: 16px; max-width: 46ch; font: italic 400 18px/1.4 var(--serif); }
.knot__scarf img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.knot__ways { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 10px; margin-top: 40px; }
.knot__ways img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--paper); }
.knot__ways span { display: block; margin-top: 10px; font-size: 11px; color: var(--ink-2); }
.knot__ways b { display: block; font: italic 400 22px/1.15 var(--serif); letter-spacing: -.02em; }
@media (min-width: 900px) {
  .knot__head { grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: end; }
  .knot__lead { font-size: 21px; }
  .knot__ways { grid-template-columns: repeat(4, 1fr); gap: 40px 18px; }
  .knot__ways li:nth-child(4n+2), .knot__ways li:nth-child(4n+4) { margin-top: 48px; }
}

/* 7. Анкета: карточка с крестиками по углам */
.rsvp { background: var(--soft); }
.rsvp__card { position: relative; background: var(--paper); padding: 36px 20px; max-width: 640px; margin: 0 auto; text-align: center; }
.rsvp .mid { margin-top: 16px; }
.cross { position: absolute; width: 14px; height: 14px; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--ink); }
.cross::before { left: 6.5px; top: 0; width: 1px; height: 14px; }
.cross::after { top: 6.5px; left: 0; height: 1px; width: 14px; }
.cross--tl { top: -7px; left: -7px; } .cross--tr { top: -7px; right: -7px; }
.cross--bl { bottom: -7px; left: -7px; } .cross--br { bottom: -7px; right: -7px; }
.form { display: grid; gap: 20px; margin-top: 30px; text-align: left; }
.field { display: grid; gap: 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .8; }
.field input {
  font: 300 16px/1.4 var(--sans); color: var(--ink); text-transform: none; letter-spacing: 0;
  border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; background: transparent; border-radius: 0;
  transition: border-color .25s;
}
.field input:focus { outline: none; border-color: var(--ink); }
.field input::placeholder { color: #a6aeb8; }
.choice { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center; min-height: 46px;
  border: 1px solid var(--line); border-radius: 99px; font-size: 14px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.choice input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--ink); }
.form .btn { width: 100%; }
.form__done { text-align: center; font: italic 400 20px/1.3 var(--serif); }

/* 8. Вопросы */
.faq .mid { margin-top: 18px; }
.faq__list { margin-top: 32px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-weight: 400; font-size: 15px; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%;
  width: 22px; height: 22px; border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 15px; line-height: 1; transition: rotate .3s var(--ease), background .2s, color .2s;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 36px 20px 0; color: var(--ink-2); }

/* 9. Финал */
.final { text-align: center; padding: 0 var(--gap) 40px; border-top: 1px solid var(--line); }
.final .wide { margin-top: 0; }
.final__line { font: italic 400 clamp(44px, 11vw, 110px)/.95 var(--serif); letter-spacing: -.045em; margin-top: 40px; }
.final__logo { width: 72px; margin: 28px auto 0; }
.final__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.final__row span { color: var(--ink-2); }
.final__row a { text-decoration: none; }

/* Появление */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Десктоп */
@media (min-width: 900px) {
  :root { --gap: 56px; }
  .top__nav { display: flex; gap: 22px; margin-left: 40px; }

  /* обложка: кадр слева, текст справа, как у рефа */
  .hero { flex-direction: row; min-height: calc(100vh - 58px); max-height: 940px; }
  .hero__photo { flex: 1 1 50%; min-height: 0; }
  .hero__text { flex: 1 1 50%; padding: 22px 40px 40px; justify-content: space-between; }
  .hero__row--top { display: flex; }
  .hero .tag { margin-top: auto; }
  .hero__title { font-size: clamp(84px, 9vw, 140px); }
  .hero__lead { font-size: 20px; }
  .hero__port { display: block; width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-top: 22px; outline: 1px solid var(--line); outline-offset: 6px; }
  .hero__meta { margin-top: auto; }
  .hero__meta span:nth-child(3) { display: inline; }
  .hero__cta { width: auto; margin-top: 20px; }

  .sec { padding: 120px var(--gap); }

  .hello__text { font-size: 22px; }

  .date { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; align-items: end; }
  .date__timer { margin-top: 0; }
  .date__ics { grid-column: 2; justify-self: end; }

  .program__list li { grid-template-columns: 120px 1fr 120px; padding: 18px 0; }

  .place { padding: 0; }
  .place__bg img { aspect-ratio: 21 / 9; }
  .place__card { width: min(720px, 100%); margin: -220px auto 120px; padding: 48px 56px; }

  .looks { grid-template-columns: 1fr 1.25fr 1fr; gap: 24px; align-items: start; }
  .looks li:nth-child(2) { margin-top: 72px; }

  .rsvp__card { padding: 56px 64px; }

  .final .wide { margin: 0 calc(var(--gap) * -1); }
  .final__line { margin-top: 64px; }
}

@media (hover: hover) {
  .top__nav a:hover { color: var(--ink); }
  .top__rsvp:hover { background: var(--ink); color: #fff; }
  .link:hover { text-decoration-thickness: 2px; }
  .btn:hover { background: #24395a; }
  .btn--line:hover { background: var(--ink); color: #fff; }
  .looks__pair img:hover { transform: scale(1.02); }
  .choice label:hover span { border-color: var(--ink); }
  .faq summary:hover::after { background: var(--ink); color: #fff; border-color: var(--ink); }
  .final__row a:hover { text-decoration: underline; text-underline-offset: 4px; }
  .program__list:hover span { color: #b4bcc6; }
  .program__list li:hover span { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__title .ln > span { opacity: 1; transform: none; transition: none; }
  .preloader { display: none; }
}

.hello .big.is-name { text-transform: none; font-size: clamp(44px, 9vw, 104px); }

/* Анкета: две кнопки ответа */
.choice--btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice--btns .btn { width: 100%; }

/* 8. На входе: три шага строками */
.entry .mid { margin-top: 18px; }
.entry__steps { list-style: none; margin-top: 32px; border-top: 1px solid var(--line); }
.entry__steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.entry__steps small { font-size: 11px; color: var(--ink-2); }
.entry__steps span { font: italic 400 clamp(22px, 5vw, 38px)/1.2 var(--serif); letter-spacing: -.02em; }
@media (min-width: 900px) { .entry__steps li { grid-template-columns: 120px 1fr; padding: 26px 0; } }

.program__note { display: block; margin-top: 4px; font: 400 13px/1.3 var(--sans); font-style: normal; letter-spacing: 0; color: var(--ink-2); }

/* Анкета: ловушка для ботов и ошибка отправки */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__done.is-err { color: #a33a3a; font: 400 14px/1.4 var(--sans); }

/* 10. Ролик внизу страницы */
.reel { text-align: center; }
.reel .mid { margin-top: 18px; }
.reel__video { margin: 32px calc(var(--gap) * -1) 0; background: #0d1a2c; }
.reel__video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0d1a2c; }
@media (min-width: 900px) { .reel__video { margin: 40px 0 0; } }
