/* ============================================================
   RosalbaMirci — versione free Weeby
   Direzione: "La dignità come grammatica" — editoriale, caldo, sobrio
   Palette e tipografia da brand canvas cliente
   ============================================================ */

:root {
  /* Palette cliente (esatta) */
  --avorio:      #F7F4EE;   /* sfondo principale */
  --avorio-2:    #EFE9DD;   /* sezioni alternate / card */
  --oro:         #C8A46B;   /* accent: dettagli, icone, sottolineature */
  --oro-soft:    #D6BE92;
  --grigio:      #6E6A64;   /* testi secondari, didascalie */
  --verde:       #1F5C5A;   /* petrolio: titoli, link, pulsanti */
  --verde-deep:  #163B3A;   /* titoli forti, footer, CTA istituzionali */
  --ink:         #2A2723;   /* testo corrente (warm near-black) */

  --border:      rgba(22, 59, 58, 0.14);
  --border-gold: rgba(200, 164, 107, 0.45);
  --shadow-sm:   0 1px 3px rgba(22, 59, 58, 0.06);
  --shadow-md:   0 18px 48px -24px rgba(22, 59, 58, 0.35);
  --shadow-lg:   0 40px 80px -40px rgba(22, 59, 58, 0.45);

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius:   14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--avorio);
  background-image:
    radial-gradient(60rem 40rem at 110% -10%, rgba(200, 164, 107, 0.10), transparent 60%),
    radial-gradient(50rem 50rem at -15% 105%, rgba(31, 92, 90, 0.08), transparent 55%);
  background-repeat: no-repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--verde-deep); letter-spacing: -0.01em; }

p { max-width: 64ch; }

a { color: var(--verde); text-decoration: none; }

::selection { background: var(--oro); color: var(--verde-deep); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }

.section { padding-block: clamp(64px, 9vw, 128px); }
.section--alt { background: var(--avorio-2); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--verde);
  display: inline-block;
  margin-bottom: 18px;
}
/* Sottolineatura oro: SOLO sull'eyebrow hero (1 occorrenza),
   non come tic ripetuto su ogni sezione. */
.hero-eyebrow::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 12px;
  background: var(--oro);
}

.section-title { font-size: clamp(1.9rem, 4.2vw, 3rem); max-width: 18ch; }
.section-intro { color: var(--grigio); font-size: 1.08rem; margin-top: 20px; max-width: 58ch; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}
.btn--primary { background: var(--verde-deep); color: var(--avorio); box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--verde); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--ghost { background: transparent; color: var(--verde-deep); border-color: var(--border-gold); }
.btn--ghost:hover { background: rgba(200, 164, 107, 0.14); border-color: var(--oro); transform: translateY(-2px); }
.btn--light { background: var(--avorio); color: var(--verde-deep); }
.btn--light:hover { background: #FDFBF7; transform: translateY(-2px); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 238, 0.92);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); background: rgba(247, 244, 238, 0.97); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__logo { width: 44px; height: 44px; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.32rem; color: var(--verde-deep); line-height: 1; }
.brand__tag { display: block; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grigio); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 8px;
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 2px;
  background: var(--oro);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--verde); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__cta { margin-left: 12px; }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 120;
}
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--verde-deep); transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 29px; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-block: clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero-eyebrow { color: var(--verde); }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.04;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--verde); position: relative; white-space: nowrap; }
.hero h1 .accent::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.06em;
  height: 0.14em;
  background: var(--oro);
  opacity: 0.55;
  border-radius: 2px;
}
.hero__intro { font-size: 1.18rem; color: var(--grigio); max-width: 50ch; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-media { position: relative; }
.hero-media__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-media__frame img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-media::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  z-index: -1;
}
.media-caption {
  position: absolute;
  left: 16px; bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--avorio);
  background: rgba(22, 59, 58, 0.72);
  backdrop-filter: blur(4px);
  padding: 8px 14px;
  border-radius: 999px;
}

/* ============================================================
   PILASTRI
   ============================================================ */
.pillars { border-top: 1px solid var(--border); }
.pillars-head { max-width: 52ch; margin-bottom: clamp(36px, 5vw, 56px); }
.pillars-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.pillar { display: flex; flex-direction: column; gap: 14px; }
.pillar__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(31, 92, 90, 0.08);
  color: var(--verde);
}
.pillar__icon svg { width: 28px; height: 28px; }
.pillar h3 { font-size: 1.18rem; color: var(--verde-deep); }
.pillar p { font-size: 0.96rem; color: var(--grigio); }

/* ============================================================
   SPLIT (chi siamo / cosa facciamo / trasparenza)
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5.5vw, 84px); align-items: center; }
.split--reverse .split__media { order: -1; }

.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.split__media .media-caption { position: absolute; left: 16px; bottom: 16px; }

.lead { font-size: 1.12rem; color: var(--ink); margin-bottom: 18px; }
.body-text { color: var(--grigio); margin-bottom: 16px; }

/* lista valori (chip) */
.values { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.values li {
  list-style: none;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--verde-deep);
  padding: 8px 16px;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: rgba(247, 244, 238, 0.6);
}

/* tag interventi */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tags li {
  list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
}
.tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--oro); flex-shrink: 0; }

