:root {
  --cream: #fefbf6;
  --rust: #9f4733;
  --rust-soft: #c88a79;
  --green: #1a3022;
  --green-soft: #5c6b60;
  --rule: #e1dfdc;
  --serif: "Cormorant Garamond", "Garamond", Georgia, serif;
  --script: "Caveat", "Segoe Script", cursive;
  --measure: 46rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.55;
  font-feature-settings: "onum" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  /* the printed sheet's dashed cut-lines */
  background-image:
    repeating-linear-gradient(to bottom, var(--rule) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(to bottom, var(--rule) 0 6px, transparent 6px 12px);
  background-size: 1px 100%, 1px 100%;
  background-position: 1.25rem 0, calc(100% - 1.25rem) 0;
  background-repeat: no-repeat;
}

a {
  color: var(--rust);
  text-decoration: none;
  border-bottom: 1px solid var(--rust-soft);
  transition: border-color .2s;
}
a:hover { border-bottom-color: var(--rust); }
a:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-bottom-color: transparent;
}

strong { font-weight: 600; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.script {
  font-family: var(--script);
  font-weight: 700;
  color: var(--rust);
  line-height: 1;
}

h2.script {
  font-size: clamp(2.8rem, 6vw, 3.8rem);
  margin: 0 0 2rem;
}

.eyebrow {
  color: var(--rust);
  font-size: 1.5rem;
  letter-spacing: .04em;
  margin: 0 0 .1em;
}

section {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5rem 2rem;
}

/* thin rust tick between sections, like the fold */
section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 3rem;
  height: 1px;
  background: var(--rust-soft);
  transform: translateX(-50%);
}

/* ---------- Bunting strings (inline SVG) ---------- */
.string {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}
.string path {
  fill: none;
  stroke: var(--rust);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.8s cubic-bezier(.4, 0, .2, 1);
}
.hero .string path,
.reveal.in .string path { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  .string path { stroke-dashoffset: 0; transition: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 6rem 2rem 2.5rem;
}

.hero-text { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(3.4rem, 12vw, 6rem);
  margin: 0;
  letter-spacing: -.01em;
}

.hero-date {
  color: var(--rust);
  font-size: 1.65rem;
  margin: .35em 0 0;
}

.countdown {
  font-style: italic;
  color: var(--green-soft);
  margin: .4em 0 0;
}

.string-hero {
  top: 0;
  right: 0;
  width: 15rem;
}

.hero-boat {
  display: block;
  width: min(100%, 34rem);
  height: auto;
  margin: 1rem 0 0 auto;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin-top: 1.5rem;
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-nav a { color: var(--green); border-bottom-color: transparent; }
.hero-nav a:hover { border-bottom-color: var(--rust); }

/* ---------- Letter ---------- */
.letter {
  text-align: center;
  font-size: 1.35rem;
  max-width: 40rem;
}
.letter p { margin-bottom: 1.4rem; }
.signature { font-size: 2.8rem; margin-top: -.6rem; }

/* ---------- Program: the route ---------- */
.route {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  align-items: center;
  padding: 1.5rem 0 4.5rem;
}

.stop-left .stop-text { grid-column: 1; }
.stop-right .stop-text { grid-column: 2; }
.stop-right .stop-art { grid-column: 1; grid-row: 1; }

.stop time {
  display: block;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--rust);
}
.stop h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.15;
  margin: .1em 0 .4em;
}
.map { font-size: 1.05rem; }

/* external-link arrow as SVG: iOS Safari renders U+2197 as an emoji */
.ext {
  width: .7em;
  height: .7em;
  margin-left: .3em;
  vertical-align: baseline;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop-art {
  display: block;
  width: 100%;
  height: auto;
}
.art-cake { max-width: 16rem; justify-self: center; }

/* strings hang from each stop to the next */
.string-1 { width: 22rem; right: 0; bottom: -2rem; }
.string-2 { width: 15rem; left: 0; bottom: -3rem; }

.stop-end {
  display: block;
  text-align: center;
  padding: 3rem 0 0;
}
.stop-end h3 { margin: 0; }

/* soft rise on reveal */
.reveal .stop-text, .reveal .stop-art, .stop-end.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in .stop-text, .reveal.in .stop-art, .stop-end.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal .stop-text, .reveal .stop-art, .stop-end.reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Praktisk info sheet ---------- */
.sheet {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}
.sheet dt {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: .35rem;
}
.sheet dd { margin: 0; }

/* ---------- Wishlist ---------- */
.lead { font-size: 1.35rem; }

.wishlist {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}
.wishlist li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px dashed var(--rule);
}
.wishlist li:first-child { border-top: 1px dashed var(--rule); }
.wishlist em { color: var(--green-soft); text-align: right; }

/* ---------- RSVP ---------- */
.rsvp { text-align: center; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 3rem 2rem 4rem;
  margin: 2rem 1.25rem 0;
  border-top: 1px dashed var(--rule);
}
footer .script { font-size: 1.9rem; margin: 1.5rem 0 0; }
.invitation-link {
  display: inline-block;
  padding: .55rem 1.3rem;
  border: 1px solid var(--rust);
  border-radius: 999px;
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.invitation-link:hover, .invitation-link:focus-visible { background: var(--rust); color: var(--cream); }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  body { font-size: 1.15rem; background-position: .6rem 0, calc(100% - .6rem) 0; }
  section, .hero { padding-left: 1.5rem; padding-right: 1.5rem; }
  .hero { padding-top: 4.5rem; }
  /* the strings connect the desktop zigzag; stacked, they hang from nothing */
  .string { display: none; }
  .hero-boat { width: 100%; margin-top: 1.5rem; }

  .stop { grid-template-columns: 1fr; gap: 1.25rem; padding-bottom: 3rem; }
  .stop-left .stop-text, .stop-right .stop-text, .stop-right .stop-art { grid-column: 1; grid-row: auto; }
  .art-cake { max-width: 11rem; justify-self: end; }

  .sheet { grid-template-columns: 1fr; gap: 2rem; }
  .wishlist li { flex-direction: column; gap: .15rem; }
  .wishlist em { text-align: left; }
  footer .script { font-size: 1.5rem; }
}
