/* Wedding Gallery — Sanjay & Jane. Vanilla, no build step.
   Blush botanical identity ported from the approved mockup. */

:root {
  --ground: #FFFFFF; --surface: #FCFAF9; --surface-2: #F5EFEE; --ink: #1A1717;
  --ink-soft: #5B5350; --neutral: #A29A98; --line: #ECE4E2;
  --blush: #E4A0A2; --blush-soft: #F8E9EA; --rose-deep: #A8555A; --accent: #C97F83;
  --btn-bg: #1A1717; --btn-fg: #FFFFFF;
  --shadow: 0 1px 2px rgba(26,23,23,.04), 0 10px 34px rgba(26,23,23,.07);
  --serif: "Didot", "Bodoni MT", "Hoefler Text", "Playfair Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --serif-body: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1180px; --r: 2px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #17141A; --surface: #201C24; --surface-2: #2A2530; --ink: #F1E9EA;
    --ink-soft: #BCB1B5; --neutral: #8A8188; --line: #322C38;
    --blush: #E7A6A8; --blush-soft: #E7A6A81E; --rose-deep: #EBAEB0; --accent: #E7A6A8;
    --btn-bg: #EBDFE0; --btn-fg: #1A1717;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 42px rgba(0,0,0,.5);
  }
}
:root[data-theme="light"] {
  --ground: #FFFFFF; --surface: #FCFAF9; --surface-2: #F5EFEE; --ink: #1A1717;
  --ink-soft: #5B5350; --neutral: #A29A98; --line: #ECE4E2;
  --blush: #E4A0A2; --blush-soft: #F8E9EA; --rose-deep: #A8555A; --accent: #C97F83;
  --btn-bg: #1A1717; --btn-fg: #FFFFFF;
  --shadow: 0 1px 2px rgba(26,23,23,.04), 0 10px 34px rgba(26,23,23,.07);
}
:root[data-theme="dark"] {
  --ground: #17141A; --surface: #201C24; --surface-2: #2A2530; --ink: #F1E9EA;
  --ink-soft: #BCB1B5; --neutral: #8A8188; --line: #322C38;
  --blush: #E7A6A8; --blush-soft: #E7A6A81E; --rose-deep: #EBAEB0; --accent: #E7A6A8;
  --btn-bg: #EBDFE0; --btn-fg: #1A1717;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 42px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--serif-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; transition: background .5s ease, color .5s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--rose-deep); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; margin: 0; }
.eyebrow { font-family: var(--serif); text-transform: uppercase; letter-spacing: .32em; font-size: 12px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.divider-mini { width: 54px; height: 1px; background: var(--blush); margin: 22px 0; }

/* Botanical sprig */
.sprig { position: absolute; opacity: .9; pointer-events: none; z-index: 0;
  background-repeat: no-repeat; background-size: contain; }
:root[data-theme="dark"] .sprig { opacity: .55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sprig { opacity: .55; } }

/* Monogram */
.monogram { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); }
.monogram b { font-weight: 400; letter-spacing: .04em; }
.monogram .rule { width: 1px; height: 1.25em; background: currentColor; opacity: .55; }

/* Nav */
header.nav { position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(1.3) blur(14px);
  background: color-mix(in srgb, var(--ground) 84%, transparent); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: baseline; gap: 13px; text-decoration: none; }
.brand .monogram { font-size: 22px; color: var(--ink); }
.brand small { font-family: var(--serif); text-transform: uppercase; letter-spacing: .22em; font-size: 10px; color: var(--neutral); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-family: var(--serif); text-transform: uppercase; letter-spacing: .16em; font-size: 12px;
  color: var(--ink-soft); text-decoration: none; position: relative; padding: 5px 0; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -1px; height: 1px; background: var(--blush); transition: right .3s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.theme-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 15px; display: grid; place-items: center; transition: border-color .2s, transform .2s; }
.theme-toggle:hover { border-color: var(--blush); transform: rotate(-12deg); }
:focus-visible { outline: 2px solid var(--blush); outline-offset: 3px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 40px; height: 40px; border-radius: 8px; cursor: pointer; font-size: 18px; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { position: absolute; top: 100%; right: 12px; left: 12px; z-index: 45; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 14px; border-radius: 8px; }
  .nav-links a::after { display: none; }
  .nav-links a[aria-current="page"], .nav-links a:hover { background: var(--blush-soft); color: var(--ink); }
}

/* Buttons */
.btn { font-family: var(--serif); text-transform: uppercase; letter-spacing: .16em; font-size: 13px;
  border-radius: var(--r); border: 1px solid transparent; cursor: pointer; padding: 13px 24px; text-decoration: none; display: inline-block; text-align: center;
  transition: transform .15s ease, background .2s, box-shadow .2s, color .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blush); color: var(--rose-deep); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-block { width: 100%; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 92px; }
.hero .sprig.tl { top: -14px; left: -26px; width: clamp(150px, 22vw, 280px); height: clamp(210px, 30vw, 380px);
  background-image: url(/img/flower-left.png?v=15); background-position: top left; transform: scaleX(-1); }
.hero .sprig.br { bottom: -18px; right: -26px; width: clamp(170px, 24vw, 320px); height: clamp(230px, 32vw, 420px);
  background-image: url(/img/flower-right.png?v=15); background-position: bottom right; transform: scaleX(-1); }
.hero-in { position: relative; z-index: 2; }
.hero-mast { text-align: center; margin-bottom: 50px; }
/* Hero wedding artwork (couple's own line-art on transparent PNG). */
.hero-art { display: block; margin-left: auto; margin-right: auto; height: auto; max-width: 100%; }
.hero-monogram { width: clamp(116px, 15vw, 168px); margin-bottom: 22px; }
.hero-wordmark { width: clamp(240px, 44vw, 470px); margin-bottom: 18px; }
.hero-date { width: clamp(210px, 38vw, 400px); }
/* Line-art is black on transparent — invert it for dark backgrounds. */
:root[data-theme="dark"] .hero-art { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-art { filter: invert(1); } }
:root[data-theme="light"] .hero-art { filter: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; margin-top: 12px; }
.hero-lead { font-family: var(--serif); font-size: clamp(23px, 3.1vw, 32px); line-height: 1.28; }
.hero-lead em { font-style: italic; color: var(--rose-deep); }
.hero-sub { margin-top: 16px; max-width: 46ch; font-size: 17px; color: var(--ink-soft); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 30px; } }

