/* =========================================================================
   twilek.hu — static photo gallery
   Editorial base + two switchable themes (wedding / family) driven by the
   [data-theme] attribute on <html>.
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  --ink:        #1a1a1e;   /* primary text                 */
  --ink-soft:   #54565f;   /* secondary text               */
  --ink-faint:  #8b8d97;   /* captions / hairline text     */
  --paper:      #f6f4f1;   /* page background              */
  --paper-2:    #efebe5;   /* deeper panel                 */
  --card:       #ffffff;   /* card surface                 */
  --line:       #e6e1d9;   /* hairline rule                */
  --line-soft:  #efeae3;

  /* accent — overridden per theme */
  --accent:     #9a6a4f;
  --accent-2:   #c79a76;
  --accent-ink: #ffffff;   /* text on accent               */
  --glow:       rgba(154,106,79,.14);
  --glow-2:     rgba(199,154,118,.10);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1240px;
  --gutter: clamp(18px, 5vw, 60px);
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(20,20,30,.05), 0 4px 14px rgba(20,20,30,.06);
  --shadow-md: 0 6px 16px rgba(20,20,30,.08), 0 20px 46px rgba(20,20,30,.12);
  --shadow-lg: 0 10px 24px rgba(20,20,30,.12), 0 44px 88px rgba(20,20,30,.18);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---- Theme: HOME (neutral, slate/sand) -------------------------------- */
[data-theme="home"] {
  --accent:     #3f6f86;
  --accent-2:   #cf9b5f;
  --accent-ink: #ffffff;
  --glow:       rgba(63,111,134,.13);
  --glow-2:     rgba(207,155,95,.10);
}

/* ---- Theme: WEDDING (romantic warm) ----------------------------------- */
[data-theme="wedding"] {
  --ink:      #2a2025;
  --ink-soft: #6a5b60;
  --paper:    #f8f2ee;
  --paper-2:  #f1e6df;
  --card:     #fffdfb;
  --line:     #ecdcd2;
  --line-soft:#f3e7df;
  --accent:   #b06a73;   /* dusty rose */
  --accent-2: #d7ab86;   /* champagne  */
  --accent-ink:#ffffff;
  --glow:     rgba(176,106,115,.16);
  --glow-2:   rgba(215,171,134,.12);
}

/* ---- Theme: FAMILY / SEASIDE (bright coastal) ------------------------- */
[data-theme="family"] {
  --ink:      #0d2a38;
  --ink-soft: #3e5a68;
  --paper:    #f1f5f6;
  --paper-2:  #e3edef;
  --card:     #ffffff;
  --line:     #d6e3e6;
  --line-soft:#e6eff1;
  --accent:   #1f7a93;   /* adriatic teal-blue */
  --accent-2: #e0a341;   /* sand / golden hour */
  --accent-ink:#ffffff;
  --glow:     rgba(31,122,147,.15);
  --glow-2:   rgba(224,163,65,.12);
}

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color .5s var(--ease), color .5s var(--ease);
  animation: page-fade .8s var(--ease) both;
}
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }

