/* ============================================================================
   FARMACIA SANTO SPIRITO — DESIGN SYSTEM
   Impostazione "apothecary premium": carta calda, verde salvia del logo,
   verde foresta profondo, tipografia editoriale. Poche regole, molta aria.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   0. CARATTERI, OSPITATI SUL SITO (2026-10-30)
   Niente piu' richieste a Google: l'indirizzo del visitatore non esce dal sito.
   File variabili ricavati dai caratteri del marchio (motore social), divisi come
   quelli di Google: «latin» (italiano) e «latin-ext» (lettere accentate dell'Est).
   Bricolage: opsz 12-96, wght 400-800 (wdth fissato a 100). Manrope: wght 400-700.
---------------------------------------------------------------------------- */
/* Bricolage «-it» (2026-11-01): il file latin di Google ridotto ai caratteri che
   servono in italiano (lettere, cifre, à è é ì ò ù e maiuscole, « » ’ “ ” – — … · € ° © ® ™
   e poche lettere straniere dei nomi dei prodotti), con gli stessi assi opsz e wght.
   86 KB -> 53 KB. Un carattere che manca lo disegna il carattere di riserva.
   Ricavato con fontTools (pyftsubset): elenco dei caratteri nel rapporto r3-tecnica.md. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-latin-it.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS
---------------------------------------------------------------------------- */
:root {
  /* — Brand: verde salvia (dal logo) — */
  --green-50:  #f3f6ee;
  --green-100: #e7edda;
  --green-200: #d3ddbf;
  --green-300: #b7c99c;
  --green-400: #9bb77c;
  --green-500: #81aa60;   /* COLORE LOGO */
  --green-600: #6d9150;
  --green-700: #587541;
  --green-800: #465c35;
  --green-900: #3a4b2e;

  /* — Forest: verdi profondi per le superfici scure — */
  --forest-700: #1d3325;
  --forest-800: #14261a;
  --forest-900: #0e1c13;
  --forest-950: #08130c;

  /* — Accento: avorio caldo. Sostituisce il lime: piu' sobrio, piu' premium — */
  --bone-100: #f7f4ea;
  --bone-200: #efeadb;
  --bone-300: #e3dcc7;

  /* — Fondi pastello delle fasce (restyling 2026-09-13) —
     Tinte piatte su cui appoggiare le foto prodotto scontornate.
     Salvia e avorio vengono dal sistema; il rosa cipria e' il colore dei post
     prodotto del motore social (01_brand/02_palette.json); l'azzurro e' nuovo,
     scelto desaturato per non litigare col verde del logo. */
  --tile-sage:  #e7edda;   /* = green-100 */
  --tile-sky:   #dde8f0;   /* NUOVO: non era in palette */
  --tile-blush: #f3dad9;   /* Rosa Cipria, dal brand social */
  --tile-bone:  #efeadb;   /* = bone-200 */

  /* — Inchiostro (dal testo del logo) — */
  --ink-900: #1e2718;
  --ink-700: #404a37;   /* COLORE TESTO LOGO */
  --ink-500: #5e6952;
  --ink-400: #66705c;

  /* — Neutri caldi — */
  --cream:    #f5f4ec;
  --paper:    #fcfbf6;
  --white:    #ffffff;
  --sand-100: #efeee4;
  --sand-200: #e4e2d5;
  --line:     #e3e1d4;
  --line-strong: #cfcdbd;

  /* — Semantici — */
  --bg:         var(--paper);
  --bg-alt:     var(--cream);
  --surface:    var(--white);
  --text:       var(--ink-900);
  --text-soft:  var(--ink-500);
  --text-muted: var(--ink-400);
  --primary:    var(--green-600);
  --primary-ink:var(--green-700);
  --on-primary: #ffffff;
  --accent:     var(--bone-200);
  --on-accent:  var(--forest-900);
  --star:       #b3873f;

  /* — Tipografia — */
  --font-display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --fs-xs:   0.875rem;   /* 14 px: minimo per il pubblico della farmacia (era 12,8) */
  --fs-sm:   0.9rem;
  --fs-base: 1.02rem;
  --fs-md:   1.14rem;
  --fs-lg:   1.32rem;
  --fs-xl:   1.6rem;
  --fs-2xl:  clamp(1.8rem, 2.6vw, 2.35rem);
  --fs-3xl:  clamp(2.1rem, 3.4vw, 3rem);
  --fs-4xl:  clamp(2.6rem, 5vw, 4.1rem);
  --fs-5xl:  clamp(3rem, 6.5vw, 5rem);

  --lh-tight: 1.08;
  --lh-snug:  1.18;
  --lh-base:  1.72;

  /* — Spaziatura — */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;    --sp-10: 8rem;

  /* — Raggi: netti e discreti — */
  --r-xs: 3px;  --r-sm: 4px;  --r-md: 6px;  --r-lg: 8px;
  --r-xl: 10px; --r-2xl: 14px; --r-pill: 999px;

  /* — Ombre: quasi assenti. La gerarchia la fanno i bordi e lo spazio — */
  --sh-xs: none;
  --sh-sm: 0 1px 2px rgba(30,39,24,.035);
  --sh-md: 0 10px 28px rgba(30,39,24,.06);
  --sh-lg: 0 24px 60px rgba(30,39,24,.09);
  --sh-glow: none;

  /* — Layout — */
  --container: 1160px;
  --container-wide: 1320px;
  --container-text: 720px;
  --gutter: clamp(1.25rem, 5vw, 2.75rem);

  /* — Motion: lento e discreto — */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,.05,.36,1);
  --t-fast: .18s; --t: .32s; --t-slow: .6s;
}

