/* ============ ЦВЕТА И ШРИФТЫ — меняйте здесь ============ */
:root {
  /* Палитра сайта (из референса) */
  --bg: #F4EEE1;          /* кремовый фон */
  --bg-alt: #EBE1CB;      /* чередующийся фон секций */
  --ink: #3D372D;         /* основной текст */
  --ink-soft: #685F4F;    /* второстепенный текст */
  --accent: #556B4F;      /* оливково-зелёный: кнопки, акценты */
  --accent-dark: #43563E;
  --line: rgba(61, 55, 45, .28);
  --divider: #8A7842;     /* цвет декоративных разделителей */

  /* 4 кружка дресс-кода */
  --dress-olive:  #7B8350;  /* оливковый */
  --dress-cream:  #F3E9D2;  /* сливочный */
  --dress-pink:   #DCA9A0;  /* пыльно-розовый */
  --dress-yellow: #EAD36B;  /* мягкий жёлтый */

  /* Лимон (из референса): линия, заливка, акварельная подкраска */
  --lemon-line: #7C6A34;
  --lemon-fill: #F8EFCB;
  --lemon-wash: #E4C85F;
  --leaf-fill:  #E6E1C2;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --serif-cs: "EB Garamond", "Cormorant Garamond", Georgia, serif; /* чешский: близко к русскому Cormorant, диакритика плотнее */
  --script: "Caveat", "Segoe Script", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(85, 107, 79, .15); }
a, button, label, summary { touch-action: manipulation; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-weight: 500; font-size: 1.22rem; line-height: 1.5;
  opacity: 0; transition: opacity .4s;
}
body.ready { opacity: 1; }
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.noscript { padding: 1rem; text-align: center; }

