/* ============================================
   ETHAN & KATE — APRIL 17, 2027
   Pressed-botanical / herbarium editorial.
   Ink-drawn vines on warm parchment.
   ============================================ */

:root {
    /* ---- Ink & foliage ---- */
    --ink: #2C3327;          /* deepest green-black — body text */
    --ink-soft: #5A6552;     /* secondary text */
    --moss: #44573D;         /* vine stems, headings */
    --sage: #6E8560;         /* leaves */
    --sage-pale: #AFBDA3;    /* hairlines, muted marks */
    --clay: #A8564B;         /* terracotta — berries, accents */
    --clay-soft: #C4877A;

    /* ---- Paper ---- */
    --paper: #FAF6EF;        /* page */
    --paper-warm: #F4EDE1;   /* alternating bands */
    --paper-deep: #EBE2D3;
    --card: #FFFDF9;         /* raised surfaces */

    /* ---- Type ---- */
    --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
    --body: 'Jost', 'Avenir Next', 'Segoe UI', sans-serif;

    /* ---- Rhythm ---- */
    --section-padding: 130px 24px;
    --container-max: 1180px;
    --measure: 63ch;

    /* ---- Depth ---- */
    --lift-1: 0 1px 2px rgba(44, 51, 39, .05), 0 6px 18px rgba(44, 51, 39, .05);
    --lift-2: 0 2px 4px rgba(44, 51, 39, .06), 0 14px 38px rgba(44, 51, 39, .09);
    --lift-3: 0 3px 6px rgba(44, 51, 39, .07), 0 26px 60px rgba(44, 51, 39, .13);

    --ease: cubic-bezier(.22, .61, .36, 1);

}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--body);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Paper grain. Fixed, so it reads as the sheet rather than moving texture. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: .38;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.36'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.15;
    color: var(--moss);
    letter-spacing: .005em;
}

h2 {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    text-align: center;
    margin-bottom: 14px;
}

h3 { font-size: 1.6rem; margin-bottom: 14px; }
h4 { font-size: 1.25rem; }

p { text-wrap: pretty; }
a { color: inherit; }

/* Letterspaced label above section titles */
.eyebrow {
    display: block;
    text-align: center;
    font-family: var(--body);
    font-size: .68rem;
    font-weight: 400;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--clay);
    margin-bottom: 18px;
}

.container { max-width: var(--container-max); margin: 0 auto; }
.section { padding: var(--section-padding); position: relative; }

/* A hairline with a leaf at its centre */
.rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 360px;
    margin: 0 auto 58px;
}
.rule::before, .rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sage-pale), transparent);
}
.rule svg { width: 19px; height: 19px; flex: none; fill: var(--sage); opacity: .75; }

/* ============================================
   VINES
   ============================================ */
