/* ============================================================
   LEVISNAT - Cosmetici botanici
   Palette "Forest": verde profondo + osso + ambra
   Raggi: card e immagini 18px, elementi interattivi a pillola
   ============================================================ */

:root {
  --osso:      #F1EFE7;
  --osso-2:    #E7E3D6;
  --inchiostro:#1B2A22;
  --verde:     #21402F;
  --verde-2:   #2E5540;
  --scuro:     #142219;
  --ambra:     #C08A2D;
  --ambra-t:   #96690F;
  --linea:     rgba(27, 42, 34, .16);
  --linea-ch:  rgba(241, 239, 231, .18);
  --r-card:    18px;
  --r-pill:    999px;
  --ease:      cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Satoshi', -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--inchiostro);
  background: var(--osso);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--verde); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3 { font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 .5em; }

h1 { font-size: clamp(2.5rem, 5.2vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }

p { margin: 0 0 1em; }

.cont { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }

.salta {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
  background: var(--verde); color: var(--osso);
  padding: 10px 22px; border-radius: var(--r-pill);
}
.salta:focus { left: 12px; }

/* ---------- Bottoni ---------- */

.btn {
  display: inline-block;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 15px 34px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn:active { transform: scale(.98); }

.btn-verde { background: var(--verde); color: var(--osso); }
.btn-verde:hover { background: var(--verde-2); }

.btn-osso { background: var(--osso); color: var(--verde); }
.btn-osso:hover { background: #fff; }

.btn-linea { background: transparent; color: var(--verde); border-color: var(--verde); }
.btn-linea:hover { background: var(--verde); color: var(--osso); }

/* ---------- Navigazione ---------- */

.nav-wrap {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--osso) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linea);
}

.nav {
  max-width: 1240px; margin: 0 auto; padding-inline: 24px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.nav-logo {
  font-weight: 900; font-size: 1.25rem; letter-spacing: .08em;
  color: var(--inchiostro); text-decoration: none;
}
.nav-logo-dot { color: var(--ambra); }

.nav-menu { display: flex; align-items: center; gap: 30px; }

.nav-menu a {
  color: var(--inchiostro); text-decoration: none;
  font-weight: 500; font-size: .98rem;
  transition: color .2s;
}
.nav-menu a:hover, .nav-menu a.attivo { color: var(--ambra-t); }

.nav-carrello {
  border: 1.5px solid var(--verde); border-radius: var(--r-pill);
  padding: 7px 18px;
}
.nav-badge {
  display: inline-block; min-width: 20px; text-align: center;
  background: var(--ambra); color: #fff;
  border-radius: var(--r-pill); font-size: .78rem; font-weight: 700;
  padding: 1px 6px; margin-left: 2px;
}

.nav-burger { display: none; }

@media (max-width: 860px) {
  .nav-burger {
    display: flex; flex-direction: column; gap: 6px;
    background: none; border: 0; padding: 8px; cursor: pointer;
  }
  .nav-burger span {
    width: 24px; height: 2px; background: var(--inchiostro);
    transition: transform .3s var(--ease), opacity .3s;
  }
  .nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--osso);
    border-bottom: 1px solid var(--linea);
    display: none; padding: 8px 24px 20px;
  }
  .nav-menu.aperto { display: flex; }
  .nav-menu a { padding: 13px 0; border-bottom: 1px solid var(--linea); }
  .nav-menu a:last-child { border-bottom: 0; }
  .nav-carrello { border: 0; padding: 13px 0; }
}

/* ---------- Hero ---------- */

.hero {
  min-height: calc(100dvh - 68px);
  display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: 48px;
  max-width: 1240px; margin: 0 auto; padding: 32px 24px 56px;
}

.hero-testo { animation: salita .9s var(--ease) both; }
.hero-testo p { font-size: 1.15rem; max-width: 42ch; color: #3d5044; }
.hero-testo .btn { margin-top: 10px; }

.hero-figura {
  position: relative;
  animation: salita .9s var(--ease) .15s both;
}
.hero-figura img {
  width: 100%; height: min(72dvh, 640px); object-fit: cover;
  border-radius: var(--r-card);
}

@keyframes salita {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 24px 16px 40px; gap: 28px; min-height: 0; }
  .hero-figura img { height: 54dvh; }
}

/* ---------- Nastro (marquee) ---------- */

.nastro {
  background: var(--verde); color: var(--osso);
  overflow: hidden; padding: 14px 0;
  white-space: nowrap;
}
.nastro-riga {
  display: inline-flex; gap: 44px; padding-right: 44px;
  font-weight: 700; letter-spacing: .06em; font-size: .95rem;
  animation: scorri 28s linear infinite;
}
.nastro-riga span::after { content: "✦"; color: var(--ambra); margin-left: 44px; font-size: .8em; }

