/* ==========================================================================
   Antico Borgo — Boutique Hotel a Galtellì
   Design system Royaletiger · edizione "storica" — pergamena, terracotta,
   oro antico, ornamenti · animazioni moderne (Ken Burns, parallasse,
   reveal coreografati, marquee)
   ========================================================================== */

/* Font self-hosted (variabili, subset latin) — nessuna richiesta a terzi */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}

:root {
  /* palette brand — pergamena, terracotta, oro antico */
  --brand: #C07A2C;
  --brand-dark: #8F5A1D;
  --brand-soft: #F3E4CB;
  --accent: #A34E22;
  --accent-dark: #813C17;
  --gold: #A98235;
  --gold-dark: #85661F;
  --gold-soft: #E3CB93;
  --ink: #241B12;
  --text: #4A3E30;
  --muted: #71624E;
  --bg: #FAF5EB;
  --bg-alt: #F1E7D4;
  --dark: #221A11;
  --dark-2: #2E2416;
  --line: #E2D5BD;
  --line-dark: rgba(227, 203, 147, .22);
  /* tipografia */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  /* sistema */
  --shadow-sm: 0 2px 10px rgba(36, 27, 18, .08);
  --shadow-md: 0 10px 32px rgba(36, 27, 18, .14);
  --shadow-lg: 0 24px 60px rgba(36, 27, 18, .22);
  --radius: 6px;
  --radius-lg: 10px;
  --container: 1240px;
  --nav-h: 84px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  /* grana pergamena leggerissima */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .24 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--gold-soft); color: var(--ink); }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.1; font-weight: 600; }
h1 { font-size: clamp(2.7rem, 6.2vw, 5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); letter-spacing: -.005em; }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h4 { font-family: var(--font-body); font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); font-weight: 600; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--brand-dark); }
.section-dark h2 em, .hero h1 em, .page-hero h1 em { color: var(--gold-soft); }

/* ---------- Utility ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background-color: var(--dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .78 0 0 0 0 .5 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-dark h2, .section-dark h3 { color: #F7F0E2; }
.section-dark p { color: #CBBFA9; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 42px; height: 1px; background: currentColor; opacity: .55; }
.section-head.is-center .eyebrow::after { content: ''; width: 42px; height: 1px; background: currentColor; opacity: .55; }
.section-dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--gold-soft); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5.5vw, 64px); }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 16px; font-size: 1.07rem; }

.lead { font-size: clamp(1.05rem, 1.8vw, 1.28rem); line-height: 1.65; }

/* Ornamento — filetto con losanga */
.ornament { display: flex; justify-content: center; color: var(--gold); margin: 26px auto 0; }
.ornament svg { display: block; }
.section-head .ornament { margin-top: 22px; }
.ornament.is-left { justify-content: flex-start; }

