:root {
  color-scheme: light;
  --paper: #f1f1e7;
  --cream: #fbf9f0;
  --peach: #f1e5d9;
  --green: #365c4e;
  --ink: #25372d;
  --muted: #516055;
  --line: #cdd0bf;
  --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --sans: system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid #8c5134; outline-offset: 5px; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--green); line-height: 1.14; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin: 0; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0 0 1rem; }
p { margin: 0 0 1rem; }
.shell { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }

.skip { position: absolute; top: .8rem; left: .8rem; background: var(--cream); padding: .6rem; z-index: 3; transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
.topbar { min-height: 4.5rem; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: .9rem; padding: .7rem clamp(1rem, 4vw, 4rem); background: var(--cream); border-bottom: 1px solid var(--line); }
.wordmark { font: 1.45rem var(--serif); text-decoration: none; justify-self: start; }
.language { justify-self: end; font-size: .84rem; }
nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem clamp(.7rem, 2.8vw, 2.25rem); }
nav a { text-decoration: none; font-size: .9rem; padding: .35rem 0; white-space: nowrap; }
nav a:hover, nav a[aria-current="page"] { text-decoration: underline; }
nav a[aria-current="page"] { font-weight: 600; }

.hero { position: relative; overflow: clip; }
.garland { width: 100%; height: clamp(7rem, 19vw, 18rem); object-fit: cover; object-position: top; }
.hero-inner { width: min(100% - 2.5rem, 63rem); margin: 0 auto; padding: 1rem 0 clamp(3rem, 6vw, 5.5rem); display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(1rem, 5vw, 5rem); align-items: center; }
.invitation { text-align: center; }
.invitation h1 { font-size: clamp(2.45rem, 5vw, 4.8rem); line-height: 1.05; letter-spacing: .075em; text-transform: uppercase; }
.invitation i { display: block; font-size: .68em; margin: .15em 0 .24em; font-weight: 400; letter-spacing: 0; }
.hero-date { margin: 1.25rem 0; display: grid; gap: .14rem; font-size: .91rem; }
.hero-date span { color: var(--muted); }
.bouquet { width: min(100%, 26rem); justify-self: center; }
.button { display: inline-block; border: 1px solid var(--green); border-radius: 2px; background: var(--green); color: #fff; padding: .65em 1.15em; text-decoration: none; font: 600 .91rem/1.45 var(--sans); cursor: pointer; }
.button:hover { background: #27483b; }
.button.secondary { background: transparent; color: var(--green); }
.button.secondary:hover { background: var(--cream); }
.story, .rsvp { border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(8rem, 1fr) 1.6fr; gap: clamp(1.6rem, 6vw, 6rem); align-items: center; padding-block: clamp(2.5rem, 7vw, 5rem); }
.story-art, .rsvp-art { width: min(100%, 15rem); max-height: 20rem; object-fit: contain; justify-self: center; }
.story p, .rsvp p { max-width: 38rem; }
.planner { background: var(--peach); }
.planner-inner { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }
.tile, .card { border: 1px solid var(--line); background: var(--cream); padding: 1.3rem; }
.tile { display: flex; justify-content: space-between; align-items: center; gap: .6rem; text-decoration: none; font: 1.27rem/1.25 var(--serif); }
.tile:hover { background: #fffdf6; }
.page-heading { width: min(100% - 2.5rem, 62rem); margin-inline: auto; padding: clamp(2.75rem, 8vw, 6rem) 0 clamp(2rem, 6vw, 3.6rem); text-align: center; }
.page-heading p { color: var(--muted); max-width: 38rem; margin: .9rem auto 0; }
.details { display: grid; grid-template-columns: 1fr minmax(7rem, .72fr) 1fr; gap: 1.5rem; align-items: center; text-align: center; padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.venue p { max-width: 21rem; margin-inline: auto; }
.details-art { max-height: 16rem; justify-self: center; }
.map { padding-block: clamp(2rem, 6vw, 4rem); border-top: 1px solid var(--line); text-align: center; }
.map-art { width: min(100%, 47rem); margin: 1.5rem auto; }
.link-list { display: flex; flex-wrap: wrap; gap: .4rem 1.15rem; padding: 0; margin: 0; list-style: none; }
.details .link-list, .map .link-list { justify-content: center; }
.panel { margin-bottom: 3.5rem; }
.card h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }
.card { display: flex; flex-direction: column; align-items: flex-start; }
.card p { margin-bottom: 1.2rem; }
.card .link-list, .card .arrow-link { margin-top: auto; }
.after-cards { margin-bottom: 4rem; text-align: center; }
.reading { max-width: 45rem; padding-bottom: 4rem; }
.reading .link-list { margin-block: 1.3rem 2rem; }
.lock-form { max-width: 29rem; margin-bottom: 4rem; background: var(--cream); border: 1px solid var(--line); padding: clamp(1.2rem, 4vw, 2rem); display: grid; gap: .7rem; }
.lock-form label { font-weight: 600; }
.lock-form input { width: 100%; min-height: 2.8rem; padding: .5rem .7rem; border: 1px solid #748174; border-radius: 2px; background: #fff; color: var(--ink); font: inherit; }
.lock-form .button { justify-self: start; margin-top: .35rem; }
.error { color: #8d352b; margin: 0; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .45rem 1rem; border-top: 1px solid var(--line); background: var(--cream); padding: 1.15rem clamp(1rem, 4vw, 4rem); color: var(--muted); font-size: .83rem; }
footer > span:first-child { font: 1.1rem var(--serif); color: var(--green); }

@media (max-width: 750px) {
  .topbar { grid-template-columns: 1fr 1fr; gap: .35rem; }
  .topbar nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; padding-top: .25rem; border-top: 1px solid var(--line); }
  nav a { font-size: .82rem; }
  .hero-inner { grid-template-columns: 1fr .7fr; gap: .6rem; }
  .invitation h1 { font-size: clamp(1.9rem, 6vw, 3.25rem); }
}
@media (max-width: 470px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 1.2rem; }
  .invitation h1 { font-size: clamp(2.25rem, 10vw, 3.5rem); }
  .bouquet { width: min(67%, 16rem); margin-top: 1rem; }
  .story, .rsvp { grid-template-columns: 1fr; text-align: center; }
  .story-art, .rsvp-art { max-height: 12rem; }
  .rsvp .link-list { justify-content: center; }
  .details { grid-template-columns: 1fr; }
  .details-art { max-height: 10rem; }
}
