/* =========================================================
   Aďka & Dung – wedding website
   Palette & type taken from the printed invitation.
   ========================================================= */

:root {
  --cream: #f7ecda;
  --cream-soft: #fbf5ea;
  --paper: #fffaf1;
  --sand: #e5d29a;
  --sand-soft: #efe2b8;
  --peach: #f1c19b;
  --peach-soft: #f7dcc5;
  --green: #4f9a3c;
  --green-dark: #3c7a2d;
  --leaf: #6a8b4a;
  --sky: #a9c0d8;
  --navy: #2d3550;
  --ink: #26251f;
  --ink-soft: #5b5747;

  --font-display: "Mali", "Comic Sans MS", cursive;
  --font-hand: "Caveat", "Segoe Print", cursive;
  --font-body: "Fraunces", Georgia, "Times New Roman", serif;

  --radius: 22px;
  --radius-lg: 36px;
  --shadow-sm: 0 2px 10px rgba(60, 50, 20, .06);
  --shadow: 0 18px 40px -18px rgba(70, 60, 25, .28);
  --ease: cubic-bezier(.22, .8, .3, 1);
  --header-h: 68px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-variation-settings: "SOFT" 100;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
a:hover { color: var(--green); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

.container {
  width: min(100% - 2.5rem, 1140px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}
.container--narrow { width: min(100% - 2.5rem, 760px); }

.muted { color: var(--ink-soft); font-size: .95rem; }

.icon {
  width: 1.1em; height: 1.1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--green);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em;
  border: 2px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(60, 122, 45, .7);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn:hover {
  --btn-bg: var(--green-dark);
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -12px rgba(60, 122, 45, .75);
}
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-fg: var(--green-dark);
  background: transparent;
  border-color: currentColor;
  color: var(--btn-fg);
  box-shadow: none;
}
.btn--ghost:hover {
  --btn-fg: #fff;
  background: var(--green);
  border-color: var(--green);
}
.btn--small { padding: .55em 1.15em; font-size: .9rem; }
.btn--large { padding: 1em 2.2em; font-size: 1.1rem; }

/* ---------- Decorative shapes ---------- */
.deco {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.deco__shape { position: absolute; display: block; }
.deco--sand  { color: var(--sand); }
.deco--peach { color: var(--peach); }
.deco--leaf  { color: var(--leaf); }

.spin-slow { animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(247, 236, 218, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.site-header.is-open {
  background: rgba(247, 236, 218, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(106, 139, 74, .18), var(--shadow-sm);
}

.nav {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--green);
  text-decoration: none;
  letter-spacing: .02em;
}
.nav__brand span { color: #e09a6a; margin-inline: .08em; }

.nav__toggle {
  width: 46px; height: 46px;
  display: grid; place-content: center; gap: 5px;
  border: 0; border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.nav__toggle-bar {
  width: 20px; height: 2px; border-radius: 2px;
  background: var(--navy);
  transition: transform .35s var(--ease), opacity .2s;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.nav__menu {
  list-style: none; margin: 0; padding: 1rem 1.25rem 1.75rem;
  position: absolute; top: var(--header-h); left: 0; right: 0;
  display: flex; flex-direction: column; gap: .25rem;
  background: rgba(247, 236, 218, .97);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .3s, transform .35s var(--ease), visibility .3s;
}
.site-header.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }

.nav__menu a:not(.btn) {
  display: block;
  padding: .7rem .5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
  position: relative;
}
.nav__menu a:not(.btn)::after {
  content: "";
  position: absolute; left: .5rem; right: .5rem; bottom: .35rem;
  height: 2px; border-radius: 2px;
  background: var(--peach);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__menu a:not(.btn):hover::after,
.nav__menu a.is-active::after { transform: scaleX(1); }
.nav__menu a:not(.btn).is-active { color: var(--green-dark); }
.nav__menu .btn.is-active { --btn-bg: var(--green-dark); }
.nav__menu .btn { margin-top: .75rem; width: 100%; }

@media (min-width: 960px) {
  .nav__toggle { display: none; }
  .nav__menu {
    position: static; flex-direction: row; align-items: center; gap: .25rem;
    padding: 0; background: none; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav__menu a:not(.btn) { font-size: 1rem; padding: .5rem .7rem; }
  .nav__menu a:not(.btn)::after { left: .7rem; right: .7rem; bottom: .2rem; }
  .nav__menu .btn { margin: 0 0 0 .75rem; width: auto; }
}

/* ---------- Hero ---------- */
.hero {
  --hero-ratio: 1024 / 731;
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
  background: #f5edd8;
}

/* Background + runners share one box with the artwork's proportions, always as tall as the page.
   Tall screens crop its outer edges; wide screens show it whole and the sides blend into cream. */
.hero__stage {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  height: 100%;
  aspect-ratio: var(--hero-ratio);
  translate: -50% 0;
  animation: hero-settle 2.4s var(--ease) both;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
@keyframes hero-settle {
  from { scale: 1.06; }
  to   { scale: 1; }
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero__runners {
  position: absolute;
  left: 41.6%;
  top: 32.15%;
  width: 19.53%;
  height: auto;
}

.hero__layout {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 4.5vh, 2.75rem) 1rem clamp(.9rem, 3vh, 1.75rem);
  text-align: center;
}

.hero__names {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, min(12vw, 8vh), 5.4rem);
  line-height: 1.05;
  color: var(--green);
  letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(255, 255, 255, .7);
}
.hero__date {
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, min(8vw, 5.5vh), 3.1rem);
  line-height: 1.1;
  color: var(--navy);
  margin: .1rem 0 0;
  letter-spacing: .05em;
  text-shadow: 0 1px 12px rgba(255, 255, 255, .8);
}

.hero__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.5rem, 1.8vh, 1rem);
  width: 100%;
}
.hero__motto {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, min(4.4vw, 2.9vh), 1.5rem);
  line-height: 1.4;
  color: var(--green);
  text-shadow: 0 1px 10px rgba(255, 250, 241, .95), 0 0 2px rgba(255, 250, 241, .9);
}
.hero__rings {
  width: 2.1em; height: 1.3em;
  vertical-align: middle;
  color: var(--ink-soft);
  margin-left: .2em;
}
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .hero__br { display: none; }
}
@media (max-height: 700px) {
  .hero__layout { padding-bottom: .6rem; }
  .hero__bottom { gap: .35rem; }
  .hero__motto { line-height: 1.3; }
  .countdown__item { padding: .3rem .2rem .25rem; border-radius: 14px; }
}

.hero__blob-1 { width: 420px; height: 420px; top: -200px; left: -200px; opacity: .9; }
.hero__blob-2 { width: 460px; height: 460px; bottom: -240px; right: -200px; opacity: .85; }
.hero__flower-1 { width: 48px; height: 48px; top: 40%; left: 3%; }
.hero__flower-2 { width: 44px; height: 44px; top: 18%; right: 3%; }

.eyebrow {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--leaf);
  margin-bottom: .4rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.countdown__item {
  background: rgba(255, 250, 241, .9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 18px;
  padding: clamp(.4rem, 1.3vh, .8rem) .25rem clamp(.35rem, 1.1vh, .65rem);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 210, 154, .7);
  transition: transform .4s var(--ease);
}
.countdown__item:hover { transform: translateY(-3px) rotate(-1.5deg); }
.countdown__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, min(7vw, 4.2vh), 2.3rem);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.countdown__label {
  font-size: clamp(.65rem, 1.4vh, .78rem);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.countdown__done {
  margin: 0;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  background: rgba(255, 250, 241, .9);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--green);
}

@media (min-width: 768px) {
  .countdown { gap: .9rem; max-width: 500px; }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 5.5rem 0;
  overflow: hidden;
}
.section--tint { background: var(--cream-soft); }

.section__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6.5vw, 3rem);
  color: var(--green);
}
.section__title::after {
  content: "";
  display: block;
  width: 72px; height: 10px;
  margin: .9rem auto 0;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 10'%3E%3Cpath d='M2 6c8-6 14 4 22-1s14 4 22-1 14 4 24-2' fill='none' stroke='%23f1c19b' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}
.section__lead {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.section__lead strong { color: var(--ink); font-weight: 600; }

.signature {
  font-family: var(--font-hand);
  font-size: 2rem;
  color: var(--navy);
  margin-top: .5rem;
}

@media (min-width: 768px) {
  .section { padding: 7rem 0; }
}

/* ---------- Photo placeholders ---------- */
.photo, .qr {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.65), transparent 55%),
    repeating-linear-gradient(-45deg, var(--sand-soft) 0 14px, #f3e8c6 14px 28px);
  border: 2px dashed rgba(106, 139, 74, .45);
  overflow: hidden;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo--wide { aspect-ratio: 16 / 10; border-radius: var(--radius) var(--radius) 0 0; border-width: 0 0 2px; }
.photo__hint {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--leaf);
  background: rgba(255, 250, 241, .85);
  padding: .15rem .9rem;
  border-radius: 999px;
}

/* ---------- Story ---------- */
.story {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 3rem;
  position: relative;
}
.story__item {
  display: grid; gap: 1.25rem;
  align-items: center;
}
.story__item .photo {
  max-width: 340px; width: 100%; justify-self: center;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
  transition: transform .6s var(--ease);
}
.story__item:nth-child(even) .photo { transform: rotate(2deg); }
.story__item:hover .photo { transform: rotate(0) scale(1.02); }

.story__item--stack .story__body p:not(.story__date) { margin-bottom: .8em; }

/* shuffle-through stack of keepsake prints */
.photo-stack {
  width: 100%;
  max-width: 420px;
  justify-self: center;
  display: grid; gap: .9rem;
  justify-items: center;
}
.photo-stack__deck {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.08;
}
.photo-stack__print {
  position: absolute;
  top: 50%; left: 50%;
  width: 64%;
  margin: 0;
  padding: 8px 8px 0;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--shadow), 0 1px 3px rgba(70, 55, 15, .12);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  transition: transform .55s var(--ease), opacity .45s ease, box-shadow .4s var(--ease);
  cursor: pointer;
}
.photo-stack__print.is-wide { width: 88%; }
.photo-stack__print img {
  display: block;
  width: 100%; height: auto;
  border-radius: 3px;
  pointer-events: none;
}
.photo-stack__print figcaption {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--navy);
  text-align: center;
  padding: .45rem .4rem .55rem;
}
.photo-stack__print:not([data-pos="0"]) figcaption { visibility: hidden; }
.photo-stack__print[data-pos="0"] { box-shadow: 0 22px 40px -20px rgba(70, 55, 15, .5), 0 1px 3px rgba(70, 55, 15, .12); }
.photo-stack__print[data-pos="1"] { transform: translate(-50%, -50%) rotate(calc(var(--r) * -1.6)); }
.photo-stack__print[data-pos="2"] { transform: translate(-50%, -50%) rotate(calc(var(--r) * 2)); }
.photo-stack__print[data-pos="hidden"] { opacity: 0; pointer-events: none; }
.photo-stack__print.is-leaving {
  transform: translate(-50%, -50%) translate(55%, -8%) rotate(16deg);
  opacity: 0;
}
.story__item--stack:hover .photo-stack__print[data-pos="0"]:not(.is-leaving) {
  transform: translate(-50%, -50%) rotate(0deg) scale(1.02);
}
.photo-stack__controls {
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--ink-soft);
}
.photo-stack__btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green);
  font: 600 1.4rem/1 var(--font-display);
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.photo-stack__btn:hover { background: var(--green); color: var(--paper); transform: scale(1.06); }
.photo-stack__btn:focus-visible { outline: 3px solid var(--peach); outline-offset: 2px; }