@keyframes scorri {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ---------- Sezioni ---------- */

.sezione { padding: 88px 0; }
.sezione-testa { max-width: 62ch; margin-bottom: 44px; }
.sezione-testa p { color: #3d5044; font-size: 1.08rem; }

/* ---------- Griglia prodotti ---------- */

.griglia-prodotti {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.griglia-prodotti .scheda:nth-child(2) { margin-top: 36px; }
.griglia-prodotti .scheda:nth-child(4) { margin-top: 36px; }

.scheda { text-decoration: none; color: inherit; display: block; }

.scheda-figura {
  overflow: hidden; border-radius: var(--r-card);
  aspect-ratio: 3 / 4; background: var(--osso-2);
}
.scheda-figura img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.scheda:hover .scheda-figura img { transform: scale(1.045); }

.scheda h3 { margin: 16px 0 2px; }
.scheda-sotto { color: #5a6b60; font-size: .92rem; margin: 0 0 6px; }
.scheda-prezzo { font-weight: 700; color: var(--ambra-t); }

@media (max-width: 960px) {
  .griglia-prodotti { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .griglia-prodotti .scheda:nth-child(2),
  .griglia-prodotti .scheda:nth-child(4) { margin-top: 0; }
}
@media (max-width: 520px) {
  .griglia-prodotti { grid-template-columns: 1fr; }
}

/* ---------- Blocco verde (formula) ---------- */

.blocco-verde {
  background: var(--scuro); color: var(--osso);
  padding: 96px 0;
}
.blocco-verde h2 { color: var(--osso); }
.blocco-verde .griglia-2 { align-items: center; }
.blocco-verde .testo p { color: #c9cec2; font-size: 1.08rem; max-width: 46ch; }

.valori { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.valori li {
  border: 1.5px solid var(--linea-ch);
  border-radius: var(--r-pill);
  padding: 9px 20px; font-weight: 500; font-size: .95rem;
}

.cifra { margin-top: 36px; }
.cifra strong {
  display: block; font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 900; letter-spacing: -.02em; line-height: 1; color: var(--ambra);
}
.cifra span { color: #c9cec2; }

/* ---------- Griglie generiche ---------- */

.griglia-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

.figura-tonda { border-radius: var(--r-card); overflow: hidden; }
.figura-tonda img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .griglia-2 { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Rituale ---------- */

.rituale-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; }

.rituale-sinistra { position: sticky; top: 100px; align-self: start; }
.rituale-sinistra img {
  border-radius: var(--r-card); width: 100%;
  height: 380px; object-fit: cover; margin-top: 28px;
}

.passo {
  padding: 30px 0;
  display: grid; grid-template-columns: 84px 1fr; gap: 20px;
}
.passo + .passo { border-top: 1px solid var(--linea); }
.passo-verbo {
  font-weight: 900; font-size: 1.05rem; color: var(--ambra-t);
  letter-spacing: .02em;
}
.passo h3 { margin-bottom: 6px; }
.passo p { color: #3d5044; margin-bottom: 10px; }
.passo a { font-weight: 700; }

@media (max-width: 860px) {
  .rituale-grid { grid-template-columns: 1fr; gap: 8px; }
  .rituale-sinistra { position: static; }
  .rituale-sinistra img { height: 260px; }
  .passo { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Recensioni ---------- */

.recensioni-fila {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(420px, 82vw);
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: thin; scrollbar-color: var(--verde) transparent;
}
.recensione {
  scroll-snap-align: start;
  background: #fff;
  border-radius: var(--r-card);
  padding: 32px;
  box-shadow: 0 10px 30px rgba(27, 42, 34, .07);
}
.recensione blockquote { margin: 0 0 20px; font-size: 1.1rem; font-weight: 500; }
.recensione footer { display: flex; align-items: center; gap: 14px; }
.recensione footer img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.recensione cite { font-style: normal; font-weight: 700; display: block; }
.recensione small { color: #5a6b60; }

/* ---------- Newsletter ---------- */

.news { background: var(--osso-2); }
.news .interno { max-width: 560px; margin: 0 auto; text-align: center; }
.news p { color: #3d5044; }

.news form { display: flex; gap: 12px; margin-top: 26px; text-align: left; }
.news .campo { flex: 1; }

label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%; font: inherit;
  padding: 14px 18px;
  border: 1.5px solid var(--linea);
  border-radius: var(--r-pill);
  background: #fff; color: var(--inchiostro);
}

/* Niente frecce native sui campi numerici: il controllo è lo stepper */
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
textarea { border-radius: var(--r-card); resize: vertical; min-height: 130px; }

input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--verde); outline-offset: 2px;
}
::placeholder { color: #6d7d72; }

.aiuto { font-size: .85rem; color: #5a6b60; margin-top: 6px; }
.errore-campo { font-size: .88rem; color: #8f2d1e; font-weight: 500; margin-top: 6px; }

@media (max-width: 560px) {
  .news form { flex-direction: column; }
}

/* ---------- Avvisi ---------- */

.avviso {
  border-radius: var(--r-card);
  padding: 18px 24px; margin-bottom: 28px;
  font-weight: 500;
}
.avviso-ok { background: #dfe8d9; color: #274427; border: 1px solid #b8ccae; }
.avviso-errore { background: #f0ddd6; color: #7c2916; border: 1px solid #ddb3a4; }

/* ---------- Pagina prodotto ---------- */

.prodotto-vista { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 56px 0 88px; }
.prodotto-vista .figura-tonda img { aspect-ratio: 3 / 4; }
.prodotto-info h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
.prodotto-info .sotto { color: #5a6b60; font-size: 1.05rem; margin-top: -8px; }
.prodotto-prezzo { font-size: 1.7rem; font-weight: 900; color: var(--ambra-t); margin: 18px 0 6px; }
.prodotto-formato { color: #5a6b60; margin-bottom: 22px; }

.acquisto { display: flex; align-items: center; gap: 14px; margin: 28px 0 8px; flex-wrap: wrap; }

.qta-stepper {
  display: inline-flex; align-items: center;
  background: #fff;
  border: 1.5px solid var(--linea);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.qta-stepper button {
  width: 46px; height: 52px;
  background: none; border: 0; cursor: pointer;
  font-size: 1.25rem; font-weight: 500; color: var(--verde);
  transition: background .2s;
}
.qta-stepper button:hover { background: var(--osso); }
.qta-stepper button:active { transform: scale(.94); }
.qta-stepper input,
.qta-stepper input[type="number"] {
  width: 44px; border: 0; border-radius: 0; padding: 0;
  text-align: center; font-weight: 700; font-size: 1.05rem;
  background: transparent;
}
.qta-stepper input:focus-visible { outline: 2px solid var(--verde); outline-offset: -2px; }

.dettagli { margin-top: 40px; border-top: 1px solid var(--linea); }
.dettagli details { border-bottom: 1px solid var(--linea); }
.dettagli summary {
  cursor: pointer; font-weight: 700; padding: 18px 0;
  list-style: none; position: relative;
}
.dettagli summary::after {
  content: "+"; position: absolute; right: 4px;
  font-weight: 400; font-size: 1.3rem; color: var(--ambra-t);
  transition: transform .3s var(--ease);
}
.dettagli details[open] summary::after { transform: rotate(45deg); }
.dettagli details p { color: #3d5044; padding-bottom: 18px; }

@media (max-width: 860px) {
  .prodotto-vista { grid-template-columns: 1fr; gap: 32px; padding: 24px 0 56px; }
}

/* ---------- Carrello ---------- */

.tab-carrello { width: 100%; border-collapse: collapse; }
.tab-carrello th {
  text-align: left; font-size: .85rem; letter-spacing: .04em;
  padding: 0 0 14px; border-bottom: 1px solid var(--linea);
}
.tab-carrello td { padding: 20px 16px 20px 0; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tab-carrello img { width: 76px; height: 96px; object-fit: cover; border-radius: 12px; }
.tab-carrello .riga-nome { font-weight: 700; }
.tab-carrello input { width: 76px; text-align: center; padding: 10px; }

.btn-rimuovi {
  background: none; border: 0; cursor: pointer;
  color: #8f2d1e; font: inherit; font-size: .9rem; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px; padding: 0;
}

.carrello-somma { margin-top: 32px; display: flex; justify-content: flex-end; }
.carrello-somma .box { min-width: 320px; }
.carrello-somma .riga { display: flex; justify-content: space-between; padding: 8px 0; }
.carrello-somma .totale { font-weight: 900; font-size: 1.3rem; border-top: 1px solid var(--linea); padding-top: 14px; margin-top: 6px; }

.vuoto { text-align: center; padding: 72px 0; }
.vuoto p { color: #3d5044; }

/* ---------- Checkout / Contatti form ---------- */

.form-griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form-griglia .largo { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-griglia { grid-template-columns: 1fr; } }

/* ---------- Pagina interna: intestazione ---------- */

.pagina-testa { padding: 64px 0 12px; max-width: 70ch; }
.pagina-testa p { font-size: 1.12rem; color: #3d5044; }

/* ---------- Pagine legali ---------- */

.prosa { max-width: 70ch; padding-bottom: 88px; }
.prosa h2 { font-size: 1.35rem; margin-top: 2.4em; }
.prosa p, .prosa li { color: #3d5044; }
.prosa ul { padding-left: 22px; margin: 0 0 1em; }
.prosa li { margin-bottom: .4em; }
.prosa .aggiornamento { font-size: .9rem; color: #5a6b60; }

/* ---------- Footer ---------- */

.footer {
  background: var(--scuro); color: #c9cec2;
  padding: 72px 0 36px;
}
.footer a { color: var(--osso); text-decoration: none; }
.footer a:hover { color: var(--ambra); }

.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--linea-ch);
}

.footer-logo {
  font-weight: 900; font-size: 1.2rem; letter-spacing: .08em;
  color: var(--osso); margin: 0 0 12px;
}
.footer-logo span { color: var(--ambra); }
.footer-tag { max-width: 34ch; margin: 0; }

.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-col p { margin: 0; }
.footer-h { font-weight: 700; color: var(--osso); margin: 0 0 6px; }

.footer-base {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 28px; font-size: .9rem;
}
.footer-base p { margin: 0; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-base { flex-direction: column; }
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Riduzione movimento ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-testo, .hero-figura { animation: none; }
  .nastro-riga { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scheda:hover .scheda-figura img { transform: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
