/* ==========================================================================
   Mariia & Yauheniy — wedding site
   Sections: tokens · base · header/menu · hero · content sections ·
             countdown/calendar · decor · RSVP page · mobile (≤760px)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette. Rough share of the page: ivory ~50%, sage ~45%, blush ~5%.
     Ink is for text and functional contrast only. */
  --ivory: #faf7f0;      /* Warm Ivory: main canvas */
  --sage: #dce5d2;       /* Pale Sage: signature sections, cards, secondary buttons */
  --blush: #f0c5cb;      /* Pastel Blush Pink: primary CTAs, small highlights */
  --ink: #635d52;        /* Soft Olive-Charcoal: text, icons, navigation */

  /* Derived shades, kept within the palette's hues */
  --ink-deep: #4f4a42;         /* text on blush (#635d52 is below 4.5:1 there) */
  --ink-muted: #68625a;        /* secondary text; ≥4.5:1 on ivory, sage and the form card */
  --sage-deep: #d2dcc6;        /* hover / selected states on sage; ink stays ≥4.5:1 on it */
  --blush-deep: #e9b4bc;       /* hover on blush buttons, decorative accents */
  --sage-soft: #eceee3;        /* sage mixed with ivory: RSVP form card */
  --line: rgba(99, 93, 82, .2);

  /* Script font: loaded in the <head> of both pages. Needs Cyrillic support. */
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: Manrope, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
}

/* Keyboard focus: one consistent, visible ring */
a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.script { font-family: var(--font-script); }

.eyebrow,
.hero-kicker { font-size: 11px; letter-spacing: .25em; font-weight: 500; }

/* Scroll-reveal (toggled by script.js) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Buttons */
.soft-button,
.line-button,
.primary-button {
  display: inline-block;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
  padding: 14px 23px;
  border-radius: 99px;
  transition: background-color .25s, border-color .25s, color .25s;
}
/* Secondary: sage */
.soft-button { background: var(--sage); color: var(--ink); }
.soft-button:hover { background: var(--sage-deep); }
/* Tertiary: outline */
.line-button { border: 1px solid var(--ink); color: var(--ink); margin-top: 15px; }
.line-button:hover { background: var(--sage-deep); }
/* Primary call to action: blush */
.primary-button { border: 0; background: var(--blush); color: var(--ink-deep); cursor: pointer; white-space: nowrap; }
.primary-button:hover { background: var(--blush-deep); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ivory);
  display: grid; place-items: center;
  transition: .7s;
}
.preloader.hide { opacity: 0; visibility: hidden; }
.preloader-mark { font: 42px var(--font-serif); letter-spacing: .12em; }
.preloader-mark i { font-weight: 400; color: var(--blush-deep); }

/* ---------- Header & menu ---------- */
.header {
  height: 72px;
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  mix-blend-mode: multiply;
}
.mark { color: var(--ink); text-decoration: none; font-size: 36px; line-height: 1; letter-spacing: .04em; }