/* ----------------------------------------------------------------------------
   2. RESET & BASE
---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
::selection { background: var(--green-200); color: var(--forest-900); }

/* ----------------------------------------------------------------------------
   3. TIPOGRAFIA
---------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -.022em;
  color: var(--ink-900);
}
.display { font-family: var(--font-display); font-weight: 400; line-height: var(--lh-tight); letter-spacing: -.025em; }
.h1 { font-size: var(--fs-4xl); line-height: var(--lh-tight); letter-spacing: -.025em; }
.h2 { font-size: var(--fs-3xl); }
.h3 { font-size: var(--fs-2xl); }
.h4 { font-size: var(--fs-xl); }
.lead { font-size: var(--fs-md); color: var(--text-soft); line-height: 1.65; font-weight: 400; }
.text-soft { color: var(--text-soft); }
.text-muted { color: var(--text-muted); }
.serif { font-family: var(--font-display); }
.italic { font-style: italic; }

/* Eyebrow / kicker — semplice testo maiuscolo spaziato, senza decorazioni */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans); font-weight: 600;
  font-size: var(--fs-xs); letter-spacing: .22em; text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: .9rem;
}
.eyebrow::before, .eyebrow::after { content: none; }
.eyebrow.on-dark { color: var(--green-300); }
.eyebrow.centered { display: block; text-align: center; }

/* ----------------------------------------------------------------------------
   4. LAYOUT HELPERS
---------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--container-wide); }
.section { padding-block: clamp(4rem, 7.5vw, 7rem); }
.section-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }
.center { text-align: center; }
.stack > * + * { margin-top: var(--sp-4); }
.section-head { max-width: var(--container-text); margin-inline: auto; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .lead { font-size: var(--fs-md); margin-top: .9rem; }
.section-head.left { margin-inline: 0; }
.grid { display: grid; gap: var(--sp-5); }
.flex { display: flex; }
.muted-divider { height: 1px; background: var(--line); border: 0; }

/* ----------------------------------------------------------------------------
   5. BOTTONI — netti, senza ombre colorate ne' sollevamenti
---------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--forest-900); --btn-fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem; padding: .92rem 1.7rem; border-radius: var(--r-sm);
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: .01em;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
  white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn::after { content: none; }
.btn:hover { background: var(--forest-800); }
.btn:active { opacity: .88; }

.btn-accent { --btn-bg: var(--bone-200); --btn-fg: var(--forest-900); }
.btn-accent:hover { background: #fff; }
.btn-dark { --btn-bg: var(--forest-900); --btn-fg: #fff; }
.btn-white { --btn-bg: #fff; --btn-fg: var(--forest-900); }
.btn-white:hover { background: var(--bone-100); }
.btn-primary { --btn-bg: var(--green-600); --btn-fg: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-ghost {
  --btn-bg: transparent; --btn-fg: var(--ink-900);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: transparent; border-color: var(--ink-900); }
.btn-ghost.on-dark { --btn-fg: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.7); }
.btn-lg { padding: 1.05rem 2rem; font-size: var(--fs-base); }
.btn-mini { padding: .55rem 1rem; font-size: var(--fs-xs); }
.btn-block { display: flex; width: 100%; }
.btn-whatsapp { --btn-bg: #1f7a49; --btn-fg: #fff; }
.btn-whatsapp:hover { background: #19653c; }

/* link con freccia */
.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: var(--fs-sm); color: var(--green-700); border-bottom: 1px solid var(--green-200); padding-bottom: 2px; }
.link-arrow svg { transition: transform var(--t) var(--ease-out); width: 1em; }
.link-arrow:hover { border-bottom-color: var(--green-600); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ----------------------------------------------------------------------------
   6. BADGE / CHIP
---------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .32rem .7rem; border-radius: var(--r-xs);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .03em;
  background: transparent; color: var(--green-700);
  border: 1px solid var(--green-200);
}
.badge.accent { background: var(--bone-200); color: var(--forest-900); border-color: var(--bone-300); }
.badge.glass { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.22); }
.badge.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.live::before { background: #4e9c6d; }

/* ----------------------------------------------------------------------------
   7. CARD — bordo sottile, niente ombra, niente sollevamento
---------------------------------------------------------------------------- */
.card {
  position: relative; background: var(--surface);
  border-radius: var(--r-lg); padding: clamp(1.5rem, 2.4vw, 2rem);
  box-shadow: none;
  border: 1px solid var(--line);
  transition: border-color var(--t) var(--ease), background var(--t);
}
.card-hover:hover { border-color: var(--green-300); }
.card-soft { background: var(--cream); border-color: transparent; }
.card-glass { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); color: #fff; }

/* icona */
.icon-badge {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-sm); background: transparent; color: var(--green-700);
  border: 1px solid var(--green-200);
  transition: border-color var(--t), color var(--t);
}
.icon-badge svg { width: 21px; height: 21px; stroke-width: 1.5; }
.card-hover:hover .icon-badge { border-color: var(--green-400); }

