/* ============================================================
   nbperrodin.com — STYLES
   Colors + fonts live in :root. Swap these five values to
   re-theme the entire site.
   ============================================================ */
:root {
  --ink:      #3A3833;   /* body text */
  --ink-soft: #7A736A;   /* captions, secondary text */
  --paper:    #F4F0E9;   /* stone — page background */
  --paper-2:  #EAE3D8;   /* beige — cards / bands */
  --line:     #D8CFC2;   /* hairlines */
  --pine:     #4E5B44;   /* olive — headings, buttons */
  --pine-2:   #5E6C53;   /* olive hover */
  --sage:     #8E9C82;   /* sage — leaves, secondary accents */
  --gold:     #B98E8C;   /* mauve — rules, small caps */
  --blush:    #D9B3AE;   /* dusty rose — petals, tags */
  --nude:     #CBBDB4;   /* nude — soft fills */

  --display: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --body:    "Jost", "Futura", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --max: 1120px;
  --measure: 62ch;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
main { overflow-x: clip; }
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.1; color: var(--pine); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.6rem; }
h3 { font-size: 1.5rem; }
p  { margin: 0 0 1em; max-width: var(--measure); }

.eyebrow {
  font-family: var(--body); font-weight: 400; font-size: 0.78rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 0.9rem;
}
.eyebrow.center { max-width: none; }
.rule { width: 56px; height: 1px; background: var(--gold); margin: 1.4rem 0; }
.rule.center { margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.center p { margin-left: auto; margin-right: auto; }

/* --- Layout ------------------------------------------------- */
.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band { background: var(--paper-2); }

/* --- Header / nav ------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { font-family: var(--display); font-size: 1.45rem; color: var(--pine); text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; }
.brand em { font-style: italic; color: var(--gold); }
.nav { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--ink); font-weight: 400; padding: 0.4rem 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--pine); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.45rem 0.7rem; font: inherit; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pine); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 0.5rem 1.25rem 1rem; }
  .nav.open { display: flex; }
  .nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
}

/* --- Hero --------------------------------------------------- */
.hero { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 560px; }
.hero-text { display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 5rem); }
.hero-text h1 { margin-bottom: 0.5rem; }
.hero-text .names em { font-style: italic; color: var(--gold); }
.hero-date { font-family: var(--display); font-size: 1.5rem; color: var(--ink); margin: 0.2rem 0 0; }
.hero-place { color: var(--ink-soft); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin-top: 0.4rem; }
.hero-photo { background: var(--paper-2); position: relative; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  width: 100%; height: 100%; min-height: 320px; display: grid; place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blush) 55%, var(--paper-2)), color-mix(in srgb, var(--pine) 22%, var(--paper-2)));
  color: var(--pine); font-family: var(--display); font-size: 1.2rem; font-style: italic; text-align: center; padding: 1rem;
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-photo { order: -1; min-height: 320px; } }

/* --- Buttons ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  background: var(--pine); color: #fff; text-decoration: none; border: 1px solid var(--pine);
  font: inherit; font-weight: 400; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--pine-2); }
.btn.ghost { background: transparent; color: var(--pine); }
.btn.ghost:hover { background: color-mix(in srgb, var(--pine) 8%, transparent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

/* --- Countdown ---------------------------------------------- */
.countdown { display: flex; gap: clamp(1rem, 4vw, 3rem); justify-content: center; margin-top: 1.5rem; font-variant-numeric: tabular-nums; }
.countdown div { text-align: center; }
.countdown b { display: block; font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; color: var(--pine); line-height: 1; }
.countdown span { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }

/* --- Details grid ------------------------------------------- */
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-top: 2.5rem; }
.details h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.details p { margin: 0; color: var(--ink-soft); }
.details .lbl { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }

