/* =====================================================================
   Charlie & Miriam
   A sun-faded field guide to a wedding in the Royal National Park.
   Palette comes from the photos: meadow green, cream paper, cosmos yellow.
   ===================================================================== */

:root {
  --paper:      oklch(96.5% 0.014 95);
  --paper-deep: oklch(93% 0.02 95);
  --ink:        oklch(26% 0.03 150);
  --ink-soft:   oklch(42% 0.03 150);
  --rule:       oklch(26% 0.03 150 / 0.18);

  --green:      oklch(38% 0.085 150);
  --green-deep: oklch(31% 0.07 150);
  --cream:      oklch(96% 0.02 95);
  --cream-soft: oklch(96% 0.02 95 / 0.72);
  --rule-light: oklch(96% 0.02 95 / 0.22);

  --yellow:     oklch(86% 0.165 90);
  --yellow-deep:oklch(80% 0.17 88);

  --display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --text:    "Literata", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 64ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;            /* 18px on phones */
  line-height: 1.55;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 60rem) { body { font-size: 1.1875rem; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -0.01em; }

.flower { color: var(--green); flex: none; }
.band .flower { color: var(--cream); }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem var(--gutter);
  background: oklch(96.5% 0.014 95 / 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap;
  font-family: var(--display); font-size: 1.15rem; text-decoration: none;
}
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { text-decoration: none; font-size: 1rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--yellow-deep); }
.top-actions { display: flex; align-items: center; gap: 0.6rem; }
.menu-btn {
  display: none; font: inherit; font-size: 1rem; color: var(--ink);
  background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer;
}
@media (max-width: 59.99rem) {
  .top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.75rem; }
  .brand { font-size: 1.05rem; }
  .top-actions { justify-self: end; gap: 0.5rem; }
  .btn-sm, .menu-btn { padding: 0.45rem 0.8rem; font-size: 0.9rem; }
  .menu-btn { display: inline-block; }
  .site-nav { display: none; grid-column: 1 / -1; flex-direction: column; gap: 0; padding: 0.5rem 0 0.25rem; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); font-size: 1.125rem; }
  .site-nav a.active { border-bottom-color: var(--rule); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--text); font-weight: 600; font-size: 1.0625rem; line-height: 1;
  color: var(--ink); background: var(--yellow);
  border: 2px solid var(--yellow); border-radius: 999px;
  padding: 0.95rem 1.5rem; text-decoration: none; cursor: pointer;
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 200ms var(--ease-out);
}
.btn:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--yellow-deep); outline-offset: 3px; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.95rem; }
.btn-wide { width: 100%; text-align: center; }
@media (min-width: 40rem) { .btn-wide { width: auto; } }
.btn-outline { background: transparent; border-color: var(--ink); }
.btn-outline:hover { background: var(--paper-deep); border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero { display: grid; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 60%; }
.hero-text { padding: 2rem var(--gutter) 3.5rem; }
.kicker { font-style: italic; color: var(--ink-soft); margin-bottom: 0.5rem; }
.names {
  font-size: clamp(3.4rem, 15vw, 7.5rem);
  line-height: 0.92;
  margin: 0 0 1.75rem -0.04em;
}
.facts { display: grid; gap: 0.9rem; margin: 0 0 2rem; max-width: 34rem; }
.facts div { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.75rem; align-items: baseline; }
.facts dt { font-style: italic; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin: 0; }
.hero-aside { font-style: italic; color: var(--ink-soft); }

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 8fr);
    align-items: stretch;
    min-height: min(calc(100vh - 3.9rem), 58rem);
  }
  .hero-photo { order: 2; }
  .hero-photo img { height: 100%; aspect-ratio: auto; }
  .hero-text { order: 1; display: flex; flex-direction: column; justify-content: center; padding: 4rem var(--gutter) 4rem clamp(1rem, 5vw, 4rem); }
  .names { font-size: clamp(5rem, 8vw, 8.5rem); margin-bottom: 2.25rem; }
  .hero-cta { flex-direction: row; align-items: center; gap: 1.25rem; }
}

