/* ============================================
   Mattia Modica Photography
   Editorial Fine Art Wedding Photography
   ============================================ */

/* ---- Fonts ----
   Editorial moderno: Inter Tight (sans geometrico) + Fraunces variabile (display).
   Tutte gratis su Google Fonts, supporto variabile per controllo fine. */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Reset & Tokens ---- */
:root {
  --bg: #f5f3ef;
  --bg-alt: #ebe7df;
  --ink: #161412;
  --ink-soft: #5a554d;
  --line: #d8d2c4;
  --accent: #8a6f4c;

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter Tight', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --container: 1440px;
  --gutter: clamp(1.5rem, 4vw, 4rem);

  --t-fast: 200ms;
  --t-med: 400ms;
  --t-slow: 800ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

/* ---- Page-load entrance animation ----
   Soft fade + leggero scivolamento dall'alto.
   Si attiva al caricamento di OGNI pagina, dando continuità visiva alla navigazione. */
@keyframes pageEnter {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: pageEnter 600ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* Header e footer non animati per evitare flicker dei link */
.site-header,
.site-footer {
  animation: none;
}

/* Rispetto preferenze di accessibilità: chi ha "reduce motion" non vede animazioni */
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--t-fast) var(--ease);
}

a:hover { opacity: 0.7; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.75rem, 8vw, 7rem);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

h2 {
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 400;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lead {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

/* ---- Layout ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(4rem, 10vw, 9rem) 0;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.9rem var(--gutter);
  /* Liquid Glass effect — stile Apple visionOS / iOS 26 */
  background: linear-gradient(
    180deg,
    rgba(250, 247, 242, 0.50) 0%,
    rgba(250, 247, 242, 0.30) 100%
  );
  backdrop-filter: blur(30px) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(30px) saturate(180%) brightness(1.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.03),
    0 1px 16px rgba(0, 0, 0, 0.05);
  transition: padding var(--t-med) var(--ease), background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}

.site-header.scrolled {
  padding: 0.7rem var(--gutter);
  background: linear-gradient(
    180deg,
    rgba(250, 247, 242, 0.70) 0%,
    rgba(250, 247, 242, 0.55) 100%
  );
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.55),
    0 4px 24px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  color: var(--ink);
  justify-self: start;
  line-height: 1;
}

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

.nav {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  padding: 0.3rem 0;
}

/* Dropdown menu (su Matrimoni) */
.nav-has-dropdown {
  position: relative;
}
.nav-has-dropdown > a::after {
  content: '▾';
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.6em;
  opacity: 0.6;
  transition: transform var(--t-fast) var(--ease);
}
.nav-has-dropdown:hover > a::after {
  transform: rotate(180deg);
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: -1rem;
  list-style: none;
  background: rgba(22, 20, 18, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
  box-shadow: 0 12px 28px rgba(0,0,0,0.20);
  z-index: 200;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown li {
  list-style: none;
}
.nav-dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(245, 243, 239, 0.85);
}
.nav-dropdown a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bg);
}

.nav a.active::after,
.nav a:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 1px;
  background: var(--ink);
  opacity: 1;
  transition: width var(--t-med) var(--ease);
}

/* ---- Header right (lang switch + menu trigger) ---- */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-self: end;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
}

.lang-switch button {
  background: none;
  border: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  transition: color var(--t-fast) var(--ease);
}

.lang-switch button.active {
  color: var(--ink);
  position: relative;
}

.lang-switch button.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: var(--ink);
}

.lang-switch .sep { color: var(--line); }

.menu-trigger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

.menu-trigger svg { display: block; }

