/* ===== Міжсторінкові переходи ===== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.35s ease both vt-out; }
::view-transition-new(root) { animation: 0.45s ease both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ===== Палітра та токени (вінтажна тема, світла) ===== */
:root {
  --vintage-bg: #F5EBD7;
  --vintage-surface: #FBF5E8;
  --vintage-tone: #8A4B2A;
  --vintage-tone-hover: #6B3618;
  --vintage-ink: #2E2218;
  --vintage-olive: #5E6B3A;
  --vintage-gold: #8E6420;
  --vintage-plum: #6E3F5C;
  --vintage-line: #B89B74;
  --vintage-footer: #3B2A1E;
  --vintage-footer-ink: #F5EBD7;
  --vintage-gradient: linear-gradient(135deg, #8A4B2A 0%, #B9793F 100%);
  --vintage-shadow: 0 8px 22px rgba(46, 34, 24, 0.14);
  --vintage-radius: 3px;
  --vintage-section-pad: 10dvh;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', Arial, sans-serif;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--vintage-ink);
  background: var(--vintage-bg);
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--vintage-tone-hover); }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--vintage-ink);
  text-transform: none;
}
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--vintage-tone); outline-offset: 3px; }

/* ===== Header ===== */
.pg-header {
  position: relative;
  background: var(--vintage-surface);
  border-bottom: 1px solid var(--vintage-line);
  z-index: 5;
}
.pg-header::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -6px;
  border-bottom: 1px solid var(--vintage-line);
  pointer-events: none;
}
.pg-header-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
}
.pg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--vintage-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
.pg-logo { color: var(--vintage-tone); flex: 0 0 auto; }
.pg-menu-check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.pg-menu-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.pg-menu-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--vintage-ink);
}
.pg-menu-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0;
  padding: 8px clamp(16px, 4vw, 48px) 18px;
  background: var(--vintage-surface);
  border-bottom: 1px solid var(--vintage-line);
}
.pg-menu-check:checked ~ .pg-menu-list { display: flex; }
.pg-menu-check:focus-visible ~ .pg-menu-burger { outline: 2px solid var(--vintage-tone); outline-offset: 3px; }
.pg-menu-link {
  padding: 12px 0;
  color: var(--vintage-ink);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dotted var(--vintage-line);
}
.pg-menu-link[aria-current="page"] { color: var(--vintage-tone-hover); text-decoration: underline; text-underline-offset: 4px; }
.pg-menu-link:hover { color: var(--vintage-tone); }
.pg-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--vintage-gradient);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .pg-progress {
    animation: pg-progress-grow linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes pg-progress-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (min-width: 860px) {
  .pg-menu-burger { display: none; }
  .pg-menu-list {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: 0;
  }
  .pg-menu-link {
    padding: 8px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
  }
  .pg-menu-link:hover { border-bottom-color: var(--vintage-tone); }
}

/* ===== Footer ===== */
.pg-footer {
  background: var(--vintage-footer);
  color: var(--vintage-footer-ink);
  padding: 44px clamp(16px, 5vw, 48px) 28px;
  margin-top: auto;
}
.pg-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}
.pg-footer .pg-brand { color: var(--vintage-footer-ink); }
.pg-footer .pg-logo { color: var(--vintage-footer-ink); }
.pg-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
}
.pg-footer-links a {
  color: var(--vintage-footer-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pg-disclaimer { max-width: 640px; font-size: 0.92rem; margin: 0; }
.pg-copy { font-size: 0.85rem; margin: 0; }

/* ===== Декор і типографіка ===== */
.vintage-kicker {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vintage-tone-hover);
  margin: 0 0 12px;
}
.ornament-rule {
  text-align: center;
  color: var(--vintage-tone);
  letter-spacing: 0.6em;
  margin: 0 0 18px;
}
.ornament-title {
  text-align: center;
  position: relative;
  margin-bottom: 0.5em;
}
.ornament-title::before {
  content: "❦";
  display: block;
  color: var(--vintage-tone);
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.vintage-lead {
  font-size: 1.1rem;
  max-width: 62ch;
}
.vintage-pill {
  display: inline-block;
  padding: 14px 30px;
  border: 3px double var(--vintage-tone);
  border-radius: 999px;
  background: var(--vintage-tone);
  color: var(--vintage-surface);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.vintage-pill:hover {
  background: var(--vintage-tone-hover);
  border-color: var(--vintage-tone-hover);
  color: var(--vintage-surface);
}
.vintage-pill--light {
  background: var(--vintage-footer-ink);
  border-color: var(--vintage-footer-ink);
  color: var(--vintage-footer);
}
.vintage-pill--light:hover {
  background: var(--vintage-bg);
  border-color: var(--vintage-bg);
  color: var(--vintage-footer);
}
.vintage-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 64px);
}
.vintage-block-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}
.vintage-block-head p { color: var(--vintage-ink); }