/* Classic three-line menu button */
.menu-button {
  width: 44px; height: 44px; padding: 0;
  margin-right: -9px; /* lines line up with the page edge padding */
  border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-button span { display: block; width: 26px; height: 1.5px; background: var(--ink); }

.menu {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(250, 247, 240, .98);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 18px;
  opacity: 0; visibility: hidden;
  transition: .35s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu a { font: 40px var(--font-serif); color: var(--ink); text-decoration: none; transition: color .25s; }
.menu a:hover { color: var(--ink-muted); }
.menu .menu-rsvp {
  font-family: var(--font-sans); font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase;
  border-bottom: 1px solid var(--blush-deep);
}
.menu .lang-switch { margin-top: 14px; }

/* RU / EN switch: end of the menu on the main page, top bar on the RSVP page */
.lang-switch {
  display: flex; align-items: center; gap: 10px;
  font: 12px var(--font-sans); letter-spacing: .18em; color: var(--ink-muted);
}
.lang-switch a,
.menu .lang-switch a { font: inherit; color: var(--ink-muted); text-decoration: none; padding: 6px 2px; }
.lang-switch a[aria-current] { color: var(--ink); border-bottom: 1px solid; }
.lang-switch a:hover { color: var(--ink); }
.menu-close { position: absolute; right: 5vw; top: 25px; border: 0; background: none; font-size: 32px; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  padding: 105px 24px 70px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  background: var(--ivory);
}
.hero-date { font-size: clamp(56px, 8vw, 104px); margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(68px, 10vw, 126px);
  font-weight: 400;
  margin: 0 0 28px;
}
.hero h1 span { font-size: .55em; }
.hero-copy { max-width: 440px; line-height: 1.8; font-family: var(--font-serif); font-size: 20px; }
.hero-big-date { font: 500 clamp(24px, 3vw, 38px) var(--font-serif); letter-spacing: .12em; margin: 22px 0; }

/* Oval photo with an illustrated botanical frame on top */
.oval-wrap {
  position: relative; isolation: isolate;
  width: min(44vw, 380px);
  aspect-ratio: .7;
  margin-bottom: 32px;
}
.oval-wrap img { position: absolute; object-position: 50% 44%; }
.oval-photo {
  left: 12%; top: 9%; width: 76%; height: 82%;
  object-fit: cover;
  clip-path: ellipse(48% 49% at 50% 50%);
  z-index: 1;
}
.oval-art {
  inset: -5%; width: 110%; height: 110%;
  object-fit: contain;
  filter: saturate(.68) contrast(.97);
  mix-blend-mode: multiply;
  z-index: 2;
  pointer-events: none;
}

/* ---------- Content sections ---------- */
.welcome, .schedule, .gifts, .faq { padding: 120px max(7vw, 28px); text-align: center; }
.welcome h2, .schedule h2, .gifts h2, .faq h2, .rsvp-call h2 {
  font: 400 clamp(44px, 6vw, 78px)/.98 var(--font-serif);
  margin: 22px 0;
}
.welcome p, .gifts p { max-width: 620px; margin: 25px auto; line-height: 1.8; }

.welcome { background: var(--sage); }
.welcome .line-button { background: rgba(251, 250, 245, .5); }

/* Full-bleed photo */
.photo-break { height: 76vh; position: relative; overflow: hidden; }
.photo-break img { width: 100%; height: 100%; object-fit: cover; }
.photo-note {
  position: absolute; right: 7vw; bottom: 7vw;
  color: var(--ivory); font-size: clamp(34px, 5vw, 65px);
}

/* Venue */
.place { display: grid; grid-template-columns: 1fr 1fr; min-height: 720px; background: var(--ivory); }
.place-copy { padding: 12vw 8vw; display: flex; flex-direction: column; justify-content: center; }
.place-copy h2 { font-size: clamp(58px, 8vw, 100px); font-weight: 400; margin: 15px 0 0; }
.place-sub { text-transform: uppercase; letter-spacing: .22em; font-size: 11px; }
.place-copy > p:not(.place-sub) { max-width: 460px; line-height: 1.8; }
.venue-facts {
  margin: 22px 0 8px; padding: 18px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.venue-facts p { margin: 10px 0; font-size: 13px; }
.venue-facts strong { text-transform: uppercase; letter-spacing: .15em; font-size: 10px; }

.place-image {
  position: relative;
  min-height: 650px;
  padding: 2.5vw;
  display: grid; place-items: center;
}
.place-image > img {
  display: block;
  width: 100%; height: auto; max-height: 680px;
  object-fit: contain;
}

/* Schedule */
.schedule { background: var(--ivory); }
.timeline { max-width: 780px; margin: 60px auto 0; border-top: 1px solid var(--line); }
.timeline article {
  display: grid; grid-template-columns: 120px 1fr; align-items: center;
  text-align: left;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.timeline time { font: italic 32px var(--font-serif); }
.timeline span { font: 28px var(--font-serif); }
.schedule-event { display: inline-flex; align-items: center; gap: 15px; }
.sketch-event-icon { width: 43px; height: 43px; object-fit: contain; flex: 0 0 43px; filter: saturate(.78); }

/* Dress code */
.dress {
  padding: 110px 9vw;
  background: var(--sage);
  display: flex; align-items: end; justify-content: space-between;
  gap: 50px;
}
.dress h2 { font-size: 80px; font-weight: 400; margin: 15px 0; }
.dress p { max-width: 580px; line-height: 1.7; }
.dress-note { font-family: var(--font-serif); font-size: 20px; }
.dress-labels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.dress-labels span {
  border: 1px solid rgba(79, 74, 66, .4);
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
}
/* Swatches show the guests' outfit colours: content, not the site palette */
.palette { display: flex; }
.palette i { width: 62px; height: 62px; border-radius: 50%; margin-left: -8px; border: 3px solid var(--ivory); }
.palette i:nth-child(1) { background: #e9c8cc; }
.palette i:nth-child(2) { background: #cba5ac; }
.palette i:nth-child(3) { background: #b8adc6; }
.palette i:nth-child(4) { background: #a7bac9; }
.palette i:nth-child(5) { background: #a1ac92; }
.palette i:nth-child(6) { background: #b8ada5; }


/* Closing portrait */
.portrait { min-height: 800px; position: relative; background: var(--sage); overflow: hidden; }
.portrait > img {
  width: 100%; height: 100%;
  position: absolute;
  object-fit: cover; object-position: center 45%;
}
.portrait-card {
  position: absolute; right: 7vw; bottom: 8vw;
  background: rgba(250, 247, 240, .92);
  padding: 42px 50px;
  text-align: center;
}
.portrait-card p { font-size: 50px; margin: 12px 0; }

.gifts { background: var(--ivory); }

/* RSVP call-to-action */
.rsvp-call {
  position: relative; overflow: hidden;
  padding: 100px 9vw;
  background: var(--sage);
  display: flex; justify-content: space-between; align-items: end;
  gap: 40px;
}
.rsvp-call > div { max-width: 820px; }
.rsvp-call p { max-width: 640px; line-height: 1.7; }
.rsvp-call > *:not(.rsvp-call-apple) { position: relative; z-index: 1; }
.rsvp-call-apple {
  position: absolute; right: 2.5vw; top: -34px;
  width: 150px;
  opacity: .2; filter: saturate(.65);
  transform: rotate(-12deg);
  pointer-events: none;
}

/* FAQ */
.faq { background: var(--ivory); }
.faq-list { max-width: 850px; margin: 50px auto 0; text-align: left; }
.faq details { border-top: 1px solid var(--line); padding: 22px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 28px var(--font-serif); }
.faq details p { line-height: 1.7; color: var(--ink-muted); max-width: 700px; }

footer { padding: 80px; text-align: center; background: var(--sage); }
footer .script { font-size: 55px; }
footer p { letter-spacing: .2em; }

/* ---------- Countdown & calendar ---------- */
.countdown {
  padding: 105px 8vw;
  background: var(--sage);
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 8vw; align-items: center;
}
.count-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 35px; }
.count-grid div { text-align: center; }
.count-grid b { display: block; font: 400 clamp(44px, 6vw, 82px) var(--font-serif); font-variant-numeric: tabular-nums; }
.count-grid span { text-transform: uppercase; letter-spacing: .18em; font-size: 9px; }

.mini-calendar {
  position: relative; isolation: isolate; overflow: visible;
  padding: 34px 35px 35px;
  background: var(--ivory); color: var(--ink);
  border: 1px solid rgba(99, 93, 82, .28);
  border-radius: 4px 9px 6px 8px;
  box-shadow: 3px 4px 0 rgba(99, 93, 82, .08);
}
/* Thin inner "pencil" border */
.mini-calendar::before {
  content: ''; position: absolute; inset: 6px; pointer-events: none;
  border: 1px solid rgba(99, 93, 82, .16);
  border-radius: 11px 4px 10px 6px / 5px 11px 5px 12px;
}
.calendar-title {
  font-size: clamp(44px, 5vw, 62px); line-height: 1.15;
  text-align: center; margin-bottom: 20px;
  transform: rotate(-1.5deg);
}
.calendar-year {
  font-family: var(--font-serif); font-size: 19px; letter-spacing: .32em;
  color: var(--ink-muted); text-align: center; margin: 2px 0 22px;
}
.week, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.week { border-bottom: 1px solid rgba(99, 93, 82, .35); padding-bottom: 10px; margin-bottom: 12px; }
.week span {
  font-family: var(--font-serif); font-size: 15px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-muted);
}
.days b, .days i { height: 34px; display: grid; place-items: center; position: relative; }
.days b { font: 500 20px var(--font-serif); color: var(--ink); }

/* Wedding day: numeral centred over a pencil-drawn heart */
.days .wedding-day {
  isolation: isolate; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; line-height: 1;
  color: var(--ink-deep);
}
.days .wedding-day::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: 53px; height: 51px;
  transform: translate(-50%, -50%) rotate(-5deg);
  background: url('assets/calendar-pencil-heart.png') center / contain no-repeat;
  opacity: .79; pointer-events: none;
}

.mini-calendar .line-button {
  display: block; width: max-content; margin: 24px auto 0;
  border-radius: 3px 8px 4px 7px;
}
.calendar-botanical {
  position: absolute; z-index: -1; pointer-events: none;
  object-fit: contain; filter: saturate(.74); opacity: .8;
}
.calendar-botanical-top { width: 165px; top: -63px; left: -60px; transform: rotate(-12deg); }
.calendar-botanical-bottom { width: 150px; right: -56px; bottom: -48px; transform: rotate(15deg); }

/* ---------- Botanical decor ---------- */
.botanical-section { position: relative; overflow: hidden; }
.botanical-section > *:not(.decor) { position: relative; z-index: 1; }
.decor {
  display: block; position: absolute; z-index: 0;
  pointer-events: none;
  filter: saturate(.68); opacity: .28;
}
.decor-welcome  { width: 205px; left: -50px;  bottom: -40px; transform: rotate(-18deg); }
.decor-place    { width: 160px; right: -40px; bottom: 10px;  transform: rotate(15deg); }
.decor-schedule { width: 180px; right: -48px; top: 30px;     transform: rotate(18deg); }
.decor-dress    { width: 225px; left: -60px;  bottom: -30px; transform: rotate(-12deg); }
.decor-gifts    { width: 170px; left: -40px;  top: 15px;     transform: rotate(-14deg); }
.decor-faq      { width: 170px; right: -45px; bottom: 10px;  transform: rotate(12deg); }

/* ==========================================================================
   RSVP page
   ========================================================================== */
.rsvp-page { font-family: var(--font-sans); background: var(--ivory); color: var(--ink); }
.rsvp-page::before,
.rsvp-page::after {
  content: ''; position: fixed; z-index: 0;
  width: 230px; height: 230px;
  background: url('assets/apple-blossom-branch.png') center / contain no-repeat;
  opacity: .12; filter: saturate(.6); mix-blend-mode: multiply;
  pointer-events: none;
}
.rsvp-page::before { left: -70px; top: -45px; transform: rotate(14deg); }
.rsvp-page::after { right: -80px; bottom: -55px; transform: rotate(190deg); }

.rsvp-topbar {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5vw 0;
}
.back { color: var(--ink); text-decoration: none; font-size: 12px; }
.rsvp-shell { position: relative; z-index: 1; max-width: 760px; margin: auto; padding: 80px 24px 90px; }

.rsvp-head { text-align: center; margin-bottom: 55px; }
.rsvp-head .script { font-size: 64px; }
.rsvp-head h1 { font: 400 clamp(52px, 8vw, 80px) var(--font-serif); margin: 10px; }
.rsvp-head p { font-family: var(--font-serif); font-size: 19px; line-height: 1.7; max-width: 590px; margin: auto; }
.rsvp-apple-mark {
  display: block; width: 74px; height: 74px; object-fit: contain; margin: 0 auto 8px;
  opacity: .7; filter: saturate(.65); mix-blend-mode: multiply;
}

.rsvp-form {
  background: var(--sage-soft);
  padding: clamp(25px, 6vw, 60px);
  border: 1px solid rgba(99, 93, 82, .12);
  box-shadow: 0 18px 50px rgba(99, 93, 82, .06);
}
.rsvp-form::before {
  content: ''; display: block; width: 54px; height: 4px; border-radius: 9px; margin: 0 auto 36px;
  background: linear-gradient(90deg, var(--blush-deep) 0 50%, var(--sage-deep) 50%); /* two flat halves */
}

.field { display: block; margin-bottom: 30px; }
.field > span,
.pretty-fieldset legend {
  display: block; margin-bottom: 11px;
  font: 500 17px var(--font-serif); letter-spacing: .02em; color: var(--ink);
}
.field input,
.field textarea {
  width: 100%; padding: 13px 2px;
  border: 0; border-bottom: 1px solid rgba(99, 93, 82, .35);
  background: transparent; outline: none; color: var(--ink);
  font: 20px var(--font-serif);
  transition: border-color .25s, box-shadow .25s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-muted); opacity: .75; }
.field input:focus,
.field textarea:focus { border-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field small { display: block; color: var(--ink-muted); margin-top: 7px; font-size: 10px; }
.field em { font-style: normal; color: var(--ink-muted); font-weight: 300; }
.field-hint { margin: -3px 0 13px; color: var(--ink-muted); font-size: 11px; }

.pretty-fieldset { border: 0; padding: 0; margin: 0 0 30px; }
.radio-card { display: inline-flex; margin: 0 8px 8px 0; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span {
  display: block; padding: 13px 17px;
  border: 1px solid rgba(99, 93, 82, .3); border-radius: 99px;
  background: var(--ivory);
  font-family: var(--font-serif); font-size: 16px; cursor: pointer;
  transition: background-color .25s, border-color .25s;
}
.radio-card span:hover { border-color: var(--ink-muted); }
.radio-card input:checked + span {
  background: var(--sage-deep);
  border-color: var(--ink-muted);
}
.radio-card input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Sections shown/hidden by rsvp.js */
.conditional[hidden] { display: none !important; }
.plus-one-box {
  margin: -8px 0 34px; padding: 28px;
  border: 1px solid var(--line);
  background: var(--ivory);
}
.mini-script { font: 38px var(--font-script); margin-bottom: 22px; }

.spotify-button { display: inline-block; color: var(--ink); font-size: 12px; margin: -10px 0 30px; }
.submit { width: 100%; padding: 17px; }
.submit:disabled { opacity: .5; }
.form-status { text-align: center; line-height: 1.5; font-size: 12px; }

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 760px) {
  .menu a { font-size: 34px; }

  .hero { padding-top: 90px; }
  .hero-date { font-size: 58px; }
  .hero h1 { font-size: 66px; }
  .oval-wrap { width: 72vw; }

  .place { grid-template-columns: 1fr; }
  .place-copy { padding: 100px 28px 45px; }
  .place-image { min-height: 430px; padding: 0 12px 45px; }

  .timeline article { grid-template-columns: 95px 1fr; }
  .schedule-event { gap: 8px; }
  .sketch-event-icon { width: 32px; height: 32px; flex-basis: 32px; }

  .dress, .rsvp-call { display: block; }
  .palette { margin-top: 35px; }
  .palette i { width: 48px; height: 48px; }

  .portrait { min-height: 660px; }
  .portrait-card { left: 7vw; right: 7vw; padding: 28px; }
  .portrait-card p { font-size: 38px; }

  .rsvp-call .primary-button { margin-top: 25px; }
  .rsvp-call-apple { width: 105px; right: -25px; top: -18px; }

  .countdown { grid-template-columns: 1fr; padding: 80px 24px; }
  .count-grid { gap: 7px; }
  .count-grid b { font-size: 42px; }

  .mini-calendar { margin: 40px 14px; padding: 30px 24px 24px; }
  .calendar-botanical-top { width: 105px; left: -28px; top: -35px; }
  .calendar-botanical-bottom { width: 100px; right: -28px; bottom: -32px; }
  .days b { font-size: 17px; }
  .days .wedding-day { font-size: 17px; }
  .days .wedding-day::before { width: 48px; height: 46px; }

  .decor { width: 125px; }

  .rsvp-page::before,
  .rsvp-page::after { width: 155px; height: 155px; opacity: .09; }
  .rsvp-head .script { font-size: 54px; }
}

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