/* =========================================================
   Inalbi — Matrimoni & Cerimonie
   Pure CSS3 · no framework · Tuscan wedding design system
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --ivory:      #FBF7F0;
  --cream:      #F3EBDD;
  --olive:      #6B7255;
  --olive-dk:   #565C44;
  --sage:       #8A9075;
  --gold:       #B08D57;
  --gold-dk:    #9A784A;
  --terracotta: #BE6B4C;
  --ink:        #3B2F2A;
  --ink-soft:   #5A4B42;

  --font-script: "Great Vibes", cursive;
  --font-serif:  "Cormorant Garamond", Georgia, serif;
  --font-sans:   "Jost", system-ui, -apple-system, sans-serif;

  --maxw: 1152px;
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(59, 47, 42, .06);
  --shadow-md: 0 12px 30px rgba(59, 47, 42, .12);
  --shadow-lg: 0 24px 50px rgba(59, 47, 42, .18);
  --ease: 220ms cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 10vw, 130px); }
.section--cream { background: color-mix(in srgb, var(--cream) 60%, var(--ivory)); }
.script { font-family: var(--font-script); color: var(--gold); font-weight: 400; }
.eyebrow { font-family: var(--font-script); font-size: clamp(1.7rem, 3vw, 2rem); color: var(--gold); }
.center { text-align: center; }
.muted { color: var(--ink-soft); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--ivory);
  padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; cursor: pointer; border: 0;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 500;
  padding: 14px 30px; border-radius: 999px;
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn--gold { background: var(--gold); color: var(--ivory); box-shadow: var(--shadow-md); }
.btn--gold:hover { background: var(--gold-dk); }
.btn--olive { background: var(--olive); color: var(--ivory); box-shadow: var(--shadow-sm); padding: 11px 22px; font-size: .95rem; }
.btn--olive:hover { background: var(--ink); }
.btn--ghost { border: 1px solid rgba(251, 247, 240, .7); color: var(--ivory); }
.btn--ghost:hover { background: rgba(251, 247, 240, .12); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(251, 247, 240, .72);
  border-bottom: 1px solid rgba(176, 141, 87, .2);
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; line-height: 1; }
.brand__logo { height: 82px; width: auto; display: block; }
.brand__name { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .25em; }
.brand__tag  { font-size: .6rem; letter-spacing: .35em; text-transform: uppercase; color: var(--gold-dk); }
@media (max-width: 520px) { .brand__logo { height: 66px; } }
.nav__links { display: none; gap: 32px; font-size: .95rem; letter-spacing: .02em; color: var(--ink-soft); }
.nav__links a { transition: color var(--ease); }
.nav__links a:hover { color: var(--gold); }
.nav__right { display: flex; align-items: center; gap: 16px; }
.lang { font-size: .75rem; letter-spacing: .2em; color: var(--ink-soft); transition: color var(--ease); }
.lang:hover { color: var(--gold); }

@media (min-width: 860px) {
  .nav__links { display: flex; }
}

/* ---------- Burger menu (mobile) ---------- */
.nav__toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav__burger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.nav__burger span {
  display: block; width: 24px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform var(--ease), opacity var(--ease);
}

