/* ─────────────────────────────────────────────────────────
   Wedding invitation — styles
   Colors and fonts are set once here, in :root. Change them
   there and the whole page follows.
   ───────────────────────────────────────────────────────── */

/* Fonts (stored locally in ../fonts, SIL Open Font License) */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/eb-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); }

:root {
  /* palette: white, blue, a hint of gold */
  --white: #ffffff;
  --mist: #eef2f9;        /* pale blue section background */
  --navy: #14254a;        /* text and headings */
  --blue: #2f4f9a;        /* Delft blue accent */
  --slate: #56627f;       /* secondary text */
  --gold: #b8964e;        /* hairlines, ornaments */
  --gold-soft: #d9c38f;   /* gold on navy */

  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --text: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;

  --measure: 34rem;
  --gap: clamp(4.5rem, 10vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--text);
  font-size: 1.1875rem;
  line-height: 1.7;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--white); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

/* ── top bar ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid rgba(184, 150, 78, .35);
  font-size: 1rem;
}
.topbar__mono { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--navy); text-decoration: none; letter-spacing: .01em; }
.topbar nav { display: flex; gap: clamp(.9rem, 2.4vw, 1.8rem); }
.topbar nav a { color: var(--slate); text-decoration: none; }
.topbar nav a:hover { color: var(--navy); }
.lang { display: flex; gap: .15rem; font-size: .95rem; }
.lang a, .lang span { padding: .1rem .45rem; border-radius: 2px; text-decoration: none; }
.lang span { color: var(--white); background: var(--navy); }
.lang a { color: var(--slate); }
@media (max-width: 760px) { .topbar nav { display: none; } }

/* ── hero: names rising out of the mountain mist ─────── */
.hero {
  text-align: center;
  padding: 0 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero__sky { position: relative; max-width: 1600px; margin: 0 auto; }
.hero__mountains {
  width: 100%;
  height: clamp(17rem, 44vw, 36rem);
  object-fit: cover;
  object-position: center 72%;
  /* soften whatever edge the crop leaves at the top */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}
.hero__intro {
  position: absolute; left: 0; right: 0; top: clamp(1.25rem, 4.5vw, 3.25rem);
  margin: 0; font-style: italic; color: var(--slate); font-size: 1.2rem;
}
.hero__inner {
  position: relative; max-width: 44rem;
  margin: clamp(-4.5rem, -5vw, -2.25rem) auto 0;
  padding: 0 1.25rem;
}
.hero__names {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(3.4rem, 13vw, 6rem);
  line-height: .95;
  letter-spacing: -.01em;
  color: var(--navy);
  text-shadow: 0 0 1.5rem #fff, 0 0 .5rem #fff;
}
.hero__names span { display: block; }
.hero__names .amp {
  font-size: .5em; color: var(--gold); line-height: 1.25;
  font-style: italic; font-weight: 300;
}
@media (min-width: 720px) {
  .hero__names span { display: inline-block; }
  .hero__names .amp { font-size: .62em; padding: 0 .12em; }
}
.hero__date { margin: 1.6rem 0 .1rem; font-size: 1.3rem; letter-spacing: .02em; }
.hero__place { color: var(--slate); margin: 0; }
.guest {
  margin: 2rem auto 0; max-width: 24rem;
  padding: .9rem 1.25rem;
  border-top: 1px solid rgba(184, 150, 78, .5); border-bottom: 1px solid rgba(184, 150, 78, .5);
}
.guest p { margin: 0; color: var(--slate); font-size: 1rem; }
.guest strong { display: block; font-family: var(--display); font-weight: 500; font-size: 1.6rem; color: var(--navy); line-height: 1.3; }

.countdown { display: flex; justify-content: center; gap: clamp(1.2rem, 5vw, 2.5rem); margin-top: 2.25rem; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 3.2rem; }
.countdown__num {
  font-family: var(--display); font-weight: 500; font-size: 2.3rem; line-height: 1;
  font-variant-numeric: lining-nums tabular-nums; color: var(--blue);
}
.countdown__label { font-size: .9rem; color: var(--slate); margin-top: .35rem; }
.countdown__done { font-family: var(--display); font-style: italic; font-size: 1.6rem; color: var(--blue); margin: 0; }

/* opening sequence: the mountains surface from the mist, then the names */
@media (prefers-reduced-motion: no-preference) {
  .hero__mountains { opacity: 0; transform: translateY(14px); transition: opacity 2.2s ease .1s, transform 3s cubic-bezier(.2, .6, .2, 1) .1s; }
  .hero__intro, .hero__names span, .hero__after { opacity: 0; transform: translateY(.5rem); transition: opacity 1.1s ease, transform 1.1s ease; }
  .hero__intro { transition-delay: .7s; }
  .hero__names span:nth-child(1) { transition-delay: 1.1s; }
  .hero__names span:nth-child(2) { transition-delay: 1.35s; }
  .hero__names span:nth-child(3) { transition-delay: 1.6s; }
  .hero__after { transition-delay: 2s; }
  .is-ready .hero__mountains, .is-ready .hero__intro,
  .is-ready .hero__names span, .is-ready .hero__after { opacity: 1; transform: none; }
}

/* ── sections ────────────────────────────────────────── */
.section { padding: var(--gap) 1.25rem; }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: #e8edf7; }
.wrap { max-width: var(--measure); margin: 0 auto; }
.wrap--wide { max-width: 58rem; margin: 0 auto; }
.center { text-align: center; }

.heading {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 6vw, 3.1rem);
  line-height: 1.1;
  margin: 0 0 1.75rem;
  text-align: center;
  color: var(--navy);
}
.section--navy .heading { color: var(--white); }
/* a small gold mark under every section heading */
.heading::after {
  content: ""; display: block; width: 7px; height: 7px; margin: 1.1rem auto 0;
  background: var(--gold); transform: rotate(45deg);
}
.section--navy .heading::after { background: var(--gold-soft); }
.lead { text-align: center; color: var(--slate); }
.section--navy .lead { color: #c4cde0; }

/* greeting + couple */
.greeting { text-align: center; }
.greeting__salam { font-style: italic; color: var(--blue); }
.couple {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  gap: clamp(1rem, 4vw, 3rem);
  margin-top: 3rem; text-align: center;
}
.person__name { font-family: var(--display); font-weight: 500; font-size: clamp(1.75rem, 4.5vw, 2.25rem); line-height: 1.15; margin: 0 0 .6rem; }
.person__of { color: var(--slate); font-size: 1.05rem; margin: 0; }
.person__parents { margin: .1rem 0 0; }
.person__ig { display: inline-flex; align-items: center; gap: .35rem; margin-top: .8rem; font-size: 1rem; text-decoration: none; }
.person__ig svg { width: 1rem; height: 1rem; }
.couple__amp { font-family: var(--display); font-style: italic; font-weight: 300; font-size: 3rem; color: var(--gold); line-height: 1; padding-top: .1rem; }
@media (max-width: 600px) {
  .couple { grid-template-columns: 1fr; gap: .5rem; }
  .couple__amp { padding: .5rem 0; }
}

/* events */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 1rem; }
.event { text-align: center; padding: 1rem clamp(1rem, 4vw, 2.5rem) 0; }
.event + .event { border-left: 1px solid rgba(184, 150, 78, .55); }
@media (max-width: 560px) {
  .event + .event { border-left: 0; border-top: 1px solid rgba(184, 150, 78, .55); margin-top: 2rem; padding-top: 2.5rem; }
}
.event__title { font-family: var(--display); font-weight: 500; font-size: 1.85rem; line-height: 1.2; margin: 0 0 .9rem; }
.event__day { margin: 0; color: var(--slate); }
.event__date { margin: 0; font-size: 1.3rem; }
.event__time { margin: .2rem 0 1.1rem; font-variant-numeric: lining-nums; color: var(--blue); font-size: 1.2rem; }
.event__cal { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem; margin: 0; font-size: 1rem; }
.venue { text-align: center; margin-top: 3.25rem; }
.venue__name { font-family: var(--display); font-weight: 500; font-size: 1.6rem; margin: 0; }
.venue__addr { color: var(--slate); margin: .2rem 0 0; }

