/* ============================================================
   Convivia — sito
   Palette e font dal Convivia Design System
   ============================================================ */

/* ---- Font (in locale, niente Google Fonts: niente cookie/GDPR) ---- */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 600; font-display: swap; src: url('fonts/cormorant-garamond-latin-600-italic.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/jost-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jost-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jost-latin-500-normal.woff2') format('woff2'); }

:root {
  --espresso: #2D1209;
  --espresso-800: #43251A;
  --terracotta: #AC5539;
  --terracotta-600: #964634;
  --terracotta-700: #7E3A26;
  --terracotta-400: #C06F52;
  --terracotta-100: #F2DED4;
  --sage: #7B816A;
  --sage-600: #636853;
  --sage-300: #B3B7A6;
  --sage-100: #E9EAE3;
  --cream: #FBF9F5;
  --paper: #F6F1E9;
  --white: #FFFFFF;
  --text-body: #4A372E;
  --text-muted: #7A6256;
  --on-dark-muted: #C9B6AB;
  --hair: #E7DFD5;
  --soft: #DBD0C5;

  --font-display: 'Cormorant Garamond', 'Hoefler Text', Georgia, serif;
  --font-sans: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(45,18,9,.05), 0 2px 8px rgba(45,18,9,.05);
  --shadow-md: 0 2px 4px rgba(45,18,9,.05), 0 10px 28px rgba(45,18,9,.08);
  --ease: cubic-bezier(.22,.61,.36,1);
  --wrap: 1180px;
  --section-y: clamp(72px, 10vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: var(--terracotta); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--terracotta-600); }
:focus-visible { outline: 3px solid var(--terracotta-400); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--espresso); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: 1.04; font-weight: 500; }
h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; }
h3 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; }
h1 em, h2 em { font-style: italic; color: var(--terracotta); font-weight: 500; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 32px); }
.section { padding: var(--section-y) 0; }
.section--paper { background: var(--paper); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-sans); font-weight: 500; font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--sage-600);
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .7; }

.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.65; max-width: 56ch; }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.ornament { display: block; width: 46px; height: auto; margin: 0 auto 22px; opacity: .9; }

/* ---- Bottoni ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 500; font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--terracotta); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--terracotta-600); color: var(--cream); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--primary:active { background: var(--terracotta-700); transform: translateY(0); }
.btn--ghost { border-color: var(--soft); color: var(--espresso); background: transparent; }
.btn--ghost:hover { border-color: var(--espresso); color: var(--espresso); transform: translateY(-1px); }
.btn--light { background: var(--cream); color: var(--espresso); }
.btn--light:hover { background: var(--white); color: var(--terracotta-600); transform: translateY(-1px); }
.btn--outline-light { border-color: rgba(251,249,245,.35); color: var(--cream); }
.btn--outline-light:hover { border-color: var(--cream); color: var(--cream); transform: translateY(-1px); }
.btn--sm { padding: 10px 18px; font-size: 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Header ---- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,249,245,.88);
  -webkit-backdrop-filter: saturate(120%) blur(10px); backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--hair); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.header__logo img { height: 50px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--espresso); opacity: .78; padding: 6px 0; border-bottom: 1.5px solid transparent;
}
.nav a:not(.btn):hover { opacity: 1; color: var(--terracotta); }
.lang { display: inline-flex; border: 1px solid var(--soft); border-radius: 999px; padding: 3px; }
.lang button {
  font: 500 11px/1 var(--font-sans); letter-spacing: .12em; padding: 7px 10px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text-muted); cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--espresso); color: var(--cream); }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--espresso); }
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 6px;
    background: var(--cream); padding: 18px 24px 28px; border-bottom: 1px solid var(--hair); box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a:not(.btn) { font-size: 15px; padding: 10px 0; width: 100%; border-bottom: 1px solid var(--hair); }
  .nav .btn { margin-top: 12px; }
  .nav .lang { margin-top: 12px; }
}

/* ---- Foto (segnaposto finché non metti le foto in /img) ---- */
.photo {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(135deg, #EFE6D9 0%, #E3D2C2 60%, #D9C3B0 100%);
  box-shadow: inset 0 0 0 1px rgba(45,18,9,.04);
  aspect-ratio: var(--ratio, 4 / 5);
}
.photo--sage { background: linear-gradient(135deg, #E2E4D8 0%, #CDD2BE 100%); }
.photo--clay { background: linear-gradient(135deg, #E4BBA8 0%, #C88E73 100%); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo__label {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); text-align: center; padding: 20px;
}
.photo__label::before {
  content: ''; width: 30px; height: 30px; opacity: .55;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6256' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E");
}

/* ---- Hero ---- */
.hero { padding: clamp(40px, 7vw, 88px) 0 var(--section-y); }
.hero__grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 26px; }
.hero .lead { margin-bottom: 34px; }
.hero__photo { --ratio: 4 / 5; }
.hero__photo img { object-position: center 50%; }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--hair);
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-600); font-weight: 500;
}
.hero__facts span { display: inline-flex; align-items: center; gap: 10px; }
.hero__facts span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--terracotta); }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { --ratio: 4 / 3; order: -1; }
}