/* --- Form --------------------------------------------------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.75rem); max-width: 720px; margin: 2rem auto 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.35rem; font-weight: 400; }
input, select, textarea {
  width: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font: inherit; font-size: 1rem; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--pine); background: #fff; }
[aria-invalid="true"] { border-color: #B5514A; background: #FBF1EF; }
.form-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.form-status { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: var(--radius); font-size: 0.95rem; display: none; }
.form-status.ok { display: block; background: color-mix(in srgb, var(--pine) 10%, #fff); color: var(--pine); border: 1px solid color-mix(in srgb, var(--pine) 30%, transparent); }
.form-status.err { display: block; background: #FBEDEA; color: #8A2E22; border: 1px solid #E9C2BA; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* --- Wedding party ------------------------------------------ */
.party-group { margin-top: 2.5rem; }
.party-group + .party-group { margin-top: 4rem; }
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.75rem 1.25rem; margin-top: 1.5rem; }
.person { text-align: center; }
.person .pic { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 0.9rem; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.person .pic img { width: 100%; height: 100%; object-fit: cover; }
.person .pic .initials { font-family: var(--display); font-size: 2.2rem; color: var(--pine); }
.person.bride .pic { background: color-mix(in srgb, var(--blush) 60%, #fff); }
.person.groom .pic { background: color-mix(in srgb, var(--pine) 14%, #fff); }
.person h3 { font-size: 1.3rem; }
.person .role { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0.2rem 0 0.5rem; }
.person p { font-size: 0.92rem; color: var(--ink-soft); margin: 0 auto; }

/* --- Registry ----------------------------------------------- */
.registry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); gap: 1.5rem; justify-content: center; margin-top: 2.5rem; }
.registry-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
.registry-card h3 { font-size: 1.7rem; }
.registry-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* --- Gallery ------------------------------------------------ */
.gallery-grid { columns: 3; column-gap: 1rem; margin-top: 2.5rem; }
.gallery-grid figure { break-inside: avoid; margin: 0 0 1rem; }
.gallery-grid img { border-radius: var(--radius); width: 100%; cursor: zoom-in; }
.gallery-grid .photo-placeholder { border-radius: var(--radius); aspect-ratio: 4 / 5; min-height: 0; }
.gallery-grid figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4rem; font-style: italic; font-family: var(--display); font-size: 1rem; }
@media (max-width: 800px) { .gallery-grid { columns: 2; } }
@media (max-width: 480px) { .gallery-grid { columns: 1; } }
.lightbox { position: fixed; inset: 0; background: rgba(20,20,18,0.92); display: none; place-items: center; z-index: 50; padding: 2rem; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: var(--radius); }
.lightbox button { position: absolute; top: 1rem; right: 1rem; background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff; font: inherit; padding: 0.4rem 0.8rem; border-radius: var(--radius); cursor: pointer; }

/* --- Photo share page --------------------------------------- */
.share-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem); max-width: 640px; margin: 2rem auto 0; text-align: center; }
.share-card .big { font-family: var(--display); font-size: 1.4rem; color: var(--pine); margin-bottom: 1rem; }
.steps { list-style: none; padding: 0; margin: 1.5rem auto 0; max-width: 420px; text-align: left; display: grid; gap: 0.75rem; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 0.75rem; align-items: start; font-size: 0.95rem; color: var(--ink-soft); }
.steps li b { font-family: var(--display); color: var(--gold); font-size: 1.3rem; line-height: 1.2; }

/* --- Footer ------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; text-align: center; color: var(--ink-soft); font-size: 0.85rem; }
.site-footer .names { font-family: var(--display); font-size: 1.5rem; color: var(--pine); margin-bottom: 0.4rem; }
.site-footer .hashtag { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; color: var(--gold); }

/* --- Florals (watercolor artwork) --------------------------- */
[data-floral] { pointer-events: none; }
.floral-img { display: block; width: 100%; height: auto; }

/* Welcome hero: photo banner with corner clusters, garland under the names */
.hero { position: relative; display: block; }
.hero-banner { position: relative; height: clamp(360px, 62vh, 640px); overflow: visible; }
.hero-banner .hero-photo { position: absolute; inset: 0; overflow: hidden; }
.hero-banner .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
/* Garland swag straddling the bottom edge of the photo */
.hero-swag { position: absolute; z-index: 3; width: min(720px, 86vw); left: 50%; bottom: 0; transform: translate(-50%, 50%); filter: drop-shadow(0 6px 14px rgba(58,56,51,0.18)); }
.hero-text { display: block; text-align: center; padding: clamp(4.5rem, 9vw, 7rem) 1.25rem clamp(2rem, 5vw, 3.5rem); position: relative; z-index: 2; }
.hero-text p { margin-inline: auto; }
.hero-text .btn-row { justify-content: center; }
.hero-garland { width: min(460px, 78vw); margin: 0.25rem auto 0.75rem; }
@media (max-width: 700px) {
  .hero-swag { width: 92vw; }
  .hero-text { padding-top: 3.5rem; }
}

/* Page headings crowned by the arched garland */
.page-head { position: relative; }
.page-head .head-arch { width: min(640px, 92vw); margin: -0.5rem auto 0.5rem; }
.page-head > *:not(.head-arch) { position: relative; z-index: 1; }