.story__body { text-align: center; }
.story__km {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600; font-size: .85rem;
  color: var(--navy);
  background: var(--peach-soft);
  padding: .2rem .8rem;
  border-radius: 999px;
  margin-bottom: .6rem;
}
.story__body h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--green);
}
.story__date {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--ink-soft);
  margin: .1rem 0 .6rem;
}
.story__outro {
  max-width: 560px;
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  border-top: 3px dashed var(--peach);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--green);
}

@media (min-width: 768px) {
  .story::before {
    content: "";
    position: absolute; left: 50%; top: 2rem; bottom: 2rem;
    border-left: 3px dashed var(--peach);
    transform: translateX(-50%);
  }
  .story__item { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .story__item .photo,
  .story__item .photo-stack { justify-self: end; }
  .story__body { text-align: left; max-width: 380px; }
  .story__item:nth-child(even) .photo,
  .story__item:nth-child(even) .photo-stack { order: 2; justify-self: start; }
  .story__item--stack .story__body { max-width: 420px; }
  .story__item:nth-child(even) .story__body { justify-self: end; text-align: right; }
}

.story__flower { width: 48px; height: 48px; top: 8rem; right: 6%; }
.story__blob { width: 340px; height: 340px; bottom: -120px; left: -160px; opacity: .6; }

/* ---------- Schedule ---------- */
.timeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem;
}
.event {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2.4rem 1.75rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(229, 210, 154, .8);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.event:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.event--highlight {
  background: linear-gradient(180deg, #fffaf1 0%, #f6efd9 100%);
  border: 2px solid var(--sand);
}
.event__badge {
  position: absolute; top: -.95rem; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600; font-size: .9rem;
  background: var(--green); color: #fff;
  padding: .3rem 1rem;
  border-radius: 999px;
}
.event--highlight .event__badge { background: var(--navy); }
.event__time {
  font-family: var(--font-hand);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: .1rem;
}
.event__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green);
  margin-bottom: .8rem;
}
.event__venue { font-weight: 600; margin-bottom: .1rem; }
.event__address { color: var(--ink-soft); margin-bottom: 1.4rem; }
.event__note { font-style: italic; color: var(--ink-soft); margin: 0; }