/* ===== Hero ===== */
.vintage-hero {
  position: relative;
  overflow: clip;
  isolation: isolate;
  min-height: 80dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--vintage-section-pad) * 1.2) clamp(16px, 5vw, 64px);
}
.vintage-hero--plain {
  min-height: 60dvh;
  background: var(--vintage-surface);
  border-bottom: 1px solid var(--vintage-line);
}
.vintage-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("img/bg.webp") center / cover no-repeat;
  filter: sepia(20%) brightness(0.9);
}
.vintage-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(245, 235, 215, 0.95) 0%, rgba(245, 235, 215, 0.72) 55%, rgba(245, 235, 215, 0.25) 100%);
}
.vintage-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.vintage-hero-title { margin-bottom: 0.4em; }
.vintage-hero-line {
  display: block;
  animation: vintage-line-in 0.8s ease both;
}
.vintage-hero-line:nth-child(2) { animation-delay: 0.15s; }
.vintage-hero-line:nth-child(3) { animation-delay: 0.3s; }
@keyframes vintage-line-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.vintage-hero .vintage-lead { margin-bottom: 1.6em; }
.vintage-seal {
  position: absolute;
  right: -60px;
  top: 50%;
  width: min(420px, 70vw);
  height: auto;
  color: var(--vintage-tone);
  opacity: 0.3;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}
.vintage-seal--small {
  position: absolute;
  right: -80px;
  top: 10%;
  width: min(300px, 60vw);
  opacity: 0.18;
  transform: none;
}

/* ===== Index content ===== */
.vintage-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 64px);
  display: grid;
  gap: 48px;
  align-items: center;
  grid-template-columns: 1fr;
}
.vintage-frame {
  margin: 0;
  padding: 14px;
  background: var(--vintage-surface);
  border: 1px solid var(--vintage-line);
  box-shadow: 4px 4px 0 var(--vintage-tone);
}
.vintage-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(12%);
}
.frame-caption {
  font-size: 0.88rem;
  color: var(--vintage-ink);
  margin-top: 10px;
  text-align: center;
}
.ornament-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ornament-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
}
.ornament-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--vintage-tone);
}
.frame-wrap { max-width: 620px; }

/* ===== Seal cards ===== */
.seal-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.seal-card {
  margin: 0;
  padding: 28px 20px;
  text-align: center;
  background: var(--vintage-surface);
  border: 1px solid var(--vintage-line);
  border-radius: var(--vintage-radius);
  box-shadow: var(--vintage-shadow);
}
.seal-badge {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--vintage-tone);
  color: var(--vintage-tone);
  font-size: 1.8rem;
  line-height: 1;
}
.seal-badge::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--vintage-tone);
  border-radius: 50%;
}
.seal-divider {
  border: 0;
  border-top: 1px dotted var(--vintage-line);
  width: 60%;
  margin: 14px auto;
}
.seal-card p { margin: 0; }

/* ===== Steps ===== */
.step-row {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
.step-item {
  position: relative;
  text-align: center;
  padding-top: 8px;
}
.step-num {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px double var(--vintage-tone);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--vintage-tone-hover);
  background: var(--vintage-surface);
}
.step-item p { margin: 0; }
@media (min-width: 760px) {
  .step-row { grid-template-columns: repeat(3, 1fr); }
  .step-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 37px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    border-top: 2px dashed var(--vintage-tone);
  }
}

/* ===== CTA strip ===== */
.vintage-cta-strip {
  display: block;
  background: var(--vintage-footer);
  color: var(--vintage-footer-ink);
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 64px);
  text-align: center;
}
.vintage-cta-box {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px;
  border: 2px double var(--vintage-footer-ink);
}
.vintage-cta-box h2 { color: var(--vintage-footer-ink); }
.vintage-cta-box p { color: var(--vintage-footer-ink); }

/* ===== About ===== */
.frame-wrap.ornament-frame, .ornament-frame {
  margin: 0 auto;
  padding: 12px;
  background: var(--vintage-surface);
  border: 1px solid var(--vintage-line);
  outline: 1px dotted var(--vintage-tone);
  outline-offset: 8px;
  box-shadow: var(--vintage-shadow);
  width: 100%;
}
.ornament-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: sepia(10%);
}
@media (min-width: 760px) {
  .ornament-frame { width: 55%; }
}
.vintage-pullquote {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 16px;
  text-align: center;
  border-top: 1px solid var(--vintage-line);
  border-bottom: 1px solid var(--vintage-line);
}
.vintage-pullquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  line-height: 1.4;
  margin: 0;
  color: var(--vintage-tone-hover);
}
.vintage-quote-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 64px);
}
.bg-band {
  position: relative;
  overflow: clip;
  isolation: isolate;
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 64px);
  display: flex;
  justify-content: center;
}
.bg-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("img/bg2.webp") center / cover no-repeat;
  filter: sepia(15%);
}
.bg-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(46, 34, 24, 0.6);
}
.floating-frame {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: clamp(24px, 4vw, 40px);
  text-align: center;
  background: var(--vintage-surface);
  border: 2px double var(--vintage-line);
  box-shadow: var(--vintage-shadow);
}
.floating-frame h2 { color: var(--vintage-ink); }

