/* Christopher & Amy, 17 July 2027
   Matches the save the dates and invitations: ivory card, watercolour eucalyptus,
   soft eucalyptus greens, Instrument Serif + Instrument Sans.
   Colours and fonts are all set here at the top. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --ivory: #faf8f3;       /* the card */
  --paper: #ffffff;       /* photo borders, cards */
  --mist: #f2f1ea;        /* alternate sections */
  --green: #3f5a49;       /* names, headings, times */
  --green-2: #4f6a59;     /* links, buttons */
  --green-soft: #7f9688;  /* ampersand, accents */
  --line: #d7ddd2;        /* hairlines */
  --ink: #2f3d33;         /* strong text */
  --ink-soft: #4b5b4f;    /* body text */
  --rose: #a8655a;        /* "please don't" notes */

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, sans-serif;

  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-2); text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; color: var(--green); }
h2 { font-size: clamp(2.6rem, 6vw, 3.8rem); margin-bottom: 0.25em; }
h3 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); margin-bottom: 0.2em; }
p { margin: 0 0 1em; max-width: 62ch; }
strong { color: var(--ink); font-weight: 600; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.centre { text-align: center; }
.centre p { margin-left: auto; margin-right: auto; }

/* Thin green rule used between things, as on the invitations */
.rule { width: 64px; height: 1px; background: var(--green-soft); opacity: 0.6; border: 0; margin: 28px auto; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 1rem/1 var(--sans);
  padding: 16px 30px;
  border-radius: 999px;
  border: 1.5px solid var(--green-2);
  background: var(--green-2);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.button:hover { background: var(--green); border-color: var(--green); color: var(--paper); }
.button.line { background: transparent; color: var(--green-2); }
.button.line:hover { background: var(--green-2); color: var(--paper); }
.button.small { padding: 10px 20px; font-size: 0.92rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.monogram { font-family: var(--serif); font-size: 1.7rem; color: var(--green); text-decoration: none; }
.monogram em { color: var(--green-soft); }
.nav ul { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 34px); list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.nav ul a:not(.button) { text-decoration: none; color: var(--ink-soft); }
.nav ul a:not(.button):hover { color: var(--green); }
@media (max-width: 760px) { .nav ul li:not(.keep) { display: none; } }

/* ---------- Eucalyptus artwork ---------- */
.euc { position: absolute; pointer-events: none; z-index: 0; height: auto; max-width: none; }
.flip-x { transform: scaleX(-1); }
.flip-y { transform: scaleY(-1); }
.flip-xy { transform: scale(-1, -1); }

/* ---------- Hero (the invitation front) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(150px, 20vw, 220px) 0 clamp(110px, 14vw, 160px);
}
.hero .wrap { position: relative; z-index: 1; }
.hero p { margin-left: auto; margin-right: auto; }
.hero .euc.tl { left: -40px; top: -16px; width: clamp(300px, 42vw, 560px); }
.hero .euc.tr { right: -30px; top: 26px; width: clamp(170px, 22vw, 300px); }
.hero .euc.bl { left: -60px; bottom: -24px; width: clamp(200px, 26vw, 340px); }
.hero .euc.br { right: -30px; bottom: 12px; width: clamp(150px, 19vw, 250px); }
.lede { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--ink-soft); margin: 0 auto 0.5em; }
.names {
  font-size: clamp(3.6rem, 10vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--green);
}
.names .amp { display: block; font-style: italic; color: var(--green-soft); font-size: 0.7em; line-height: 1.1; }
.hero .date { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--green); margin: 0.9em auto 0.1em; }
.hero .place { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 0; }

.countdown { display: flex; justify-content: center; gap: 28px; margin: 0 0 30px; padding: 0; list-style: none; }
.countdown li { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.countdown strong { font-family: var(--serif); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 0.85rem; color: var(--ink-soft); }

@media (max-width: 640px) {
  .hero { padding-top: 130px; }
  .hero .euc.tl { width: 260px; left: -50px; }
  .hero .euc.tr { width: 140px; }
  .hero .euc.bl { width: 170px; }
  .hero .euc.br { width: 120px; }
}

/* ---------- Sections ---------- */
.block { position: relative; padding: clamp(72px, 10vw, 120px) 0; }
.block.mist { background: var(--mist); }
.intro { color: var(--ink-soft); font-size: 1.12rem; margin-bottom: 2.2em; }

/* A note from us */
.story { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(36px, 7vw, 96px); align-items: center; }
.framed { padding: 8px; border: 1px solid rgba(79, 106, 89, 0.45); justify-self: center; max-width: 360px; width: 100%; }
.framed img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 10px solid var(--paper); }
.story p { font-size: 1.12rem; }
.signoff { font-family: var(--serif); font-style: italic; font-size: 1.9rem; color: var(--green-soft); margin-top: 0.4em; }
@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; }
  .framed { max-width: 280px; order: 2; }
}