/* ---------- Bottoni ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 34px;
  border-radius: 3px;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.2;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
/* riflesso moderno al passaggio */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  transition: left .6s var(--ease);
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { border: 1px solid var(--brand-dark); color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand-dark); color: #fff; }
.hero .btn-outline, .section-dark .btn-outline { border-color: rgba(247, 240, 226, .55); color: #F7F0E2; }
.hero .btn-outline:hover, .section-dark .btn-outline:hover { background: #F7F0E2; color: var(--ink); border-color: #F7F0E2; }
.btn-whatsapp { background: #1FA855; color: #fff; }
.btn-whatsapp:hover { background: #17853F; color: #fff; }
.btn svg { flex: none; }

.cta-note { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.hero .cta-note, .section-dark .cta-note { color: rgba(247, 240, 226, .65); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250, 245, 235, 0);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), transform .45s var(--ease);
}
.site-header.scrolled, .site-header.is-solid {
  background: rgba(250, 245, 235, .96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.site-header.nav-hidden { transform: translateY(-105%); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav-brand { display: flex; align-items: center; gap: 13px; }
.nav-brand img { width: 46px; height: 57px; object-fit: contain; border-radius: 5px; background: #FBF7F0; padding: 3px; box-shadow: 0 0 0 1px rgba(169, 130, 53, .35); }
.nav-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  transition: color .4s var(--ease);
}
.nav-brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-top: 5px;
  transition: color .4s var(--ease);
}
.hero-header .nav-brand-name { color: #fff; }
.hero-header .nav-brand-name small { color: var(--gold-soft); }
.hero-header.scrolled .nav-brand-name { color: var(--ink); }
.hero-header.scrolled .nav-brand-name small { color: var(--gold-dark); }

.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 36px); }
.nav-links a { position: relative; font-weight: 500; font-size: .95rem; color: var(--ink); transition: color .3s var(--ease); }
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after, .nav-links a[aria-current="page"]:not(.nav-cta)::after { transform: scaleX(1); transform-origin: left; }
.hero-header .nav-links a { color: #F7F0E2; }
.hero-header.scrolled .nav-links a { color: var(--ink); }
.nav-links a:hover { color: var(--accent); }
.hero-header:not(.scrolled) .nav-links a:hover { color: var(--gold-soft); }
.nav-links a[aria-current="page"]:not(.nav-cta) { color: var(--brand-dark); }
.hero-header .nav-links a[aria-current="page"]:not(.nav-cta) { color: var(--gold-soft); }
.hero-header.scrolled .nav-links a[aria-current="page"]:not(.nav-cta) { color: var(--brand-dark); }
.nav-links a.nav-cta { color: #fff; padding: 13px 26px; font-size: .74rem; }

.nav-toggle { display: none; width: 44px; height: 44px; position: relative; z-index: 110; }
.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--ink);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease), background .3s var(--ease);
}
.hero-header:not(.scrolled) .nav-toggle span { background: #F7F0E2; }
body.menu-open .nav-toggle span { background: var(--ink) !important; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero home ---------- */
.hero {
  position: relative;
  min-height: min(100vh, 920px);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 90px;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
/* Ken Burns lento */
.kenburns { animation: kenburns 22s var(--ease) both alternate infinite; will-change: transform; }
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.12) translate(-1.5%, 1.5%); }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(24, 17, 10, .55) 0%, rgba(24, 17, 10, .1) 30%),
    linear-gradient(95deg, rgba(24, 17, 10, .82) 0%, rgba(24, 17, 10, .45) 55%, rgba(24, 17, 10, .18) 100%);
}
.hero h1 { color: #fff; max-width: 16ch; }
/* titolo a righe con maschera */
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .line > span { display: inline-block; transform: translateY(112%); animation: line-up 1s var(--ease-out) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .14s; }
.hero-title .line:nth-child(3) > span { animation-delay: .28s; }
@keyframes line-up { to { transform: translateY(0); } }
.hero .lead { color: rgba(255, 255, 255, .92); max-width: 54ch; margin-top: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(247, 240, 226, .22); }
.hero-badges li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(247, 240, 226, .92);
  font-size: .92rem;
  font-weight: 500;
}
.hero-badges svg { color: var(--gold-soft); flex: none; }

/* indicatore di scroll */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(247, 240, 226, .75);
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.scroll-cue::after {
  content: '';
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--gold-soft), transparent);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Marquee (nastro scorrevole) ---------- */
.marquee {
  overflow: hidden;
  background: var(--dark);
  border-block: 1px solid var(--line-dark);
  padding: 18px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  color: var(--gold-soft);
  white-space: nowrap;
  padding-right: 28px;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Hero pagine interne ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(56px, 9vw, 110px)) 0 clamp(56px, 8vw, 96px);
  background: var(--dark);
  isolation: isolate;
  overflow: hidden;
}
.page-hero-bg { position: absolute; inset: -12% 0; z-index: -2; will-change: transform; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(24, 17, 10, .78), rgba(24, 17, 10, .55));
}
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255, 255, 255, .9); max-width: 58ch; margin-top: 18px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 22px; color: rgba(247, 240, 226, .65); }
.breadcrumb a { color: var(--gold-soft); }
.breadcrumb a:hover { color: #fff; }

/* ---------- Card (doppia cornice storica) ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  position: relative;
  background: #FDFAF3;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 34px 36px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(169, 130, 53, .28);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
  transition: inset .35s var(--ease), border-color .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }
.card:hover::before { inset: 6px; border-color: rgba(169, 130, 53, .5); }
.num-roman {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
  letter-spacing: .12em;
}
.card-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(169, 130, 53, .3);
  color: var(--brand-dark);
  margin-bottom: 22px;
  transition: transform .35s var(--ease);
}
.card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .97rem; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5.5vw, 80px); align-items: center; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; height: auto; }
.split-media::before {
  content: '';
  position: absolute;
  inset: 26px -26px -26px 26px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: .5;
}
.split-media::after {
  content: '';
  position: absolute;
  top: -14px; right: 14px;
  width: 54px; height: 54px;
  background: transparent;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
  opacity: .65;
}
.split-body h2 { margin-bottom: 20px; }
.split-body p + p { margin-top: 15px; }
.split-body .btn { margin-top: 30px; }
.split.is-reverse .split-media { order: 2; }
.split.is-reverse .split-media::before { inset: 26px 26px -26px -26px; }
.split.is-reverse .split-media::after { right: auto; left: 14px; border-right: 0; border-left: 1px solid var(--gold); }

/* arco storico per immagini verticali */
.arch { border-radius: 999px 999px var(--radius-lg) var(--radius-lg) !important; }
.split-media.has-arch::before { border-radius: 999px 999px var(--radius-lg) var(--radius-lg); }

/* sipario di rivelazione immagini */
.img-reveal { position: relative; overflow: hidden; }
.img-reveal::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--bg-alt);
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 1.1s var(--ease-out) .15s;
  z-index: 2;
  pointer-events: none;
}
.img-reveal.is-visible::after { transform: scaleX(0); }
.img-reveal img { transition: transform 1.4s var(--ease-out) .15s; }
.img-reveal:not(.is-visible) img { transform: scale(1.12); }
.section-dark .img-reveal::after { background: var(--dark-2); }