.link-btn {
  font: inherit; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
}
.link-btn:hover { color: var(--navy); }

/* story: three chapters, arched photos */
.story { display: grid; gap: clamp(3.5rem, 8vw, 5.5rem); margin-top: 3rem; }
.chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: center; }
.chapter:nth-child(even) .chapter__photo { order: 2; }
.chapter__photo { margin: 0; }
.chapter__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 999px 999px 0 0;
  background: var(--mist);
}
.chapter__no { font-family: var(--display); font-style: italic; font-size: 1.4rem; color: var(--gold); margin: 0 0 .2rem; }
.chapter__title { font-family: var(--display); font-weight: 500; font-size: clamp(1.9rem, 4.5vw, 2.4rem); line-height: 1.15; margin: 0 0 .9rem; }
.chapter__text p { color: var(--slate); max-width: 30rem; }
@media (max-width: 640px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter:nth-child(even) .chapter__photo { order: 0; }
  .chapter__photo { max-width: 17rem; margin: 0 auto; }
  .chapter__text { text-align: center; }
  .chapter__text p { margin-left: auto; margin-right: auto; }
}

/* map */
.map {
  position: relative; margin: 2.25rem auto 0; max-width: 46rem;
  aspect-ratio: 16 / 10; background: var(--mist);
  border: 1px solid rgba(184, 150, 78, .55);
}
.map img, .map iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-size: 1.05rem; letter-spacing: .01em;
  padding: .7rem 1.6rem; min-height: 2.9rem;
  border-radius: 2px; border: 1px solid var(--navy);
  background: var(--navy); color: var(--white); text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn svg { width: 1.05rem; height: 1.05rem; flex: none; }