.vine { overflow: visible; display: block; }
.vine-stem {
    stroke: var(--moss);
    stroke-width: 2.1;
    fill: none;
    stroke-linecap: round;
}
.vine-leaf { fill: var(--sage); opacity: .9; }
.vine-vein { stroke: var(--paper); stroke-width: .9; fill: none; opacity: .5; }
.vine-tendril { stroke: var(--moss); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.vine-berry { fill: var(--clay); opacity: .8; }

/* Growing in: the stem draws itself, then the foliage unfurls along it. */
.vine .vine-stem {
    stroke-dasharray: 2600;
    stroke-dashoffset: 2600;
}
/* Only .vine-pop is animated. Its parent .vine-node carries the placement
   transform, and a CSS transform would replace that attribute outright. */
.vine-pop, .vine-berry {
    opacity: 0;
    transform: scale(.4);
    transform-origin: center;
    transform-box: fill-box;
}

.vine.is-grown .vine-pop,
.vine.is-grown .vine-berry {
    animation: unfurl .8s var(--ease) forwards;
}
@keyframes unfurl {
    from { opacity: 0; transform: scale(.4) rotate(-8deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

/* Foliage opens roughly in step with the stem drawing past it. */
.vine.is-grown .vine-node .vine-pop                 { animation-delay: .3s; }
.vine.is-grown .vine-node:nth-child(n+4) .vine-pop  { animation-delay: .55s; }
.vine.is-grown .vine-node:nth-child(n+7) .vine-pop  { animation-delay: .85s; }
.vine.is-grown .vine-node:nth-child(n+10) .vine-pop { animation-delay: 1.15s; }
.vine.is-grown .vine-node:nth-child(n+13) .vine-pop { animation-delay: 1.45s; }
.vine.is-grown .vine-node:nth-child(n+16) .vine-pop { animation-delay: 1.75s; }
.vine.is-grown .vine-node:nth-child(n+19) .vine-pop { animation-delay: 2.05s; }
.vine.is-grown .vine-node:nth-child(n+22) .vine-pop { animation-delay: 2.3s; }
.vine.is-grown .vine-berry                          { animation-delay: 2.4s; }

/* The nav markup is identical on every page; the current page is picked out
   here, so there is no per-page copy to fall out of sync. */
body[data-page="home"]     .nav a[href="/"],
body[data-page="story"]    .nav a[href="/story"],
body[data-page="details"]  .nav a[href="/details"],
body[data-page="rsvp"]     .nav a[href="/rsvp"],
body[data-page="registry"] .nav a[href="/registry"],
body[data-page="travel"]   .nav a[href="/travel"] {
    color: var(--moss);
}
body[data-page="home"]     .nav a[href="/"]::after,
body[data-page="story"]    .nav a[href="/story"]::after,
body[data-page="details"]  .nav a[href="/details"]::after,
body[data-page="rsvp"]     .nav a[href="/rsvp"]::after,
body[data-page="registry"] .nav a[href="/registry"]::after,
body[data-page="travel"]   .nav a[href="/travel"]::after {
    width: 100%;
    background: var(--sage);
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 12px 20px;
    background: var(--moss);
    color: var(--paper);
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   PAGE HEADER (every page but home)
   ============================================ */
.page-head {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 168px 24px 4px;          /* clears the fixed nav */
    background:
        radial-gradient(ellipse 60% 70% at 50% 0%, rgba(175, 189, 163, .2), transparent 72%),
        linear-gradient(180deg, #F6F1E7 0%, var(--paper) 100%);
}

/* A faint sprig drifting behind the title */
.page-head-vine {
    position: absolute;
    top: 58px;
    left: 50%;
    width: min(760px, 116vw);
    transform: translateX(-50%);
    opacity: .16;
    pointer-events: none;
}

.page-head .eyebrow,
.page-head h1,
.page-head .rule,
.page-head .page-lede { position: relative; z-index: 1; }

.page-head h1 {
    font-size: clamp(2.7rem, 6.4vw, 4.4rem);
    font-weight: 300;
    line-height: 1.05;
    color: var(--moss);
}

.page-head .rule { margin-bottom: 0; }

.page-lede {
    max-width: 52ch;
    margin: 26px auto 0;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* The first section after a page header doesn't need its own big top gap. */
.page-head + .section { padding-top: 66px; }

/* ============================================
   HOME
   ============================================ */
body.is-home .hero { min-height: 100vh; }

.home-intro { background: var(--paper); text-align: center; }

.home-welcome {
    max-width: 50ch;
    margin: 0 auto 60px;
    font-family: var(--display);
    font-size: 1.45rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    text-align: left;
}

.home-card {
    display: flex;
    flex-direction: column;
    padding: 34px 28px 30px;
    background: var(--card);
    border: 1px solid rgba(175, 189, 163, .5);
    border-radius: 2px;
    text-decoration: none;
    box-shadow: var(--lift-1);
    transition: transform .45s var(--ease), box-shadow .45s var(--ease),
                border-color .45s var(--ease);
}
.home-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--lift-2);
    border-color: var(--sage);
}

.home-card-leaf { line-height: 0; margin-bottom: 16px; }
.home-card-leaf svg {
    width: 22px; height: 22px;
    fill: var(--sage);
    opacity: .8;
    transition: transform .45s var(--ease);
}
.home-card:hover .home-card-leaf svg { transform: rotate(-12deg) scale(1.1); }

.home-card h2 {
    font-size: 1.5rem;
    text-align: left;
    margin-bottom: 8px;
}

.home-card p {
    flex: 1;
    font-size: .88rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.home-card-go {
    font-size: .6rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--clay);
}
.home-card-go::after {
    content: ' \2192';
    display: inline-block;
    transition: transform .35s var(--ease);
}
.home-card:hover .home-card-go::after { transform: translateX(4px); }

.home-rsvp-nudge { margin-top: 52px; }

/* Doubled class so this beats the base .btn width:100%, which is
   defined later in the file. */
.btn.btn--inline { width: auto; padding: 17px 54px; text-decoration: none; }

/* ============================================
   NEXT-PAGE LINK
   ============================================ */
.page-next {
    text-align: center;
    padding: 0 24px 104px;
}
.page-next a {
    display: inline-block;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--moss);
    text-decoration: none;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--sage-pale);
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.page-next a:hover { color: var(--clay); border-bottom-color: var(--clay); }

/* ============================================
   FOOTER NAV
   ============================================ */
.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin: 22px auto 24px;
}
.footer-nav a {
    font-size: .68rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--paper-warm);
    text-decoration: none;
    opacity: .78;
    transition: opacity .3s var(--ease);
}
.footer-nav a:hover { opacity: 1; }

.footer-mark {
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    opacity: .55;
}

/* ============================================
   PAGE ARRIVAL
   Each page fades up once, so moving between them feels continuous
   instead of like six separate documents slamming into place.
   ============================================ */
@keyframes page-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
main { animation: page-in .55s var(--ease) both; }

/* ============================================
   NAV
   ============================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(250, 246, 239, .82);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid rgba(175, 189, 163, .4);
    transition: box-shadow .4s var(--ease);
}

.nav ul {
    display: flex;
    justify-content: center;
    gap: 42px;
    list-style: none;
    padding: 19px 20px;
    flex-wrap: wrap;
}

.nav a {
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    position: relative;
    padding-bottom: 3px;
    transition: color .3s var(--ease);
}

.nav a::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 0;
    width: 0; height: 1px;
    background: var(--clay);
    transform: translateX(-50%);
    transition: width .35s var(--ease);
}
.nav a:hover { color: var(--moss); }
.nav a:hover::after { width: 100%; }

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 130px 24px 90px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 55% at 50% 12%, rgba(175, 189, 163, .22), transparent 70%),
        radial-gradient(ellipse 60% 50% at 12% 88%, rgba(196, 135, 122, .14), transparent 70%),
        linear-gradient(168deg, #FBF8F2 0%, #F5EFE4 58%, #EDE4D6 100%);
}

.hero-vine {
    position: absolute;
    top: -40px;
    width: 128px;
    height: 78vh;
    opacity: .5;
    pointer-events: none;
}
.hero-vine--left { left: max(2vw, 10px); }
.hero-vine--right { right: max(2vw, 10px); transform: scaleX(-1); }

.hero-content { max-width: 860px; position: relative; z-index: 2; }

/* One orchestrated load: each line arrives a beat after the last. */
.hero-content > * {
    opacity: 0;
    transform: translateY(20px);
    animation: rise 1.15s var(--ease) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: .15s; }
.hero-content > *:nth-child(2) { animation-delay: .35s; }
.hero-content > *:nth-child(3) { animation-delay: .62s; }
.hero-content > *:nth-child(4) { animation-delay: .8s; }
.hero-content > *:nth-child(5) { animation-delay: .98s; }

@keyframes rise { to { opacity: 1; transform: none; } }

.pre-title {
    font-size: .7rem;
    letter-spacing: .38em;
    text-transform: uppercase;
    color: var(--clay);
    margin-bottom: 30px;
}

.couple-names {
    font-family: var(--display);
    font-size: clamp(3.6rem, 13vw, 8.4rem);
    font-weight: 300;
    line-height: .94;
    color: var(--moss);
    letter-spacing: -.012em;
}

.couple-names .amp {
    display: block;
    font-style: italic;
    font-size: .4em;
    color: var(--clay);
    margin: .06em 0;
    font-weight: 400;
}

.wedding-date {
    margin-top: 34px;
    font-size: .88rem;
    letter-spacing: .3em;
    text-transform: uppercase;
}

.wedding-location {
    margin-top: 12px;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--ink-soft);
}

/* ---------- Countdown ---------- */
.countdown {
    display: flex;
    justify-content: center;
    margin-top: 54px;
}

.countdown-item { padding: 0 clamp(16px, 3.4vw, 36px); position: relative; }
.countdown-item + .countdown-item::before {
    content: '';
    position: absolute;
    left: 0; top: 16%;
    height: 68%; width: 1px;
    background: var(--sage-pale);
}

.countdown-number {
    display: block;
    font-family: var(--display);
    font-size: clamp(2.1rem, 5.2vw, 3.1rem);
    font-weight: 300;
    line-height: 1;
    color: var(--moss);
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    display: block;
    margin-top: 9px;
    font-size: .58rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.countdown-message {
    font-family: var(--display);
    font-size: 2.2rem;
    color: var(--clay);
    font-style: italic;
}

/* ============================================
   OUR STORY
   ============================================ */
.story-lead {
    max-width: 56ch;
    margin: 0 auto 26px;
    font-family: var(--display);
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--ink);
}

.story-lead::first-letter {
    float: left;
    font-size: 3.5em;
    line-height: .78;
    padding: .06em .12em 0 0;
    color: var(--clay);
}

.story-text { max-width: var(--measure); margin: 0 auto; }
.story-text p { margin-bottom: 1.3em; }
.story-text p:last-child { margin-bottom: 0; }

.story-quote {
    max-width: 40ch;
    margin: 58px auto;
    text-align: center;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.75rem;
    line-height: 1.45;
    color: var(--moss);
    position: relative;
    padding: 28px 0;
}
.story-quote::before, .story-quote::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 74px; height: 1px;
    background: var(--sage-pale);
}
.story-quote::before { top: 0; }
.story-quote::after { bottom: 0; }

