/* Font locali: i percorsi sono relativi a questo foglio, nella root. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/DMSans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/Fraunces-latin.woff2") format("woff2");
}

/* Base e accessibilità */
:root {
  --paper: #f6f1e7;
  --forest: #244638;
  --clay: #b85d46;
  --ink: #1f2a24;
  --line: #e4dccb;
  --card: #faf7f0;
  --photo-paper: #eee7da;
  --sticky-height: 0px;
  color-scheme: light;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; scroll-padding-bottom: calc(var(--sticky-height) + 16px); }
body { margin: 0; font-size: 16px; line-height: 1.5; }
body.has-sticky-bar { padding-bottom: var(--sticky-height); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .wordmark, .plan-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  color: var(--forest);
}
h1 { font-size: clamp(40px, 10.8vw, 66px); line-height: .99; letter-spacing: -.055em; }
h2 { font-size: clamp(32px, 7.8vw, 44px); line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
h3 { font-size: 25px; line-height: 1.2; letter-spacing: -.025em; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, summary, label { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 5px;
}
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
.container { width: min(1200px, calc(100% - 36px)); margin-inline: auto; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.visually-hidden, .plan-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.media { display: block; overflow: hidden; background: var(--photo-paper); }
.media img { visibility: hidden; }
.media img.is-loaded { visibility: visible; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 12px 26px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  color: var(--paper);
  background: var(--forest);
  text-align: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .18s, color .18s;
}
.button:hover { background: #19382b; }
.price { color: var(--clay); font-family: "Fraunces", Georgia, serif; font-size: 26px; font-weight: 500; line-height: 1.25; letter-spacing: -.035em; }
.section { padding-block: 36px; border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: 24px; }

/* HEADER */
.announcement { padding: 9px 18px; text-align: center; color: var(--paper); background: var(--forest); font-size: 16px; }
.header-inner { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-size: 34px; line-height: 1; letter-spacing: .065em; text-decoration: none; }
.desktop-nav { display: none; }
.cart-link { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; }

/* MAIN — Hero */
.hero { display: grid; }
.hero-media { aspect-ratio: 5 / 3; margin-inline: -10px; }
.hero-media img { object-position: 50% 60%; }
.hero-copy { padding-block: 18px 30px; min-width: 0; }
.hero-description { font-size: 18px; line-height: 1.4; margin-top: 10px; }
.hero-price { margin-top: 20px; }
.hero-note { margin-top: 10px; }
.hero-button { width: 100%; margin-top: 22px; font-family: "Fraunces", Georgia, serif; font-weight: 500; }
.hero-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 30px; }
.hero-benefits li { display: flex; align-items: center; flex-direction: column; gap: 9px; padding-inline: 7px; text-align: center; line-height: 1.4; }
.hero-benefits li + li { border-left: 1px solid var(--line); }

/* MAIN — Kit e preparazione */
.kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kit-card { overflow: hidden; border-radius: 14px; background: var(--card); }
.kit-card .media { aspect-ratio: 6 / 5; }
.kit-card-copy { padding: 15px 12px 18px; text-align: center; }
.kit-card h3 { font-size: 20px; }
.kit-card p { margin-top: 8px; font-size: 16px; line-height: 1.45; }
.kit-card:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.kit-card:last-child .media { height: 100%; min-height: 180px; }
.preparation-grid { display: grid; gap: 30px; }
.preparation-card .media { aspect-ratio: 6 / 5; border-radius: 16px; }
.step-copy { display: flex; align-items: flex-start; gap: 16px; margin-top: 18px; }
.step-copy p { margin-top: 8px; }
.step-number { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--clay); color: var(--paper); font-family: "Fraunces", Georgia, serif; font-size: 25px; line-height: 1; }
.latte-card { display: grid; margin-top: 36px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.latte-card .media { aspect-ratio: 4 / 3; }
.latte-copy { padding: 24px; align-self: center; }
.latte-copy p { margin-top: 12px; }

/* MAIN — Origine */
.origin-section { display: grid; gap: 28px; }
.origin-media { aspect-ratio: 1; border-radius: 16px; }
.origin-copy > p { margin-top: 20px; font-size: 18px; }
.origin-list { margin-top: 24px; display: grid; gap: 18px; }
.origin-list li { display: flex; gap: 12px; align-items: flex-start; }
.origin-list .icon { width: 23px; height: 23px; color: var(--forest); }

/* MAIN — Abbonamento e radio native */
.subscription-grid { display: grid; gap: 26px; }
.timeline { display: grid; gap: 28px; }
.timeline li { display: flex; position: relative; gap: 20px; align-items: flex-start; }
.timeline li:first-child::after { content: ""; position: absolute; width: 1px; background: var(--clay); left: 18px; top: 44px; bottom: -20px; }
.timeline h3 { font-size: 25px; }
.timeline p { margin-top: 5px; font-size: 18px; }
.subscription-note { margin-top: 28px; }
.plan-options { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
.plan-option { position: relative; }
.plan-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 20px 18px; border: 1px solid #bfb6a7; border-radius: 15px; cursor: pointer; }
.plan-copy { display: grid; gap: 7px; min-width: 0; }
.plan-title { display: block; font-size: 25px; line-height: 1.15; letter-spacing: -.035em; }
.badge { justify-self: start; border-radius: 999px; background: var(--clay); color: #fff; padding: 3px 13px; font-size: 19px; font-weight: 700; }
.radio-mark { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--ink); padding: 4px; }
.plan-option input:checked + .plan-card { border-color: var(--clay); background: #f8eee3; }
.plan-option input:checked + .plan-card .radio-mark { border-color: var(--clay); }
.plan-option input:checked + .plan-card .radio-mark::after { content: ""; display: block; width: 100%; height: 100%; background: var(--clay); border-radius: 50%; }
.plan-option input:focus-visible + .plan-card { outline: 3px solid var(--forest); outline-offset: 4px; }
.plan-option input:disabled + .plan-card { opacity: .55; cursor: not-allowed; }
.plan-form .button { width: 100%; margin-top: 20px; }
.tax-note { margin-top: 12px; text-align: center; font-size: 16px; }

/* MAIN — Storia, garanzie e domande */
.about-section { text-align: center; padding-block: 52px; }
.about-section p { max-width: 750px; margin-inline: auto; font-size: 20px; }
.guarantees-grid { display: grid; gap: 28px; }
.guarantees-grid .icon { margin-bottom: 12px; }
.guarantees-grid h3 { font-size: 24px; }
.guarantees-grid p { margin-top: 10px; }
.guarantees-grid a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 66px; padding-block: 18px; font-size: 20px; line-height: 1.35; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.faq-toggle { flex: 0 0 24px; text-align: center; font-size: 28px; font-weight: 400; line-height: 1; }
.faq-toggle::before { content: "+"; }
details[open] .faq-toggle::before { content: "−"; }
details p { max-width: 720px; padding: 0 36px 22px 0; }
.closing { text-align: center; padding-block: 36px 56px; }
.closing .price { margin-top: 20px; }
.closing .button { width: 100%; max-width: 340px; margin-top: 24px; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 36px; }
.footer-nav { display: flex; flex-wrap: wrap; column-gap: 24px; margin-top: 24px; }
.footer-nav a { display: inline-flex; min-height: 44px; align-items: center; }
.legal { margin-top: 24px; font-size: 16px; }

/* Barra mobile: altezza misurata anche con zoom del testo e safe area. */
.sticky-bar { position: fixed; z-index: 10; inset: auto 0 0; border-top: 1px solid var(--line); background: var(--paper); padding: 12px 18px max(12px, env(safe-area-inset-bottom)); }
.sticky-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 600px; margin-inline: auto; }
.sticky-bar .price { white-space: nowrap; font-family: "DM Sans", sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.sticky-bar .button { flex: 0 0 auto; padding: 12px 18px; font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 500; }

@media (min-width: 600px) {
  .hero-media { margin-inline: 0; }
  .hero-copy { max-width: 640px; }
  .hero-benefits li { padding-inline: 16px; }
  .kit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kit-card:last-child { grid-column: auto; display: block; }
  .kit-card:last-child .media { height: auto; min-height: 0; }
  .latte-card { grid-template-columns: 1fr 1.3fr; }
  .latte-card .media { height: 100%; }
  .guarantees-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* DESKTOP — struttura predisposta per i blocchi del tema. */
@media (min-width: 960px) {
  body.has-sticky-bar { padding-bottom: 0; }
  .container { width: min(1200px, calc(100% - 80px)); }
  .announcement { padding-block: 6px; font-size: 17px; font-weight: 600; }
  .header-inner { min-height: 80px; }
  .wordmark { font-size: 48px; }
  .desktop-nav { display: flex; gap: 34px; }
  .desktop-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
  .desktop-nav a:hover { text-decoration: underline; }
  .hero { grid-template-columns: .94fr 1.26fr; align-items: stretch; gap: 24px; }
  .hero-media { grid-column: 2; grid-row: 1; aspect-ratio: auto; min-height: 480px; }
  .hero-copy { grid-column: 1; grid-row: 1; padding-block: 28px 36px; align-self: center; }
  h1 { font-size: clamp(48px, 4.65vw, 64px); line-height: 1.03; }
  h2 { font-size: 40px; }
  .hero-description { font-size: 22px; line-height: 1.35; margin-top: 16px; }
  .hero-price { color: var(--forest); font-family: "DM Sans", sans-serif; font-size: 23px; font-weight: 700; margin-top: 20px; letter-spacing: -.035em; }
  .hero-note { margin-top: 7px; }
  .hero-button { width: 80%; max-width: 330px; font-family: "DM Sans", sans-serif; font-size: 19px; font-weight: 600; margin-top: 20px; }
  .hero-benefits { margin-top: 28px; gap: 18px; }
  .hero-benefits li { padding: 0; align-items: flex-start; text-align: left; font-size: 16px; }
  .hero-benefits li + li { border: 0; }
  .section { padding-block: 56px; }
  .section > h2 { margin-bottom: 28px; }
  .kit-section { padding-top: 26px; margin-top: 10px; }
  .kit-section > h2 { margin-bottom: 18px; }
  .kit-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .kit-card h3 { font-size: 21px; }
  .kit-card-copy { padding: 16px 12px 22px; }
  .preparation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .latte-card { grid-template-columns: 1fr 2fr; margin-top: 40px; }
  .latte-card .media { max-height: 250px; }
  .latte-copy { padding: 36px 44px; }
  .latte-copy h3 { font-size: 30px; }
  .latte-copy p { font-size: 18px; }
  .origin-section { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .origin-copy > p { font-size: 20px; }
  .subscription > h2 { margin-bottom: 40px; }
  .subscription-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .timeline { gap: 34px; }
  .timeline h3 { font-size: 28px; }
  .subscription-note { max-width: 480px; font-size: 18px; margin-top: 32px; }
  .plan-card { padding: 22px; }
  .plan-title { font-size: 29px; }
  .about-section { padding-block: 72px; }
  .about-section p { font-size: 23px; }
  .guarantees-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .faq-section { display: grid; grid-template-columns: 1fr 1.55fr; gap: 64px; }
  .faq-section > h2 { margin: 0; }
  .closing { padding-block: 36px 72px; }
  .footer-inner { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start; }
  .footer-nav { margin: 0; column-gap: 28px; }
  .legal { grid-column: 2; margin: 0; }
  .sticky-bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
@media (forced-colors: active) {
  .button, .step-number, .badge { border: 1px solid ButtonText; }
  .plan-option input:checked + .plan-card { outline: 2px solid Highlight; }
  .plan-option input:checked + .plan-card .radio-mark::after { background: Highlight; }
}