.check-list { margin-top: 24px; display: grid; gap: 13px; }
.check-list li { display: flex; gap: 13px; align-items: flex-start; font-size: .99rem; }
.check-list svg { flex: none; margin-top: 4px; color: var(--gold-dark); }

/* ---------- Camere / room card ---------- */
.room-card {
  position: relative;
  background: #FDFAF3;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.room-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }
.room-card figure { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.room-card figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(24, 17, 10, .38));
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.room-card:hover figure::after { opacity: 1; }
.room-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.room-card:hover img { transform: scale(1.07); }
.room-card-body { padding: 28px 28px 32px; display: flex; flex-direction: column; flex: 1; border-top: 1px solid var(--line); }
.room-card-body h3 { margin-bottom: 8px; }
.room-card-body p { font-size: .96rem; flex: 1; }
.room-card-body .tag-row { margin: 16px 0 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 3px;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(169, 130, 53, .25);
  color: var(--brand-dark);
}

/* ---------- Galleria ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-grid a {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  isolation: isolate;
}
.gallery-grid a::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(247, 240, 226, .55);
  border-radius: 3px;
  z-index: 2;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  pointer-events: none;
}
.gallery-grid a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(24, 17, 10, .45));
  opacity: 0;
  transition: opacity .45s var(--ease);
  z-index: 1;
}
.gallery-grid a:hover::before { opacity: 1; transform: scale(1); }
.gallery-grid a:hover::after { opacity: 1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.gallery-grid a:hover img { transform: scale(1.08); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(18, 13, 8, .95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.is-open { display: flex; animation: lb-fade .35s var(--ease); }
@keyframes lb-fade { from { opacity: 0; } }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: min(92vw, 1100px); }
.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 80vh;
  width: auto; height: auto;
  border-radius: 6px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-dark);
  animation: lb-zoom .4s var(--ease-out);
}
@keyframes lb-zoom { from { transform: scale(.96); opacity: 0; } }
.lightbox figcaption {
  color: rgba(247, 240, 226, .8);
  font-size: .9rem;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 14px;
}
.lightbox .lb-count { font-family: var(--font-display); font-style: italic; color: var(--gold-soft); font-size: 1.05rem; white-space: nowrap; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  color: #F7F0E2;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(247, 240, 226, .1);
  box-shadow: inset 0 0 0 1px rgba(247, 240, 226, .18);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(247, 240, 226, .24); transform: scale(1.06); }
.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

/* ---------- Quote ---------- */
.quote-wrap { max-width: 820px; margin-inline: auto; text-align: center; position: relative; padding-top: 30px; }
.quote-mark {
  font-family: var(--font-display);
  font-size: clamp(5rem, 10vw, 8rem);
  line-height: .6;
  color: var(--gold);
  opacity: .55;
  display: block;
  margin-bottom: 18px;
}
.quote-wrap blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  font-weight: 500;
  font-style: italic;
  color: #F7F0E2;
  line-height: 1.3;
}
.quote-wrap cite { display: block; margin-top: 26px; font-family: var(--font-body); font-style: normal; font-size: .82rem; color: var(--gold-soft); letter-spacing: .18em; text-transform: uppercase; }