.story-pets {
    max-width: var(--measure);
    margin: 48px auto 0;
    padding-top: 26px;
    border-top: 1px solid rgba(175, 189, 163, .55);
    text-align: center;
    font-size: .92rem;
    color: var(--ink-soft);
}
.story-pets strong {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 500;
    font-style: italic;
    color: var(--moss);
}

/* ---------- The story timeline ----------
   One beat per moment: a photograph and its part of the story, side by side,
   progressing straight down the page. A vine runs the length of it, passing
   behind some frames and across the front of others. */
.timeline {
    position: relative;
    margin: 70px auto 0;
    max-width: 1060px;
}

.beat {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(36px, 6vw, 92px);
    padding: 26px 0;
    margin-bottom: clamp(40px, 6vw, 84px);
}
.beat:last-child { margin-bottom: 0; }

/* Alternate which side the photograph falls on. */
.beat--left  .beat-photo { grid-column: 1; grid-row: 1; justify-content: flex-end; }
.beat--left  .beat-text  { grid-column: 2; grid-row: 1; padding-left: clamp(8px, 3.4vw, 52px); }
.beat--right .beat-photo { grid-column: 2; grid-row: 1; justify-content: flex-start; }
.beat--right .beat-text  { grid-column: 1; grid-row: 1; padding-right: clamp(8px, 3.4vw, 52px); }