.race-info {
  margin: 3rem 0 0;
  display: grid; gap: 1rem;
  background: var(--sand-soft);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.race-info > div { text-align: center; }
.race-info dt {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  color: var(--leaf);
}
.race-info dd { margin: 0; font-weight: 500; }
.infinity { font-size: 1.4em; line-height: 1; vertical-align: -.08em; color: var(--green); }

@media (min-width: 860px) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
  .race-info { grid-template-columns: repeat(3, 1fr); padding: 2rem 2.5rem; }
  .race-info > div + div { border-left: 2px dashed rgba(106, 139, 74, .3); padding-left: 1rem; }
}

.schedule__squiggle { width: 300px; height: 160px; top: -40px; left: -60px; opacity: .55; }
.schedule__flower { width: 56px; height: 56px; bottom: 3rem; right: 5%; }

/* ---------- Travel ---------- */
.cards {
  display: grid; gap: 1.5rem;
}
.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex; flex-direction: column; align-items: flex-start;
  flex: 1;
}
.card__body h3 { font-family: var(--font-display); font-size: 1.35rem; color: var(--green); }
.card__meta { font-family: var(--font-hand); font-size: 1.25rem; color: var(--ink-soft); margin-bottom: .6rem; }
.card__body .btn { margin-top: auto; }
.promo { font-size: .95rem; }
.promo code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--peach-soft);
  padding: .15rem .5rem;
  border-radius: 6px;
}