/* ---- Mobile menu ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  padding: 6rem var(--gutter) 2rem;
  transform: translateY(-100%);
  transition: transform var(--t-med) var(--ease);
  overflow-y: auto;
}

.mobile-menu.open { transform: translateY(0); }

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: var(--gutter);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s var(--ease);
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.05) 55%, rgba(0,0,0,0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem);
  text-align: center;
  color: #faf7f2;
}

.hero-content .eyebrow {
  color: rgba(250, 247, 242, 0.95);
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.hero-content h1 {
  color: #faf7f2;
  font-style: italic;
  font-weight: 300;
  max-width: 900px;
}

.hero-content .lead {
  color: rgba(250, 247, 242, 0.9);
  margin-top: 1.5rem;
  max-width: 600px;
  font-style: normal;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #faf7f2;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.8;
}

.scroll-cue::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: currentColor;
  margin: 0.75rem auto 0;
  animation: scrollLine 2.4s var(--ease) infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); transform-origin: top; opacity: 0.8; }
  50% { transform: scaleY(0.3); transform-origin: top; opacity: 0.3; }
}

/* ---- Intro section ---- */
.intro {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.intro h2 {
  margin: 1.5rem 0 2rem;
  font-style: italic;
}

.intro .signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 2rem;
}

/* ---- Featured grid ---- */
.featured {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  align-items: end;
}

.featured-item {
  position: relative;
  overflow: hidden;
}

.featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.featured-item:hover img {
  transform: scale(1.04);
}

.featured-item .caption {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  color: #faf7f2;
  z-index: 2;
}

.featured-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

.featured-item .caption .eyebrow {
  color: rgba(250, 247, 242, 0.85);
}

.featured-item .caption h3 {
  color: #faf7f2;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Magazine-style layout: asymmetric */
.featured-item:nth-child(1) {
  grid-column: 1 / span 7;
  aspect-ratio: 4 / 3;
}
.featured-item:nth-child(2) {
  grid-column: 9 / span 4;
  aspect-ratio: 3 / 4;
  margin-bottom: 6rem;
}
.featured-item:nth-child(3) {
  grid-column: 2 / span 4;
  aspect-ratio: 3 / 4;
  margin-top: -4rem;
}
.featured-item:nth-child(4) {
  grid-column: 7 / span 6;
  aspect-ratio: 4 / 3;
}

/* ---- Section header ---- */
.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-header .eyebrow { margin-bottom: 1rem; }
.section-header h2 { font-style: italic; }
.section-header .lead { margin-top: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ---- Approach (services) ---- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 1100px;
  margin: 0 auto;
}

.approach-item {
  text-align: center;
  padding: 0 1rem;
}

.approach-item .number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.approach-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.approach-item p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---- Testimonial ---- */
.testimonial {
  background: var(--bg-alt);
  padding: clamp(5rem, 10vw, 9rem) 0;
  text-align: center;
}

.testimonial-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.4;
  font-weight: 300;
  max-width: 900px;
  margin: 0 auto;
  color: var(--ink);
  position: relative;
}

.testimonial-quote::before {
  content: '\201C';
  display: block;
  font-size: 5rem;
  line-height: 0.5;
  color: var(--accent);
  margin-bottom: 2rem;
}

