/* ==========================================================
   Sorelle Dicecca — Landing page
   Palette presa dalle foto: pietra di Altamura, pomodorino,
   tovaglia verde salvia, grano e papaveri, pecora nera del logo.
   Cambia le variabili qui sotto per modificare tutto il look.
   ========================================================== */

:root {
  --c-ink: #1b1c1a;          /* nero del logo */
  --c-stone: #f6efe2;        /* pietra di Altamura */
  --c-cream: #fbf7ef;
  --c-red: #d8402b;          /* pomodorino / bandana */
  --c-red-dark: #b3301e;
  --c-green: #2f6b5b;        /* verde salvia scuro */
  --c-green-light: #8cc7b2;  /* tovaglia */
  --c-yellow: #f2c14e;       /* grano / sole */
  --c-blue: #2d4f86;         /* ceramica dipinta */
  --c-muted: #5d5a52;

  --font-display: "DM Serif Display", Georgia, serif;
  --font-label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  --radius: 18px;
  --container: 1180px;
  --header-h: 76px;
  --section-y: clamp(64px, 9vw, 120px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0 0 .45em; }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h3 { font-size: 1.55rem; }
p  { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.eyebrow {
  font-family: var(--font-label);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-red);
  margin-bottom: .6em;
}

/* Logo in PNG con fondo bianco:
   - .blend       → il bianco sparisce su fondi chiari/colorati (logo nero)
   - .blend-white → logo bianco su fondi scuri/colorati            */
.blend { mix-blend-mode: multiply; }
.blend-white { filter: invert(1); mix-blend-mode: screen; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .95em 1.7em;
  border-radius: 999px;
  font: 700 .95rem var(--font-body);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--red   { background: var(--c-red); color: #fff; }
.btn--red:hover { background: var(--c-red-dark); }
.btn--green { background: var(--c-green); color: #fff; }
.btn--light { background: #fff; color: var(--c-green); }
.btn--ghost { border-color: var(--c-ink); color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-ink); color: #fff; }
.btn--big { font-size: 1.15rem; padding: 1.05em 2em; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(251, 247, 239, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(27, 28, 26, .08);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__sheep { height: 44px; width: auto; }
.logo__name  { height: 26px; width: auto; }

.nav { display: flex; gap: 30px; }
.nav a {
  font-family: var(--font-label);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 3px; border-radius: 3px;
  background: var(--c-red);
  transition: right .25s;
}
.nav a:hover::after { right: 0; }

.header__actions { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: flex; background: #fff; border: 1px solid rgba(27,28,26,.12); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0; background: none; cursor: pointer;
  font: 600 .95rem var(--font-label);
  letter-spacing: .1em;
  padding: .3em .85em;
  border-radius: 999px;
  color: var(--c-muted);
}
.lang-switch button[aria-pressed="true"] { background: var(--c-green); color: #fff; }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 0; background: none; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.menu-toggle span { display: block; height: 2px; background: var(--c-ink); transition: transform .25s, opacity .25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 92% 12%, rgba(242, 193, 78, .45) 0 180px, transparent 181px),
    radial-gradient(circle at 4% 96%, rgba(140, 199, 178, .5) 0 220px, transparent 221px),
    var(--c-stone);
  overflow: hidden;
}
.hero__inner {
  min-height: calc(100svh - var(--header-h) - 58px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: 56px;
}
.hero__title { font-size: clamp(2.8rem, 6.6vw, 5.4rem); }
.hero__title::after {
  content: "";
  display: block;
  width: 90px; height: 6px; margin-top: .35em;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--c-red) 0 33%, var(--c-yellow) 33% 66%, var(--c-green-light) 66%);
}
.hero__lead { font-size: 1.15rem; color: var(--c-muted); max-width: 34em; margin-bottom: 1.8em; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__media { position: relative; }
.hero__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 200px 200px var(--radius) var(--radius);
  box-shadow: 18px 18px 0 var(--c-green-light);
}
.hero__badge-img {
  position: absolute;
  left: -40px; bottom: -24px;
  width: 42%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid var(--c-cream);
  box-shadow: 0 16px 40px rgba(27,28,26,.18);
}
.sticker {
  position: absolute;
  top: 28px; right: -14px;
  background: var(--c-red);
  color: #fff;
  font: 600 1rem var(--font-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .7em 1.2em;
  border-radius: 999px;
  transform: rotate(6deg);
  box-shadow: 0 8px 20px rgba(216, 64, 43, .35);
}

/* ---------- Nastro scorrevole ---------- */
.ribbon { background: var(--c-red); color: #fff; overflow: hidden; padding: 14px 0; }
.ribbon__track { display: flex; width: max-content; animation: scroll 32s linear infinite; }
.ribbon__track span {
  font: 500 1.35rem var(--font-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-inline: 28px;
  white-space: nowrap;
}
.ribbon__track span::after { content: "✿"; margin-left: 56px; color: var(--c-yellow); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section-y); }
.section--cream { background: var(--c-stone); }
.section--yellow { background: var(--c-yellow); }
.section--yellow .eyebrow { color: var(--c-ink); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section__head p:last-child { color: var(--c-muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.split--top { align-items: start; }
.split__content > p { color: var(--c-muted); }
.section--yellow .split__content > p { color: var(--c-ink); }

/* Collage storia */
/* La foto di famiglia è intera (3:2, nessun taglio); quella del papà
   sta in alto a destra e copre solo il muro sopra le teste */
.collage { position: relative; padding-top: 26%; }
.collage img { border-radius: var(--radius); object-fit: cover; }
.collage img:first-child { width: 100%; aspect-ratio: 3 / 2; box-shadow: -16px 16px 0 var(--c-yellow); }
.collage img:last-child {
  position: absolute; right: 0; top: 0;
  width: 28%; aspect-ratio: 3 / 4;
  object-position: 50% 20%;
  border: 6px solid var(--c-cream);
}

.facts { list-style: none; padding: 0; margin: 2em 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.facts li { padding: 16px; border-radius: 14px; background: var(--c-stone); }
.facts li:nth-child(1) { border-top: 5px solid var(--c-green-light); }
.facts li:nth-child(2) { border-top: 5px solid var(--c-yellow); }
.facts li:nth-child(3) { border-top: 5px solid var(--c-red); }
.facts strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; }
.facts span { font-size: .9rem; color: var(--c-muted); }

/* Fascia payoff con foto */
.band {
  position: relative;
  color: #fff;
  text-align: center;
  /* Testo in alto sul cielo/colline, famiglia libera nella parte bassa */
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(240px, 30vw, 420px);
  background:
    linear-gradient(rgba(27, 28, 26, .55), rgba(27, 28, 26, .15) 55%, rgba(27, 28, 26, 0)),
    url("img/foto-17.jpg") center 55% / cover;
  isolation: isolate;
}
.band__inner { display: grid; justify-items: center; gap: 16px; }
.band__sheep { width: 84px; height: auto; }
.band__quote { font-family: var(--font-display); font-style: italic; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.15; margin: 0; max-width: 16em; text-shadow: 0 2px 20px rgba(0,0,0,.25); }

/* Prodotti */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product {
  --accent: var(--c-green);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 2px 0 rgba(27,28,26,.04);
  transition: transform .25s, box-shadow .25s;
}
.product:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 20px 40px rgba(27,28,26,.12); }
.product img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product__body { padding: 22px 24px 26px; border-top: 6px solid var(--accent); flex: 1; }
.product__body h3 { color: var(--accent); }
.product__body p { color: var(--c-muted); margin: 0; font-size: .98rem; }
.product--green  { --accent: var(--c-green); }
.product--red    { --accent: var(--c-red); }
.product--yellow { --accent: #c9952a; }
.product--blue   { --accent: var(--c-blue); }

/* Card "Vuoi ordinare?" a tutta larghezza sotto i prodotti */
.product--cta {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  background: var(--c-green);
  color: #fff;
  padding: 32px 40px;
  isolation: isolate;
}
.product--cta img { width: 80px; flex-shrink: 0; aspect-ratio: auto; }
.product--cta__text { flex: 1; }
.product--cta h3 { margin-bottom: .2em; }
.product--cta p { opacity: .85; margin: 0; }
.product--cta:hover { transform: translateY(-4px); }

@media (max-width: 760px) {
  .product--cta { flex-direction: column; align-items: flex-start; padding: 32px 28px; gap: 16px; }
}

/* Galleria */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 14px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; transition: transform .35s; }
.gallery img:hover { transform: scale(1.02); }
.gallery .g-wide { grid-column: span 2; }

/* Contatti */
.contact-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-cards li { background: var(--c-cream); border-radius: var(--radius); padding: 22px 26px; font-size: 1.15rem; }
.contact-cards a { text-decoration: none; }
.contact-cards a:hover { color: var(--c-red); }
.contact-cards__label {
  display: block;
  font: 600 .95rem var(--font-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-red);
  margin-bottom: 4px;
}
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { padding: .35em 1em; border-radius: 999px; background: var(--c-ink); color: #fff; font-size: .95rem; }
.socials a:hover { background: var(--c-red); color: #fff; }

/* Footer */
.footer { background: var(--c-ink); color: #cfc9bc; padding-block: 48px 32px; isolation: isolate; }
.footer__inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.footer__logo { width: 170px; height: auto; }
.footer__info { flex: 1; min-width: 260px; }
.footer__info p { margin: 0 0 .8em; font-size: .9rem; line-height: 1.7; }
.footer__name { font-family: var(--font-display); font-size: 1.3rem !important; color: #fff; }
.footer__info a { overflow-wrap: anywhere; }
.footer__small { font-size: .82rem !important; opacity: .7; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__credits { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; }
.footer__credits p { margin: 0; font-size: .8rem; opacity: .6; }
.footer__credits a { text-decoration: underline; text-underline-offset: 3px; }

/* WhatsApp fisso */
.wa-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }

/* Animazione all'ingresso (attivata da script.js) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner, .split { grid-template-columns: 1fr; }
  .hero__media { max-width: 520px; margin-inline: auto; width: 100%; }
  .hero__badge-img { left: -10px; }
  .sticker { right: 0; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .band { background-attachment: scroll; }
}

@media (max-width: 760px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--c-cream);
    border-bottom: 1px solid rgba(27,28,26,.08);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav.is-open { max-height: 320px; }
  .nav a { padding: 16px 20px; border-top: 1px solid rgba(27,28,26,.08); }
  .nav a::after { display: none; }
  .logo__name { display: none; }
  .facts { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .products { grid-template-columns: 1fr; }
  .gallery { grid-auto-rows: 150px; }
  .hero__img { box-shadow: 10px 10px 0 var(--c-green-light); }
  .sticker { font-size: .78rem; top: 16px; right: 8px; }
}

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