/* ----------------------------------------------------------------------------
   8. FORM
---------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700); }
.input, .select, .textarea {
  width: 100%; padding: .85rem 1rem; border-radius: var(--r-sm);
  background: var(--white); border: 1px solid var(--line-strong);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus {
  outline-offset: 2px; border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(129,170,96,.14);
}
.textarea { min-height: 110px; resize: vertical; }

/* ----------------------------------------------------------------------------
   9. SUPERFICI SCURE
---------------------------------------------------------------------------- */
.on-dark, .surface-dark { color: rgba(255,255,255,.78); }
.surface-dark { background: var(--forest-900); }
.surface-dark h1,.surface-dark h2,.surface-dark h3,.surface-dark h4 { color: #fff; }
.surface-green { background: var(--green-600); color: #fff; }

/* ----------------------------------------------------------------------------
   10. RIVELAZIONE ALLO SCROLL — una sola, sobria
---------------------------------------------------------------------------- */
/* Il velo si applica SOLO se il motore e' partito davvero: la classe
   `reveal-on` la mette js/reveal-init.js, e se main.js non rivela entro tre
   secondi se la toglie da solo. Senza JS, con JS rotto, in stampa e con meno
   movimento richiesto, il testo e' visibile e basta — prima non lo era, e in
   stampa sparivano titoli interi. */
html.reveal-on [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
html.reveal-on [data-reveal].in { opacity: 1; transform: none; }
html.reveal-on [data-reveal="left"], html.reveal-on [data-reveal="right"], html.reveal-on [data-reveal="scale"] { transform: translateY(14px); }
[data-delay="1"]{ transition-delay:.06s } [data-delay="2"]{ transition-delay:.12s }
[data-delay="3"]{ transition-delay:.18s } [data-delay="4"]{ transition-delay:.24s }
[data-delay="5"]{ transition-delay:.30s } [data-delay="6"]{ transition-delay:.36s }

/* La prima videata non aspetta main.js (2026-10-30). Titolo, sottotitolo e foto
   in cima alla pagina (.hero, .page-hero) entrano con un'animazione solo CSS che
   parte al primo disegno: prima restavano a opacita' 0 finche' main.js, in fondo
   alla pagina, non aggiungeva .in, e Chrome contava l'LCP solo da li'
   (1,2-1,6 s). Niente sfocatura: a schermo pieno costava tempo di lettura.
   Vince sulle regole di movimento.css per specificita'. */
html.reveal-on :is(.hero, .page-hero) [data-reveal] {
  opacity: 1; transform: none; filter: none; transition: none; will-change: auto;
  animation: primaVideata .7s var(--ease-out) both;
}
html.reveal-on :is(.hero, .page-hero) [data-delay="1"] { animation-delay: .06s; }
html.reveal-on :is(.hero, .page-hero) [data-delay="2"] { animation-delay: .12s; }
html.reveal-on :is(.hero, .page-hero) [data-delay="3"] { animation-delay: .18s; }
html.reveal-on :is(.hero, .page-hero) [data-delay="4"] { animation-delay: .24s; }
html.reveal-on :is(.hero, .page-hero) [data-delay="5"] { animation-delay: .30s; }
@keyframes primaVideata { from { opacity: .01; transform: translate3d(0, 14px, 0); } }

/* le animazioni decorative sono disattivate: look piu' calmo */
.float-anim, .spin-slow { animation: none !important; }

/* a11y */
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }
/* Anello del fuoco a due toni: il verde da solo faceva 2,38:1 sul verde scuro
   del piede e del menu, cioe' era invisibile proprio dove serve di piu'. */
:focus-visible {
  outline: 3px solid var(--forest-900);
  outline-offset: 2px;
  border-radius: 3px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .92);
}
.surface-dark :focus-visible,
.footer :focus-visible,
.mobile-menu :focus-visible,
.cta-band :focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 6px rgba(14, 28, 19, .92);
}


/* ----------------------------------------------------------------------------
   MENO MOVIMENTO E STAMPA — nessun contenuto puo' restare invisibile
---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html.reveal-on [data-reveal] {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  [data-delay] { transition-delay: 0s !important; }
  html.reveal-on :is(.hero, .page-hero) [data-reveal] { animation: none !important; }
}

@media print {
  [data-reveal], html.reveal-on [data-reveal], .prod-grid .prod-card {
    opacity: 1 !important; transform: none !important;
    animation: none !important; transition: none !important;
  }
  .header, .wa-float, .to-top, .mobile-menu, .page-hero-deco,
  .hero__bg, .page-hero::before, .page-hero::after { display: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
  body { background: #fff; color: #000; }
}