.info-grid {
  display: grid; gap: 1.25rem;
  margin-top: 3rem;
}
.info {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: rgba(255, 250, 241, .6);
  border: 2px dashed rgba(229, 210, 154, .9);
}
.info__icon {
  width: 40px; height: 40px;
  padding: 8px;
  border-radius: 50%;
  background: var(--green); color: #fff;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: .9rem;
}
.info h3 { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy); margin-bottom: .4rem; }

.cards, .info-grid { max-width: 900px; margin-inline: auto; }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .info {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1.25rem;
    align-items: start;
  }
  .info__icon { grid-row: span 2; margin-bottom: 0; }
}

.travel__blob { width: 360px; height: 360px; top: -140px; right: -150px; opacity: .55; }
.travel__flower { width: 44px; height: 44px; top: 45%; left: 3%; }

/* ---------- Dress code ---------- */
.swatches {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1rem;
  max-width: 720px;
}
.swatch { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.swatch__dot {
  width: 74px; height: 74px;
  background: var(--c);
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.08), var(--shadow-sm);
  border: 4px solid var(--paper);
  transition: transform .5s var(--ease), border-radius .8s var(--ease);
}
.swatch:hover .swatch__dot {
  transform: translateY(-4px) rotate(-8deg) scale(1.06);
  border-radius: 45% 55% 42% 58% / 55% 45% 55% 45%;
}
.swatch__name { font-family: var(--font-hand); font-size: 1.3rem; line-height: 1.1; color: var(--ink-soft); }