.testimonial-attribution {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- CTA banner ---- */
.cta-banner {
  text-align: center;
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.cta-banner h2 {
  margin-bottom: 1.5rem;
  font-style: italic;
}

.button {
  display: inline-block;
  padding: 1.15rem 3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  margin-top: 1.5rem;
}

.button:hover {
  background: transparent;
  color: var(--ink);
  opacity: 1;
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.button.ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
  align-items: start;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  line-height: 1;
}

.footer-brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.site-footer h4 {
  color: var(--bg);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.6rem; }
.site-footer a {
  color: var(--bg);
  opacity: 0.85;
  font-size: 0.95rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(250, 247, 242, 0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

/* ---- Page hero (interior pages) ---- */
.page-hero {
  padding: 10rem var(--gutter) 5rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.page-hero .eyebrow { margin-bottom: 1.5rem; }
.page-hero h1 { font-style: italic; margin-bottom: 1.5rem; }

/* ---- Gallery grid (portfolio pages) ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.gallery-item { overflow: hidden; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.gallery-item:hover img { transform: scale(1.03); }

/* Magazine-style gallery */
.gallery-item:nth-child(8n+1) { grid-column: 1 / span 7; aspect-ratio: 4/3; }
.gallery-item:nth-child(8n+2) { grid-column: 8 / span 5; aspect-ratio: 4/5; }
.gallery-item:nth-child(8n+3) { grid-column: 1 / span 5; aspect-ratio: 4/5; }
.gallery-item:nth-child(8n+4) { grid-column: 6 / span 7; aspect-ratio: 4/3; }
.gallery-item:nth-child(8n+5) { grid-column: 1 / span 4; aspect-ratio: 1/1; }
.gallery-item:nth-child(8n+6) { grid-column: 5 / span 4; aspect-ratio: 1/1; }
.gallery-item:nth-child(8n+7) { grid-column: 9 / span 4; aspect-ratio: 1/1; }
.gallery-item:nth-child(8n+8) { grid-column: 3 / span 8; aspect-ratio: 16/9; }

/* ---- About page ---- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-text h2 { font-style: italic; margin-bottom: 2rem; }
.about-text p { margin-bottom: 1.25rem; color: var(--ink-soft); line-height: 1.8; }
.about-text .signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--accent);
  margin-top: 2rem;
}

/* ---- Contact form ---- */
.contact-layout {
  max-width: 720px;
  margin: 0 auto;
}

.form-group { margin-bottom: 1.75rem; }

.form-group label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .site-header { padding: 0.65rem var(--gutter); }
  .site-header.scrolled { padding: 0.5rem var(--gutter); }
  .nav { display: none; }
  .site-header nav { display: none; }
  .menu-trigger { display: flex; }
  .header-inner { grid-template-columns: 1fr auto; gap: 0.75rem; }
  .brand { font-size: 0.95rem; }
  .brand small { font-size: 0.48rem; margin-top: 0.18rem; letter-spacing: 0.22em; }
  .header-right { gap: 0.85rem; }
  .lang-switch { font-size: 0.65rem; gap: 0.3rem; }

  .featured { grid-template-columns: 1fr; gap: 2rem; }
  .featured-item:nth-child(n) {
    grid-column: 1 / -1;
    margin: 0;
    aspect-ratio: 4/5;
  }

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

  .gallery { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .gallery-item:nth-child(n) { grid-column: span 2; aspect-ratio: 4/3; }
  .gallery-item:nth-child(2n) { grid-column: span 1; aspect-ratio: 3/4; }
  .gallery-item:nth-child(2n+1) { grid-column: span 1; aspect-ratio: 3/4; }

  .about-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---- Animations on scroll ----
   Visibile di default; JS aggiunge .js-enabled all'html
   per attivare lo stato di partenza nascosto. Così se JS fallisce,
   tutto resta visibile. */
.js-enabled .fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.js-enabled .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Page transitions (View Transitions API + fallback) ---- */
@view-transition {
  navigation: auto;
}

/* Cross-fade morbido per la transizione root */
::view-transition-old(root) {
  animation: 300ms cubic-bezier(0.22, 0.61, 0.36, 1) both fadeOutPage;
}

::view-transition-new(root) {
  animation: 450ms cubic-bezier(0.22, 0.61, 0.36, 1) 80ms both fadeInPage;
}

@keyframes fadeOutPage {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.995);
  }
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(12px) scale(1.005);
  }
}

/* L'header invece resta fermo durante la transizione — sensazione "Apple" */
.site-header {
  view-transition-name: site-header;
}

::view-transition-old(site-header),
::view-transition-new(site-header) {
  animation: none;
  mix-blend-mode: normal;
}

/* Riduce le animazioni per chi ha "prefers-reduced-motion" */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: 200ms ease both opacityOnly;
  }
  @keyframes opacityOnly {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ---- Lightbox per foto matrimoni e ritratti ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 8, 10, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-stage {
  position: relative;
  width: 92vw;
  height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transition: opacity 280ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lightbox-img.swap {
  opacity: 0;
  transform: scale(0.98);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 220ms, transform 220ms;
  user-select: none;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* Cursor pointer su foto cliccabili */
.wedding-photo,
.gallery-item,
.portrait-photo {
  cursor: zoom-in;
}
.wedding-photo img,
.gallery-item img,
.portrait-photo img {
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.wedding-photo:hover img,
.gallery-item:hover img,
.portrait-photo:hover img {
  transform: scale(1.02);
}

@media (max-width: 600px) {
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }
}