/* ---------- The spine ----------
   Rendered twice in the same place. The back copy always shows. The front
   copy is masked to a horizontal band, so the vine disappears behind the
   photograph and re-emerges across the front of it. */
.beat-spine {
    position: absolute;
    top: -15%;
    left: 50%;
    width: clamp(170px, 21vw, 268px);
    height: 130%;
    transform: translateX(-50%);
    pointer-events: none;
}
.beat-spine--back  { z-index: 0; }
.beat-spine--front {
    z-index: 3;
    -webkit-mask-image: linear-gradient(to bottom,
        transparent 0 30%, #000 34% 62%, transparent 66% 100%);
    mask-image: linear-gradient(to bottom,
        transparent 0 30%, #000 34% 62%, transparent 66% 100%);
}

.beat-vine { width: 100%; height: 100%; }

/* ---------- The photograph ---------- */
.beat-photo {
    position: relative;
    z-index: 1;           /* above the back spine, below the front spine */
    margin: 0;
    display: flex;
}

/* A sprig draped over the corner, always in front of the frame — the clearest
   read of "growing across the picture" rather than merely past it. */
.beat-drape {
    position: absolute;
    z-index: 4;
    width: clamp(136px, 18vw, 224px);
    pointer-events: none;
}
.beat--left  .beat-drape { top: -42px; right: -34px; }
.beat--right .beat-drape { top: -42px; left: -34px; transform: scaleX(-1); }
.beat-drape-vine { width: 100%; height: auto; }

/* ---------- The text beside it ---------- */
.beat-text { position: relative; z-index: 2; }

.beat-when {
    display: block;
    font-size: .62rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--clay);
    margin-bottom: 12px;
}

.beat-title {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    text-align: left;
    line-height: 1.12;
    margin-bottom: 16px;
}

.beat-text p {
    font-size: .98rem;
    line-height: 1.82;
    color: var(--ink-soft);
    max-width: 44ch;
}

/* ---------- Frames ---------- */
.photo {
    position: relative;
    width: 100%;
    max-width: 404px;      /* keeps the frame off the prose and inside the vine */
    background: var(--card);
    padding: 13px;
    border-radius: 2px;
    box-shadow: var(--lift-2);
    transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.beat--left  .photo { transform: rotate(-1.5deg); }
.beat--right .photo { transform: rotate(1.4deg); }
.beat--left  .photo:hover,
.beat--right .photo:hover {
    transform: rotate(0) translateY(-7px) scale(1.02);
    box-shadow: var(--lift-3);
}

.photo-frame {
    position: relative;
    overflow: hidden;
    background: var(--paper-warm);
    border-radius: 1px;
}
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

.photo--portrait  .photo-frame { aspect-ratio: 4 / 5; }
.photo--landscape .photo-frame { aspect-ratio: 5 / 4; }
.photo--square    .photo-frame { aspect-ratio: 1 / 1; }

/* Empty slots read as a waiting album page, not a broken image. */
.photo-empty {
    position: absolute;
    inset: 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px dashed rgba(110, 133, 96, .45);
    color: var(--sage);
    text-align: center;
    padding: 12px;
}
.photo-empty svg { width: 24px; height: 24px; opacity: .7; fill: var(--sage); }
.photo-empty span {
    font-family: var(--body);
    font-size: .58rem;
    letter-spacing: .06em;
    opacity: .85;
    word-break: break-all;
}

/* Photo and text slide in from their own sides as each beat arrives. */
.beat--left  .beat-photo.reveal { transform: translateX(-26px); }
.beat--right .beat-photo.reveal { transform: translateX(26px); }
.beat--left  .beat-text.reveal  { transform: translateX(22px); }
.beat--right .beat-text.reveal  { transform: translateX(-22px); }
.beat-photo.reveal.is-visible,
.beat-text.reveal.is-visible { transform: none; }
.beat-text.reveal { transition-delay: .12s; }

/* ============================================
   DETAILS
   ============================================ */
.venue-line { text-align: center; margin: 0 auto 54px; max-width: 620px; }
.venue-line .venue-name {
    display: block;
    font-family: var(--display);
    font-size: 1.85rem;
    color: var(--moss);
    margin-bottom: 8px;
}
.venue-line a {
    font-size: .95rem;
    text-decoration: none;
    border-bottom: 1px solid var(--sage-pale);
    padding-bottom: 2px;
    transition: border-color .3s var(--ease), color .3s var(--ease);
}
.venue-line a:hover { color: var(--clay); border-bottom-color: var(--clay); }
.venue-note { display: block; margin-top: 14px; font-size: .88rem; color: var(--ink-soft); }

/* Four cards read left-to-right as a timeline */
.events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 70px;
    counter-reset: step;
}

.event-card {
    position: relative;
    background: var(--card);
    padding: 40px 22px 34px;
    text-align: center;
    border-radius: 2px;
    box-shadow: var(--lift-1);
    border-top: 2px solid var(--sage-pale);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--lift-2);
    border-top-color: var(--clay);
}