.dress__tips {
  display: grid; gap: 1.25rem;
  margin-top: 3.5rem;
}
.tip {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  box-shadow: var(--shadow-sm);
}
.tip h3 { font-family: var(--font-display); font-size: 1.25rem; color: var(--green); margin-bottom: .4rem; }
.tip--note { background: var(--peach-soft); box-shadow: none; }
.tip--note h3 { color: var(--navy); }

@media (min-width: 600px) {
  .swatches { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 860px) {
  .dress__tips { grid-template-columns: repeat(3, 1fr); }
}

.dress__blob { width: 320px; height: 320px; bottom: -120px; right: -120px; opacity: .6; }
.dress__flower { width: 50px; height: 50px; top: 4.5rem; left: 7%; }

/* ---------- Footer ---------- */
.footer {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 4rem 0 3rem;
  border-top-left-radius: 50% 40px;
  border-top-right-radius: 50% 40px;
}
.footer__flower { width: 46px; height: 46px; color: var(--peach); display: block; margin: 0 auto 1rem; }
.footer__names { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; margin: 0; }
.footer__date { font-family: var(--font-hand); font-size: 1.6rem; opacity: .9; margin: 0 0 .4rem; }
.footer__motto { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: .2rem; }
.footer__note { opacity: .85; font-style: italic; }
.footer__top {
  display: inline-block; margin-top: 1.2rem;
  color: #fff; font-family: var(--font-display); text-decoration: none;
  border-bottom: 2px solid var(--peach);
  padding-bottom: 2px;
  transition: color .25s;
}
.footer__top:hover { color: var(--peach); }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--delay, 0s) + var(--page-delay, 0s));
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Book mode – every section is a page that turns like paper.
   Enabled by JS; without it the site falls back to scrolling.
   ========================================================= */
.pager { display: none; }

.book-mode,
.book-mode body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
.book-mode body {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #f1e6c8 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, #e2cf98 0%, transparent 70%),
    #e9dcb4;
}
.book-mode .site-header:not(.is-open) {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.book-mode {
  --pager-h: 64px;
  --book-gap: 10px;
  --page-radius: 6px 22px 22px 6px;
  --turn: 1.05s;
  --turn-ease: cubic-bezier(.55, .08, .3, 1);
}

.book-mode .book {
  position: fixed;
  top: var(--header-h);
  bottom: var(--pager-h);
  left: 0; right: 0;
  width: min(100% - var(--book-gap) * 2 - 10px, 1240px);
  margin-inline: auto;
  perspective: 2400px;
  perspective-origin: 50% 40%;
}

/* stacked paper edges under the open page */
.book-mode .book::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--page-radius);
  background: var(--cream);
  box-shadow:
    3px 3px 0 -1px #f4e8cf, 3px 3px 0 0 #dccb98,
    6px 6px 0 -1px #f4e8cf, 6px 6px 0 0 #dccb98,
    9px 9px 0 -1px #f4e8cf, 9px 9px 0 0 #d6c48f,
    0 30px 60px -25px rgba(70, 55, 15, .45);
}

.book-mode .page {
  position: absolute;
  inset: 0;
  padding: 0;
  min-height: 0;
  overflow: visible;
  display: block;
  background: none;
  visibility: hidden;
  z-index: 1;
  transform-origin: left center;
  transform-style: preserve-3d;
  border-radius: var(--page-radius);
}
.book-mode .page.is-under    { visibility: visible; z-index: 2; }
.book-mode .page.is-current  { visibility: visible; z-index: 3; }
.book-mode .page.is-flipping { visibility: visible; z-index: 4; }

.page__front,
.page__back,
.page__shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.page__front {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--cream);
  scrollbar-width: thin;
  scrollbar-color: var(--sand) transparent;
}
.page__front:focus { outline: none; }
.section--tint > .page__front { background: var(--cream-soft); }