/* Address form band: tall bouquet at the side on wide screens */
.section.band { position: relative; overflow: hidden; }
.band .wrap { position: relative; z-index: 1; }
.band-bouquet { position: absolute; z-index: 0; width: clamp(150px, 16vw, 240px); left: max(0.5rem, calc(50% - 560px - 20px)); top: 50%; transform: translateY(-46%); opacity: 0.95; }
.band-bouquet.right { left: auto; right: max(0.5rem, calc(50% - 560px - 20px)); transform: translateY(-46%) scaleX(-1); }
@media (max-width: 1120px) { .band-bouquet { display: none; } }
.band-floral.br { position: absolute; z-index: 0; width: clamp(200px, 26vw, 360px); right: -0.5rem; bottom: -0.5rem; opacity: 0.9; }
.band-floral.tl { position: absolute; z-index: 0; width: clamp(200px, 26vw, 360px); left: -0.5rem; top: -0.5rem; opacity: 0.9; }

/* Corner clusters on cards */
.has-corner { position: relative; }
.has-corner [data-floral] { position: absolute; z-index: 1; }
.has-corner .corner-br { width: 210px; right: -40px; bottom: -44px; }
.has-corner .corner-tl { width: 200px; left: -40px; top: -40px; }
@media (max-width: 600px) { .has-corner .corner-br { width: 140px; right: -24px; bottom: -28px; } .has-corner .corner-tl { width: 130px; left: -22px; top: -24px; } }

/* Photo-share card framed by the wreath */
.share-wreath { position: relative; width: min(560px, 92vw); margin: 1.5rem auto 0; aspect-ratio: 1; display: grid; place-items: center; }
.share-wreath [data-floral] { position: absolute; inset: 0; z-index: 0; }
.share-wreath .share-inner { position: relative; z-index: 2; width: 52%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.share-wreath .share-inner .big { font-family: var(--display); font-size: clamp(1.25rem, 4vw, 2rem); color: var(--pine); line-height: 1.1; }
.share-wreath .share-inner .btn { font-size: clamp(0.62rem, 2.4vw, 0.8rem); padding: 0.65rem 0.9rem; letter-spacing: 0.1em; white-space: normal; line-height: 1.3; max-width: 100%; }

.thanks-banner { max-width: 640px; margin: 0 auto 1.4rem; text-align: center; }

/* --- Venue page --------------------------------------------- */
.venue-lead { margin-top: 2.5rem; }
.venue-lead figure { margin: 0; }
.venue-lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.venue-lead figcaption, .venue-grid figcaption { font-family: var(--display); font-style: italic; color: var(--ink-soft); margin-top: 0.5rem; text-align: center; }
.venue-placeholder { aspect-ratio: 16 / 9; min-height: 0; border-radius: var(--radius); }
.venue-about { max-width: 720px; margin: 2.5rem auto 0; text-align: center; }
.venue-about h2 { margin-bottom: 0.4rem; }
.venue-about .venue-loc { color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.04em; margin-bottom: 1.4rem; }
.venue-about p { margin-inline: auto; }
.venue-about .btn-row { justify-content: center; }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.venue-grid figure { margin: 0; }
.venue-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.venue-video { margin-top: 3.5rem; }
.video-frame { position: relative; max-width: 900px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); box-shadow: 0 10px 30px rgba(58,56,51,0.12); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cap { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin: 0.8rem auto 0; font-style: italic; font-family: var(--display); font-size: 1.05rem; }
.venue-links { margin-top: 3.5rem; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto; }
.link-card { position: relative; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 2.4rem 1.1rem 1.2rem; text-decoration: none; color: var(--ink); transition: border-color 0.15s ease, transform 0.15s ease; }
.link-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.link-card .lc-label { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--pine); line-height: 1.2; }
.link-card .lc-note { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.25rem; }
.link-card .lc-arrow { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 1.1rem; }

/* --- Scroll cue (Save the Date) ----------------------------- */
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin: 3rem auto 0; text-decoration: none; color: var(--gold); width: max-content; }
.scroll-cue-text { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; }
.scroll-cue-arrows { display: flex; flex-direction: column; align-items: center; height: 42px; }
.scroll-cue-arrows i { display: block; width: 14px; height: 14px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); margin-top: -6px; opacity: 0.35; animation: cue 1.8s ease-in-out infinite; }
.scroll-cue-arrows i:nth-child(2) { animation-delay: 0.25s; }
.scroll-cue-arrows i:nth-child(3) { animation-delay: 0.5s; }
@keyframes cue { 0%, 100% { opacity: 0.25; transform: rotate(45deg) translate(0, 0); } 50% { opacity: 1; transform: rotate(45deg) translate(3px, 3px); } }
.scroll-cue:hover .scroll-cue-text { color: var(--pine); }