/* ---------- верхнее меню + переключатель языка ---------- */
:root { --nav-h: 56px; }
.topbar { position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: var(--nav-h); transition: background-color .3s, box-shadow .3s, transform .3s; }
.topbar.is-solid, .topbar.is-open { background: rgba(244, 238, 225, .97); box-shadow: 0 1px 0 var(--line); }
.topbar.is-hidden { transform: translateY(-100%); }
.topbar__in { height: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 8px 0 16px; }
.lang { position: relative; z-index: 2; display: flex; align-items: center; gap: 2px; font-size: .95rem; letter-spacing: .12em; }
.lang button, .burger { font: inherit; letter-spacing: inherit; background: none; border: 0; color: var(--ink-soft); min-width: 44px; min-height: 44px; cursor: pointer; }
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.burger { position: relative; z-index: 2; width: 44px; padding: 0; color: var(--ink); }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s, opacity .2s, top .3s; }
.burger span:nth-child(1) { top: 16px; } .burger span:nth-child(2) { top: 22px; } .burger span:nth-child(3) { top: 28px; }
.topbar.is-open .burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.topbar.is-open .burger span:nth-child(2) { opacity: 0; }
.topbar.is-open .burger span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* мобильное меню: во весь экран */
.menu {
  position: fixed; inset: 0; z-index: 1; background: var(--bg); display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--nav-h) + 12px) 24px 28px; visibility: hidden; opacity: 0; transition: opacity .3s, visibility 0s .3s; overflow-y: auto;
}
.topbar.is-open .menu { visibility: visible; opacity: 1; transition: opacity .3s; }
.menu__list { list-style: none; margin: auto 0; padding: 0; text-align: center; }
.menu__list a { display: block; padding: .7rem 1rem; min-height: 52px; font-size: 1.7rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.menu a.is-active:not(.menu__cta) { color: var(--accent); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.menu__cta { display: block; width: min(320px, 100%); text-align: center; background: var(--accent); color: #fff; border: 1px solid var(--accent); padding: 1rem 1.5rem; font-size: 1.15rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.menu__cta:hover, .menu__cta.is-active { background: var(--accent-dark); }
body.menu-open { overflow: hidden; }

/* десктоп: тонкая строка вверху */
@media (min-width: 1100px) {
  :root { --nav-h: 64px; }
  .topbar__in { padding: 0 clamp(20px, 3vw, 48px); justify-content: space-between; }
  .burger { display: none; }
  .menu { position: static; z-index: auto; inset: auto; background: none; flex-direction: row; align-items: center; gap: 1.6rem; padding: 0; visibility: visible; opacity: 1; overflow: visible; transition: none; }
  .menu__list { display: flex; gap: clamp(.9rem, 1.9vw, 2.2rem); margin: 0; }
  .menu__list a { display: inline-flex; align-items: center; padding: 0; min-height: 44px; font-size: .82rem; letter-spacing: .16em; white-space: nowrap; color: var(--ink-soft); transition: color .2s; }
  .menu__list a:hover { color: var(--ink); }
  .menu a.is-active:not(.menu__cta) { color: var(--ink); text-decoration: underline; text-underline-offset: 9px; text-decoration-thickness: 1px; }
  .menu__cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; width: auto; padding: .5rem 1.2rem; font-size: .82rem; letter-spacing: .16em; white-space: nowrap; background: transparent; color: var(--accent-dark); border-color: var(--accent); }
  .menu__cta:hover, .menu__cta.is-active { background: var(--accent); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar, .menu, .burger span { transition: none !important; }
}
section[id] { scroll-margin-top: max(0px, calc(var(--nav-h) - 3.75rem)); }

/* ---------- общие ---------- */
.section { padding: 3.75rem 0; }
.alt { background: var(--bg-alt); }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.wrap--narrow { width: min(680px, 100% - 40px); }
.h2 {
  font-weight: 500; font-size: 1.5rem; letter-spacing: .28em; text-transform: uppercase;
  text-align: center; margin: 0 0 1.1rem; padding-inline: 1rem;
}
.h2--left { text-align: left; padding: 0; }
.h2--light { color: #fff; }
.prose p { margin-bottom: 1em; }
.prose p:last-child, .lines p:last-child { margin-bottom: 0; }
.pull { font-family: var(--script); font-size: 1.9rem; color: var(--accent); margin: 1.3rem 0 .7rem; line-height: 1.1; }
.script { font-family: var(--script); font-size: 2rem; color: var(--accent); transform: rotate(-3deg); margin: 1rem 0 0; }
.hint { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 .4rem; }

.ph { overflow: hidden; background: var(--bg-alt); }
.ph picture, .ph img { width: 100%; height: 100%; object-fit: cover; }

.lemon { width: 78px; height: 87px; margin-bottom: .7rem; opacity: 0; transform-origin: 78% 18%; animation: lemon-in 1.1s .25s ease-out forwards, lemon-sway 7s 1.4s ease-in-out infinite; }
@keyframes lemon-in { from { opacity: 0; transform: translateY(-8px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes lemon-sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@media (prefers-reduced-motion: reduce) { .lemon { animation: none; opacity: 1; } }

.btn {
  display: inline-block; font: inherit; font-size: 1.1rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .85rem 1.6rem; border: 1px solid currentColor; text-decoration: none; cursor: pointer; background: none;
  transition: background .25s, color .25s; min-height: 48px;
}
.btn--light { color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; width: 100%; }
.btn--solid:hover:not(:disabled) { background: var(--accent-dark); }
.btn:disabled { opacity: .65; cursor: progress; }

/* ---------- анимации появления ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, body { transition: none !important; }
}

/* ---------- 1. hero: фото на весь экран ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; background: var(--bg); overflow: hidden; }
/* мобильный: кадр портретный по высоте экрана — пара целиком внизу, небо сверху под текст */
.hero__photo {
  position: absolute; left: 0; right: 0; bottom: 52px; height: 66vh; height: 66svh;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 91%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 91%, transparent 100%);
}
.hero__photo .ph { height: 100%; background: none; }
.hero__photo img { object-position: 85% 50%; }
.hero__text { position: relative; z-index: 2; text-align: center; padding: 4.4rem 22px 0; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-weight: 500; font-size: clamp(1.35rem, 6.3vw, 2.4rem); letter-spacing: .16em; text-transform: uppercase; line-height: 1.15; margin: 0 0 .5rem; text-wrap: balance; }
.hero h1 span { display: inline-block; opacity: 0; animation: word-in .9s ease forwards; }
.hero h1 span:nth-child(1) { animation-delay: .15s; } .hero h1 span:nth-child(2) { animation-delay: .45s; } .hero h1 span:nth-child(3) { animation-delay: .75s; }
@keyframes word-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero h1 span { animation: none; opacity: 1; } }
.hero__date { font-size: 1.35rem; letter-spacing: .15em; margin: 0 0 .15rem; }
.hero__names { color: var(--ink); font-size: 1.2rem; margin: 0; }
.hero__down { position: absolute; z-index: 2; bottom: 4px; left: 50%; margin-left: -1.5rem; width: 3rem; text-align: center; font-size: 1.7rem; line-height: 44px; text-decoration: none; color: var(--ink-soft); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero__down { animation: none; } }

/* планшет/десктоп и телефон в ландшафте: фото на весь экран, текст слева в небе */
@media (min-width: 900px), (orientation: landscape) {
  .hero__photo { inset: 0; bottom: 0; height: auto; -webkit-mask-image: none; mask-image: none; }
  .hero__photo img { object-position: 72% 100%; }
  .hero::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 12vh; background: linear-gradient(to bottom, rgba(244, 238, 225, 0), var(--bg)); pointer-events: none; }
  .hero__text { align-items: flex-start; text-align: left; padding: clamp(4.5rem, 11vh, 9rem) 0 0 max(24px, calc((100% - min(1080px, 100% - 40px)) / 2 - 20px)); max-width: none; }
  .hero h1 { font-size: clamp(2rem, min(3.8vw, 8vh), 3.8rem); letter-spacing: .2em; white-space: nowrap; word-spacing: -.14em; margin-left: -.06em; }
  .hero__date { font-size: clamp(1.3rem, 1.9vw, 2rem); }
  .hero__names { font-size: clamp(1.15rem, 1.5vw, 1.6rem); }
    .hero__down { left: max(24px, calc((100% - min(1080px, 100% - 40px)) / 2 - 20px)); margin-left: 0; bottom: 6px; z-index: 2; }
  .lemon { width: clamp(56px, min(5.2vw, 8vh), 84px); height: clamp(63px, min(5.9vw, 9vh), 94px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero__text { padding-top: 3.4rem; }
  .lemon { width: 40px; height: 45px; margin-bottom: .3rem; }
  .hero h1 { font-size: 1.7rem; }
  }

/* ---------- 2. история ---------- */
.story__a { display: grid; gap: 1.1rem; align-items: center; }
.story__pic { margin: 0; }
.story__pic .ph { aspect-ratio: 4 / 3; max-height: 60svh; width: 100%; }
.story__pic img { object-position: 50% 80%; }
.story__wide { margin: 0; }
.story__wide .ph { aspect-ratio: 3 / 2; width: 100%; max-height: 80svh; }
.story__wide img { object-position: 50% 35%; }
/* История: весь текст одним ритмом — по левому краю, абзацы через 1em, акценты отдельно */
.story .prose, .story .prose p, .story__b > p { line-height: 1.55; }
.story__b { text-align: left; }
.story__b > p.prose { margin: 0 0 1em; }
.lines { margin: 1.4rem 0; padding: .15rem 0 .15rem 1.1rem; border-left: 2px solid var(--divider); }
.lines p { font-style: italic; font-size: 1.3rem; line-height: 1.4; margin: 0 0 .35em; }
.lines p:last-child { margin-bottom: 0; }

/* ---------- декоративные разделители ---------- */
.divider { width: min(160px, 56%); margin: 1rem auto; color: var(--divider); line-height: 0; }
.divider svg { width: 100%; height: auto; display: block; }
.divider--tight { margin: .7rem auto; }
.divider--top { margin: 0 auto 2rem; }

/* ---------- 3. отсчёт ---------- */
.countdown { color: #fff; background: var(--accent); text-align: center; display: flex; flex-direction: column; }
.countdown__bg { order: 2; }
.countdown__bg .ph { aspect-ratio: 4 / 3; max-height: 60svh; width: 100%; }
.countdown__bg img { object-position: 50% 75%; }
.countdown__inner { order: 1; width: min(680px, 100% - 24px); margin-inline: auto; padding: 3rem 0 2.4rem; }
.countdown .h2 { margin-bottom: .6rem; }
.countdown__date { letter-spacing: .3em; margin-bottom: 2rem; }
.timer { display: grid; grid-template-columns: repeat(4, 1fr); }
.timer div { padding: 0 4px; }
.timer div + div { border-left: 1px solid rgba(255, 255, 255, .5); }
.timer b { display: block; font-size: 2.6rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.timer span { font-size: .95rem; letter-spacing: .08em; }

/* ---------- split-блоки (программа, дресс-код, подарки) ---------- */
.split { display: grid; gap: 1.8rem; align-items: center; }
.split__pic { margin: 0; }
.split__pic .ph { aspect-ratio: 4 / 5; max-height: 70svh; width: 100%; }


/* ---------- 5. место ---------- */
.venue { position: relative; color: #fff; padding: 3.75rem 0; overflow: hidden; }
.venue__bg, .venue__bg .ph { position: absolute; inset: 0; }
.venue__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(35, 32, 20, .6), rgba(35, 32, 20, .45)); }
.venue__inner { position: relative; display: grid; gap: 2.2rem; align-items: center; }
.venue__name { font-size: 1.8rem; font-style: italic; margin-bottom: 1.6rem; }
.venue__card { margin: 0; border: 6px solid rgba(255, 255, 255, .92); box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.venue__card .ph { aspect-ratio: 3 / 2; }

/* ---------- 6. дресс-код ---------- */
.swatches { display: flex; gap: 14px; margin: 0 0 1.3rem; }
.swatches i { width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(61, 55, 45, .22); display: block; }

/* ---------- 8. важно ---------- */

/* ---------- 9. анкета ---------- */
.rsvp .prose { text-align: center; }
.form { margin-top: 1.8rem; background: var(--bg); padding: 1.6rem 1.3rem 1.8rem; border: 1px solid var(--line); }
.form__title { font-weight: 500; font-size: 1.4rem; letter-spacing: .22em; text-transform: uppercase; text-align: center; margin: 0 0 1.6rem; }
.field { border: 0; padding: 0; margin: 0 0 1.3rem; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 600; padding: 0; margin-bottom: .3rem; }
.field legend { margin-bottom: .6rem; }
input[type="text"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink-soft); border-radius: 0; padding: .55rem 0; min-height: 44px;
}
textarea { resize: vertical; }
input[type="text"]:focus, textarea:focus { outline: 0; border-bottom: 2px solid var(--accent); }
.err { color: #9A3B2E; font-size: 1.05rem; margin: .4rem 0 0; }
.invalid input[type="text"], input[aria-invalid="true"] { border-bottom-color: #9A3B2E; }
.form__summary, .form__fail { color: #9A3B2E; border: 1px solid #9A3B2E; padding: .7rem 1rem; margin-bottom: 1.2rem; }
.form__fail { margin-top: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks { text-align: center; margin-top: 1.8rem; padding: 2.4rem 1rem; background: var(--bg); border: 1px solid var(--line); }
.thanks__big { font-size: 1.9rem; margin-bottom: .4rem; }
[hidden] { display: none !important; }

/* ============ планшет / десктоп ============ */
@media (min-width: 700px) {
  .story__wide .ph { aspect-ratio: 16 / 9; max-height: 75svh; }
  .story__pic .ph { aspect-ratio: 3 / 2; }
  .story__pic img { object-position: 50% 78%; }
}
@media (min-width: 900px) {
  .story__pic .ph { aspect-ratio: 4 / 5; max-height: none; }
  .story__pic img { object-position: 50% 82%; }
  body { font-size: 1.3rem; }
  .section { padding: 5.5rem 0; }
  .h2 { font-size: 1.7rem; }


  .story__a { grid-template-columns: 1.2fr 1fr; gap: 4rem; }
    .divider { margin: 1.3rem auto; }
  .timer b { font-size: 3.8rem; }
  .timer span { font-size: 1.1rem; }

  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split--rev .split__pic { order: -1; }
  /* отсчёт: на широком экране текст и портретное фото — две половины */
  .countdown { display: grid; grid-template-columns: 1fr 1fr; }
  .countdown__bg .ph { aspect-ratio: auto; height: 60svh; min-height: 420px; max-height: none; }
  .countdown__bg img { object-position: 50% 70%; }
  .countdown__inner { align-self: center; width: min(560px, 100% - 64px); padding: 4rem 0; }
  .venue { padding: 5.5rem 0; }
  .venue__inner { grid-template-columns: 1fr 1.2fr; gap: 5rem; }
  .form { padding: 2.4rem 2.6rem 2.6rem; }
  .btn--solid { width: auto; min-width: 240px; }

}
@media (max-width: 380px) {
  body { font-size: 1.15rem; }
  .timer b { font-size: 2.1rem; }
}

.story { padding-bottom: 2.5rem; }
@media (min-width: 900px) { .story { padding-bottom: 3.5rem; } }

/* ============ иконки ============ */
:root { --ico-line: #7C6A34; }
.ico { width: 40px; height: 40px; flex: none; display: block; }

/* ============ программа: иллюстрированный таймлайн ============ */
.timeline { list-style: none; margin: 0 0 .4rem; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; border-left: 1px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: .35rem 0; }
.timeline__ico { width: 56px; height: 56px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; position: relative; }
.timeline__ico .ico { width: 34px; height: 34px; }
.timeline time { display: block; font-variant-numeric: tabular-nums; color: var(--accent-dark); letter-spacing: .08em; font-size: 1rem; }
.timeline b { display: block; font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
.timeline span.tl-text { display: block; color: var(--ink-soft); margin-top: .1rem; }
.timeline li.is-ghost { opacity: .75; }
.timeline li.is-ghost .bar { display: block; height: 9px; border-radius: 9px; border: 1px dashed var(--ink-soft); margin: 6px 0; }
.timeline li.is-ghost .bar--s { width: 38%; } .timeline li.is-ghost .bar--l { width: 78%; }
.soon { display: block; width: fit-content; margin: 1.1rem auto .2rem; border: 1px dashed var(--ink-soft); padding: .6rem 1.4rem; letter-spacing: .1em; }
.program .script { text-align: center; }

/* ============ что дарить ============ */
.gift-art { display: block; width: min(260px, 70%); margin: 0 auto 1rem; height: auto; }
.gift .prose { text-align: center; }

/* ============ важно: карточки + аккордеон ============ */
.imp-grid { display: grid; gap: 12px; max-width: 960px; }
.imp-card { align-content: start; background: var(--bg); border: 1px solid var(--line); padding: 1.1rem 1.2rem 1rem; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; }
.imp-card .ico { grid-row: span 3; width: 44px; height: 44px; }
.imp-card h3 { margin: 0 0 .4rem; font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: .03em; color: var(--accent-dark); }
.imp-card__lead { margin: 0; line-height: 1.4; }
.imp-card__more div > p, .imp-card__more > div > p { margin: .5rem 0 0; }
.imp-card__more { margin-top: .4rem; }
.imp-card__more > div > p:first-child, .imp-card__more > p:first-child { margin-top: 0; }
.imp-card > :not(.ico) { grid-column: 2; }

/* ============ вы с нами ============ */
.rsvp__lead { font-size: 1.5rem; line-height: 1.3; text-align: center; margin: 0 0 .9rem; }
.rsvp__hint { text-align: center; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.4; }
.rsvp__hint p { margin-bottom: .5em; }
.rsvp__cta { text-align: center; margin: 1.1rem 0 0; }
.rsvp__cta .btn { width: auto; min-width: 260px; }

/* ============ мастер анкеты ============ */
.wiz__top { margin-bottom: 1.2rem; }
.wiz__count { margin: 0 0 .4rem; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.wiz__bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.wiz__bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.step { animation: step-in .35s ease both; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.step.is-back { animation-name: step-in-back; }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.q { display: block; font-weight: 600; font-size: 1.3rem; line-height: 1.3; margin: 0 0 .5rem; padding: 0; }
.field .hint { font-size: .98rem; margin: 0 0 .5rem; }
.tile { display: block; position: relative; margin-bottom: 8px; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile span { display: flex; align-items: center; min-height: 52px; padding: .6rem 1rem; border: 1px solid var(--ink-soft); background: var(--bg); line-height: 1.25; transition: background .2s, border-color .2s, color .2s; }
.tile input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile:hover input:not(:checked) + span { background: var(--bg-alt); }
.tiles2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles2 .tile { margin: 0; }
.tiles2 .tile span { justify-content: center; }
.sub { margin-top: .8rem; }
.wiz__nav { display: flex; gap: 10px; margin-top: 1.4rem; }
.wiz__nav .btn { flex: 1 1 0; width: auto; min-width: 0; padding-inline: .6rem; letter-spacing: .1em; }
.wiz__nav .btn--solid { flex-grow: 1.5; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn--ghost:hover { background: var(--bg-alt); }
.thanks__art { width: 150px; height: auto; margin: 0 auto .6rem; display: block; }
@media (prefers-reduced-motion: reduce) { .step, .step.is-back { animation: none; } .wiz__bar i { transition: none; } }
/* ============ футер: текст на светлой зоне, фото плавно из кремового ============ */
.footer { background: var(--bg); text-align: center; overflow: hidden; }
.footer__text { position: relative; z-index: 2; padding: 2.6rem 20px 0; display: flex; flex-direction: column; align-items: center; }
.footer__big { font-size: 1.5rem; letter-spacing: .25em; text-transform: uppercase; margin: 0 0 .3rem; color: var(--ink); }
.footer__date { letter-spacing: .2em; margin: 0 0 .15rem; color: var(--ink); }
.footer__photo { margin-top: 1.2rem; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%); mask-image: linear-gradient(to bottom, transparent 0, #000 7%); }
.footer__photo .ph { aspect-ratio: 4 / 5; background: none; }
.footer__photo img { object-position: 50% 0%; }
@media (min-width: 700px) {
  .footer__photo { max-width: 640px; margin-inline: auto; }
  .footer__photo .ph { aspect-ratio: 1 / 1; }
  .footer__photo img { object-position: 50% 0%; }
}
@media (min-width: 900px) {
  .imp-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .timeline li { grid-template-columns: 64px 1fr; gap: 18px; }
  .timeline__ico { width: 64px; height: 64px; }
  .timeline::before { left: 31px; }
  .footer__text { padding-top: 3.4rem; }
}

/* ============ стикер «perfect match» на фото истории ============ */
.story__pic { position: relative; }
.sticker { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 62px; height: 62px; border-radius: 50%; background: var(--bg); color: var(--accent-dark);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3.5px var(--accent); transform: rotate(-9deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--script); font-size: 1.02rem; line-height: .95; text-align: center; }
.sticker span { display: block; }
@media (min-width: 900px) { .sticker { width: 76px; height: 76px; font-size: 1.25rem; right: 12px; bottom: 12px; } }
.gift__link { text-align: center; margin: 1.2rem 0 0; }
.gift__link .btn { width: auto; min-width: 240px; text-decoration: none; display: inline-block; }

/* футер: фото в круге (чтобы вернуть прямоугольник, удалите блок «.footer__photo --круг» ниже) */
/* .footer__photo --круг */
.footer__photo { -webkit-mask-image: none; mask-image: none; width: min(86vw, 440px); margin: 1.4rem auto 0; }
.footer__photo .ph { aspect-ratio: 1; border-radius: 50%; }
.footer__photo img { object-position: 50% 0%; }
@media (min-width: 700px) { .footer__photo { max-width: 440px; } .footer__photo .ph { aspect-ratio: 1; } .footer__photo img { object-position: 50% 0%; } }
.footer { padding-bottom: 3rem; }

/* ============ типографика: переносы и висячие строки ============ */
body { overflow-wrap: break-word; }
p, li, .tile span, .hint, .err { text-wrap: pretty; }
h1, h2, h3, .footer__big { text-wrap: balance; }
/* чешский: автоматические переносы слов в обычном тексте (в заголовках с разрядкой переносов нет) */
html[lang="cs"] body { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 9 4 4; }
html[lang="cs"] h1, html[lang="cs"] h2, html[lang="cs"] .footer__big, html[lang="cs"] .menu, html[lang="cs"] .btn, html[lang="cs"] button, html[lang="cs"] .sticker, html[lang="cs"] .timer, html[lang="cs"] .lang { -webkit-hyphens: manual; hyphens: manual; }

/* ============ контакты ============ */
.coord { margin-top: .6rem; display: block; }
.coord__line { display: block; }
.coord__langs { display: block; color: var(--ink-soft); font-size: 1.02rem; margin-top: .3rem; }
.imp-card a, .form__fail a, .contact__title a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.form__fail a { color: inherit; font-weight: 600; }
.contact { margin-top: 2rem; text-align: center; }
.contact__title { font-size: 1.3rem; margin: 0 0 .8rem; }
.contact__btns { display: grid; gap: 10px; max-width: 460px; margin-inline: auto; }
.contact__btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 56px; padding: .7rem 1rem; text-decoration: none; color: var(--accent-dark); border: 1px solid var(--accent); background: transparent; transition: background .2s, color .2s; }
.contact__btn:hover { background: var(--accent); color: #fff; }
.contact__name { font-size: 1rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.contact__handle { font-size: 1.1rem; }
.contact__btn--small { display: inline-flex; flex-direction: row; min-height: 44px; margin: .5rem 0 0; padding: .4rem 1rem; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; }
@media (min-width: 520px) { .contact__btns { grid-template-columns: 1fr 1fr; } }

/* ============ чешский шрифт: EB Garamond (родственный Cormorant, но háčky и čárky плотнее) ============ */
html[lang="cs"] { --serif: var(--serif-cs); }
html[lang="cs"] body { font-size: 1.15rem; line-height: 1.5; font-weight: 400; }
@media (min-width: 900px) { html[lang="cs"] body { font-size: 1.22rem; } }
html[lang="cs"] .pull, html[lang="cs"] .script { font-family: var(--script); }

/* ============ ландшафт на телефоне (низкое окно): hero по высоте экрана, меню в две колонки ============ */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { height: 100vh; height: 100svh; min-height: 0; }
  .hero__photo img { object-position: 72% 100%; }
}
@media (max-width: 1099px) and (max-height: 520px) and (orientation: landscape) {
  .menu { padding: calc(var(--nav-h) + 2px) 20px 12px; }
  .menu__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; margin: auto 0; }
  .menu__list a { min-height: 44px; padding: .3rem .8rem; font-size: 1.2rem; letter-spacing: .12em; }
  .menu__cta { padding: .75rem 1.5rem; }
}

/* ============ планшет: комфортная длина строки, «Важно» в две колонки уже с 700 px ============ */
.story__text { max-width: 40rem; margin-inline: auto; }
@media (min-width: 700px) { .imp-grid { grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; } }

/* ============ длинные слова в узких колонках; поля формы не прячутся под фиксированную шапку при фокусе ============ */
.imp-card, .tile span, .hint, .err, .rsvp__hint, .contact__handle, .gift .prose, .timeline b { overflow-wrap: anywhere; }
.field input, .field textarea, .wiz__nav .btn, .tile { scroll-margin: 84px 0 24px; }