.page__content {
  position: relative;
  flex: 1 0 auto;
  padding: 3.5rem 0 1rem;
}
.hero > .page__front > .page__content {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #f5edd8;
}
.hero > .page__front > .page__folio { display: none; }

/* back side of the sheet, seen while it swings over the spine */
.page__back {
  transform: rotateY(180deg);
  background:
    linear-gradient(to left, rgba(90, 70, 20, .12), transparent 18%),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(106, 139, 74, .06) 27px 28px),
    var(--cream-soft);
}

/* spine shading + light overlay used during a turn */
.page__shade {
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to right, rgba(60, 45, 10, .35), rgba(60, 45, 10, .12) 40%, rgba(60, 45, 10, .28));
}
.book-mode .page::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 46px;
  border-radius: 6px 0 0 6px;
  pointer-events: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(to right, rgba(70, 55, 15, .16), rgba(70, 55, 15, .05) 45%, transparent);
}

/* turning forward: current sheet lifts from the right and folds over the spine */
.page.flip-out { animation: flip-out var(--turn) var(--turn-ease) forwards; }
.page.flip-out > .page__shade { animation: shade-turning var(--turn) var(--turn-ease) forwards; }
.page.flip-out > .page__back { animation: back-fade-out var(--turn) linear forwards; }

/* turning back: previous sheet returns from the left */
.page.flip-in { animation: flip-in var(--turn) var(--turn-ease) forwards; }
.page.flip-in > .page__shade { animation: shade-turning var(--turn) var(--turn-ease) reverse forwards; }
.page.flip-in > .page__back { animation: back-fade-in var(--turn) linear forwards; }

/* the page lying underneath gets lit / shadowed by the moving sheet */
.page.shade-out > .page__shade { animation: shade-reveal var(--turn) var(--turn-ease) forwards; }
.page.shade-in > .page__shade { animation: shade-reveal var(--turn) var(--turn-ease) reverse forwards; }

@keyframes flip-out {
  0%   { transform: rotateY(0) translateZ(0); }
  12%  { transform: rotateY(-8deg) translateZ(14px); }
  100% { transform: rotateY(-180deg) translateZ(0); }
}
@keyframes flip-in {
  0%   { transform: rotateY(-180deg) translateZ(0); }
  88%  { transform: rotateY(-8deg) translateZ(14px); }
  100% { transform: rotateY(0) translateZ(0); }
}
@keyframes shade-turning {
  0%   { opacity: 0; }
  50%  { opacity: .9; }
  100% { opacity: .9; }
}
@keyframes shade-reveal {
  0%   { opacity: .75; }
  100% { opacity: 0; }
}
@keyframes back-fade-out {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes back-fade-in {
  0% { opacity: 0; }
  30%, 100% { opacity: 1; }
}

/* page number + "turn the page" at the foot of every page */
.page__folio {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1.5rem 1rem 2rem;
}
.page__number {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--ink-soft);
}
.page__turn {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 0; background: none; cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-dark);
  padding: .35rem .8rem;
  border-radius: 999px;
  transition: background-color .25s, gap .3s var(--ease);
}
.page__turn:hover { background: var(--sand-soft); gap: .75rem; }
.page__turn svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* back cover */
.book-mode .footer { padding: 0; border-radius: var(--page-radius); }
.book-mode .footer > .page__front {
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.12), transparent 40%),
    var(--green);
  color: #fff;
  justify-content: center;
}
.book-mode .footer .page__content { display: flex; align-items: center; justify-content: center; padding: 2rem 0; }
.book-mode .footer .footer__names { font-size: clamp(2.6rem, 9vw, 4.2rem); }
.book-mode .footer .footer__date { font-size: 2rem; }

/* pager */
.book-mode .pager {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  height: var(--pager-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 1rem;
}
.pager__btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--paper);
  color: var(--green-dark);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .3s var(--ease), background-color .25s, color .25s, opacity .25s;
}
.pager__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pager__btn:hover:not(:disabled) { background: var(--green); color: #fff; transform: scale(1.08); }
.pager__btn:disabled { opacity: .35; cursor: default; }

.pager__middle {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  min-width: 0;
}
.pager__label {
  margin: 0;
  display: flex; gap: .55rem; align-items: baseline;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--navy);
  white-space: nowrap;
}
.pager__num { color: var(--ink-soft); font-size: 1.05rem; }
.pager__dots { display: flex; gap: .35rem; }
.pager__dot {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(106, 139, 74, .3);
  cursor: pointer;
  transition: width .35s var(--ease), background-color .25s;
}
.pager__dot:hover { background: var(--leaf); }
.pager__dot[aria-current="page"] { width: 22px; border-radius: 6px; background: var(--green); }