/* A small numeral in the corner, like a plate number */
.event-card::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 13px; left: 16px;
    font-family: var(--display);
    font-size: .8rem;
    color: var(--sage-pale);
    letter-spacing: .08em;
}

.event-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.event-time {
    font-size: 1.02rem;
    letter-spacing: .06em;
    color: var(--clay);
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums;
}
.event-venue { font-size: .88rem; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Unplugged ---------- */
.unplugged {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 44px;
    text-align: center;
    background: var(--card);
    border-radius: 2px;
    box-shadow: var(--lift-1);
    border: 1px solid rgba(175, 189, 163, .6);
}
.unplugged-sprig { margin: 0 auto 14px; line-height: 0; }
.unplugged-sprig svg { width: 34px; height: 34px; fill: var(--sage); opacity: .85; }
.unplugged h3 { margin-bottom: 12px; }
.unplugged p { color: var(--ink-soft); font-size: .95rem; max-width: 52ch; margin: 0 auto; }

/* ---------- Dress code ---------- */
.dress-code { max-width: 720px; margin: 70px auto 0; text-align: center; }
.dress-code h3 { font-size: 2rem; margin-bottom: 20px; }
.dress-code p { color: var(--ink-soft); margin-bottom: 1.1em; }

.dress-notes {
    max-width: 560px;
    margin: 34px auto 0;
    padding: 28px 30px;
    list-style: none;
    text-align: left;
    background: rgba(255, 253, 249, .72);
    border-left: 2px solid var(--sage-pale);
    border-radius: 2px;
}
.dress-notes li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: .89rem;
    line-height: 1.7;
    color: var(--ink-soft);
}
.dress-notes li:last-child { margin-bottom: 0; }
.dress-notes li::before {
    content: '';
    position: absolute;
    left: 0; top: .62em;
    width: 7px; height: 7px;
    border-radius: 50% 0 50% 50%;
    transform: rotate(45deg);
    background: var(--sage);
}

/* ============================================
   RSVP
   ============================================ */
.rsvp-deadline {
    text-align: center;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--ink-soft);
    margin-bottom: 46px;
}

.rsvp-app { max-width: 660px; margin: 0 auto; }