/* Find-yourself card */
.find-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 30px; box-shadow: var(--shadow); }
.find-card h3 { font-size: 25px; margin-bottom: 8px; }
.find-card p { margin: 0 0 20px; font-size: 15px; color: var(--ink-soft); font-family: var(--sans); }
.selfie-drop { display: flex; gap: 14px; align-items: center; border: 1.5px dashed var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 16px; cursor: pointer; transition: border-color .3s, background .3s; }
.selfie-drop:hover { border-color: var(--blush); background: var(--blush-soft); }
.selfie-thumb { width: 52px; height: 52px; border-radius: 50%; flex: none; overflow: hidden; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--surface-2); }
.selfie-thumb img { width: 100%; height: 100%; object-fit: cover; }
.selfie-drop div { font-size: 13px; line-height: 1.45; font-family: var(--sans); }
.selfie-drop strong { font-weight: 600; color: var(--ink); }
.consent { display: flex; gap: 9px; align-items: flex-start; margin-top: 15px; font-size: 12px; color: var(--neutral); font-family: var(--sans); }
.consent input { margin-top: 3px; accent-color: var(--rose-deep); }

/* Sections */
section.band { padding: 88px 0; position: relative; }
.band-head { max-width: 62ch; margin: 0 auto 44px; text-align: center; }
.band-head .eyebrow { display: block; margin-bottom: 14px; }
.band-head h2 { font-size: clamp(29px, 4.4vw, 44px); line-height: 1.08; }
.band-head p { margin: 16px auto 0; font-size: 18px; color: var(--ink-soft); max-width: 56ch; }
.band-head .divider-mini { margin: 20px auto 0; }
.surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 15px 20px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); margin-bottom: 26px; }
.toolbar .status { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral); transition: background .3s; }
.dot.on { background: var(--rose-deep); box-shadow: 0 0 0 4px var(--blush-soft); }
.spacer { flex: 1; }
.count-pill { font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 100px; background: var(--blush-soft); color: var(--rose-deep); }