/* ---------- "I nostri limiti, per scelta" ---------- */
.principles {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(22, 59, 58, 0.04);
  padding: clamp(22px, 3vw, 34px);
}
.principles h3 { font-size: 1.3rem; margin-bottom: 6px; }
.principles__sub { font-size: 0.92rem; color: var(--grigio); margin-bottom: 18px; }
.principles ul { display: grid; gap: 14px; }
.principles li {
  list-style: none;
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 0.98rem; color: var(--ink);
}
.principles li svg { width: 22px; height: 22px; color: var(--verde); flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   COME AIUTARE — programmi
   ============================================================ */
.programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 52px; }
.program {
  display: flex; flex-direction: column;
  background: var(--avorio);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.program:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.program--feature { background: var(--verde-deep); border-color: var(--verde-deep); color: var(--avorio); }
.program--feature h3, .program--feature .program__price { color: var(--avorio); }
.program--feature .program__desc { color: rgba(247, 244, 238, 0.82); }
.program--feature .program__badge { background: var(--oro); color: var(--verde-deep); }

.program__badge {
  align-self: flex-start;
  font-family: var(--sans); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--verde); background: rgba(31, 92, 90, 0.1);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.program h3 { font-size: 1.4rem; margin-bottom: 10px; }
.program__price { font-family: var(--serif); font-size: 1.05rem; color: var(--oro); font-style: italic; margin-bottom: 12px; }
.program__desc { color: var(--grigio); font-size: 0.98rem; }

.help-note {
  margin-top: 40px;
  text-align: center;
  font-size: 1.02rem;
  color: var(--ink);
}
.help-note strong { color: var(--verde-deep); }
.help-note .email-text { color: var(--verde); font-weight: 600; white-space: nowrap; }

/* ============================================================
   MANIFESTO band
   ============================================================ */
.manifesto { background: var(--verde-deep); color: var(--avorio); position: relative; overflow: hidden; }
.manifesto::before {
  content: "“";
  position: absolute;
  top: -0.2em; left: 0.1em;
  font-family: var(--serif);
  font-size: 22rem;
  line-height: 1;
  color: var(--oro);
  opacity: 0.12;
  pointer-events: none;
}
.manifesto .container { position: relative; text-align: center; }
.manifesto blockquote {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.2vw, 3.1rem);
  line-height: 1.28;
  color: var(--avorio);
  max-width: 20ch;
  margin: 0 auto;
}
.manifesto blockquote .gold { color: var(--oro-soft); font-style: italic; }
.manifesto cite { display: block; margin-top: 28px; font-family: var(--sans); font-style: normal; font-size: 0.86rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247, 244, 238, 0.6); }

/* ============================================================
   CONTATTI
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.contact-card {
  background: var(--avorio);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
}
.contact-item { margin-bottom: 26px; }
.contact-item:last-child { margin-bottom: 0; }
.contact-item .label { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oro); margin-bottom: 8px; }
.contact-item .value { font-size: 1.18rem; color: var(--verde-deep); font-weight: 500; }
.contact-item .value--email { font-family: var(--serif); font-style: italic; font-size: 1.3rem; }
.contact-item .hint { font-size: 0.88rem; color: var(--grigio); margin-top: 6px; }

.contact-launch { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 0.92rem; color: var(--verde); font-weight: 600; letter-spacing: 0.04em; }
.contact-launch::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--oro); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--verde-deep); color: rgba(247, 244, 238, 0.74); padding-block: 56px 30px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(247, 244, 238, 0.14); }
.footer-brand { max-width: 34ch; }
.footer-brand .brand__name { color: var(--avorio); }
.footer-brand p { font-size: 0.92rem; color: rgba(247, 244, 238, 0.6); margin-top: 12px; }
.footer-col h3 { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oro); margin-bottom: 14px; }
.footer-col p { font-size: 0.95rem; color: rgba(247, 244, 238, 0.78); margin-bottom: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 0.82rem; color: rgba(247, 244, 238, 0.55); }
.footer-credit a { color: var(--oro-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-credit a:hover { color: var(--avorio); }

/* ============================================================
   ANIMAZIONI scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .site-header { backdrop-filter: blur(8px); }
}

@media (max-width: 980px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .programs { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }

  .nav-toggle { display: block; }

  /* Menu overlay full-screen — niente translateY, niente trappola backdrop-filter */
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: var(--avorio);
    background-image: radial-gradient(40rem 30rem at 90% 0%, rgba(200,164,107,0.14), transparent 60%);
    padding: 90px 28px 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0s linear 0.32s;
    z-index: 110;
  }
  body.menu-open .nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0s;
  }
  .nav__link { font-family: var(--serif); font-size: 1.6rem; color: var(--verde-deep); padding: 14px 10px; }
  .nav__link::after { display: none; }
  .nav__cta { margin-left: 0; margin-top: 18px; }
  .nav__cta .btn { font-size: 1.05rem; padding: 15px 36px; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 460px; margin-inline: auto; }
  .hero-media__frame img { aspect-ratio: 4 / 3; }
  .hero-media::before { inset: 12px -12px -12px 12px; }
  .hero h1 .accent { white-space: normal; }

  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split__media { order: 0; }

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

  .footer-top { flex-direction: column; gap: 28px; }
}

@media (max-width: 460px) {
  .pillars-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero__actions .btn { width: 100%; }
}

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

/* ---------- Focus visible ---------- */
:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; border-radius: 4px; }