.rsvp-search {
    background: var(--card);
    border-radius: 2px;
    padding: 38px 36px;
    box-shadow: var(--lift-1);
    border: 1px solid rgba(175, 189, 163, .5);
}
.rsvp-search > label {
    display: block;
    font-family: var(--display);
    font-size: 1.6rem;
    color: var(--moss);
    margin-bottom: 18px;
    text-align: center;
}
.rsvp-search-row { display: flex; gap: 12px; }

/* ---------- Shared field styling ---------- */
.rsvp-search-row input,
.rsvp-plus-one-input,
.rsvp-dietary-input,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(175, 189, 163, .75);
    border-radius: 2px;
    font-family: var(--body);
    font-size: .98rem;
    font-weight: 300;
    color: var(--ink);
    background: var(--paper);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.rsvp-search-row input:focus,
.rsvp-plus-one-input:focus,
.rsvp-dietary-input:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sage);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(110, 133, 96, .14);
}
.rsvp-search-row input { flex: 1; min-width: 0; }

.rsvp-hint {
    margin-top: 16px;
    font-size: .82rem;
    line-height: 1.7;
    color: var(--ink-soft);
    text-align: center;
}

.rsvp-stage:not(:empty) { margin-top: 26px; }

.rsvp-loading {
    text-align: center;
    color: var(--ink-soft);
    padding: 34px;
    font-style: italic;
    font-family: var(--display);
    font-size: 1.15rem;
}

/* ---------- Notices ---------- */
.rsvp-notice {
    padding: 15px 19px;
    border-radius: 2px;
    border-left: 2px solid;
    font-size: .88rem;
    line-height: 1.65;
    margin-bottom: 22px;
}
.rsvp-notice--error {
    background: rgba(168, 86, 75, .07);
    border-left-color: var(--clay);
    color: #7C3D34;
}
.rsvp-notice--info {
    background: rgba(110, 133, 96, .1);
    border-left-color: var(--sage);
    color: #3F4F37;
}

/* ---------- Which invitation is yours ---------- */
.rsvp-choices-prompt {
    text-align: center;
    color: var(--ink-soft);
    margin-bottom: 18px;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.2rem;
}
.rsvp-choice {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--card);
    border: 1px solid rgba(175, 189, 163, .6);
    border-radius: 2px;
    padding: 19px 22px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.rsvp-choice:hover {
    border-color: var(--sage);
    transform: translateX(4px);
    box-shadow: var(--lift-1);
}
.rsvp-choice-label {
    display: block;
    font-family: var(--display);
    font-size: 1.35rem;
    color: var(--moss);
}
.rsvp-choice-members {
    display: block;
    margin-top: 4px;
    font-size: .82rem;
    color: var(--ink-soft);
}

/* ---------- The party form ---------- */
.rsvp-party-form {
    background: var(--card);
    border: 1px solid rgba(175, 189, 163, .5);
    border-radius: 2px;
    padding: 40px 36px;
    box-shadow: var(--lift-1);
}
.rsvp-party-header {
    text-align: center;
    padding-bottom: 26px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(175, 189, 163, .5);
}
.rsvp-party-header h3 { font-size: 1.9rem; margin-bottom: 6px; }
.rsvp-party-sub { font-size: .88rem; color: var(--ink-soft); }

.rsvp-guest { padding: 24px 0; border-bottom: 1px solid rgba(175, 189, 163, .4); }
.rsvp-guest:last-of-type { border-bottom: none; }
.rsvp-guest.has-error {
    border-left: 2px solid var(--clay);
    padding-left: 16px;
    margin-left: -18px;
}

.rsvp-guest-name {
    font-family: var(--display);
    font-size: 1.45rem;
    color: var(--ink);
    margin-bottom: 15px;
}

.rsvp-plus-one-label {
    display: block;
    font-family: var(--body);
    font-size: .58rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--clay);
    margin-bottom: 9px;
}
.rsvp-plus-one-input { font-family: var(--display); font-size: 1.3rem; }

/* ---------- Yes / no ---------- */
.rsvp-attendance { display: flex; gap: 12px; }
.rsvp-attendance-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 18px;
    border: 1px solid rgba(175, 189, 163, .7);
    border-radius: 2px;
    font-size: .89rem;
    cursor: pointer;
    background: var(--paper);
    transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.rsvp-attendance-option:hover { border-color: var(--sage); }
.rsvp-attendance-option:has(input:checked) {
    border-color: var(--sage);
    background: rgba(110, 133, 96, .12);
    color: var(--moss);
}
.rsvp-attendance-option input { accent-color: var(--sage); margin: 0; flex: none; }

