@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pinyon-script-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pinyon-script-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --script: "Pinyon Script", "Cormorant Garamond", cursive;
  --ivory: #faf7f2;
  --paper: #f2ede4;
  --ink: #2f2b26;
  --muted: #7a7166;
  --sage: #7d8b6f;
  --sage-dark: #5f6c53;
  --line: #e2dacd;
  --sage-light: #c9d3bd;
  --sage-wash: #eef1e8;
  --forest: #3e4a36;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--ivory); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
[hidden] { display: none !important; }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 32px; transition: background .3s, box-shadow .3s; color: #fff; }
.nav.solid { background: rgba(250,247,242,.94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); color: var(--sage-dark); }
.nav.solid .nav-cta { background: var(--sage); border-color: var(--sage); color: #fff; }
.nav-mark { font-family: var(--script); font-size: 28px; text-decoration: none; letter-spacing: .04em; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { text-decoration: none; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.nav-cta { border: 1px solid currentColor; padding: 6px 16px; border-radius: 999px; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; background: center/cover no-repeat; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,16,13,.88) 0%, rgba(18,16,13,.62) 30%, rgba(18,16,13,.35) 60%, rgba(18,16,13,.12) 100%); }
.hero-photo.empty { background: radial-gradient(circle at 30% 20%, #a7b398, #6e7b61 60%, #4f5945); }
.hero-inner { position: relative; z-index: 0; padding: 120px 24px 80px; }
.eyebrow { font-family: var(--serif); font-weight: 500; font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: var(--sage); margin-bottom: 14px; }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.names { font-family: var(--script); font-weight: 400; font-size: clamp(64px, 12vw, 140px); line-height: 1.05; }
.names .amp { display: block; font-family: var(--serif); font-style: italic; font-size: .38em; margin: .1em 0; color: var(--sage-light); }
.hero-meta { font-family: var(--serif); font-weight: 500; margin-top: 22px; font-size: 19px; letter-spacing: .14em; text-transform: uppercase; }
.countdown { display: flex; justify-content: center; gap: 64px; margin: 36px 0; }
.countdown b { display: block; font-family: var(--script); font-weight: 400; font-size: 46px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.married { font-family: var(--serif); font-size: 36px; font-style: italic; }

.btn { display: inline-block; background: var(--sage); color: #fff; text-decoration: none; padding: 14px 40px; border-radius: 999px;
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase; transition: background .2s, transform .2s; cursor: pointer; }
.btn:hover { background: var(--sage-dark); transform: translateY(-1px); }
.hero .btn { background: var(--sage); color: #fff; }
.hero .btn:hover { background: var(--sage-dark); }

/* Sections */
.section { padding: 112px calc(24px + var(--vine-gutter, 0px)); text-align: center; }
.section.alt { background: var(--sage-wash); }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 60px); line-height: 1.1; margin-bottom: 56px; }
h2::after { content: ""; display: block; width: 56px; height: 2px; margin: 22px auto 0; background: var(--sage); border-radius: 2px; }
h3 { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.2; margin-bottom: 8px; }
.lead { color: var(--muted); margin: -36px 0 32px; }

.ph { width: 100%; height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #e9e2d6 0 12px, #e4dccf 12px 24px); }
.ph span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* Story */
.story { max-width: 980px; margin: 0 auto; display: grid; gap: 72px; }
.story-item { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; text-align: left; }
.story-item.flip .story-photo { order: 2; }
.story-photo { aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; }
.year { font-family: var(--serif); font-weight: 500; font-size: 15px; letter-spacing: .2em; color: var(--sage); }
.story-text h3 { color: var(--sage-dark); }
.story-text p { color: var(--muted); }

/* Details */
.events, .cards { max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.events { max-width: 440px; grid-template-columns: 1fr; } /* a single ceremony card */
.events-note { margin-top: 14px; font-size: 14px; font-style: italic; color: var(--muted); }
.card { background: var(--ivory); border: 1px solid var(--line); border-top: 3px solid var(--sage); border-radius: 4px; padding: 40px 32px; }
.card h3 { color: var(--sage-dark); }
.section:not(.alt) .card { background: #fff; }
.card p { color: var(--muted); }
.card .time { color: var(--sage); letter-spacing: .1em; margin-bottom: 14px; }
.link { display: inline-block; margin-top: 14px; color: var(--sage-dark); font-size: 14px; text-decoration: none; border-bottom: 1px solid currentColor; }
.schedule-wrap { max-width: 520px; margin: 72px auto 0; }
.schedule { list-style: none; margin-top: 20px; border-top: 1px solid var(--sage-light); }
.schedule li { display: flex; gap: 24px; padding: 14px 4px; border-bottom: 1px solid var(--sage-light); text-align: left; }
.schedule li span { width: 96px; flex: none; color: var(--sage); font-variant-numeric: tabular-nums; }
.dress { margin-top: 28px; color: var(--muted); }
.dress b { color: var(--ink); font-weight: 500; }

/* Gallery */
.gallery { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery figure { aspect-ratio: 2/3; overflow: hidden; border-radius: 4px; }
.shot { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery img { transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20,18,15,.94); display: grid; place-items: center; }
.lightbox img { width: auto; height: auto; max-width: 92vw; max-height: 90vh; object-fit: contain; border-radius: 2px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-family: var(--serif); line-height: 1; opacity: .8; padding: 12px 18px; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 12px; right: 12px; font-size: 44px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 64px; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }

/* Arched photo above the RSVP: round top, flat bottom, with a fine outline like the flier */
/* Keep the RSVP close to the photo above it (stronger selectors so the phone layout's section padding can't override them) */
.section.arch { padding-bottom: 0; }
.section.arch + .section.rsvp { padding-top: 40px; }
.arch-photo { position: relative; width: min(340px, 78%); aspect-ratio: 2 / 3; margin: 0 auto; }
.arch-photo img { border-radius: 999px 999px 0 0; }
.arch-photo::after { content: ""; position: absolute; inset: -10px -10px -10px; border: 1px solid var(--sage-dark); border-radius: 999px 999px 0 0; opacity: .6; pointer-events: none; }

/* RSVP + registry */
.registry { max-width: 520px; margin: 80px auto 0; padding-top: 56px; border-top: 1px solid var(--sage-light); }
.registry p { color: var(--muted); }

/* FAQ */
.faq { max-width: 680px; margin: 0 auto; text-align: left; }
.faq details { border-bottom: 1px solid var(--sage-light); padding: 20px 4px; }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-size: 22px; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--sage); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: 10px; }

.footer { padding: 72px 24px; text-align: center; background: var(--forest); color: var(--sage-light); font-size: 14px; letter-spacing: .1em; }
.footer-names { font-family: var(--script); font-size: 52px; color: #fff; letter-spacing: .04em; margin-bottom: 6px; }

/* Vine (vine.js) — line-drawn sprigs like the save-the-date, growing as you scroll */
.vine-wrap { position: absolute; left: 0; width: 100%; z-index: 2; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .6s; }
.vine-wrap.ready { opacity: .45; } /* kept faint so the vine is a subtle detail */
.vine-wrap.measure .vine-grow { transform: none !important; opacity: 1 !important; transition: none !important; }
.vine-wrap svg { display: block; }
.vine-stem, .vine-twig, .vine-grow path { fill: none; stroke: var(--sage); stroke-linecap: round; stroke-linejoin: round; }
.vine-stem { stroke-width: 1.2; }
.vine-tip path { fill: rgba(125,139,111,.12); stroke: var(--sage); stroke-width: 1.1; stroke-linejoin: round; transition: opacity .3s; }
.vine-tip { transition: opacity .3s; }
.vine-twig { stroke-width: 1; }
.vine-tendril { fill: none !important; stroke-width: .9; }
.vine-grow path { stroke-width: .95; fill: rgba(125,139,111,.07); }
/* Leaves unfurl slowly when the stem reaches them, but vanish the moment it pulls back past them, so none are left floating */
.vine-grow { transform: scale(0); opacity: 0; transition: none; }
.vine-grow.on { transform: scale(1); opacity: 1; transition: transform 1.1s cubic-bezier(.2,.8,.2,1), opacity .7s ease; transition-delay: var(--d, 0ms); }
@media (max-width: 720px) { .vine-wrap.ready { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .vine-grow { transition: none; } }

.verse { max-width: 420px; margin: 8px auto 0; letter-spacing: normal; }
.verse-text { display: block; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.4; color: #fff; }
.verse-ref { display: block; margin-top: 8px; font-family: var(--serif); font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--sage-light); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

@media (max-width: 720px) {
  .nav { padding: 14px 18px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 80px calc(20px + var(--vine-gutter, 0px)); }
  .story-item { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .story-item.flip .story-photo { order: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .countdown { gap: 40px; }
}