/* Load reveal: a single orchestrated moment, nothing more */
.reveal { animation: rise 900ms var(--ease-out) both; }
.reveal:nth-child(2) { animation-delay: 80ms; }
.reveal:nth-child(3) { animation-delay: 160ms; }
.reveal:nth-child(4) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Sections: heading rail + body ---------- */
.sec {
  display: grid; gap: 1.25rem 3rem;
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter);
  border-top: 1px solid var(--rule);
}
.sec h2 { font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.05; }
.sec-sub { margin: 0.75rem 0 0; color: var(--ink-soft); font-style: italic; max-width: 28rem; }
.sec-body { max-width: var(--measure); }
@media (min-width: 60rem) {
  .sec { grid-template-columns: minmax(14rem, 1fr) minmax(0, 2.4fr); max-width: 78rem; margin: 0 auto; }
  .sec h2 { font-size: clamp(2.25rem, 3.2vw, 3rem); }
}
.prose strong { font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 1.5rem 0 0; font-weight: 600; }

/* ---------- RSVP form ---------- */
.rsvp { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; padding: 0; }
.opt { font-weight: 400; color: var(--ink-soft); }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: oklch(100% 0 0 / 0.55);
  border: 1.5px solid var(--ink-soft); border-radius: 10px;
  padding: 0.85rem 0.95rem;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--yellow-deep); outline-offset: 0; border-color: var(--ink); }
.field ::placeholder { color: oklch(26% 0.03 150 / 0.45); }
.choices { display: grid; gap: 0.6rem; }
@media (min-width: 40rem) { .choices { grid-template-columns: 1fr 1fr; } }
.field .choice {
  position: relative; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.95rem 1.1rem; border: 1.5px solid var(--ink-soft); border-radius: 10px;
  font-weight: 400 !important; cursor: pointer; background: oklch(100% 0 0 / 0.55);
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.choice input { accent-color: var(--green); width: 1.25rem; height: 1.25rem; margin: 0; flex: none; }
.choice:has(input:checked) { background: var(--yellow); border-color: var(--yellow-deep); font-weight: 600 !important; }
.choice:has(input:focus-visible) { outline: 3px solid var(--yellow-deep); outline-offset: 2px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 600; }
.form-status.err { color: oklch(45% 0.15 25); }

/* ---------- Green band: the day, getting there, where to stay ---------- */
.band { background: var(--green); color: var(--cream); }
.band .sec { border-top-color: var(--rule-light); }
.band .sec:first-child { border-top: 0; }
.band .sec-sub, .band .kicker { color: var(--cream-soft); }
.band a { text-decoration-color: oklch(96% 0.02 95 / 0.5); }
.band p, .band li { line-height: 1.62; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.timeline li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; position: relative; }
.timeline time { font-family: var(--display); font-size: 1.15rem; color: var(--yellow); padding-top: 0.15rem; }
.timeline h3 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.timeline p { margin: 0; color: var(--cream-soft); }
@media (min-width: 40rem) {
  .timeline { gap: 2.25rem; }
  .timeline li { grid-template-columns: 7rem 1fr; gap: 1.5rem; }
  .timeline li::before {
    content: ""; position: absolute; left: 7rem; top: 0.2rem; bottom: -2.25rem;
    margin-left: -0.75rem; border-left: 1px solid var(--rule-light);
  }
  .timeline li:last-child::before { display: none; }
  .timeline li::after {
    content: ""; position: absolute; left: 7rem; top: 0.55rem; margin-left: calc(-0.75rem - 4px);
    width: 9px; height: 9px; border-radius: 50%; background: var(--yellow);
  }
}

.band-photo { margin: 0; padding: 0 var(--gutter) clamp(3rem, 8vw, 5.5rem); max-width: 78rem; margin-inline: auto; }
.band-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.band-photo figcaption { font-style: italic; color: var(--cream-soft); font-size: 1rem; margin-top: 0.75rem; }
@media (min-width: 60rem) {
  .band-photo { display: grid; grid-template-columns: minmax(14rem, 1fr) minmax(0, 2.4fr); gap: 3rem; }
  .band-photo img { grid-column: 2; }
  .band-photo figcaption { grid-column: 2; }
}

/* ---------- Q & A ---------- */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1.05rem 2.5rem 1.05rem 0; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.35rem; top: 50%; width: 14px; height: 14px; translate: 0 -50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: rotate 220ms var(--ease-out);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: 0; padding: 0 0 1.25rem; color: var(--ink-soft); max-width: 58ch; }

/* ---------- Wishing well, footer ---------- */
.sign { font-family: var(--display); font-size: 1.35rem; line-height: 1.3; margin-top: 2rem; }
.foot {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 3rem var(--gutter) 3.5rem; text-align: center;
  background: var(--paper-deep); border-top: 1px solid var(--rule);
  color: var(--ink-soft); font-style: italic;
}
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .btn, .choice, .faq summary::after { transition: none; }
}