@media (min-width: 768px) {
  .book-mode { --book-gap: 24px; --pager-h: 74px; }
  .page__content { padding-top: 4.5rem; }
}
@media (min-width: 960px) {
  .book-mode { --book-gap: 40px; }
}


/* =========================================================
   Envelope intro – the site opens like a posted invitation
   ========================================================= */
.intro { display: none; }

.js .intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #f1e6c8 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, #e2cf98 0%, transparent 70%),
    #e9dcb4;
  transition: opacity .8s var(--ease);
}

.intro__blob-1 { width: 380px; height: 380px; top: -170px; left: -170px; opacity: .8; }
.intro__blob-2 { width: 420px; height: 420px; bottom: -210px; right: -180px; opacity: .8; }
.intro__squiggle { width: 260px; height: 140px; top: -40px; right: 12%; opacity: .7; transform: rotate(160deg); }
.intro__flower-1 { width: 44px; height: 44px; top: 14%; left: 8%; }
.intro__flower-2 { width: 36px; height: 36px; bottom: 16%; right: 9%; }
.intro__flower-3 { width: 40px; height: 40px; bottom: 10%; left: 12%; }

.intro__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vh, 1.75rem);
  transition: scale 1s var(--ease);
}
.intro__eyebrow {
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  color: var(--leaf);
  text-align: center;
  transition: opacity .4s;
}
/* --- envelope --- */
.envelope {
  --w: min(88vw, 560px, 72vh);
  --paper-1: #f6eacd;
  --paper-2: #f1e2bf;
  --paper-3: #eddcb5;
  position: relative;
  width: var(--w);
  aspect-ratio: 3 / 2;
  margin-top: calc(var(--w) * .3);
  perspective: 1400px;
  cursor: pointer;
  animation: envelope-float 4.5s ease-in-out infinite;
}
@keyframes envelope-float {
  0%, 100% { translate: 0 0; rotate: -.6deg; }
  50%      { translate: 0 -6px; rotate: .6deg; }
}

.envelope__back {
  position: absolute; inset: 0;
  z-index: 0;
  border-radius: 10px;
  background:
    radial-gradient(circle at 25% 30%, rgba(241, 193, 155, .55) 0 6px, transparent 7px) 0 0 / 34px 34px,
    radial-gradient(circle at 75% 75%, rgba(106, 139, 74, .35) 0 5px, transparent 6px) 0 0 / 34px 34px,
    #e4d09c;
  box-shadow: 0 34px 50px -26px rgba(70, 55, 15, .55), 0 2px 6px rgba(70, 55, 15, .12);
}

/* mini invitation card tucked inside */
.envelope__card {
  position: absolute;
  left: 6%; right: 6%; bottom: 3.5%;
  z-index: 1;
  aspect-ratio: 1024 / 731;
  border-radius: 8px;
  overflow: hidden;
  background: #f5edd8;
  box-shadow: 0 6px 18px rgba(70, 55, 15, .18);
}
.envelope__card-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.envelope__card-runners { position: absolute; left: 41.6%; top: 32.15%; width: 19.53%; height: auto; }
.envelope__card-names,
.envelope__card-date {
  position: absolute; left: 0; right: 0;
  margin: 0;
  text-align: center;
  line-height: 1;
}
.envelope__card-names {
  top: 6%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: calc(var(--w) * .072);
  color: var(--green);
}
.envelope__card-date {
  top: 18%;
  font-family: var(--font-hand);
  font-size: calc(var(--w) * .048);
  color: var(--navy);
}