/* atmospheric wash + faint film grain for a printed-album feel */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 80% at 88% -8%, var(--glow), transparent 55%),
    radial-gradient(90% 70% at 4% 0%, var(--glow-2), transparent 52%);
  transition: background .6s var(--ease);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="wedding"] body::before {
  background:
    url('assets/bg-wedding.svg') right bottom / clamp(300px, 44vmin, 520px) no-repeat,
    radial-gradient(120% 80% at 88% -8%, var(--glow), transparent 55%),
    radial-gradient(90% 70% at 4% 0%, var(--glow-2), transparent 52%);
}
[data-theme="family"] body::before {
  background:
    url('assets/bg-beach.svg') center bottom / min(1400px, 100%) auto no-repeat,
    radial-gradient(120% 80% at 88% -8%, var(--glow), transparent 55%),
    radial-gradient(90% 70% at 4% 0%, var(--glow-2), transparent 52%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 460; line-height: 1.08; letter-spacing: -.01em; }
em { font-style: italic; color: var(--accent); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ====================== HEADER ====================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .5s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header .nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 18px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand--static { cursor: default; pointer-events: none; }
/* shared (standalone) album view: no crumb, so give the cover top air */
.shared-mode .album-view > .wrap > .album-cover { margin-top: clamp(20px, 4vw, 40px); }
.album-welcome {
  text-align: center; font-family: var(--font-display); font-style: italic;
  font-size: 1.1rem; color: var(--accent); padding: 14px 0 4px;
  opacity: 0; animation: rise .8s var(--ease) .1s forwards;
}
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name { font-family: var(--font-display); font-size: 1.32rem; letter-spacing: -.01em; }
.brand-name b { font-weight: 600; }
.brand-name .dot { color: var(--accent); }

/* ---- Language switcher ---- */
.nav-tools { display: flex; align-items: center; gap: 12px; }
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600; font-size: .9rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.lang-btn:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.lang-btn .flag { width: 1.3em; height: 0.975em; vertical-align: middle; }
.lang-btn .cur { text-transform: uppercase; letter-spacing: .04em; }
.lang-btn svg { color: var(--ink-faint); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 188px; padding: 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md);
  display: none; flex-direction: column; gap: 2px; z-index: 60;
}
.lang.open .lang-menu { display: flex; animation: pop .16s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lang-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; width: 100%; text-align: left;
  font-size: .94rem; transition: background .15s var(--ease);
}
.lang-menu button:hover { background: var(--paper-2); }
.lang-menu button[aria-current="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.lang-menu .flag { width: 1.4em; height: 1.05em; flex-shrink: 0; }
.lang-menu .code { margin-left: auto; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }

/* ====================== APP / shared ====================== */
#app { flex: 1 0 auto; }
.view { padding-bottom: clamp(48px, 9vw, 110px); }

.loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 50vh; color: var(--ink-soft); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.state-msg { min-height: 44vh; display: grid; place-content: center; text-align: center; color: var(--ink-soft); gap: 16px; }
.state-msg h2 { font-size: 1.5rem; color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn--solid { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn--solid:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { border: 1px solid var(--line); background: var(--card); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* back link */
.crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .9rem; color: var(--ink-soft);
  padding: 8px 0; transition: color .2s var(--ease), gap .2s var(--ease);
}
.crumb:hover { color: var(--accent); gap: 11px; }
.crumb svg { transition: transform .2s var(--ease); }
.crumb:hover svg { transform: translateX(-3px); }

/* section head */
.view-head { padding-top: clamp(26px, 5vw, 56px); }
.view-head h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); }
.view-head .lead { color: var(--ink-soft); max-width: 60ch; margin-top: 12px; font-size: 1.06rem; }
.view-head .meta-line { color: var(--ink-faint); font-size: .92rem; margin-top: 14px; font-weight: 500; }

/* ====================== HOME ====================== */
.home-hero { padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(28px, 5vw, 56px); }
.home-hero h1 { font-size: clamp(2.4rem, 6.6vw, 4.6rem); max-width: 16ch; }
.home-hero .lead { color: var(--ink-soft); max-width: 56ch; margin-top: 18px; font-size: 1.12rem; }

.cat-grid {
  display: grid; gap: clamp(18px, 3vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}
.cat-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 5 / 4;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  isolation: isolate;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); z-index: -2; }
.cat-card:hover .cat-card__img { transform: scale(1.05); }
.cat-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,12,16,.06) 0%, rgba(10,12,16,.12) 42%, rgba(10,12,16,.74) 100%);
}
.cat-card__body { position: absolute; inset: auto 0 0 0; padding: clamp(22px, 3vw, 34px); color: #fff; }
.cat-card__tag { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.cat-card__body h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: #fff; margin: 8px 0 6px; }
.cat-card__body p { color: rgba(255,255,255,.86); font-size: .98rem; max-width: 42ch; }
.cat-card__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; font-size: .92rem; }
.cat-card__go svg { transition: transform .2s var(--ease); }
.cat-card:hover .cat-card__go svg { transform: translateX(4px); }
.cat-card__count {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-size: .78rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ====================== CATEGORY (album list) ====================== */
.album-grid {
  margin-top: clamp(28px, 4vw, 46px);
  display: grid; gap: clamp(16px, 2.4vw, 26px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
}
.album-card {
  display: block; background: var(--card);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.album-card__art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.album-card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .45s var(--ease); }
.album-card__peek { position: absolute; inset: 0; z-index: 0; opacity: 0; }
.album-card__art img:not(.album-card__peek) { position: relative; z-index: 1; }
.album-card:hover .album-card__art img:not(.album-card__peek) { opacity: 0; transform: scale(1.06); }
.album-card:hover .album-card__peek { opacity: 1; }
.album-card__year {
  position: absolute; top: 12px; left: 12px; z-index: 3;   /* stay above the zooming cover */
  background: color-mix(in srgb, var(--accent) 92%, black 0%); color: var(--accent-ink);
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; padding: 5px 11px; border-radius: 999px;
}
.album-card__body { padding: 16px 18px 18px; }
.album-card__body h3 { font-size: 1.28rem; font-weight: 500; }
.album-card__body .count { display: block; margin-top: 5px; color: var(--ink-faint); font-size: .88rem; font-weight: 500; }

/* ---- category booking call-to-action band -------------------------- */
.cta-band {
  margin-top: clamp(44px, 7vw, 88px);
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(20px, 4vw, 40px); flex-wrap: wrap;
  padding: clamp(26px, 4vw, 46px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.cta-band__text { flex: 1 1 360px; min-width: 0; }
.cta-band__text h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.cta-band__text p { color: var(--ink-soft); margin-top: 10px; max-width: 60ch; }
.cta-band .btn { flex-shrink: 0; }
.cta-band .btn svg { opacity: .85; }

/* ====================== ALBUM (photos) ====================== */
.album-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }

.photo-grid {
  --photo-gap: 26px;
  margin-top: clamp(28px, 4vw, 50px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  grid-auto-rows: 1px;          /* JS sets each figure's row span from its aspect ratio */
  column-gap: var(--photo-gap);
  row-gap: 0;                   /* vertical gap is baked into the span via figure padding */
  align-items: start;
}
.photo-grid figure {
  margin: 0;
  padding-bottom: var(--photo-gap);   /* the vertical gutter */
  position: relative;
}
.photo-grid figure > span {
  display: block;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(90deg, var(--paper-2) 0%, rgba(255,255,255,.38) 50%, var(--paper-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  box-shadow: var(--shadow-sm);
  /* scroll-reveal: slide + fade + settle (delay set per-photo by JS via --rd) */
  opacity: 0;
  transform: translateY(38px) scale(.965);
  transition: opacity .85s var(--ease), transform .9s var(--ease), box-shadow .4s var(--ease);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}
.photo-grid figure.in > span { opacity: 1; transform: none; }
.photo-grid figure > span:hover { box-shadow: var(--shadow-md); }
.photo-grid img {
  width: 100%; height: auto; display: block;
  transition: transform .9s var(--ease);
}
.photo-grid figure > span:hover img { transform: scale(1.045); }

/* heart favourite button on each photo */
.photo-heart {
  position: absolute; bottom: calc(var(--photo-gap) + 8px); right: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.38); color: #fff;
  opacity: 0;
  transition: opacity .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.photo-grid figure:hover .photo-heart,
.photo-heart.active { opacity: 1; }
.photo-heart.active { color: #e85555; background: rgba(255,255,255,.92); }
.photo-heart:hover { background: rgba(0,0,0,.6); transform: scale(1.12); }
.photo-heart.active:hover { background: rgba(255,255,255,.7); }

/* share button */
.share-btn { display: inline-flex; align-items: center; gap: 8px; }

/* =========================================================================
   MOTION & ALBUM-COVER ENHANCEMENTS
   ========================================================================= */

/* ---- staggered entrance for view headers --------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.view-head > *, .home-hero > * { opacity: 0; animation: rise .8s var(--ease) forwards; }
.view-head > *:nth-child(1), .home-hero > *:nth-child(1) { animation-delay: .06s; }
.view-head > *:nth-child(2), .home-hero > *:nth-child(2) { animation-delay: .15s; }
.view-head > *:nth-child(3), .home-hero > *:nth-child(3) { animation-delay: .24s; }
.view-head > *:nth-child(4), .home-hero > *:nth-child(4) { animation-delay: .33s; }
.view-head > *:nth-child(5), .home-hero > *:nth-child(5) { animation-delay: .42s; }

/* ---- generic scroll-reveal (cards, cover) -------------------------- */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .85s var(--ease);
  transition-delay: var(--rd, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ---- decorative flourish under headings ---------------------------- */
[data-theme="wedding"] .view-head h1::after,
[data-theme="wedding"] .home-hero h1::after,
[data-theme="wedding"] .album-cover h1::after {
  content: ""; display: block; width: 58px; height: 2px; margin-top: 20px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}
[data-theme="family"] .view-head h1::after,
[data-theme="family"] .home-hero h1::after,
[data-theme="family"] .album-cover h1::after {
  content: ""; display: block; width: 44px; height: 3px; margin-top: 18px;
  background: var(--accent-2); border-radius: 3px;
}
.album-cover h1::after { background: rgba(255,255,255,.85) !important; }

/* ---- ALBUM COVER (turns an album into a real "album", not a list) -- */
.album-view .crumb { margin-top: clamp(18px, 4vw, 38px); }
.album-cover {
  position: relative; isolation: isolate;
  margin-top: 14px;
  height: clamp(360px, 68vh, 720px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.album-cover__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.09);
  animation: kenburns 14s var(--ease) forwards;
}
@keyframes kenburns { to { transform: scale(1); } }
.album-cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14,11,13,.22) 0%, rgba(14,11,13,.18) 50%, rgba(14,11,13,.84) 100%);
}
.album-cover__inner {
  position: absolute; inset: auto 0 0 0;
  padding: clamp(24px, 5vw, 58px);
  color: #fff;
}
.album-cover__inner > * { opacity: 0; animation: rise .9s var(--ease) forwards; }
.album-cover__inner > *:nth-child(1) { animation-delay: .28s; }
.album-cover__inner > *:nth-child(2) { animation-delay: .42s; }
.album-cover__inner > *:nth-child(3) { animation-delay: .56s; }
.album-cover__inner > *:nth-child(4) { animation-delay: .68s; }
.album-cover__eyebrow {
  display: inline-block; font-weight: 600; font-size: .74rem;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.86);
}
.album-cover h1 {
  color: #fff; font-size: clamp(2.1rem, 6vw, 5.2rem); line-height: 1.02; font-weight: 300;
  text-shadow: 0 4px 40px rgba(0,0,0,.38);
}
[data-theme="wedding"] .album-cover h1 { font-style: italic; }
.album-cover__meta { margin-top: 14px; font-weight: 500; color: rgba(255,255,255,.9); letter-spacing: .02em; }
.album-cover__date {
  display: block; font-family: var(--font-display); font-style: italic;
  font-size: clamp(1rem, 2vw, 1.35rem); color: rgba(255,255,255,.88); margin-top: 6px;
}
.album-share-row {
  position: absolute; top: clamp(15px, 3vw, 26px); right: clamp(15px, 3vw, 26px); z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.album-cover__share {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  color: var(--accent-ink); background: var(--accent);
  border: 1px solid transparent; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
  opacity: 0; animation: pop .5s var(--ease) .8s forwards;
}
.album-cover__share:hover { filter: brightness(1.12); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.album-cover__social {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 999px;
  color: #fff; background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.34);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .2s var(--ease), transform .2s var(--ease);
  opacity: 0; animation: pop .5s var(--ease) .95s forwards;
}
.album-cover__social:hover { background: rgba(255,255,255,.3); transform: translateY(-2px); }
.album-share-row > *:nth-child(3) { animation-delay: 1.05s; }
.album-share-row > *:nth-child(4) { animation-delay: 1.15s; }
/* ---- wedding ornament divider (rings) ------------------------------ */
.album-ornament { display: none; }
[data-theme="wedding"] .album-ornament,
[data-theme="family"] .album-ornament {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  margin: clamp(48px, 7vw, 80px) auto 0;
  color: var(--accent);
}
[data-theme="wedding"] .album-ornament::before,
[data-theme="wedding"] .album-ornament::after,
[data-theme="family"] .album-ornament::before,
[data-theme="family"] .album-ornament::after {
  content: ""; height: 1px; width: min(150px, 24vw);
}
[data-theme="wedding"] .album-ornament::before,
[data-theme="family"] .album-ornament::before { background: linear-gradient(90deg, transparent, var(--accent-2)); }
[data-theme="wedding"] .album-ornament::after,
[data-theme="family"] .album-ornament::after  { background: linear-gradient(90deg, var(--accent-2), transparent); }
[data-theme="wedding"] .album-ornament svg,
[data-theme="family"] .album-ornament svg { opacity: .9; }

/* scroll cue */
.album-cover__cue {
  position: absolute; left: 50%; bottom: 16px; z-index: 2;
  transform: translateX(-50%); color: rgba(255,255,255,.8);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  opacity: 0;
  animation: bob-fade 8s var(--ease) 2.5s 1 both;
}
.album-cover__cue-label {
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.65);
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }
@keyframes bob-fade {
  0%   { opacity: 0; transform: translate(-50%, 0); }
  12%  { opacity: 1; }
  25%  { transform: translate(-50%, 7px); }
  38%  { transform: translate(-50%, 0); }
  50%  { transform: translate(-50%, 7px); }
  62%  { transform: translate(-50%, 0); }
  75%  { transform: translate(-50%, 7px); }
  88%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* ====================== FOOTER ====================== */
.site-footer {
  flex-shrink: 0; margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding-block: 30px;
  text-align: center;
}
.site-footer .foot-net { font-size: 1.02rem; font-weight: 500; }
.site-footer .foot-net a { color: var(--accent); font-weight: 700; transition: opacity .2s var(--ease); }
.site-footer .foot-net a:hover { opacity: .7; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .foot-rights { margin-top: 8px; color: var(--ink-faint); font-size: .85rem; }

/* ====================== LIGHTBOX ====================== */
.photo-grid figure > span { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; place-items: center;
  background: rgba(14, 11, 13, .93);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.lightbox.open { display: grid; opacity: 1; }
.lb-stage { margin: 0; display: grid; place-items: center; max-width: 100vw; max-height: 100vh; }
.lb-img {
  max-width: 92vw; max-height: 88vh; width: auto; height: auto;
  border-radius: 4px; box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  cursor: default;
}
.lightbox.open .lb-img { animation: lb-in .34s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
.lb-close, .lb-nav {
  position: fixed; z-index: 2;
  display: grid; place-items: center;
  color: #fff; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 999px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: 18px; right: 20px; width: 46px; height: 46px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 64px; height: 64px; opacity: .45; transition: background .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease); }
.lb-nav:hover { transform: translateY(-50%) scale(1.06); opacity: 1; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-counter {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 4;
  color: rgba(255, 255, 255, .9); font-size: .9rem; font-weight: 500; letter-spacing: .06em;
  background: rgba(0, 0, 0, .3); padding: 6px 14px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
/* heart button in lightbox */
.lb-heart {
  position: fixed; bottom: 88px; right: 20px; z-index: 4;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.26);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.lb-heart:hover { background: rgba(255,255,255,.26); transform: scale(1.08); }
.lb-heart.active { color: #e85555; }
/* filmstrip */
.lb-strip {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 3;
  display: flex; gap: 4px; padding: 8px 12px 10px;
  overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  -webkit-overflow-scrolling: touch;
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-thumb {
  flex-shrink: 0; width: 56px; height: 56px;
  border-radius: 6px; overflow: hidden;
  border: 2px solid transparent; opacity: .48;
  transition: opacity .2s var(--ease), border-color .2s var(--ease);
  background: rgba(255,255,255,.08); padding: 0;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.lb-thumb.active { border-color: #fff; opacity: 1; }
.lb-thumb:not(.active):hover { opacity: .8; }
@media (max-width: 640px) {
  .lb-nav { width: 48px; height: 48px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
  .lb-img { max-width: 96vw; max-height: 82vh; }
}

/* ====================== QR MODAL ====================== */
.qr-modal {
  position: fixed; inset: 0; z-index: 250;
  display: none; place-items: center;
  background: rgba(14,11,13,.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 20px;
}
.qr-modal.open { display: grid; animation: lb-in .22s var(--ease); }
.qr-modal__box {
  position: relative; background: var(--card);
  border-radius: var(--radius-lg); padding: clamp(28px,5vw,44px);
  text-align: center; box-shadow: var(--shadow-lg);
  max-width: 320px; width: 100%;
}
.qr-modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--ink-soft);
  transition: background .15s var(--ease);
}
.qr-modal__close:hover { background: var(--line); }
.qr-modal__title {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.15rem; color: var(--ink); margin-bottom: 18px; font-weight: 460;
}
.qr-modal__img { width: 200px; height: 200px; display: block; margin: 0 auto 14px; border-radius: 8px; }
.qr-modal__url { font-size: .72rem; color: var(--ink-faint); word-break: break-all; }

/* ====================== TOAST ====================== */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .photo-grid {
    --photo-gap: 10px;
    grid-template-columns: repeat(2, 1fr);
  }
  .brand-name { font-size: 1.18rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
