/* Palette taken from the save-the-date: handmade ivory stock, dark tan
   letterpress, chocolate brown (darker than the envelope) for the lettering, plus the wedding's two blues. */
:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --paper-deep: #efe9dc;
  --tan: #8b7457;
  --tan-soft: #b6a386;
  --espresso: #4b2a1a;
  --espresso-deep: #381e12;
  --navy: #1f2e45;
  --navy-soft: #33445f;
  --sky: #b7c9da;
  --sky-pale: #e3ebf2;
  --ink: #3c342e;
  --muted: #7a6e64;
  --rule: #d9cfbd;

  --script: 'Pinyon Script', cursive;
  --caps: 'Cormorant SC', 'Cormorant Garamond', Georgia, serif;
  --serif: 'EB Garamond', Georgia, serif;

  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration-color: var(--tan-soft); text-underline-offset: 3px; }
a:hover { color: var(--espresso); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--caps);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.38em;
  text-transform: lowercase;
  color: var(--espresso);
  margin: 0;
}

.script {
  font-family: var(--script);
  font-weight: 400;
  color: var(--espresso);
  line-height: 1.1;
  margin: 0;
}

h2.script { font-size: clamp(44px, 7vw, 64px); }

h3 {
  font-family: var(--caps);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--navy);
  margin: 0 0 6px;
}

.lede { font-size: 21px; color: var(--muted); max-width: 640px; margin: 18px auto 0; }

/* Cedar Lakes Estate's own cedar-sprig emblem, from their website. */
.emblem {
  width: 64px;
  aspect-ratio: 167 / 192;
  margin: 28px auto;
  background: var(--tan-soft);
  -webkit-mask: url(cedar-lakes-emblem.svg) center / contain no-repeat;
  mask: url(cedar-lakes-emblem.svg) center / contain no-repeat;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 244, 236, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}

.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.monogram {
  font-family: var(--script);
  font-size: 34px;
  color: var(--espresso);
  text-decoration: none;
  line-height: 1;
}

.nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }

.nav ul a {
  font-family: var(--caps);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--espresso);
  text-decoration: none;
}

.nav ul a:hover { color: var(--espresso); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  font-family: var(--caps);
  letter-spacing: 0.2em;
  color: var(--espresso);
  cursor: pointer;
  padding: 8px 0;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav ul {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px 24px 16px;
  }
  .nav.open ul { display: flex; }
  .nav ul a { display: block; padding: 10px 0; }
}

/* ---------- hero ---------- */

/* Laid out like the card, but tighter: the forest artwork (sized by --art) is
   anchored to the bottom of the hero with its empty sky trimmed off the top,
   so the names sit among the treetops just above the cabin roof. */
.hero {
  --art: clamp(700px, 100vw, 1100px);
  position: relative;
  text-align: center;
  height: calc(var(--art) * 0.755);
  padding: calc(var(--art) * 0.075) 16px 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sky);
  /* The artwork's last few percent is blank paper below the ground line, so
     it hangs off the bottom and the next section starts right at the ground. */
  -webkit-mask: url(forest.png) center bottom calc(var(--art) * -0.045) / var(--art) auto no-repeat;
  mask: url(forest.png) center bottom calc(var(--art) * -0.045) / var(--art) auto no-repeat;
  pointer-events: none;
}

/* A soft paper-colored halo keeps the lettering crisp where it crosses the trees. */
.hero > * { position: relative; text-shadow: 0 0 10px var(--paper), 0 0 4px var(--paper); }

/* Phones: the forest spans the screen so the tall pines frame the text, which
   is laid over the treetops with no empty band between the words and the art. */
@media (max-width: 640px) {
  .hero {
    --art: 108vw;
    height: auto;
    padding: 40px 16px calc(var(--art) * 0.475);
  }
  .hero h1.names { font-size: 42px; margin: 10px 0 16px; }
}

.hero .names {
  font-family: var(--script);
  font-weight: 400;
  font-size: calc(var(--art) * 0.072);
  color: var(--espresso);
  line-height: 1.1;
  margin: calc(var(--art) * 0.02) 0 calc(var(--art) * 0.03);
}

/* Pinyon Script's ampersand is a tiny squiggle; a light Cormorant italic one
   stays small and delicate between the names, like "and" on the card. */
.hero .names .and { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 300; font-size: 0.55em; margin: 0 0.12em; }

.hero .when {
  font-family: var(--caps);
  font-weight: 600;
  font-size: max(13px, calc(var(--art) * 0.016));
  letter-spacing: 0.28em;
  color: var(--espresso);
  margin: 0;
}

.hero .when span { white-space: nowrap; }

/* ---------- sections ---------- */

section { padding: 96px 0; }
.hero + section { padding: 72px 0; }
section > .wrap > header { text-align: center; margin-bottom: 48px; }