@media (max-width: 859px) {
  .nav__inner { position: relative; }
  .nav__burger { display: flex; }
  .nav__right .btn--olive { display: none; }
  .nav__links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 0 24px;
    background: rgba(251, 247, 240, .97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(176, 141, 87, .2);
    box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden;
    transition: max-height var(--ease), padding var(--ease);
  }
  .nav__links li { border-top: 1px solid rgba(176, 141, 87, .14); }
  .nav__links a { display: block; padding: 16px 2px; }
  .nav__toggle:checked ~ nav .nav__links { max-height: 70vh; padding: 4px 24px 12px; }
  .nav__toggle:checked ~ .nav__right .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle:checked ~ .nav__right .nav__burger span:nth-child(2) { opacity: 0; }
  .nav__toggle:checked ~ .nav__right .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(59,47,42,.5), rgba(59,47,42,.3) 45%, rgba(59,47,42,.62));
}
.hero__content { position: relative; z-index: 2; max-width: 780px; padding: 130px 24px; }
.hero__script { font-family: var(--font-script); font-size: clamp(2.2rem, 6vw, 3.2rem); color: rgba(251,247,240,.96); text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero h1 { margin-top: 12px; color: var(--ivory); font-size: clamp(2.6rem, 7vw, 4.6rem); text-shadow: 0 4px 24px rgba(0,0,0,.4); }
.hero__lead { margin: 24px auto 0; max-width: 620px; color: rgba(251,247,240,.9); font-weight: 300; font-size: clamp(1.05rem, 2.4vw, 1.3rem); }
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---------- Storytelling / Venue ---------- */
.split { display: grid; gap: 56px; align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }
.split h2 { margin-top: 8px; font-size: clamp(2rem, 4vw, 3rem); }
.split p { margin-top: 20px; color: var(--ink-soft); font-size: 1.1rem; }
.split p + p { margin-top: 16px; }

.stats { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stats dt { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 600; color: var(--olive); }
.stats dd { margin: 4px 0 0; font-size: .9rem; color: var(--ink-soft); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo img { border-radius: var(--radius); box-shadow: var(--shadow-md); object-fit: cover; aspect-ratio: 2 / 3; height: auto; width: 100%; }
.duo img:last-child { margin-top: 34px; }

/* ---------- Section heading ---------- */
.head { max-width: 620px; margin-inline: auto; }
.head h2 { margin-top: 8px; font-size: clamp(2rem, 4vw, 3rem); }
.head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Event cards ---------- */
.cards { margin-top: 60px; display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--ivory);
  border: 1px solid rgba(176, 141, 87, .16);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card__icon {
  width: 48px; height: 48px; border-radius: 999px;
  background: rgba(107, 114, 85, .12); color: var(--olive);
  display: flex; align-items: center; justify-content: center;
}
.card h3 { margin-top: 20px; font-size: 1.5rem; }
.card p { margin-top: 8px; color: var(--ink-soft); }

/* ---------- Feature rows ---------- */
.features { margin-top: 60px; display: flex; flex-direction: column; gap: 64px; }
.feature { display: grid; gap: 40px; align-items: center; }
@media (min-width: 820px) { .feature { grid-template-columns: 1fr 1fr; } }
.feature__img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; height: clamp(280px, 40vw, 384px); object-fit: cover; }
.feature h3 { font-size: clamp(1.6rem, 3vw, 2rem); }
.feature p { margin-top: 16px; color: var(--ink-soft); font-size: 1.1rem; }
@media (min-width: 820px) {
  .feature--reverse .feature__media { order: 2; }
  .feature--reverse .feature__text  { order: 1; }
}

/* ---------- Gallery ---------- */
.gallery { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 780px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery img {
  width: 100%; height: 224px; object-fit: cover; border-radius: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: opacity var(--ease), transform var(--ease);
}
.gallery img:hover { opacity: .92; transform: scale(1.01); }
.note { margin-top: 24px; text-align: center; font-size: .85rem; font-style: italic; color: rgba(90, 75, 66, .7); }

/* ---------- CTA / Contact ---------- */
.cta {
  background: var(--olive); color: var(--ivory);
  border-radius: 28px; padding: clamp(40px, 6vw, 64px);
  text-align: center; box-shadow: var(--shadow-lg);
}
.cta__script { font-family: var(--font-script); font-size: clamp(2rem, 5vw, 2.6rem); color: rgba(251,247,240,.96); }
.cta h2 { margin-top: 6px; color: var(--ivory); font-size: clamp(2rem, 4vw, 3rem); }
.cta__lead { margin: 16px auto 0; max-width: 560px; color: rgba(251,247,240,.85); font-size: 1.1rem; }

.form { margin-top: 40px; display: grid; gap: 16px; text-align: left; }
@media (min-width: 620px) { .form { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .85rem; margin-bottom: 6px; color: rgba(251,247,240,.9); }
.field input, .field select, .field textarea {
  font-family: var(--font-sans); font-size: 1rem; color: var(--ink);
  background: rgba(251,247,240,.96); border: 0; border-radius: 10px;
  padding: 12px 16px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; box-shadow: 0 0 0 3px var(--gold);
}
.form__submit { grid-column: 1 / -1; text-align: center; margin-top: 6px; }

/* Honeypot anti-spam: nascosto a schermo ma presente nel DOM per i bot */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consenso privacy */
.form__consent label {
  flex-direction: row; align-items: flex-start; gap: 10px;
  font-size: .9rem; line-height: 1.4; cursor: pointer;
}
.form__consent input[type="checkbox"] { width: auto; margin-top: 3px; flex: 0 0 auto; }
.form__consent a { text-decoration: underline; }

/* Errori di validazione per singolo campo */
.field--error input, .field--error select, .field--error textarea {
  box-shadow: 0 0 0 2px #c0392b;
}
.field__error { margin-top: 6px; font-size: .8rem; color: #ffb4a2; }
.contact-card .field__error { color: #c0392b; }

/* Stati del messaggio di esito */
.form-status--ok { color: var(--gold); }
.form-status--error { color: #ffb4a2; }
.contact-card ~ .form-status--error,
.contact-card .form-status--error { color: #c0392b; }

.contacts { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; font-size: .95rem; color: rgba(251,247,240,.9); }
.contacts a { display: inline-flex; align-items: center; gap: 8px; transition: color var(--ease); }
.contacts a:hover { color: var(--gold); }
.contacts svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(251,247,240,.8); }
.footer__grid { display: grid; gap: 40px; padding-block: 56px; }
@media (min-width: 780px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer__name { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .25em; color: var(--ivory); }
.footer p { margin-top: 12px; font-size: .9rem; color: rgba(251,247,240,.6); }
/* Su sfondo scuro la .muted (var(--ink-soft)) sarebbe illeggibile: usa una tinta chiara conforme AA */
.footer .muted { color: rgba(251,247,240,.75); }
.footer h4 { color: var(--ivory); font-size: 1.15rem; }
.footer ul { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.footer a { transition: color var(--ease); }
.footer a:hover { color: var(--gold); }
.footer__meta { border-top: 1px solid rgba(251,247,240,.1); }
.footer__meta p { text-align: center; padding-block: 22px; font-size: .75rem; color: rgba(251,247,240,.4); }
/* I link del meta devono distinguersi dal testo tenue: più chiari e sottolineati */
.footer__meta a { color: rgba(251,247,240,.85); text-decoration: underline; text-underline-offset: 2px; }
.footer__meta a:hover { color: var(--gold); }
/* Su tablet/smartphone il pulsante float (.to-top) copre il meta: aggiungiamo spazio sotto */
@media (max-width: 780px) { .footer__meta p { padding-bottom: 88px; } }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Sub-pages (SEO landing pages)
   ========================================================= */

/* Compact hero for inner pages */
.subhero {
  position: relative;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 62vh; padding-top: 80px; overflow: hidden;
}
.subhero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.subhero__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(59,47,42,.55), rgba(59,47,42,.65)); }
.subhero__content { position: relative; z-index: 2; max-width: 820px; padding: 56px 24px; }
.subhero__eyebrow { font-family: var(--font-script); font-size: clamp(1.8rem, 4vw, 2.4rem); color: rgba(251,247,240,.96); }
.subhero h1 { margin-top: 8px; color: var(--ivory); font-size: clamp(2.2rem, 5.5vw, 3.6rem); text-shadow: 0 4px 24px rgba(0,0,0,.4); }
.subhero__sub { margin-top: 14px; color: rgba(251,247,240,.85); font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; }

/* Breadcrumb */
.crumbs { background: var(--cream); border-bottom: 1px solid rgba(176,141,87,.18); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; padding-block: 12px; padding-inline: 0; list-style: none; font-size: .82rem; color: var(--ink-soft); }
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "›"; color: var(--gold); }
.crumbs a { transition: color var(--ease); }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* Prose article */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { margin-top: 44px; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.prose h3 { margin-top: 32px; font-size: 1.4rem; color: var(--olive-dk); }
.prose p { margin-top: 18px; color: var(--ink-soft); font-size: 1.12rem; }
.prose p:first-of-type { font-size: 1.2rem; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul.ticks { margin-top: 20px; display: grid; gap: 12px; }
.prose ul.ticks li { position: relative; padding-left: 30px; color: var(--ink-soft); font-size: 1.08rem; }
.prose ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 14px; height: 8px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

/* Location chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.chip {
  font-size: .82rem; letter-spacing: .04em; color: var(--olive-dk);
  background: rgba(107,114,85,.1); border: 1px solid rgba(107,114,85,.2);
  padding: 7px 16px; border-radius: 999px;
}

/* Inline CTA band */
.band { background: var(--cream); text-align: center; }
.band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.band p { margin: 14px auto 0; max-width: 560px; color: var(--ink-soft); font-size: 1.1rem; }
.band .btn { margin-top: 28px; }

/* Related pages */
.related { margin-top: 12px; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .related { grid-template-columns: repeat(3, 1fr); } }
.related__card {
  display: block; background: var(--ivory); border: 1px solid rgba(176,141,87,.16);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.related__card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.related__card span { font-family: var(--font-script); color: var(--gold); font-size: 1.3rem; }
.related__card h3 { margin-top: 4px; font-size: 1.35rem; }
.related__card p { margin-top: 8px; color: var(--ink-soft); font-size: .98rem; }
.related__card em { display: inline-block; margin-top: 14px; font-style: normal; color: var(--olive-dk); font-weight: 500; }

/* Contact page layout */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.info-list { display: grid; gap: 20px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list svg { width: 24px; height: 24px; color: var(--olive); flex: 0 0 auto; margin-top: 2px; }
.info-list strong { display: block; color: var(--ink); }
.info-list span { color: var(--ink-soft); }
.map-embed { border: 0; width: 100%; height: 340px; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.contact-card { background: var(--cream); border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); }
.contact-card .form .field input,
.contact-card .form .field select,
.contact-card .form .field textarea { background: var(--ivory); box-shadow: inset 0 0 0 1px rgba(176,141,87,.25); }
.contact-card .field label { color: var(--ink-soft); }

/* =========================================================
   Refinements — decorative ornaments, hero frame,
   card accents, stats separators, gallery lightbox
   ========================================================= */

/* Anchor offset so fixed navbar doesn't cover section titles */
section[id], [id].section { scroll-margin-top: 96px; }

/* ---------- Decorative script dividers (flanked lines) ---------- */
/* Turns every centered script accent into a wedding-invitation ornament */
.center .eyebrow,
.cta__script,
.hero__script {
  display: inline-flex; align-items: center;
  gap: clamp(12px, 3vw, 22px);
}
.center .eyebrow::before, .center .eyebrow::after,
.cta__script::before, .cta__script::after,
.hero__script::before, .hero__script::after {
  content: ""; flex: 0 0 auto;
  height: 1px; width: clamp(28px, 7vw, 64px);
}
.center .eyebrow::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.center .eyebrow::after  { background: linear-gradient(90deg, var(--gold), transparent); }
/* Light variant for ornaments over dark backgrounds */
.cta__script::before, .hero__script::before { background: linear-gradient(90deg, transparent, rgba(251,247,240,.62)); }
.cta__script::after,  .hero__script::after  { background: linear-gradient(90deg, rgba(251,247,240,.62), transparent); }

/* ---------- Hero: scroll cue ---------- */
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: 26px; z-index: 2;
  width: 18px; height: 18px; margin-left: -9px;
  border-right: 2px solid rgba(251,247,240,.8);
  border-bottom: 2px solid rgba(251,247,240,.8);
  transform: rotate(45deg);
  animation: heroScroll 2s ease-in-out infinite;
}
@keyframes heroScroll {
  0%, 100% { transform: translateY(0) rotate(45deg); opacity: .5; }
  50%      { transform: translateY(8px) rotate(45deg); opacity: 1; }
}

/* ---------- Event cards: gold accent + richer icon ---------- */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--olive), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--ease);
}
.card:hover::before { transform: scaleX(1); }
.card__icon {
  background: linear-gradient(135deg, rgba(176,141,87,.16), rgba(107,114,85,.16));
  color: var(--gold-dk);
  box-shadow: inset 0 0 0 1px rgba(176,141,87,.22);
}

/* ---------- Stats: thin separators for a premium rhythm ---------- */
.stats > div { position: relative; }
.stats > div + div::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  height: 64%; width: 1px; background: rgba(176,141,87,.3);
}

/* ---------- Gallery lightbox (grid gallery kept as-is) ---------- */
.gallery img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(59,47,42,.86);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 100%; max-height: 100%;
  border-radius: 12px; box-shadow: var(--shadow-lg);
  transform: scale(.96); transition: transform .25s ease;
}
.lightbox.open .lightbox__img { transform: none; }
.lightbox__caption {
  position: absolute; left: 50%; bottom: clamp(16px, 4vw, 40px);
  transform: translateX(-50%);
  max-width: min(90%, 720px);
  margin: 0; padding: 10px 18px;
  text-align: center; font-size: .95rem; line-height: 1.4;
  color: var(--ivory, #fbf7f0);
  background: rgba(59,47,42,.6);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lightbox__caption[hidden] { display: none; }
.lightbox__close {
  position: absolute; top: 20px; right: 24px;
  width: 48px; height: 48px; border: 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(251,247,240,.14); color: var(--ivory);
  font-size: 2rem; line-height: 1;
  transition: background var(--ease);
}
.lightbox__close:hover { background: rgba(251,247,240,.28); }
.lightbox__close:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border: 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(251,247,240,.14); color: var(--ivory);
  transition: background var(--ease);
}
.lightbox__nav:hover { background: rgba(251,247,240,.28); }
.lightbox__nav:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.lightbox__nav svg { width: 26px; height: 26px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
@media (max-width: 560px) {
  .lightbox__nav { width: 44px; height: 44px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

/* ---------- Back-to-top floating button ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 45;
  width: 48px; height: 48px; border: 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--olive); color: var(--ivory);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--ease), transform var(--ease), background var(--ease), visibility var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink); }
.to-top:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.to-top svg { width: 22px; height: 22px; }
@media (max-width: 560px) { .to-top { right: 16px; bottom: 16px; } }