/* front pocket made of three folded flaps */
.envelope__pocket {
  position: absolute; inset: 0;
  z-index: 2;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
}
.envelope__side,
.envelope__bottom,
.envelope__flap-face {
  position: absolute; inset: 0;
}
.envelope__side::before,
.envelope__bottom::before,
.envelope__flap-face::before {
  content: "";
  position: absolute; inset: 0;
}
.envelope__side { filter: drop-shadow(0 0 3px rgba(80, 60, 20, .14)); }
.envelope__side--left::before  { background: var(--paper-2); clip-path: polygon(0 0, 53% 54%, 0 100%); }
.envelope__side--right::before { background: var(--paper-3); clip-path: polygon(100% 0, 47% 54%, 100% 100%); }
.envelope__bottom { filter: drop-shadow(0 -3px 4px rgba(80, 60, 20, .16)); }
.envelope__bottom::before {
  background: linear-gradient(to bottom, var(--paper-1), #f3e4c2);
  clip-path: polygon(0 100%, 50% 44%, 100% 100%);
}
.envelope__to {
  position: absolute; left: 0; right: 0; bottom: 8%;
  margin: 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: calc(var(--w) * .046);
  color: var(--navy);
}

/* top flap – two faces so the patterned lining shows once it opens */
.envelope__flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 58%;
  z-index: 3;
  transform-origin: top center;
  transform-style: preserve-3d;
}
.envelope__flap-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.envelope__flap-face--front { filter: drop-shadow(0 4px 5px rgba(80, 60, 20, .2)); }
.envelope__flap-face--front::before {
  background: linear-gradient(to bottom, #f8eed6, var(--paper-1));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 10px 10px 0 0;
}
.envelope__flap-face--back { transform: rotateX(180deg); }
.envelope__flap-face--back::before {
  background:
    radial-gradient(circle at 25% 30%, rgba(241, 193, 155, .6) 0 6px, transparent 7px) 0 0 / 34px 34px,
    radial-gradient(circle at 75% 75%, rgba(106, 139, 74, .4) 0 5px, transparent 6px) 0 0 / 34px 34px,
    #e9d7a6;
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
}

/* wax seal in the shape of the invitation flower */
.envelope__seal {
  position: absolute;
  left: 50%; top: 58%;
  z-index: 4;
  width: calc(var(--w) * .17);
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--green);
  cursor: pointer;
  filter: drop-shadow(0 4px 6px rgba(40, 70, 25, .35));
  transition: scale .35s var(--ease), rotate .5s var(--ease);
}
.envelope__seal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.envelope__seal span {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(var(--w) * .038);
  color: #fff;
  letter-spacing: .02em;
}
.envelope__seal::after {
  content: "";
  position: absolute; inset: -10%;
  border-radius: 50%;
  border: 2px solid rgba(79, 154, 60, .45);
  animation: seal-pulse 2.2s ease-out infinite;
}
.envelope:hover .envelope__seal { scale: 1.08; rotate: 12deg; }
@keyframes seal-pulse {
  0%   { opacity: .9; scale: .85; }
  100% { opacity: 0; scale: 1.35; }
}

/* --- opening sequence --- */
.intro.is-opening .envelope { animation: none; }
.intro.is-opening .intro__eyebrow { opacity: 0; }
.intro.is-opening .envelope { cursor: default; }
.intro.is-opening .envelope__seal {
  pointer-events: none;
  animation: seal-break .5s var(--ease) forwards;
}
.intro.is-opening .envelope__seal::after { animation: none; opacity: 0; }
.intro.is-opening .envelope__flap {
  animation:
    flap-open .85s .35s cubic-bezier(.5, 0, .3, 1) forwards,
    flap-behind 0s .78s forwards;
}
.intro.is-opening .envelope__card {
  animation: card-out 1.05s 1.15s cubic-bezier(.3, .7, .2, 1) forwards;
}
.intro.is-leaving { opacity: 0; pointer-events: none; }
.intro.is-leaving .intro__stage { scale: 1.14; }

@keyframes seal-break {
  0%   { scale: 1; rotate: 0deg; opacity: 1; }
  35%  { scale: 1.18; rotate: -8deg; opacity: 1; }
  100% { scale: .3; rotate: 35deg; opacity: 0; }
}
@keyframes flap-open {
  to { transform: rotateX(180deg); }
}
@keyframes flap-behind {
  to { z-index: 0; }
}
@keyframes card-out {
  to { transform: translateY(-60%); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