/* ---------- Numeri / info strip ---------- */
.info-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.info-strip > div { position: relative; padding: 10px 18px; }
.info-strip > div + div::before {
  content: '';
  position: absolute;
  left: -15px; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 64%;
  background: linear-gradient(180deg, transparent, var(--gold-soft), transparent);
}
.info-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.9rem);
  font-weight: 600;
  color: var(--brand-dark);
  line-height: 1.05;
}
.info-strip span { font-size: .95rem; color: var(--muted); }

/* ---------- Timeline storica ---------- */
.timeline { position: relative; max-width: 760px; margin-inline: auto; padding-left: 42px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), var(--gold-soft));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.6s var(--ease-out) .2s;
}
.timeline.is-visible::before { transform: scaleY(1); }
.timeline-item { position: relative; padding-bottom: clamp(34px, 5vw, 52px); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -39px; top: 12px;
  width: 9px; height: 9px;
  background: var(--bg);
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.section-alt .timeline-item::before { background: var(--bg-alt); }
.timeline-item .year {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold-dark);
  display: block;
  line-height: 1.1;
}
.timeline-item h3 { margin: 6px 0 8px; }
.timeline-item p { font-size: .98rem; max-width: 58ch; }

/* ---------- Blog card ---------- */
.post-card {
  background: #FDFAF3;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }
.post-card figure { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.post-card:hover img { transform: scale(1.06); }
.post-card-body { padding: 28px; display: flex; flex-direction: column; flex: 1; border-top: 1px solid var(--line); }
.post-card-body time { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 10px; }
.post-card-body h3 { font-size: 1.4rem; margin-bottom: 10px; }
.post-card-body h3 a { color: var(--ink); }
.post-card-body h3 a:hover { color: var(--accent); }
.post-card-body p { font-size: .95rem; flex: 1; }
.post-card-body .read-more { margin-top: 18px; font-weight: 600; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Articolo ---------- */
.article-body { max-width: 760px; margin-inline: auto; }
/* capolettera storica */
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4.4em;
  font-weight: 600;
  color: var(--brand-dark);
  float: left;
  line-height: .78;
  padding: .08em .12em 0 0;
}
.article-body h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin: 48px 0 18px; }
.article-body h3 { font-size: 1.32rem; margin: 32px 0 12px; }
.article-body p + p { margin-top: 16px; }
.article-body ul, .article-body ol { margin: 16px 0 16px 22px; }
.article-body ul { list-style: none; }
.article-body ul li { position: relative; padding-left: 22px; }
.article-body ul li::before { content: '◆'; position: absolute; left: 0; top: .1em; font-size: .6em; color: var(--gold); }
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: 8px; }
.article-body img { border-radius: var(--radius-lg); margin: 34px 0; box-shadow: var(--shadow-md); }
.article-body strong { color: var(--ink); }
.article-meta { display: flex; gap: 14px; align-items: center; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(247, 240, 226, .8); margin-top: 20px; }
.article-body .faq { margin-top: 22px; border-top: 1px solid var(--line); }
.article-body .faq details { border-bottom: 1px solid var(--line); padding: 19px 0; }
.article-body .faq summary { font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.article-body .faq summary::-webkit-details-marker { display: none; }
.article-body .faq summary::after { content: '+'; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-dark); line-height: 1; transition: transform .3s var(--ease); }
.article-body .faq details[open] summary::after { content: '–'; }
.article-body .faq details p { margin-top: 12px; font-size: .97rem; }

