/* Landing della nuova versione di Panacea
   Colori ripresi dal sito panacea-farmacia.it (tema Kadence, palette 1–2). */

:root {
  --brand: #049f82;          /* verde Panacea, per elementi grandi e decorativi */
  --brand-ink: #00745e;      /* verde scuro, per testo e pulsanti (contrasto AA su bianco) */
  --brand-deep: #0a2f2a;     /* sfondo delle sezioni scure */
  --brand-deeper: #061f1c;
  --mint: #7fe0c8;           /* accento su sfondo scuro */
  --ink: #1d2523;
  --ink-soft: #4a5552;
  --line: #e3e9e7;
  --bg: #ffffff;
  --bg-alt: #f4f8f7;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(10, 47, 42, .06), 0 8px 24px rgba(10, 47, 42, .08);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .45);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 720; }
h3 { font-size: 1.12rem; font-weight: 680; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 4px; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.4em; border-radius: 999px; font-weight: 650; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .15s; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-ink); color: #fff; }
.btn-primary:hover { background: #005f4d; }
.btn-light { background: #fff; color: var(--brand-ink); }
.btn-light:hover { background: #e9f7f3; }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn-sm { padding: .55em 1.1em; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(6, 31, 28, .0); transition: background-color .2s, box-shadow .2s; }
.site-header.scrolled { background: rgba(6, 31, 28, .94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; }
.brand img { width: 140px; height: auto; }
.brand-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; font-size: .74rem; letter-spacing: .02em; white-space: nowrap; }
.main-nav { display: flex; gap: 24px; }
.main-nav a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .95rem; font-weight: 550; }
.main-nav a:hover { color: #fff; }

/* Hero: lo sfondo scuro parte da sotto l'header trasparente */
.hero { position: relative; margin-top: -72px; padding: 136px 0 96px; color: #fff; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 15%, rgba(4, 159, 130, .45), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(4, 159, 130, .22), transparent 60%),
    linear-gradient(160deg, var(--brand-deeper), var(--brand-deep) 55%, #0c3a33);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(127, 224, 200, .12); border: 1px solid rgba(127, 224, 200, .3); color: var(--mint); font-size: .88rem; font-weight: 650; letter-spacing: .02em; margin-bottom: 22px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(127, 224, 200, .2); }
.hero h1 { color: #fff; }
.lead { font-size: 1.16rem; color: rgba(255, 255, 255, .82); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 28px; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .92rem; color: rgba(255, 255, 255, .78); }
.proof li { display: flex; align-items: center; gap: 8px; }
.proof li::before, .checks li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat; }

.hero-shot { margin: 0; }
.browser { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08); transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #eef2f1; border-bottom: 1px solid #dde4e2; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9d3d0; }
.browser-bar span { margin-left: 12px; font-size: .78rem; color: #6b7774; background: #fff; padding: 3px 12px; border-radius: 6px; flex: 1; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Carosello delle schermate: le slide stanno una sopra l'altra, si vede quella attiva */
.slides { display: grid; }
.slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.carousel-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.carousel-tab, .carousel-arrow { font: inherit; cursor: pointer; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .78); border-radius: 999px; transition: background-color .15s, color .15s, border-color .15s; }
.carousel-tab { padding: 6px 14px; font-size: .86rem; font-weight: 600; }
.carousel-tab:hover, .carousel-arrow:hover { border-color: rgba(255, 255, 255, .5); color: #fff; }
.carousel-tab[aria-current="true"] { background: var(--mint); border-color: var(--mint); color: var(--brand-deeper); }
.carousel-arrow { width: 34px; height: 34px; flex: none; font-size: 1.3rem; line-height: 1; display: grid; place-items: center; padding: 0 0 3px; }

.hero-shot figcaption, .split-media figcaption { font-size: .78rem; padding: 10px 4px 0; color: rgba(255, 255, 255, .55); }
.split-media figcaption { color: var(--ink-soft); background: #fff; padding: 10px 16px; border-top: 1px solid var(--line); }

/* Dispositivi collegati */
.devices { padding: 30px 0; border-bottom: 1px solid var(--line); }
.devices-title { text-align: center; font-size: .82rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; }
.device-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; }
.device-row li { font-family: var(--font-head); font-weight: 750; font-size: 1.12rem; letter-spacing: -.01em; color: #8a9693; }

/* Novità */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { position: relative; padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.news-card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.news-card h3 { font-size: 1.2rem; }
.news-main { grid-column: span 2; padding: 36px; color: #fff; border: 0;
  background: radial-gradient(600px 300px at 100% 0%, rgba(4, 159, 130, .5), transparent 70%), linear-gradient(160deg, var(--brand-deep), var(--brand-deeper)); }
.news-main h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 6px; }
.news-main p { color: rgba(255, 255, 255, .82); font-size: 1.05rem; max-width: 36em; }
.news-main .checks { margin-top: 26px; }
.news-main .checks li { color: rgba(255, 255, 255, .9); }
.tag { display: inline-block; font-size: .76rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); background: #e3f5f0; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.news-main .tag { color: var(--mint); background: rgba(127, 224, 200, .14); }

/* Come si forma l'ordine giornaliero */
.flow { list-style: none; margin: 0; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); counter-reset: passo; }
.flow li { position: relative; display: grid; gap: 2px; padding: 0 0 22px 52px; counter-increment: passo; }
.flow li:last-child { padding-bottom: 0; }
.flow li::before { content: counter(passo); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e3f5f0; color: var(--brand-ink); font-weight: 750; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: #d6e6e1; }
.flow li:nth-child(2)::before { background: var(--brand-ink); color: #fff; }
.flow strong { font-size: 1.02rem; padding-top: 5px; }
.flow span { color: var(--ink-soft); font-size: .96rem; }

/* Sezioni */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(160deg, var(--brand-deep), var(--brand-deeper)); color: #fff; }
.section-dark p { color: rgba(255, 255, 255, .8); }
.section-dark a { color: var(--mint); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head p:last-child { color: var(--ink-soft); font-size: 1.08rem; }
.kicker { font-size: .82rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 12px; }
.section-dark .kicker { color: var(--mint); }

/* Caratteristiche */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.feature:hover { border-color: #bfe3d9; box-shadow: var(--shadow); transform: translateY(-2px); }
.feature p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #e3f5f0; margin-bottom: 18px; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--brand-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Blocchi testo + immagine */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.split-reverse .split-copy { order: 2; }
.split-copy > p:not(.kicker) { color: var(--ink-soft); font-size: 1.06rem; }
.section-dark .split-copy > p:not(.kicker) { color: rgba(255, 255, 255, .8); }
.split-media { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); }
.checks { display: grid; gap: 12px; margin-top: 24px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before { margin-top: 4px; }

/* Schema concentratore */
.network { background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1); box-shadow: none; padding: 16px; }
.network svg { width: 100%; height: auto; display: block; }
.net-links path { stroke: rgba(127, 224, 200, .55); stroke-width: 2; stroke-dasharray: 6 7; fill: none; animation: flow 1.6s linear infinite; }
.net-node rect { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .22); }
.net-node text { fill: #fff; font: 600 17px var(--font); text-anchor: middle; }
.net-hub rect { fill: var(--brand); stroke: var(--mint); stroke-width: 1.5; }
.net-hub text { fill: #fff; font: 750 20px var(--font-head); text-anchor: middle; }
.net-hub text.sub { font: 500 13px var(--font); fill: rgba(255, 255, 255, .85); }
@keyframes flow { to { stroke-dashoffset: -26; } }

/* Moduli */
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module-group { padding: 26px; border-radius: var(--radius-lg); background: var(--bg-alt); }
.module-group h3 { font-size: 1rem; color: var(--brand-ink); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #d6e6e1; }
.module-group li { padding: 5px 0; font-size: .97rem; }

/* Integrazioni */
.integrations { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.int-card { padding: 32px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.int-card > p { color: var(--ink-soft); }
.int-card .checks { margin-top: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pills li { padding: 6px 14px; border-radius: 999px; background: #e3f5f0; color: var(--brand-ink); font-size: .9rem; font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s; }
.faq details[open] { border-color: #bfe3d9; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--brand-ink); border-bottom: 2px solid var(--brand-ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--ink-soft); }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: start; }
.contact-copy { padding-top: 12px; }
.contact-alt { margin-top: 28px; font-size: .97rem; }
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); padding: 11px 14px; border: 1.5px solid #cfd9d6; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(4, 159, 130, .15); }
.field input.invalid, .consent.invalid span { border-color: #c0392b; }
.consent.invalid span { color: #b0291c; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); margin: 6px 0 20px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand-ink); flex: none; }
.section-dark .form-card a { color: var(--brand-ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-size: .95rem; min-height: 1.4em; }
.form-status.error { color: #b0291c; }
.form-done { text-align: center; padding: 28px 8px; }
.form-done .icon { margin: 0 auto 16px; width: 56px; height: 56px; border-radius: 50%; }
.form-done p { color: var(--ink-soft); margin: 0; }

/* Footer */
.site-footer { background: var(--brand-deeper); color: rgba(255, 255, 255, .7); padding: 36px 0; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-inner img { width: 112px; height: auto; margin-right: auto; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.footer-inner a:hover { color: #fff; text-decoration: underline; }
.legal { margin: 0; width: 100%; font-size: .85rem; color: rgba(255, 255, 255, .55); }

/* Responsive */
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .split-reverse .split-copy { order: 0; }
  .browser { transform: none; }
  .features, .news { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 112px 0 64px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; text-align: left; }
  .features, .news, .modules, .integrations, .field-row { grid-template-columns: 1fr; }
  .news-main { grid-column: auto; }
  .feature, .int-card, .module-group, .news-card, .news-main, .flow { padding: 22px; }
  .device-row { gap: 8px 22px; }
  .device-row li { font-size: 1rem; }
  .form-card { padding: 22px; }
  .cta-row .btn { width: 100%; }
  .brand img { width: 118px; }
  .header-inner { gap: 12px; }
  .carousel-arrow { display: none; }
  .brand-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
