/* ——— Jordan & Ruby — guest site ———
   White page, terracotta ink, letterspaced Cormorant Garamond + EB Garamond.
   Names and a centred nav up top, the photo contained beneath (photo first on phones).
   One long page: Welcome · Schedule · RSVP · Q&A · Registry. */

:root {
  --stone:      #FFFFFF;
  --stone-deep: #F3ECE8;
  --paper:      #FAF6F3;
  --ink:        #75625A;
  --ink-deep:   #A15C4B;
  --ink-soft:   #AE9D95;
  --line:       #E9DED8;
  --white:      #FFFFFF;
  --serif:      "Cormorant Garamond", "Times New Roman", serif;
  --sans:       "EB Garamond", Garamond, Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body { overflow-x: clip; }
body {
  font-family: var(--sans); font-weight: 400;
  color: var(--ink); background: var(--stone);
  line-height: 1.65; font-size: 18px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--stone-deep); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-deep); }
strong { font-weight: 500; color: var(--ink-deep); }

/* ——— Masthead: names, date, countdown, centred nav, then the photo ——— */
.masthead {
  max-width: 1180px; margin: 0 auto; padding: clamp(4rem, 13vh, 8rem) clamp(1rem, 4vw, 2rem) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.names {
  font-family: var(--serif); font-weight: 300; color: var(--ink-deep);
  font-size: clamp(2.8rem, 5.6vw, 4.6rem); line-height: 1.05; letter-spacing: 0.07em;
  text-decoration: none; display: block;
}
.mast-meta { color: var(--ink-deep); font-size: 1.1rem; letter-spacing: 0.1em; line-height: 1.5; }
.names + .mast-meta { margin-top: 1.4rem; }
.hero-invite { margin-top: 0.4rem; color: var(--ink); font-style: italic; letter-spacing: 0.04em; }
.mast-mobile { display: none; }

.nav-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem clamp(1.2rem, 2.4vw, 2.1rem);
  margin: clamp(2.2rem, 6vh, 3.6rem) 0 clamp(1.4rem, 3vh, 2rem);
  font-size: 1rem; letter-spacing: 0.1em;
}
.nav-links a {
  color: var(--ink); text-decoration: none; padding: 0.2rem 0.35rem 0.35rem;
  border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--ink-deep); }
.nav-links a.active { color: var(--ink-deep); border-bottom-color: var(--ink-deep); }

/* full-bleed, edge to edge. It's a portrait selfie, so 3:2 is as wide as it
   goes while keeping both heads and the ring hand in frame. */
.mast-photo { width: 100vw; max-width: none; margin: 0; align-self: center; }
.mast-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 43%; }

.masthead-slim { padding-bottom: 0; }
.masthead-slim .names { font-size: clamp(2.2rem, 4vw, 3.2rem); }