/* ---------- Dietary: attendees only ---------- */
.rsvp-dietary { display: none; margin-top: 17px; }
.rsvp-guest.is-attending .rsvp-dietary {
    display: block;
    animation: rise .45s var(--ease) forwards;
}

.rsvp-dietary label,
.form-group label {
    display: block;
    font-size: .58rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 9px;
}

.form-group { margin-top: 26px; }
.form-group textarea { resize: vertical; line-height: 1.65; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    width: 100%;
    background: var(--moss);
    color: var(--paper);
    padding: 16px 40px;
    border: none;
    border-radius: 2px;
    font-family: var(--body);
    font-size: .74rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .35s var(--ease), transform .25s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover {
    background: var(--ink);
    transform: translateY(-2px);
    box-shadow: var(--lift-2);
}
.btn:disabled { opacity: .55; cursor: wait; transform: none; }

.rsvp-search-row .btn { width: auto; flex: none; white-space: nowrap; }

.rsvp-actions { margin-top: 32px; text-align: center; }

.rsvp-restart {
    display: inline-block;
    margin-top: 20px;
    background: none;
    border: none;
    font-family: var(--body);
    font-size: .82rem;
    color: var(--ink-soft);
    cursor: pointer;
    border-bottom: 1px solid var(--sage-pale);
    padding-bottom: 2px;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.rsvp-restart:hover { color: var(--clay); border-bottom-color: var(--clay); }

.rsvp-confirmation {
    text-align: center;
    background: var(--card);
    border: 1px solid rgba(175, 189, 163, .5);
    border-radius: 2px;
    padding: 54px 34px;
    box-shadow: var(--lift-1);
    animation: rise .7s var(--ease) forwards;
}
.rsvp-confirmation h3 { font-size: 2.1rem; margin-bottom: 14px; }
.rsvp-confirmation p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto; }
.rsvp-change-note { margin-top: 20px !important; font-size: .82rem; color: var(--sage); }

/* ============================================
   REGISTRY
   ============================================ */
.registry { text-align: center; }
.registry > .container > p {
    max-width: 52ch;
    margin: 0 auto 38px;
    color: var(--ink-soft);
}
.registry-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.registry-btn {
    display: inline-block;
    padding: 15px 52px;
    border: 1px solid var(--moss);
    border-radius: 2px;
    font-size: .74rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--moss);
    text-decoration: none;
    transition: background .35s var(--ease), color .35s var(--ease), transform .25s var(--ease);
}
.registry-btn:hover {
    background: var(--moss);
    color: var(--paper);
    transform: translateY(-2px);
}

/* ============================================
   TRAVEL
   ============================================ */
.travel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
}
.travel-card {
    background: var(--card);
    padding: 40px 34px;
    border-radius: 2px;
    box-shadow: var(--lift-1);
    border-top: 2px solid var(--sage-pale);
}
.travel-card h3 { margin-bottom: 20px; }
.travel-card p { font-size: .92rem; color: var(--ink-soft); margin-bottom: 12px; }
.travel-card strong { color: var(--ink); font-weight: 400; }
.travel-card a {
    color: var(--moss);
    text-decoration: none;
    border-bottom: 1px solid var(--sage-pale);
}
.travel-card a:hover { color: var(--clay); border-bottom-color: var(--clay); }

.hotel h4 { font-family: var(--display); color: var(--moss); margin-bottom: 8px; }

.btn-small {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 26px;
    border: 1px solid var(--sage-pale);
    border-radius: 2px;
    font-size: .65rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--moss);
    text-decoration: none;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-small:hover {
    background: var(--moss);
    color: var(--paper);
    border-color: var(--moss);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 76px 24px 60px;
    background: var(--moss);
    color: var(--paper-warm);
}
.footer-vine { width: 240px; height: 40px; margin: 0 auto 24px; opacity: .8; }
.footer-vine .vine-stem { stroke: var(--sage-pale); }
.footer-vine .vine-leaf { fill: var(--sage-pale); opacity: .8; }
.footer-vine .vine-vein { stroke: var(--moss); opacity: .6; }
.footer-vine .vine-tendril { stroke: var(--sage-pale); }
.footer-vine .vine-berry { fill: var(--clay-soft); }

.hashtag {
    font-family: var(--display);
    font-size: 2.1rem;
    margin-bottom: 12px;
    color: var(--paper);
}
.footer p:last-child {
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    opacity: .6;
}