/* Timeline, laid out like the back of the invitation */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; }
.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 4px 32px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--green); text-align: right; }
.timeline li.key time { font-style: italic; }
.timeline h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 600; color: var(--ink); margin: 0 0 2px; }
.timeline p { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding: 16px 0; }
  .timeline time { text-align: left; font-size: 1.6rem; }
}

/* Venues */
.venues { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 32px); }
.venues:has(> .venue:only-child) { grid-template-columns: minmax(0, 640px); justify-content: center; }
.venue { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.venue iframe { width: 100%; height: 260px; border: 0; display: block; background: var(--mist); filter: saturate(0.55); }
.venue .body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.venue .role { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--green-soft); margin-bottom: 6px; }
.venue address { font-style: normal; color: var(--ink-soft); margin: 4px 0 12px; }
.venue .note { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 6px; }
.venue .warn { font-size: 0.97rem; font-weight: 600; color: var(--rose); margin-bottom: 20px; }
.venue .button { align-self: flex-start; margin-top: auto; }

.venue-photos { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 130px 130px; gap: 3px; background: var(--paper); }
.venue-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.venue-photos img:first-child { grid-row: 1 / span 2; }
.venues:has(> .venue:only-child) .venue-photos { grid-template-rows: 160px 160px; }
@media (max-width: 760px) { .venues { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .venues .venue-photos, .venues:has(> .venue:only-child) .venue-photos { grid-template-rows: 100px 100px; }
}

/* Good to know */
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 56px; margin: 0; }
.details div { border-top: 1px solid var(--line); padding: 20px 0 14px; }
.details dt { font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; color: var(--green); margin-bottom: 6px; }
.details dd { margin: 0; }
@media (max-width: 640px) { .details { grid-template-columns: 1fr; } }

/* FAQs */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.faqs details { border-top: 1px solid var(--line); }
.faqs details:last-child { border-bottom: 1px solid var(--line); }
.faqs summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 44px 20px 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::before, .faqs summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: var(--green-soft);
  transition: transform 0.25s ease;
}
.faqs summary::after { transform: rotate(90deg); }
.faqs details[open] summary::after { transform: rotate(0deg); }
.faqs details p { padding: 0 0 18px; margin: 0; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: 1fr; } }

/* RSVP call to action */
.cta { position: relative; overflow: hidden; text-align: center; padding: clamp(96px, 13vw, 150px) 0; background: var(--mist); }
.cta .wrap { position: relative; z-index: 1; }
.cta .euc.l { left: -30px; top: 50%; width: clamp(160px, 20vw, 260px); transform: translateY(-50%); }
.cta .euc.r { right: -30px; top: 50%; width: clamp(160px, 20vw, 260px); transform: translateY(-50%) scaleX(-1); }
.cta h2 { font-size: clamp(3rem, 8vw, 5.4rem); }
.cta p { margin: 0 auto 1.8em; font-size: 1.12rem; }
@media (max-width: 640px) { .cta .euc { opacity: 0.45; } }