/* ===== Reserve ===== */
.reserve-head {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--vintage-section-pad) * 0.8) clamp(16px, 5vw, 64px) 0;
  text-align: center;
}
.reserve-head .vintage-lead { margin: 0 auto; }
.prep-section { padding-top: calc(var(--vintage-section-pad) * 0.8); }
.prep-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
.prep-card {
  padding: 28px 24px;
  background: var(--vintage-surface);
  border: 1px solid var(--vintage-line);
  border-radius: var(--vintage-radius);
  box-shadow: var(--vintage-shadow);
}
.prep-card .seal-badge { margin: 0 0 16px; width: 64px; height: 64px; font-size: 1.4rem; }
.prep-card p { font-size: 0.98rem; }
.prep-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.prep-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.prep-dot {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--vintage-surface);
}
.prep-dot--tone { background: var(--vintage-tone); }
.prep-dot--olive { background: var(--vintage-olive); }
.prep-dot--gold { background: var(--vintage-gold); }
.prep-dot--plum { background: var(--vintage-plum); }
@media (min-width: 860px) {
  .prep-grid { grid-template-columns: repeat(3, 1fr); }
}
.form-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 64px);
}
.form-vintage-card {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px);
  background: var(--vintage-surface);
  border: 4px double var(--vintage-line);
}
.form-vintage-card h2 { text-align: center; }
.form-note { text-align: center; font-size: 0.92rem; margin-bottom: 24px; }
.form-field { margin-bottom: 22px; }
.form-field label,
.form-consent label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-consent label { display: inline; font-weight: 400; margin: 0; }
.form-line-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--vintage-ink);
  border-radius: 0;
  padding: 10px 2px;
  font: inherit;
  color: var(--vintage-ink);
}
.form-line-input::placeholder { color: #6E5B4A; }
.form-line-input:focus {
  outline: 2px solid var(--vintage-tone);
  outline-offset: 2px;
}
.form-line-area { resize: vertical; min-height: 110px; }
.form-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 8px 0 26px;
}
.form-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--vintage-tone);
}
.form-actions { text-align: center; }
.form-actions .vintage-pill { cursor: pointer; }
.faq-section { padding-top: 0; }
.faq-vintage { max-width: 820px; margin: 0 auto; }
.faq-item {
  padding: 16px 0;
  border-bottom: 1px dotted var(--vintage-line);
}
.faq-item summary {
  list-style: none;
  cursor: default;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--vintage-ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 10px 0 0; }

/* ===== Legal та подяка ===== */
.legal-main {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 48px);
  min-height: 100dvh;
}
.legal-main h2 { margin-top: 1.6em; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.legal-main section { scroll-margin-top: 90px; }
.thank-layout {
  max-width: 1100px;
  min-height: 80dvh;
  margin: 0 auto;
  padding: var(--vintage-section-pad) clamp(16px, 5vw, 64px);
  display: grid;
  gap: 36px;
  align-items: center;
  justify-items: center;
  text-align: center;
}
.thank-figure { width: 100%; max-width: 520px; }
.thank-copy { max-width: 640px; }
.thank-copy .ornament-title { text-align: center; }
.thank-copy .vintage-pill { margin-top: 12px; }
@media (min-width: 860px) {
  .thank-layout { grid-template-columns: 1fr 1fr; text-align: left; justify-items: stretch; }
  .thank-copy .ornament-title { text-align: left; }
  .thank-copy .ornament-title::before { content: none; }
}

/* ===== Parts and reveal (view-based, лише у підтримуваних браузерах) ===== */
@supports (animation-timeline: view()) {
  .frame-clip {
    animation: frame-clip-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  .reveal-section {
    animation: section-fade-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}
@keyframes frame-clip-in {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes section-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Stagger-reveal (JS) ===== */
.js .stagger-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--stagger-delay, 0ms);
}
.js .stagger-item.is-in {
  opacity: 1;
  transform: none;
}

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
  background: var(--vintage-footer);
  color: var(--vintage-footer-ink);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.2);
}
.cookie-banner[hidden] { display: none; }
.cookie-text { margin: 0; max-width: 680px; font-size: 0.95rem; }
.cookie-text a { color: var(--vintage-footer-ink); text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn {
  padding: 10px 20px;
  border: 2px solid var(--vintage-footer-ink);
  border-radius: var(--vintage-radius);
  background: transparent;
  color: var(--vintage-footer-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cookie-btn-accept {
  background: var(--vintage-footer-ink);
  color: var(--vintage-footer);
}
.cookie-btn:hover { opacity: 0.9; }

/* ===== Адаптивність ===== */
@media (max-width: 759px) {
  .vintage-hero { min-height: 70dvh; }
  .vintage-seal { right: -120px; opacity: 0.18; width: 300px; }
  .vintage-seal--small { right: -120px; width: 220px; }
}
@media (min-width: 860px) {
  .vintage-content { grid-template-columns: 1fr 1fr; }
  .vintage-content .vintage-copy-col { order: 2; }
  .vintage-content .vintage-frame { order: 1; }
}

/* ===== Reduced motion (обов'язково) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html { view-transition-name: none; }
}