/* ============================================
   SCROLL REVEALS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

.photo.reveal { transition-duration: 1s; }
.photo.reveal:nth-child(1) { transition-delay: .05s; transform: translateY(26px) rotate(-2.1deg); }
.photo.reveal:nth-child(2) { transition-delay: .17s; transform: translateY(26px) rotate(1.3deg); }
.photo.reveal:nth-child(3) { transition-delay: .29s; transform: translateY(26px) rotate(-1.1deg); }
.photo.reveal:nth-child(4) { transition-delay: .41s; transform: translateY(26px) rotate(1.9deg); }
.photo.reveal:nth-child(5) { transition-delay: .53s; transform: translateY(26px) rotate(-1.5deg); }
.photo.reveal.is-visible:nth-child(1) { transform: rotate(-2.1deg); }
.photo.reveal.is-visible:nth-child(2) { transform: rotate(1.3deg); }
.photo.reveal.is-visible:nth-child(3) { transform: rotate(-1.1deg); }
.photo.reveal.is-visible:nth-child(4) { transform: rotate(1.9deg); }
.photo.reveal.is-visible:nth-child(5) { transform: rotate(-1.5deg); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1000px) {
    .events-grid { grid-template-columns: repeat(2, 1fr); }
    .home-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
    :root { --section-padding: 92px 22px; }

    .page-head { padding-top: 146px; }
    .page-head-vine { top: 48px; opacity: .13; }
    .home-welcome { font-size: 1.25rem; }

    .hero-vine { opacity: .34; width: 90px; }

    /* Stack each beat: photograph, then its part of the story. The spine runs
       down the left margin instead of between two columns. */
    .beat {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-left: 76px;
    }
    .beat--left  .beat-photo,
    .beat--right .beat-photo { grid-column: 1; grid-row: 1; }
    .beat--left  .beat-text,
    .beat--right .beat-text  { grid-column: 1; grid-row: 2; }

    .beat-spine {
        left: -34px;
        width: 120px;
        transform: none;
    }
    .beat-spine--front {
        -webkit-mask-image: linear-gradient(to bottom,
            transparent 0 26%, #000 30% 56%, transparent 60% 100%);
        mask-image: linear-gradient(to bottom,
            transparent 0 26%, #000 30% 56%, transparent 60% 100%);
    }

    .beat-drape { width: 112px; }
    .beat--left  .beat-drape { top: -26px; right: -14px; }
    .beat--right .beat-drape { top: -26px; left: auto; right: -14px; transform: none; }

    /* Slide in from one side only, now that everything is one column. */
    .beat--left  .beat-photo.reveal,
    .beat--right .beat-photo.reveal,
    .beat--left  .beat-text.reveal,
    .beat--right .beat-text.reveal { transform: translateY(22px); }

    .story-lead { font-size: 1.3rem; }
    .story-quote { font-size: 1.45rem; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }

    /* Six links need to breathe once they wrap to two rows. */
    .nav ul { gap: 10px 16px; padding: 13px 14px; }
    .nav a { font-size: .6rem; letter-spacing: .13em; }

    .page-head { padding-top: 132px; }
    .page-lede { font-size: 1.08rem; }
    .home-cards { grid-template-columns: 1fr; gap: 16px; }
    .home-card { padding: 26px 22px 24px; }
    .page-next { padding-bottom: 76px; }
    .footer-nav { gap: 8px 18px; }

    .countdown { flex-wrap: wrap; }
    .countdown-item { padding: 0 15px; }

    .events-grid { grid-template-columns: 1fr; }

    .beat { padding-left: 58px; }
    .beat-spine { left: -32px; width: 102px; }
    .beat-drape { width: 92px; }
    .beat--left .beat-drape,
    .beat--right .beat-drape { top: -20px; right: -10px; }
    .beat-title { font-size: 1.65rem; }

    .rsvp-search, .rsvp-party-form { padding: 26px 20px; }
    .rsvp-search-row, .rsvp-attendance { flex-direction: column; }
    .rsvp-search-row .btn { width: 100%; }
    .unplugged { padding: 32px 22px; }
    .dress-notes { padding: 22px 20px; }
    .registry-btn { padding: 15px 38px; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0ms !important;
        transition-duration: .01ms !important;
    }

    .hero-content > * { opacity: 1; transform: none; }
    .reveal { opacity: 1; transform: none; }
    main { animation: none; }
    .vine .vine-stem { stroke-dashoffset: 0; }
    .vine g, .vine .vine-berry { opacity: 1; transform: none; }
}

@media print {
    .nav, body::after, .vine { display: none; }
    .section { padding: 24px 0; }
}