/* Footer */
footer { padding: 48px 0 60px; text-align: center; font-size: 0.95rem; border-top: 1px solid var(--line); }
footer img { margin: 0 auto 18px; width: 170px; }
footer p { margin: 0 auto 6px; }

/* ---------- Login, RSVP and thank-you pages ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 100svh; }
.split-art {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 18px;
  background: var(--ivory);
  border-right: 1px solid var(--line);
}
.split-art > :not(.euc) { position: relative; z-index: 1; }
.split-art .euc.tl { left: -40px; top: -14px; width: clamp(240px, 30vw, 420px); }
.split-art .euc.br { right: -40px; bottom: -14px; width: clamp(200px, 24vw, 330px); transform: scale(-1, -1); }
.split-art .names { font-size: clamp(3.2rem, 6.4vw, 5.6rem); }
.split-art .meta { color: var(--ink-soft); margin: 0; }
.split-art .meta strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--green); line-height: 1.15; }
.split-art .lede { margin: 0; }
.split-art a.back { position: absolute; top: clamp(24px, 4vw, 40px); left: clamp(24px, 4vw, 48px); font-size: 0.95rem; }

.split-form { display: flex; align-items: center; justify-content: center; padding: clamp(32px, 6vw, 80px) var(--gutter); background: var(--paper); }
.form-inner { width: 100%; max-width: 500px; }
.form-inner h2 { font-size: clamp(2.8rem, 5vw, 3.8rem); margin-bottom: 0.2em; }
.form-inner .sub { color: var(--ink-soft); margin-bottom: 2em; font-size: 1.05rem; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; min-height: auto; }
  .split-art { padding: 72px 24px 40px; border-right: 0; border-bottom: 1px solid var(--line); }
  .split-art .names { font-size: clamp(2.8rem, 12vw, 4rem); }
  .split-art .euc.tl { width: 220px; }
  .split-art .euc.br { width: 170px; }
  .split-art a.back { top: 20px; left: 20px; }
}

.field { margin-bottom: 22px; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: 0.95rem; color: var(--ink); margin-bottom: 8px; }
.field .hint { display: block; font-size: 0.88rem; color: var(--ink-soft); margin-top: 6px; }
.optional { font-weight: 400; color: var(--ink-soft); }
input[type="text"], input[type="password"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--ivory);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(127, 150, 136, 0.22); }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  background: var(--ivory);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { background: var(--green-2); border-color: var(--green-2); color: var(--paper); }
.choice:has(input:focus-visible) { outline: 2px solid var(--green-2); outline-offset: 3px; }
@media (max-width: 420px) { .choices { grid-template-columns: 1fr; } }

.pin-input { letter-spacing: 0.5em; font-variant-numeric: tabular-nums; font-size: 1.2rem; }
.form-error { background: #f6ebe7; border-left: 3px solid var(--rose); padding: 12px 16px; border-radius: 6px; font-size: 0.95rem; color: var(--ink); margin-bottom: 22px; }
.form-error[hidden] { display: none; }
.form-inner .button { width: 100%; margin-top: 8px; }
.small-print { font-size: 0.9rem; color: var(--ink-soft); margin: 20px 0 0; text-align: center; max-width: none; }
.done h2 { font-size: clamp(2.6rem, 5vw, 3.6rem); }
.hidden { display: none !important; }

/* Scrolling ribbon under the welcome section */
.ribbon {
  background: var(--mist);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--green);
  overflow: hidden;
  white-space: nowrap;
  padding: 14px 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
}
.ribbon-track { display: flex; width: max-content; animation: ribbon 45s linear infinite; }
.ribbon-track span { flex-shrink: 0; display: inline-flex; align-items: center; gap: 26px; padding-right: 26px; }
.ribbon .leaf { width: 18px; height: 18px; color: var(--green-soft); }
@keyframes ribbon { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ribbon-track { animation: none; } }
