/* ============================================================
   /weddings — landing standalone (replica di fotografo-matrimonio).
   Display = Brown Sugar (self-hosted); corpo = Epilogue (Google Fonts).
   ============================================================ */
@font-face {
  font-family: "Brown Sugar";
  src: url("/fonts/Brown-Sugar-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --ink: #111110;
  --ink-soft: #55524c;
  --ink-faint: #8b877f;
  --paper: #ffffff;
  --line: #e4e1da;
  --accent: #c4402f;         /* rosso/terracotta dei link e della barra */
  --ff-display: "Brown Sugar", "Times New Roman", serif;
  --ff-body: "Epilogue", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

body.wed {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--ff-body);
  font-size: clamp(1rem, 0.92rem + 0.4vw, 1.125rem); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.wed-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--ink-faint); margin: 0 0 1.5rem;
}
.ac { color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: opacity .3s; }
.ac:hover { opacity: 0.6; }

/* ---------------- HEADER + FAB ---------------- */
.wed-head {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(1rem, 2.5vw, 1.75rem) var(--pad);
  mix-blend-mode: difference; color: #fff; pointer-events: none;
}
.wed-brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; pointer-events: auto; }
.wed-index {
  pointer-events: auto; cursor: pointer;
  background: none; border: 0; color: inherit; font: inherit; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.95rem; padding: 0; line-height: 1;
}
.wed-index-close { display: none; font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 300; line-height: 0.7; margin-top: -0.1em; }
.wed-index[aria-expanded="true"] .wed-index-label { display: none; }
.wed-index[aria-expanded="true"] .wed-index-close { display: inline-block; }
/* ---------------- MENU overlay ---------------- */
.wed-menu {
  position: fixed; inset: 0; z-index: 55; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 0.2rem; padding: var(--pad); opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
.wed-menu.is-open { opacity: 1; visibility: visible; }
.wed-menu ul { list-style: none; margin: 0; padding: 0; }
.wed-menu li a { font-family: var(--ff-display); font-size: clamp(2.4rem, 8vw, 5.5rem); line-height: 1.05; display: inline-block; padding: 0.1em 0; transition: opacity .3s; }
.wed-menu li a:hover { opacity: 0.55; }
.wed-menu-site { margin-top: 2.5rem; letter-spacing: 0.05em; color: var(--ink-faint); }

/* ---------------- HERO = nastro infinito (pattern /food pf) ---------------- */
.wed-hero {
  --pf-T: 55s; --pf-pad: 12svh; --pf-hs: 1;
  position: relative; height: 100svh; overflow: hidden; background: var(--paper); isolation: isolate;
}
.pf-viewport { position: absolute; inset: 0; overflow: hidden; }
.pf-strip {
  display: flex; width: max-content; height: 100%; box-sizing: border-box;
  padding-block: var(--pf-pad); will-change: transform; animation: pf-scroll var(--pf-T) linear infinite;
}
.pf-set { display: flex; align-items: center; height: 100%; flex: 0 0 auto; }
.pf-cell {
  flex: 0 0 auto; height: calc(var(--h, 48svh) * var(--pf-hs)); margin-left: var(--gap, 10vw);
  align-self: var(--align, center); display: flex;
  transform: translate(calc(var(--mx, 0) * var(--depth, 0.6) * 40px), calc(var(--my, 0) * var(--depth, 0.6) * 22px));
  transition: transform 0.5s var(--ease);
}
.pf-item { height: 100%; border-radius: 2px; overflow: hidden; background: #eee; animation: pf-drift var(--pf-T) ease-in-out infinite; animation-delay: var(--delay, 0s); }
.pf-item img { height: 100%; width: auto; }
.wed-hero-title {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 2;
  margin-inline: auto; margin-block: 0; pointer-events: none; text-align: center; text-transform: uppercase;
  max-width: 9ch;   /* forza "UNCOMMON" / "WEDDINGS" su due righe come l'originale */
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(3.2rem, 15vw, 15rem); line-height: 0.84; letter-spacing: -0.01em;
  color: #fff; mix-blend-mode: difference;
}
.wed-scroll {
  position: absolute; left: 50%; bottom: clamp(1.5rem, 4vh, 3rem); transform: translateX(-50%);
  z-index: 3; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-soft);
  mix-blend-mode: difference; color: #fff;
}
@keyframes pf-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pf-drift { 0%,100% { transform: translateX(0); } 50% { transform: translateX(var(--amp,0px)); } }
.wed-hero.is-paused .pf-strip, .wed-hero.is-paused .pf-item { animation-play-state: paused; }
@media (max-width: 1024px) { .wed-hero { --pf-hs: 0.82; } }
@media (max-width: 640px) { .wed-hero { --pf-hs: 0.62; --pf-pad: 20svh; } .wed-hero-title { font-size: clamp(2.8rem, 20vw, 9rem); } }

/* ---------------- INTRO — testo sx + polaroid dx ---------------- */
.wed-intro {
  padding: clamp(6rem, 14vh, 12rem) var(--pad);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 7vw, 7rem); align-items: center;
  max-width: 1600px; margin-inline: auto;
}
.wed-intro-head { margin: 0 0 clamp(2rem, 6vw, 4rem); font-family: var(--ff-body); font-weight: 500; text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(1.3rem, 2.6vw, 2rem); }
.wed-intro-head em { font-style: italic; font-weight: 400; }
.wed-intro-body p { margin: 0 0 1.4em; max-width: 46ch; }
.wed-intro-media { display: flex; justify-content: center; }
.wed-polaroid {
  position: relative; margin: 0; background: #fff; padding: 0; max-width: 460px; width: 100%;
  box-shadow: 0 25px 60px rgba(0,0,0,.18); transform: rotate(-1.2deg);
}
.wed-polaroid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
/* nastro adesivo ai 4 angoli */
.wed-polaroid::before, .wed-polaroid::after,
.wed-polaroid > img::before {}
.wed-polaroid::before, .wed-polaroid::after {
  content: ""; position: absolute; width: 92px; height: 26px;
  background: rgba(120,120,120,.28); backdrop-filter: blur(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.wed-polaroid::before { top: -12px; left: -16px; transform: rotate(-38deg); }
.wed-polaroid::after  { bottom: -12px; right: -16px; transform: rotate(-38deg); }
@media (max-width: 820px) { .wed-intro { grid-template-columns: 1fr; } .wed-intro-media { margin-top: 1rem; } }

/* ---------------- FILOSOFIA — titolo gigante centrato ---------------- */
.wed-philo { padding: clamp(4rem, 10vh, 9rem) var(--pad) clamp(5rem, 12vh, 10rem); border-top: 1px solid var(--line); text-align: center; }
.wed-philo-title {
  margin: 0 auto clamp(2.5rem, 7vw, 5rem); font-family: var(--ff-display); font-weight: 400;
  text-transform: uppercase; font-size: clamp(4rem, 20vw, 20rem); line-height: 0.85; letter-spacing: -0.01em;
}
.wed-philo-body { max-width: 62ch; margin-inline: auto; text-align: center; }
.wed-philo-body p { margin: 0 0 1.4em; }
.wed-philo-q { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 500; margin-bottom: 2em !important; }
.wed-philo-body strong { display: block; font-weight: 500; font-size: clamp(1.3rem, 3vw, 2rem); margin: 1.5em 0; }

/* ---------------- MANIFESTO — sans bold, righe stirate a piena larghezza (SVG textLength) ---------------- */
.wed-manifesto { padding: clamp(5rem, 14vh, 12rem) var(--pad); }
.wed-mani-block { width: min(100%, 72ch); margin-inline: auto; }
.wed-mani-line { position: relative; }
.wed-mani-line + .wed-mani-line { margin-top: clamp(0.15rem, 0.6vw, 0.5rem); }
.wed-mani-struck { margin-bottom: clamp(1.4rem, 4vw, 3rem); }
.wed-mani-svg {
  display: block; width: 100%; height: 1em; overflow: visible;
  font-family: var(--ff-body); font-weight: 800; text-transform: uppercase;
}
.wed-mani-svg text { fill: var(--ink); dominant-baseline: text-before-edge; font-size: clamp(1.6rem, 6.2vw, 4rem); }
.wed-mani-struck .wed-mani-svg text { fill: var(--ink-faint); }
/* fallback prima che il JS calcoli textLength: nasconde il testo non-stirato per evitare il "salto" */
.wed-mani-svg:not(.is-fit) text { opacity: 0; }
.wed-mani-svg.is-fit text { opacity: 1; transition: opacity .25s; }
.wed-mani-bar {
  position: absolute; left: 0; top: 50%; height: clamp(4px, 0.7vw, 8px); width: 0;
  background: var(--accent); transform: translateY(-50%); z-index: 2; pointer-events: none;
  transition: width 1.1s var(--ease);
}
.wed-manifesto.is-in .wed-mani-bar { width: 100%; }
.wed-mani-close { margin: clamp(2rem, 5vw, 3.5rem) auto 0; max-width: 40ch; text-align: center; color: var(--ink-soft); font-size: clamp(1rem, 2vw, 1.2rem); }

/* ---------------- PORTFOLIO — cover full-viewport + gallery in-page ---------------- */
.wed-pf-cover { position: relative; height: 100svh; overflow: hidden; background: #111; isolation: isolate; border-top: 1px solid var(--line); }
.wed-pf-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wed-pf-title {
  position: absolute; left: 0; right: 0; top: clamp(4rem, 10vh, 8rem); z-index: 2; margin: 0;
  text-align: center; text-transform: uppercase; font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(3rem, 14vw, 14rem); line-height: 0.85; color: #fff; mix-blend-mode: difference; pointer-events: none;
}
.wed-pf-gallery { padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(4rem, 10vh, 8rem); }
/* Masonry via CSS columns: le foto scorrono nelle colonne mantenendo il rapporto
   nativo (niente crop, altezze diverse). NB: solo la gallery /weddings — le gallery
   tematiche /weddings/<cat> usano l'altra macchina (layouts/gallery). */
.wed-grid { columns: 4 clamp(200px, 19vw, 320px); column-gap: clamp(0.6rem, 1.4vw, 1.1rem); }
.wed-grid-cell { break-inside: avoid; margin: 0 0 clamp(0.6rem, 1.4vw, 1.1rem); overflow: hidden; border-radius: 2px; background: #eee; }
.wed-grid-cell img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .wed-grid { columns: 3 clamp(170px, 28vw, 260px); } }
@media (max-width: 560px) { .wed-grid { columns: 2; column-gap: 0.5rem; } .wed-grid-cell { margin-bottom: 0.5rem; } }

/* ---------------- CATEGORIE — sfondo full-viewport + lista centrata ---------------- */
.wed-cats {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(5rem, 12vh, 9rem) var(--pad); overflow: hidden; isolation: isolate; color: #fff;
}
.wed-cats-bg { position: absolute; inset: 0; z-index: -2; background: var(--cat-bg) center/cover no-repeat; transition: background-image .5s ease; }
.wed-cats::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20,18,15,.42); }
.wed-cats-head { margin: 0; text-align: center; max-width: 22ch; font-family: var(--ff-body); font-weight: 500; font-size: clamp(1rem, 2.2vw, 1.4rem); text-transform: uppercase; letter-spacing: 0.08em; }
.wed-cats-list { list-style: none; margin: 0; padding: 0; text-align: center; }
.wed-cats-list li a {
  display: block; font-family: var(--ff-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.8rem, 5.5vw, 4.2rem); line-height: 1.18; letter-spacing: 0.02em;
  transition: opacity .35s var(--ease);
}
@media (hover: hover) {
  .wed-cats-list:hover li a { opacity: 0.45; }
  .wed-cats-list li a:hover { opacity: 1; }
}

/* ---------------- PER SEMPRE ---------------- */
.wed-forever { padding: clamp(5rem, 12vh, 10rem) var(--pad); border-top: 1px solid var(--line); background: #f5f3ef; }
.wed-forever-txt { max-width: 60ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.wed-forever-head { margin: 0 0 1.5rem; font-family: var(--ff-display); font-weight: 400; font-size: clamp(1.8rem, 4.5vw, 3.4rem); line-height: 1.08; }
.wed-forever-txt p { margin: 0 0 1.2em; color: var(--ink-soft); }
.wed-forever-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(0.6rem, 1.5vw, 1.2rem); }
.wed-forever-cell { margin: 0; overflow: hidden; border-radius: 3px; }
.wed-forever-cell img { width: 100%; height: 100%; aspect-ratio: 3/2; object-fit: cover; }
.wed-forever-cell:nth-child(3n+1) { grid-column: span 2; }
@media (max-width: 640px) { .wed-forever-cell:nth-child(3n+1) { grid-column: auto; } }

/* ---------------- FAQ — colonna sx "FAQ" gigante sticky + accordion dx ---------------- */
.wed-faq {
  padding: clamp(5rem, 12vh, 10rem) var(--pad); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: clamp(2rem, 6vw, 6rem);
  align-items: stretch;   /* l'aside si allunga quanto la lista → lo sticky ha spazio in cui restare */
  max-width: 1600px; margin-inline: auto;
}
.wed-faq-aside { height: 100%; }
.wed-faq-title {
  position: sticky; top: clamp(4.5rem, 12vh, 8rem); margin: 0;
  font-family: var(--ff-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(4rem, 16vw, 16rem); line-height: 0.82; letter-spacing: -0.01em;
}
.wed-faq-list { list-style: none; margin: 0; padding: 0; }
@media (max-width: 820px) {
  .wed-faq { grid-template-columns: 1fr; gap: clamp(1.5rem, 5vw, 3rem); }
  .wed-faq-title { position: static; font-size: clamp(3.5rem, 22vw, 8rem); }
}
.wed-faq-item { border-top: 1px solid var(--line); }
.wed-faq-item:last-child { border-bottom: 1px solid var(--line); }
.wed-faq-q { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: clamp(1rem, 2.5vw, 1.6rem) 0; font-family: var(--ff-body); font-weight: 500; font-size: clamp(1.05rem, 2.2vw, 1.4rem); line-height: 1.3; }
.wed-faq-ico { position: relative; flex: 0 0 auto; width: 16px; height: 16px; }
.wed-faq-ico::before, .wed-faq-ico::after { content: ""; position: absolute; background: var(--ink); transition: transform .35s var(--ease); top: 50%; left: 50%; }
.wed-faq-ico::before { width: 16px; height: 1.5px; transform: translate(-50%,-50%); }
.wed-faq-ico::after { width: 1.5px; height: 16px; transform: translate(-50%,-50%); }
.wed-faq-q[aria-expanded="true"] .wed-faq-ico::after { transform: translate(-50%,-50%) scaleY(0); }
.wed-faq-a { padding: 0 0 clamp(1.2rem, 3vw, 2rem); max-width: 62ch; color: var(--ink-soft); }
.wed-faq-a p { margin: 0 0 0.8em; }

/* ---------------- TESTIMONIALS ---------------- */
.wed-testi { padding: clamp(5rem, 12vh, 10rem) var(--pad); border-top: 1px solid var(--line); }
.wed-testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(2rem, 5vw, 4rem); }
.wed-testi-item { margin: 0; }
.wed-testi-item p { font-family: var(--ff-body); font-weight: 400; font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.45; margin: 0 0 1.2rem; }
.wed-testi-item cite { font-style: normal; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; color: var(--ink-faint); }

/* ---------------- CONTATTI ---------------- */
.wed-contact { padding: clamp(6rem, 14vh, 12rem) var(--pad); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.wed-contact-head { margin: 0; grid-column: 1 / -1; font-family: var(--ff-display); font-weight: 400; font-size: clamp(2.4rem, 7vw, 6rem); line-height: 0.95; text-transform: uppercase; }
.wed-contact-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.wed-contact-list li { display: flex; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.wed-contact-list li span { flex: 0 0 6.5rem; color: var(--ink-faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; align-self: center; }
.wed-contact-list li a { font-size: 1.05rem; transition: opacity .3s; }
.wed-contact-list li a:hover { opacity: 0.55; }
.wed-contact-cta { justify-self: start; align-self: center; display: inline-block; padding: 0.9rem 2.2rem; border: 1px solid var(--ink); border-radius: 100px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 600; transition: background .35s var(--ease), color .35s var(--ease); }
.wed-contact-cta:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) { .wed-contact { grid-template-columns: 1fr; } }

/* ---------------- FOOTER ---------------- */
.wed-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2.5rem var(--pad); border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  .pf-strip, .pf-item { animation: none; }
  .pf-cell { transition: none; transform: none; }
  .wed-mani-bar { transition: none; width: 100%; }
}