.btn--gold { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--navy); }
.btn--gold:hover { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* forms */
.form { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
.field { display: grid; gap: .35rem; }
.field > label, .field legend { font-size: 1rem; color: inherit; padding: 0; }
.field input[type="text"], .field select, .field textarea {
  font: inherit; color: inherit; width: 100%;
  padding: .55rem .1rem; border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
  background: transparent;
}
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 1.5rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--navy); }
fieldset.field { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .35rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block; padding: .5rem 1.15rem; border: 1px solid currentColor; border-radius: 2px;
  transition: background-color .2s ease, color .2s ease;
}
.choice input:checked + span { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--navy); }
.choice input:focus-visible + span { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.section--navy .field input, .section--navy .field select, .section--navy .field textarea { border-bottom-color: rgba(232, 237, 247, .55); }
.section--navy .field input:focus, .section--navy .field textarea:focus, .section--navy .field select:focus { outline: none; border-bottom-color: var(--gold-soft); }
.section--navy :focus-visible { outline-color: var(--gold-soft); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__status { margin: 0; font-size: 1.02rem; min-height: 1.5em; flex: 1 1 14rem; }
.form__status.is-error { color: #b4232a; }
.section--navy .form__status.is-error { color: #ffb4b4; }
.form__status.is-ok { color: var(--blue); }
.section--navy .form__status.is-ok { color: var(--gold-soft); }
.closed-note { text-align: center; font-style: italic; margin-top: 2rem; }

/* wishes */
.wishes__meta { text-align: center; color: var(--slate); font-style: italic; margin: 3rem 0 1.25rem; }
.wishes {
  list-style: none; margin: 0; padding: 0;
  max-height: 34rem; overflow-y: auto;
  border-top: 1px solid rgba(184, 150, 78, .55); border-bottom: 1px solid rgba(184, 150, 78, .55);
}
.wish { padding: 1.35rem .25rem; }
.wish + .wish { border-top: 1px solid rgba(20, 37, 74, .1); }
.wish__msg { margin: 0 0 .4rem; white-space: pre-line; overflow-wrap: anywhere; }
.wish__by { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: 1rem; color: var(--slate); }
.wish__name { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--navy); }
.wish__by time { font-variant-numeric: lining-nums; }

/* closing */
.closing { text-align: center; }
.closing__names { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(2.6rem, 8vw, 3.6rem); line-height: 1.05; margin: .5rem 0 0; }
.closing__names .amp { color: var(--gold); font-weight: 300; }

.footer { text-align: center; padding: 2.5rem 1.25rem 3rem; font-size: .95rem; color: var(--slate); border-top: 1px solid rgba(184, 150, 78, .35); }
.footer p { margin: 0 0 .3rem; }
.footer a { color: inherit; }

/* language chooser (root index.html) */
.chooser { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 2rem 1.25rem; }
.chooser .actions { margin-top: 2.5rem; }