.band-sky { background: var(--sky-pale); }
.band-espresso { background: var(--espresso); color: var(--paper); }
.band-espresso .script, .band-espresso h3, .band-espresso .eyebrow { color: var(--paper); }
.band-espresso .lede, .band-espresso .muted { color: #dccbbd; }
.band-espresso .emblem { background: #dccbbd; }
#schedule .lede { color: var(--paper); }
/* The day cards stay ivory, so their text keeps the regular colors. */
.band-espresso .day { color: var(--ink); }
.band-espresso .day h3 { color: var(--navy); }
.band-espresso .day .muted { color: var(--muted); }
.band-espresso a { color: var(--paper); }
.band-navy { background: var(--navy); color: var(--paper); }
.band-navy .script, .band-navy h3 { color: var(--paper); }
.band-navy .eyebrow { color: var(--sky); }
.band-navy .lede { color: #c9d4e0; }

.muted { color: var(--muted); }
.tbd { font-style: italic; color: var(--espresso); }

/* ---------- schedule ---------- */

.days { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.day {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 32px 28px;
  position: relative;
}

.day::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--rule);
  pointer-events: none;
}

.day .date { font-family: var(--script); font-size: 40px; color: var(--espresso); margin: 0; line-height: 1.1; }
.day .weekday { margin-bottom: 20px; }

.event { padding: 16px 0; border-top: 1px solid var(--rule); }
.event:first-of-type { border-top: 0; }
.event p { margin: 0; }
.event .time { font-family: var(--caps); letter-spacing: 0.12em; color: var(--espresso); font-size: 16px; }

/* ---------- attire ---------- */

.attire { display: grid; gap: 40px 48px; grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
@media (max-width: 640px) { .attire { grid-template-columns: 1fr; } }
.look { text-align: center; }
.look .dress-code {
  font-family: var(--script);
  font-size: 34px;
  color: var(--espresso);
  margin: 4px 0 12px;
}
.look p { margin: 0 0 8px; }

/* ---------- two column ---------- */

.split { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 14px 0; border-top: 1px solid rgba(247, 244, 236, 0.2); }
.facts li:first-child { border-top: 0; }

.note {
  border-left: 2px solid var(--tan-soft);
  padding: 4px 0 4px 18px;
  margin: 24px 0;
}

/* ---------- travel ---------- */

.map {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  filter: sepia(0.25) saturate(0.8);
  background: var(--paper-deep);
}

.address { font-family: var(--caps); letter-spacing: 0.14em; font-size: 18px; line-height: 1.5; }

.routes { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 56px; }
.route { border-top: 1px solid var(--tan-soft); padding-top: 18px; }
.route p { margin: 0 0 10px; }

table.drive { width: 100%; border-collapse: collapse; font-size: 18px; }
table.drive td { padding: 6px 0; border-bottom: 1px solid var(--rule); }
table.drive td:last-child { text-align: right; color: var(--muted); }

/* ---------- registry / rsvp ---------- */

.center { text-align: center; }

.button {
  display: inline-block;
  font-family: var(--caps);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: lowercase;
  font-size: 15px;
  padding: 14px 30px;
  border: 1px solid currentColor;
  color: var(--espresso);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--espresso); color: var(--paper); border-color: var(--espresso); }
.button[aria-disabled='true'] { opacity: 0.55; pointer-events: none; }
.band-navy .button { color: var(--paper); }
.band-navy .button:hover { background: var(--paper); color: var(--navy); border-color: var(--paper); }

/* ---------- faq ---------- */

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--caps);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.1em;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--espresso); font-family: var(--serif); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 12px 0 0; }

/* ---------- photos placeholder ---------- */

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.gallery div {
  aspect-ratio: 4 / 5;
  background: var(--sky-pale);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  font-family: var(--caps);
  letter-spacing: 0.2em;
  font-size: 13px;
  color: var(--muted);
}
.gallery div:nth-child(even) { background: var(--paper-deep); }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- footer ---------- */

footer {
  background: var(--espresso-deep);
  color: #dccbbd;
  text-align: center;
  padding: 56px 24px;
}
footer .monogram { color: var(--paper); font-size: 52px; }
footer p { margin: 10px 0 0; font-family: var(--caps); letter-spacing: 0.24em; font-size: 14px; }

/* ---------- login ---------- */

.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.login .hero { min-height: 100vh; height: auto; }
.login form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.login input {
  font: inherit;
  font-size: 18px;
  padding: 12px 16px;
  border: 1px solid var(--tan-soft);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  min-width: 240px;
  text-align: center;
  letter-spacing: 0.08em;
}
.login input:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
.login .error { color: #8a3b2e; margin: 14px 0 0; min-height: 1.6em; }

@media (max-width: 560px) {
  body { font-size: 18px; }
  section { padding: 72px 0; }
  .wrap { padding: 0 16px; }
}