/* ---------- CTA banner ---------- */
.cta-banner { text-align: center; }
.cta-banner .container { position: relative; max-width: 900px; padding: clamp(30px, 5vw, 56px) clamp(24px, 5vw, 64px); }
.cta-banner .container::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-dark);
  pointer-events: none;
}
.cta-banner .container::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(227, 203, 147, .12);
  pointer-events: none;
}
.cta-banner h2 { max-width: 22ch; margin-inline: auto; }
.cta-banner p { max-width: 54ch; margin: 18px auto 0; }
.cta-banner .hero-cta { justify-content: center; margin-top: 32px; }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(36px, 5vw, 70px); align-items: start; }
.contact-info h2 { margin-bottom: 14px; }
.contact-list { margin-top: 30px; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .card-icon { width: 50px; height: 50px; margin: 0; flex: none; }
.contact-list strong { display: block; color: var(--ink); font-size: .98rem; }
.contact-list a, .contact-list span { font-size: .96rem; }

.contact-form {
  position: relative;
  background: #FDFAF3;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 46px);
  box-shadow: var(--shadow-sm);
}
.contact-form::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(169, 130, 53, .22);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}
.contact-form > * { position: relative; }
.contact-form h2 { font-size: 1.8rem; margin-bottom: 6px; }
.contact-form > p { font-size: .95rem; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: 7px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font: inherit;
  color: var(--text);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(169, 130, 53, .18);
}
.form-privacy { display: flex; gap: 10px; align-items: flex-start; font-size: .87rem; margin: 4px 0 22px; }
.form-privacy input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--brand-dark); flex: none; }
.form-status { margin-top: 14px; font-size: .93rem; font-weight: 500; color: var(--brand-dark); min-height: 1.4em; }
.form-alt { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .93rem; }
.form-alt .btn { margin-top: 14px; }

.map-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--brand-soft);
  border: 1px solid rgba(169, 130, 53, .3);
  border-radius: var(--radius-lg);
}
.map-link strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); display: block; }
.map-link span { font-size: .9rem; color: var(--muted); }