/* ---- La tavola ---- */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.split h2 { margin-bottom: 22px; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.point {
  background: var(--white); border: 1px solid var(--hair); border-radius: var(--radius); padding: 26px 26px 28px;
  box-shadow: var(--shadow-sm);
}
.point__n { font-family: var(--font-display); font-style: italic; font-size: 34px; line-height: 1; color: var(--terracotta); margin-bottom: 14px; }
.point h3 { font-size: 24px; margin-bottom: 8px; }
.point p { font-size: 15.5px; line-height: 1.65; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .points { grid-template-columns: 1fr; } }

/* ---- Formati ---- */
.section-head { max-width: 680px; margin: 0 auto 56px; }
.section-head h2 { margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--hair);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .photo { border-radius: 0; --ratio: 4 / 3; }
.card__body { padding: 28px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.card__tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--sage-600); font-weight: 500; margin-bottom: 10px; }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 15.5px; line-height: 1.65; flex: 1; }
.card__link { margin-top: 22px; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.card__link::after { content: '→'; transition: transform .2s var(--ease); }
.card__link:hover::after { transform: translateX(3px); }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }

/* ---- Galleria ---- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery__item { margin: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ---- Diario serate ---- */
.diary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
.diary__item { background: var(--white); border: 1px solid var(--hair); border-radius: var(--radius); padding: 26px 24px 28px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--terracotta-100); }
.diary__when { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-600); font-weight: 500; }
.diary__item h3 { font-size: 23px; margin: 4px 0 6px; }
.diary__item p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
@media (max-width: 960px) { .diary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .diary { gap: 22px 14px; } .diary__item h3 { font-size: 20px; } .diary__item p { font-size: 14px; } .diary__when { font-size: 11px; } }

.season {
  margin-top: 64px; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  background: var(--sage-100); border-radius: var(--radius); padding: 30px 34px;
}
.season__badge {
  font-family: var(--font-display); font-style: italic; font-size: 26px; color: var(--sage-600); line-height: 1.1;
  padding-right: 28px; border-right: 1px solid var(--sage-300);
}
.season p { font-size: 16px; }
@media (max-width: 760px) {
  .season { grid-template-columns: 1fr; text-align: left; }
  .season__badge { border-right: 0; padding-right: 0; }
}

/* ---- Sezione scura: prossime date ---- */
.dark { background: var(--espresso); color: var(--on-dark-muted); }
.dark h2 { color: var(--cream); }
.dark h2 em { color: var(--terracotta-400); }
.dark .eyebrow { color: var(--sage-300); }
.dates { text-align: center; }
.dates h2 { margin-bottom: 22px; }
.dates .lead { margin: 0 auto 36px; }
.dates .btns { justify-content: center; }
.dates__note { margin-top: 26px; font-size: 14px; color: rgba(201,182,171,.8); }

/* ---- Chi siamo ---- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about .photo { --ratio: 4 / 5; max-width: 520px; }
.about .photo img { object-position: center 25%; }
.about h2 { margin-bottom: 22px; }
.about p + p { margin-top: 16px; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.person { border-top: 1px solid var(--soft); padding-top: 16px; }
.person strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--espresso); line-height: 1.1; }
.person span { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-600); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* ---- Contatti / richiesta ---- */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact h2 { margin-bottom: 20px; }
.contact__list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.contact__list svg { width: 18px; height: 18px; color: var(--sage); flex: none; }
.form {
  background: var(--white); border: 1px solid var(--hair); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-md); display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.field input, .field select, .field textarea {
  font: 400 16px/1.4 var(--font-sans); color: var(--espresso); background: var(--cream);
  border: 1px solid var(--soft); border-radius: var(--radius-sm); padding: 13px 14px; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terracotta-400); box-shadow: 0 0 0 3px rgba(192,111,82,.18); }
.form__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.form__hint { font-size: 13px; color: var(--text-muted); }
.form__hint a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }

/* ---- FAQ ---- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--soft); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--espresso); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-sans); font-weight: 300; font-size: 26px; color: var(--terracotta); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 24px; font-size: 16px; max-width: 64ch; }

/* ---- Footer ---- */
.footer { background: var(--espresso); color: var(--on-dark-muted); padding: 72px 0 36px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer__logo { height: 46px; width: auto; margin-bottom: 18px; }
.footer h4 { font: 500 11px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sage-300); margin: 6px 0 18px; }
.footer a { color: var(--on-dark-muted); }
.footer a:hover { color: var(--cream); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__legal {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(251,249,245,.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12.5px; color: rgba(201,182,171,.7);
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---- Barra mobile fissa ---- */
.mobile-cta {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  gap: 10px; padding: 8px; border-radius: 999px; background: rgba(45,18,9,.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow-md);
  transform: translateY(120%); transition: transform .35s var(--ease);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta .btn { flex: 1; padding: 13px 14px; font-size: 12px; }
@media (max-width: 760px) { .mobile-cta { display: flex; } .footer { padding-bottom: 100px; } }

/* ---- Comparsa leggera allo scroll ---- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}