/* Grid + tiles */
/* The gallery/videos grids get a much wider container than the reading-width
   hero + nav, so the thumbnails fill the screen instead of sitting small in a
   narrow column. Scoped via :has so only wraps that contain a grid widen. */
.wrap:has(> .grid) { max-width: 1560px; padding: 0 20px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } .wrap:has(> .grid), .wrap { padding: 0 8px; } .band-head { margin-bottom: 26px; } section.band { padding: 40px 0; } }

/* Paginated gallery footer: "x–y of N" count + numbered pager. */
.grid-foot { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.grid-count { font-family: var(--sans); font-size: 13px; letter-spacing: .04em; color: var(--neutral); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.pager-btn { min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-family: var(--sans); font-size: 14px; border-radius: 4px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.pager-btn:hover:not(:disabled):not(.active) { border-color: var(--blush); color: var(--rose-deep); }
.pager-btn.active { background: var(--rose-deep); border-color: var(--rose-deep); color: #fff; cursor: default; }
.pager-btn:disabled { opacity: .38; cursor: default; }
.pager-gap { padding: 0 4px; color: var(--neutral); font-family: var(--sans); }
@media (max-width: 560px) { .pager-btn { min-width: 36px; height: 36px; font-size: 13px; } }
.tile { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 4/5; background: var(--surface-2); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .5s, opacity .5s; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; font-family: var(--sans); font-size: 12px; color: #fff;
  background: linear-gradient(to top, rgba(20,14,14,.72), transparent); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.tile:hover { transform: translateY(-4px); }
.tile:hover .cap { opacity: 1; transform: none; }
.tile .badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 100px; background: var(--blush); color: #3d2022; }
.tile .heart { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: none; cursor: pointer; font-size: 14px;
  background: rgba(20,14,14,.32); color: #fff; backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s, transform .2s, background .2s; }
.tile:hover .heart { opacity: 1; }
.tile .heart:hover { transform: scale(1.15); }
.tile .heart.faved { background: var(--rose-deep); opacity: 1; }
/* Touch devices have no hover, so the grid heart would be an invisible tap-trap.
   Hide it there — favouriting happens in the lightbox instead. */
@media (hover: none) { .tile .heart { display: none; } }
.tile .vbadge { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 11px; font-weight: 600; color: #fff;
  padding: 5px 10px; border-radius: 100px; background: rgba(20,14,14,.5); backdrop-filter: blur(4px); font-variant-numeric: tabular-nums; }
.tile .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; z-index: 2; border-radius: 50%; display: grid; place-items: center; pointer-events: none;
  background: rgba(20,14,14,.42); border: 1.5px solid rgba(255,255,255,.8); color: #fff; backdrop-filter: blur(2px); transition: background .25s, border-color .25s; }
.tile:hover .play { background: var(--rose-deep); border-color: var(--rose-deep); }
.tile .play svg { width: 20px; height: 20px; margin-left: 3px; }
.matched .tile:not(.me) { opacity: .26; filter: grayscale(.65); }

/* Story */
.chapter { display: grid; grid-template-columns: 210px 1fr; gap: 44px; padding: 44px 0; align-items: start; }
.chapter-label { position: sticky; top: 110px; }
.chapter-num { font-family: var(--serif); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--rose-deep); }
.chapter-label h3 { font-size: 31px; margin: 10px 0 8px; line-height: 1.05; }
.chapter-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.chapter-photos .tile:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.chapter + .chapter { border-top: 1px solid var(--line); }
@media (max-width: 800px) { .chapter { grid-template-columns: 1fr; gap: 18px; } .chapter-label { position: static; } .chapter-photos { grid-template-columns: repeat(2, 1fr); } .chapter-photos .tile:first-child { grid-column: span 2; } }

/* Prints */
.print-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.frame { background: var(--ground); padding: 26px; border-radius: 1px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.frame .mat { background: var(--surface); padding: 24px; border: 1px solid var(--line); }
.frame .art { aspect-ratio: 4/5; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.frame figcaption { text-align: center; font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 15px; margin-top: 16px; }
.price { font-family: var(--serif); font-size: 42px; }
.price small { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--neutral); }
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.opt { font-family: var(--sans); font-size: 13.5px; padding: 9px 16px; border-radius: 100px; border: 1px solid var(--line); background: var(--ground); color: var(--ink-soft); cursor: pointer; transition: all .2s; }
.opt[aria-pressed="true"] { border-color: var(--blush); color: var(--rose-deep); background: var(--blush-soft); font-weight: 600; }
.opt:hover { border-color: var(--blush); }
.label-row { font-family: var(--serif); font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--neutral); margin: 22px 0 4px; }
.print-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.fulfil { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 12.5px; color: var(--neutral); font-family: var(--sans); }
.fulfil .b { width: 6px; height: 6px; border-radius: 50%; background: var(--blush); }
@media (max-width: 820px) { .print-grid { grid-template-columns: 1fr; gap: 34px; } }

/* Footer */
footer { padding: 56px 0 80px; border-top: 1px solid var(--line); text-align: center; }
footer .monogram { font-size: 34px; color: var(--ink); justify-content: center; margin-bottom: 12px; }
footer .names { font-family: var(--serif); text-transform: uppercase; letter-spacing: .24em; font-size: 14px; color: var(--ink-soft); }
.foot-note { font-family: var(--sans); font-size: 12.5px; color: var(--neutral); max-width: 46ch; margin: 20px auto 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20,14,14,.62); backdrop-filter: blur(10px); }
.lightbox.open { display: flex; }
.lb-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); max-width: 1020px; width: 100%; max-height: 92vh; overflow: hidden; display: grid; grid-template-columns: 1.35fr .65fr; }
.lb-media { position: relative; background: #0c0809; min-height: 220px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-media img, .lb-media video { width: auto; height: auto; max-width: 100%; max-height: 86vh; object-fit: contain; display: block; }
.lb-close { position: absolute; top: 14px; right: 14px; z-index: 4; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; font-size: 19px; background: rgba(20,14,14,.42); color: #fff; backdrop-filter: blur(4px); display: grid; place-items: center; transition: background .2s, transform .2s; }
.lb-close:hover { background: var(--rose-deep); transform: rotate(90deg); }
.lb-side { padding: 32px; display: flex; flex-direction: column; }
.lb-kind { font-family: var(--serif); text-transform: uppercase; letter-spacing: .22em; font-size: 11px; color: var(--rose-deep); }
.lb-side h3 { font-size: 28px; margin: 12px 0 6px; }
.lb-side .meta { font-family: var(--sans); font-size: 13px; color: var(--neutral); }
.lb-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 26px; }
.lb-note { font-family: var(--sans); font-size: 12px; color: var(--neutral); margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; }
.lb-note .b { width: 6px; height: 6px; border-radius: 50%; background: var(--blush); margin-top: 6px; flex: none; }
@media (max-width: 780px) { .lb-panel { grid-template-columns: 1fr; max-height: 94vh; overflow-y: auto; } .lb-media { min-height: 240px; } .lb-media img, .lb-media video { max-height: 70vh; } }

/* Toast + states */
/* Selfie source chooser (bottom sheet on mobile, centered card on desktop) */
.sheet-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(20,14,14,.5); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
@media (min-width: 560px) { .sheet-overlay { align-items: center; } }

.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(24px); background: var(--ink); color: var(--ground); font-family: var(--sans); font-size: 14px; padding: 13px 22px; border-radius: 100px; box-shadow: var(--shadow); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.state { text-align: center; padding: 80px 20px; color: var(--ink-soft); font-family: var(--sans); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--blush); border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.gate { max-width: 460px; margin: 12vh auto; text-align: center; padding: 0 24px; }
.gate .monogram { font-size: 48px; justify-content: center; margin-bottom: 18px; color: var(--ink); }