/* Phone top bar: menu + monogram (hidden on desktop) */
.topbar { display: none; }
.menu-btn { background: none; border: 0; cursor: pointer; width: 26px; height: 20px; position: relative; padding: 0; }
.menu-btn span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink-deep); transition: transform 0.25s, opacity 0.2s; }
.menu-btn span:nth-child(1) { top: 2px; } .menu-btn span:nth-child(2) { top: 9px; } .menu-btn span:nth-child(3) { top: 16px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.topbar-mono { font-family: var(--serif); font-size: 1.7rem; font-weight: 300; letter-spacing: 0.06em; color: var(--ink-deep); text-decoration: none; line-height: 1; }

/* Hero load-in */
@media (prefers-reduced-motion: no-preference) {
  .fade-1, .fade-2, .fade-3 { opacity: 0; transform: translateY(14px); animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
  .fade-1 { animation-delay: 0.15s; } .fade-2 { animation-delay: 0.45s; } .fade-3 { animation-delay: 0.7s; }
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ——— Sections ——— */
.section { padding: clamp(4.5rem, 11vh, 8rem) 1.4rem; }
.section-inner { max-width: 760px; margin: 0 auto; }
.section-inner.center { text-align: center; }
.section-inner.narrow { max-width: 600px; }
.section + .section { padding-top: 0; }

.h2 {
  font-family: var(--serif); font-weight: 300; color: var(--ink-deep);
  font-size: clamp(2.3rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: 0.07em;
  text-align: center; margin-bottom: clamp(1.8rem, 4vh, 2.8rem);
}
.h3 { font-family: var(--serif); font-weight: 400; color: var(--ink-deep); font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.1em; font-weight: 400; color: var(--ink-soft); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 560px; margin: 0 auto; }
.lede + .lede { margin-top: 1.2rem; }
.prose p + p { margin-top: 1.3rem; }
.prose { font-size: 1.05rem; }

/* Welcome — echoes the printed invitation */
.welcome .full-names { font-family: var(--serif); font-weight: 400; color: var(--ink-deep); font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.1; margin: 0.6rem 0 1.2rem; }
.welcome .full-names em { font-style: italic; font-size: 0.7em; display: inline-block; margin: 0.15em 0; }
.welcome .invite-line { color: var(--ink); letter-spacing: 0.04em; margin-bottom: 2.4rem; }
.welcome .place { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 2.6rem); color: var(--ink-deep); line-height: 1.1; }
.welcome .when { margin-top: 0.7rem; font-size: 0.9rem; letter-spacing: 0.1em; font-weight: 400; color: var(--ink); }
.welcome .countdown { margin-top: 0.4rem; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--ink-soft); min-height: 1.4em; }
.welcome .actions { margin: 2rem 0 2.4rem; display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* Buttons — the Joy-style pill */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-weight: 400; font-size: 1.05rem; letter-spacing: 0.02em;
  padding: 0.9rem 2.2rem; border-radius: 0; line-height: 1.2;
  border: 1.5px solid var(--ink-deep); color: var(--ink-deep); background: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}
.btn:hover { background: var(--ink-deep); color: var(--white); }
.btn-solid { background: var(--ink-deep); color: var(--white); }
.btn-solid:hover { background: #874A3C; border-color: #874A3C; }
.btn-small { padding: 0.55rem 1.4rem; font-size: 0.95rem; letter-spacing: 0.1em; }
.btn-wide { width: 100%; text-align: center; margin-top: 0.6rem; }
.btn:focus-visible { outline: 2px solid var(--ink-deep); outline-offset: 3px; }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* Scroll reveals */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ——— Schedule: date, then a timeline ——— */
.sched-date { font-size: clamp(1rem, 2vw, 1.3rem); letter-spacing: 0.1em; font-weight: 400; color: var(--ink); margin-bottom: 1.6rem; }
.timeline { list-style: none; border-left: 1px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 2.2rem 2.2rem; }
.timeline li:last-child { padding-bottom: 0.4rem; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 0.55em; width: 11px; height: 11px;
  border-radius: 50%; border: 1px solid var(--ink-soft); background: var(--stone);
}
.timeline .time { font-size: 0.85rem; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 400; }
.timeline .what { font-family: var(--serif); font-size: clamp(1.5rem, 2.8vw, 2rem); color: var(--ink-deep); line-height: 1.15; margin-top: 0.1rem; }
.timeline .where { margin-top: 0.35rem; font-size: 0.98rem; }
.timeline .where a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.map {
  margin-top: 1.4rem; border-radius: 0; overflow: hidden; aspect-ratio: 16 / 7; background: var(--stone-deep);
  filter: saturate(0.55) contrast(0.98);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.sched-links { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0; font-size: 0.78rem; letter-spacing: 0.1em; font-weight: 400; }
.sched-links a { text-decoration: none; color: var(--ink); }
.sched-links a:hover { color: var(--ink-deep); text-decoration: underline; text-underline-offset: 4px; }
.sched-links span { color: var(--line); padding: 0 0.8rem; }
.sched-note { margin-top: 1.6rem; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--ink); }

/* ——— Photo break ——— */
.photo-break { padding: 0 1.4rem clamp(4.5rem, 11vh, 8rem); }
.photo-break img { max-width: 620px; margin: 0 auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* ——— RSVP form: quiet underlined fields ——— */
.rsvp-form { text-align: left; margin-top: 0.4rem; }
.hp { position: absolute; left: -9999px; }
.field { margin-bottom: 1.6rem; border: 0; }
.field > label, .field legend {
  display: block; font-size: 0.78rem; letter-spacing: 0.1em;
  font-weight: 400; color: var(--ink-soft); margin-bottom: 0.35rem;
}
.opt { text-transform: none; letter-spacing: 0.02em; opacity: 0.8; }
.field input, .field textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink-deep);
  padding: 0.6rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink-deep); }
.field input::placeholder, .field textarea::placeholder { color: #ADA697; }
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 2rem; }
.field-row .grow { flex: 1; }
.field-row .field:first-child { width: 7rem; }
.radio-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.3rem; }
.radio {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 0; padding: 0.55rem 1.1rem;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.radio:has(input:checked) { border-color: var(--ink-deep); background: var(--ink-deep); color: var(--white); }
.radio input { accent-color: var(--ink-deep); }
.radio:has(input:checked) input { accent-color: var(--stone); }
.form-status { margin-top: 1rem; text-align: center; min-height: 1.4em; font-weight: 400; }
.form-status.ok { color: #4E6B45; }
.form-status.err { color: #9A4034; }

.rsvp-hint { font-size: 1rem; margin-bottom: 1.6rem; text-align: center; }
.rsvp-alt { margin-top: 1.2rem; text-align: center; font-size: 0.92rem; color: var(--ink-soft); }
.rsvp-alt a { color: var(--ink); text-underline-offset: 3px; }
.party-people { margin: 0.6rem 0 1.6rem; border-top: 1px solid var(--line); }
.person { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.person .pname { font-family: var(--serif); font-size: 1.45rem; color: var(--ink-deep); line-height: 1.1; }
.person .radio-row { margin: 0; gap: 0.5rem; }
.person .radio { padding: 0.45rem 0.95rem; font-size: 0.92rem; }
.person .radio input { position: absolute; opacity: 0; pointer-events: none; }

/* ——— Q&A ——— */
.faq-grid { display: grid; gap: 2rem; text-align: left; }
.faq-item h3 { font-weight: 400; font-size: 1.05rem; color: var(--ink-deep); margin-bottom: 0.3rem; }
.faq-item p { font-size: 1.02rem; }

/* ——— Registry preview ——— */
.registry-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 2.4rem auto 2.4rem; max-width: 820px;
}
.registry-grid img {
  aspect-ratio: 1; width: 100%; object-fit: contain; padding: 14%;
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
}

/* ——— Footer ——— */
.footer { text-align: center; padding: 2rem 1.4rem 4rem; }
.footer .names-small { font-family: var(--serif); font-weight: 300; letter-spacing: 0.07em; font-size: 2rem; color: var(--ink-deep); line-height: 1.1; }
.footer .foot-date { margin-top: 0.4rem; font-size: 0.78rem; letter-spacing: 0.1em; color: var(--ink-soft); }

/* ——— Gift list page ——— */
.page-head { padding: 2.4rem 1.4rem 1rem; text-align: center; }
.page-head .h1 { font-family: var(--serif); font-weight: 300; letter-spacing: 0.07em; color: var(--ink-deep); font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: 1; }
.page-head .lede { margin-top: 1.4rem; }
.back-link { font-size: 0.8rem; letter-spacing: 0.1em; text-decoration: none; font-weight: 400; color: var(--ink); }
.back-link:hover { color: var(--ink-deep); }

.gift-featured {
  display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: clamp(1.4rem, 4vw, 3rem);
  max-width: 1100px; margin: 2.4rem auto; text-align: left;
  background: var(--paper); border-radius: 6px; padding: clamp(1.2rem, 3vw, 2rem);
}
.gift-featured img { border-radius: 4px; aspect-ratio: 4 / 3; object-fit: cover; }
.gift-featured h3 { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; color: var(--ink-deep); margin-bottom: 0.5rem; line-height: 1.05; }
.gift-featured p { font-size: 1rem; margin-bottom: 1rem; }

.gift-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.4rem;
  margin: 2.2rem auto 0; text-align: left; max-width: 1100px;
}
.gift-card { display: flex; flex-direction: column; }
.gift-photo-wrap { background: var(--paper); border-radius: 4px; margin-bottom: 0.9rem; }
.gift-photo {
  display: block; width: 100%; aspect-ratio: 1; object-fit: contain;
  padding: 1rem; mix-blend-mode: multiply;
}
.gift-card h3 { font-weight: 400; font-size: 1.05rem; color: var(--ink-deep); line-height: 1.35; }
.gift-price { font-size: 0.85rem; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0.15rem 0 0.45rem; }
.gift-card .blurb { font-size: 0.95rem; flex: 1; margin-bottom: 0.9rem; }
.gift-card .shop-link { font-size: 0.85rem; margin-bottom: 0.8rem; }
.gift-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.gift-actions .btn { text-align: center; padding: 0.65rem 1.2rem; font-size: 0.85rem; }
.gift-claim-form { display: flex; gap: 0.5rem; }
.gift-claim-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 0.95rem; color: var(--ink-deep);
  padding: 0.5rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.gift-claim-form input:focus { outline: none; border-bottom-color: var(--ink-deep); }
.gift-reserved { font-size: 0.85rem; letter-spacing: 0.06em; color: var(--ink-deep); background: var(--paper); border-radius: 0; padding: 0.55rem 1rem; text-align: center; }
.gift-undo { font-size: 0.8rem; text-align: center; }
.gift-thanks { margin-top: 0.8rem; font-size: 0.9rem; text-align: center; background: var(--paper); border-radius: 6px; padding: 0.8rem 0.9rem; }
.progress { height: 5px; border-radius: 999px; overflow: hidden; background: var(--stone-deep); margin-bottom: 0.35rem; }
.progress i { display: block; height: 100%; background: var(--ink-deep); border-radius: 999px; }
.progress-label { font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-soft); text-align: center; margin-bottom: 0.5rem; }
.give-how { max-width: 600px; margin: 3rem auto 0; font-size: 1rem; border-top: 1px solid var(--line); padding-top: 1.6rem; text-align: center; }

/* ——— Responsive ——— */
@media (max-width: 860px) {
  .gift-featured { grid-template-columns: 1fr; }
  .topbar {
    display: flex; align-items: center; justify-content: center; position: sticky; top: 0; z-index: 50;
    height: 56px; background: rgba(255,255,255,0.96); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
  .menu-btn { position: absolute; left: 1.1rem; top: 18px; }
  .masthead { padding: 0 0 1rem; }
  .masthead-slim { padding-top: 1.6rem; }
  .mast-photo { order: -1; }
  .mast-photo { max-width: none; }
  .mast-photo img { aspect-ratio: 4 / 5; object-position: 50% 40%; }
  .mast-text { padding: clamp(3rem, 12vh, 5.5rem) 1.2rem 0; }
  .masthead-slim .mast-text { padding-top: 0; }
  .names { font-size: clamp(2.4rem, 11vw, 3.1rem); line-height: 1.1; }
  .names + .mast-meta { margin-top: 1.1rem; }
  .mast-meta { font-size: 0.95rem; }
  .mast-mobile { display: flex; flex-direction: column; align-items: center; margin-top: 2.6rem; }
  .masthead-slim .mast-mobile { display: none; }
  .mm-date { color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.1em; padding: 0 0.6rem 0.7rem; border-bottom: 1px solid var(--ink-deep); min-width: 9.5rem; }
  .mm-place { color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.14em; line-height: 1.35; margin: 0.8rem 0 1.1rem; }
  /* the nav becomes a drop-down under the top bar */
  .nav-links {
    position: fixed; top: 56px; left: 0; right: 0; z-index: 49; margin: 0;
    flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.8rem 0 1.4rem;
    background: rgba(255,255,255,0.98); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0.25s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; transition: opacity 0.25s, transform 0.25s; }
  .nav-links a { font-size: 1.1rem; padding: 0.5rem 0.4rem; }

}
@media (max-width: 640px) {
  .field-row { flex-direction: column; gap: 0; }
  .field-row .field:first-child { width: 100%; }
  .registry-grid { grid-template-columns: repeat(2, 1fr); }
  .registry-grid img:nth-child(n+5) { display: none; }
}
