/* ── Fonts ── */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/newsreader-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/newsreader-400i.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/newsreader-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-700.woff2') format('woff2');
}

/* ── Tokens ── */
:root {
  --white:     #FDFAF9;
  --bg-alt:    #F5F2F1;
  --border:    #E6E0DF;
  --bordeaux:  #51191F;
  --bordeaux-h:#6B2228;
  --ink:       #1E1B1C;
  --ink-soft:  #4A4344;
  --green:     #3E6B4F;
  --serif:     'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:      'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --r:         3px;
  --max:       1100px;
  --gap:       clamp(2.5rem, 6vw, 5rem);
}

/* ── 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: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--bordeaux); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; border-radius: 2px; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--bordeaux);
  line-height: 1.25;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); margin-bottom: 1.1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); margin-bottom: .6rem; color: var(--ink); }
p { max-width: 68ch; margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout helpers ── */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}
.section { padding-block: var(--gap); }
.section--alt { background: var(--bg-alt); }
.section--bordeaux { background: var(--bordeaux); color: var(--white); }
.section--bordeaux h2, .section--bordeaux h3 { color: var(--white); }

/* ── CTA Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  background: var(--bordeaux);
  color: var(--white);
  font-family: var(--sans);
  font-size: .975rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .85em 2em;
  border-radius: var(--r);
  min-height: 48px;
  transition: background .18s, transform .12s;
  cursor: pointer;
  border: none;
}
.btn:hover { background: var(--bordeaux-h); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; }
.btn--outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn--outline:hover { background: rgba(255,255,255,.12); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bordeaux);
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 1px 6px rgba(30,27,28,.18);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 62px;
}
.site-logo {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { color: rgba(255,255,255,.85); }
.site-nav { display: flex; align-items: center; gap: 1.8rem; flex: 1; justify-content: center; }
.site-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .15s;
}
.site-nav a:hover { color: var(--white); }
.site-header .btn { font-size: .825rem; padding: .65em 1.5em; min-height: 40px; flex-shrink: 0; }

/* ── Hero ── */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-content { max-width: 560px; }
.hero h1 { margin-bottom: 1.1rem; }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 2rem;
}
.hero-reassurance {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 2rem;
}
.hero-reassurance li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  list-style: none;
  margin-bottom: 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-reassurance li svg { flex-shrink: 0; margin-top: .2em; }
.hero-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-img-wrap img {
  max-height: 480px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(81,25,31,.13));
}

/* ── Chiffres clés ── */
.stats {
  padding-block: clamp(1.8rem, 4vw, 3rem);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 1.4rem 1rem;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--bordeaux);
  line-height: 1;
  margin-bottom: .3rem;
}
.stat-label {
  font-size: .83rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ── Content sections ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
}
.content-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ── Composition table ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 1rem;
}
.scheda-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  min-width: 520px;
}
.scheda-table thead {
  background: var(--bordeaux);
  color: var(--white);
}
.scheda-table thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.scheda-table thead th:last-child { text-align: right; }
.scheda-table tbody tr { border-bottom: 1px solid var(--border); }
.scheda-table tbody tr:last-child { border-bottom: none; }
.scheda-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.scheda-table td {
  padding: .7rem 1rem;
  vertical-align: top;
  color: var(--ink);
}
.scheda-table td:first-child { font-weight: 600; }
.scheda-table td:nth-child(2) { color: var(--ink-soft); font-size: .88rem; }
.scheda-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  color: var(--bordeaux);
}
.table-note {
  font-size: .83rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ── Come agisce: card grid ── */
.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.mechanism-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.6rem 1.4rem;
}
.mechanism-card h3 { margin-bottom: .6rem; font-size: 1rem; color: var(--bordeaux); }
.mechanism-card p { font-size: .93rem; margin-bottom: 0; }

/* ── Posologia ── */
.posology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.posology-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem 1.8rem;
  text-align: center;
}
.posology-time {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bordeaux);
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.posology-count {
  font-size: 3.5rem;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--bordeaux);
  line-height: 1;
  display: block;
}
.posology-unit {
  font-size: .9rem;
  color: var(--ink-soft);
  margin-top: .3rem;
}
.posology-list {
  list-style: none;
  padding: 0;
  margin-top: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.posology-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .95rem;
  margin-bottom: 0;
}
.posology-list li svg { flex-shrink: 0; margin-top: .25em; }

/* ── Avvertenze ── */
.avvertenze-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--bordeaux);
  border-radius: var(--r);
  padding: 1.8rem 2rem;
}
.avvertenze-box ul { list-style: none; padding: 0; }
.avvertenze-box li {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.avvertenze-box li:last-child { border-bottom: none; padding-bottom: 0; }
.avvertenze-box li svg { flex-shrink: 0; margin-top: .25em; }

/* ── Ordine steps ── */
.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}
.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: 0;
  counter-increment: steps;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bordeaux);
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .15em;
}
.step-text { font-size: .97rem; padding-top: .4em; line-height: 1.6; }
.step-text strong { color: var(--bordeaux); }

/* ── FAQ ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.faq-list details {
  border-bottom: 1px solid var(--border);
}
.faq-list details:last-child { border-bottom: none; }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  list-style: none;
  background: var(--white);
  transition: background .15s;
  min-height: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%2351191F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(180deg); }
.faq-list summary:hover { background: var(--bg-alt); }
.faq-list details[open] summary { background: var(--bg-alt); color: var(--bordeaux); }
.faq-answer {
  padding: 0 1.4rem 1.3rem;
  font-size: .95rem;
  color: var(--ink-soft);
  background: var(--bg-alt);
  line-height: 1.7;
}
.faq-answer p { max-width: 70ch; margin-bottom: 0; }

/* ── CTA final ── */
.cta-final { text-align: center; padding-block: clamp(3rem, 7vw, 5rem); }
.cta-final-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: .6rem;
}
.cta-final-sub {
  color: rgba(255,255,255,.82);
  font-size: 1rem;
  margin-bottom: 1.8rem;
  max-width: 50ch;
  margin-inline: auto;
}

/* ── Footer ── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.65);
  padding-block: 2.5rem;
  font-size: .83rem;
  line-height: 1.6;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: var(--white); }
.footer-disclaimer { max-width: 80ch; }

/* ── Mobile sticky CTA bar ── */
#mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: .75rem 1rem;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(30,27,28,.1);
}
#mobile-cta-bar .btn { width: 100%; justify-content: center; font-size: 1rem; min-height: 52px; }

/* ── Fade-in animation ── */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s ease, transform .55s ease;
  }
  .fade-in.visible {
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .mechanism-grid { grid-template-columns: 1fr 1fr; }
  .content-grid--3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-header .btn { font-size: .8rem; padding: .6em 1.2em; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-img-wrap { order: -1; }
  .hero-img-wrap img { max-height: 280px; }
  .stats .container { grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-bottom: none; }
  .mechanism-grid { grid-template-columns: 1fr; }
  .content-grid--3 { grid-template-columns: 1fr; }
  .posology-grid { grid-template-columns: 1fr; gap: 1rem; }
  #mobile-cta-bar { display: block; }
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  .stats .container { grid-template-columns: 1fr 1fr; }
  .avvertenze-box { padding: 1.2rem 1.2rem; }
  .faq-list summary { padding: 1rem 1.1rem; font-size: .95rem; }
}