/* Mappa Google — caricata solo dopo click (privacy by design) */
.map-embed {
  position: relative;
  margin-top: 36px;
  border: 1px solid rgba(169, 130, 53, .35);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
}
.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(169, 130, 53, .3);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}
.map-placeholder strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.map-placeholder p { font-size: .92rem; color: var(--muted); max-width: 42ch; }
.map-placeholder .map-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.map-placeholder small { font-size: .74rem; color: var(--muted); max-width: 48ch; }

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .78 0 0 0 0 .5 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  color: #C4B69E;
  border-top: 1px solid var(--line-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(30px, 4vw, 56px);
  padding: clamp(56px, 7vw, 88px) 24px 44px;
}
.footer-brand-row { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.footer-brand-row img { width: 44px; height: 54px; object-fit: contain; border-radius: 5px; background: #FBF7F0; padding: 3px; box-shadow: 0 0 0 1px rgba(227, 203, 147, .3); }
.footer-brand { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: #F7F0E2; line-height: 1.1; }
.footer-brand small { display: block; font-family: var(--font-body); font-size: .58rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-soft); margin-top: 5px; }
.footer-grid p { font-size: .93rem; }
.footer-grid h4 { color: #F7F0E2; margin-bottom: 20px; position: relative; padding-bottom: 12px; }
.footer-grid h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 1px; background: var(--gold); }
.footer-grid ul { display: grid; gap: 11px; }
.footer-grid ul a, .footer-grid ul span { color: #C4B69E; font-size: .93rem; }
.footer-grid ul a:hover { color: var(--gold-soft); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { flex: none; margin-top: 4px; color: var(--gold-soft); }
.footer-social { display: flex; gap: 12px; margin-top: 22px; }
.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px var(--line-dark);
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.footer-social a:hover { background: var(--gold-soft); color: var(--dark); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.footer-legal { border-top: 1px solid var(--line-dark); background: rgba(12, 8, 4, .35); }
.footer-legal .container { padding-block: 20px; }
.footer-legal p { font-size: .8rem; color: #9A8D77; line-height: 1.8; }
.footer-legal strong { color: #C4B69E; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 28px;
  border-top: 1px solid var(--line-dark);
  font-size: .84rem;
}
.footer-bottom a { color: #C4B69E; }
.footer-bottom a:hover { color: var(--gold-soft); }
.footer-credit a { color: var(--gold-soft); }

/* ---------- Reveal (con ritardo coreografato via --d) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease-out) var(--d, 0s), transform .9s var(--ease-out) var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.page-404 { min-height: 72vh; display: flex; align-items: center; text-align: center; padding-top: var(--nav-h); }
.page-404 .big {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(5.5rem, 15vw, 10rem);
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
}
.page-404 h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 12px 0 14px; }
.page-404 .hero-cta { justify-content: center; }

/* ---------- Policy ---------- */
.policy-body { max-width: 800px; margin-inline: auto; }
.policy-body h2 { font-size: 1.6rem; margin: 38px 0 12px; }
.policy-body p + p { margin-top: 12px; }
.policy-body ul { margin: 14px 0 14px 22px; list-style: disc; }
.policy-body li + li { margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  /* con 8 voci il menu orizzontale non ci sta: hamburger già da tablet */
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .24 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform .5s var(--ease);
    z-index: 105;
  }
  .nav-links.is-open { transform: none; }
  .nav-links a { font-size: 1.45rem; font-family: var(--font-display); font-weight: 600; color: var(--ink) !important; }
  .nav-links a:not(.nav-cta)::after { bottom: -4px; }
  .nav-links a.nav-cta { color: #fff !important; font-family: var(--font-body); font-size: .8rem; }
}

@media (max-width: 900px) {
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split.is-reverse .split-media { order: 0; }
  .split-media::before, .split-media::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 74px; }
  .hero { min-height: 92vh; }
  .scroll-cue { display: none; }
  .info-strip { grid-template-columns: 1fr; gap: 34px; }
  .info-strip > div + div::before { display: none; }
  .timeline { padding-left: 34px; }
  .timeline-item::before { left: -31px; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .map-link { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .btn { width: 100%; }
  .hero-cta .btn { width: auto; flex: 1; min-width: 150px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .img-reveal:not(.is-visible) img { opacity: 1; transform: none; }
  .img-reveal::after { display: none; }
  .hero-title .line > span { transform: none; }
  .timeline::before { transform: scaleY(1); }
  .marquee-track { animation: none !important; flex-wrap: wrap; }
  .kenburns { animation: none !important; }
}
