/* ==========================================================================
   TEVET — sito vetrina
   Palette ufficiale del logo (§3.1 della guida, vincolante):
     Turchese scuro  #007C91  accenti, bottoni primari
     Blu notte       #003249  wordmark, testo forte, footer
     Turchese chiaro #45AFB6  logomark, hover, dettagli, tracciato ECG
     Bianco          #FFFFFF
   Neutri derivati dai colori brand (nessun colore estraneo).
   Firma visiva: il tracciato ECG turchese (motivo del settore telemedicina).
   ========================================================================== */

:root {
  /* Colori brand vincolanti */
  --brand-deep: #003249;   /* blu notte */
  --brand: #007C91;        /* turchese scuro */
  --brand-light: #45AFB6;  /* turchese chiaro */
  --white: #FFFFFF;

  /* Neutri derivati (tinte del brand, per superfici e testo) */
  --ink: #16333F;          /* testo corpo */
  --muted: #5B7580;        /* testo secondario */
  --bg: #FFFFFF;
  --bg-tint: #F0F7F8;      /* sezioni alternate, tinta del turchese chiaro */
  --surface: #FFFFFF;      /* card */
  --line: #DBE7EA;         /* bordi hairline */
  --brand-hover: #006679;  /* hover bottone primario */

  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,50,73,.04), 0 12px 32px -14px rgba(0,50,73,.18);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* --- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "tnum" 1, "cv05" 1; /* cifre tabulari */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brand-deep);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1rem; }

/* Focus visibile (quality floor) */
:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 56px 0; }
.section--tint { background: var(--bg-tint); }
.section--deep { background: var(--brand-deep); color: #E8F3F5; }
.section--deep h2, .section--deep h3 { color: var(--white); }

.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 .8rem;
  display: block;          /* blocco normale: il testo lungo va a capo su mobile */
  max-width: 100%;
  overflow-wrap: break-word;
}
.section-head--center .eyebrow,
.cta-band .eyebrow { text-align: center; }
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: .55rem;
  background: var(--brand-light);
  transform: rotate(45deg); /* micro-rombo, richiamo del logomark */
  vertical-align: middle;
}
.section--deep .eyebrow { color: var(--brand-light); }

h2 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.section--deep .lead { color: #BFDDE2; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
}
.brand-link { display: inline-flex; align-items: center; }
.brand-link img { height: 48px; width: auto; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--brand-deep);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-menu {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px 20px;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
}
.nav-menu.is-open { display: flex; }
.nav-link {
  font-weight: 500;
  color: var(--brand-deep);
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.nav-link:last-of-type { border-bottom: none; }
.nav-link[aria-current="page"] { color: var(--brand); }
.nav-cta { margin-top: 10px; }

/* --- Bottoni -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--white); }
.btn--primary:hover { background: var(--brand-hover); color: var(--white); }
.btn--ghost { background: transparent; color: var(--brand-deep); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand-light); color: var(--brand); }
.btn--light { background: var(--white); color: var(--brand-deep); }
.btn--light:hover { background: #EAF5F6; color: var(--brand-deep); }
.btn--full { width: 100%; }

/* --- Hero ----------------------------------------------------------------- */
.hero { padding: 44px 0 56px; overflow: hidden; }
.hero__inner { display: grid; gap: 32px; }
.hero h1 {
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: .35em;
}
.hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-bottom: 1.6rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Pannello ECG (firma visiva) */
.hero__panel {
  position: relative;
  background: linear-gradient(160deg, #003249 0%, #01465f 100%);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.hero__panel-rombo { width: 46px; height: auto; opacity: .95; }
.hero__panel-caption { color: #BFDDE2; font-size: .95rem; margin: 0; max-width: 34ch; }
.hero__panel-caption strong { color: var(--white); font-weight: 600; }

/* Tracciato ECG SVG */
.ecg { display: block; width: 100%; height: auto; }
.ecg__line {
  fill: none;
  stroke: var(--brand-light);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ecg--hero .ecg__line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ecg-draw 3.4s ease-out .3s forwards;
}
@keyframes ecg-draw { to { stroke-dashoffset: 0; } }

/* Divisore ECG tra sezioni */
.ecg-divider { color: var(--brand-light); padding: 0; line-height: 0; }
.ecg-divider .ecg { height: 40px; opacity: .55; }
.ecg-divider .ecg__line { stroke-width: 2.5; }

/* --- Trust strip ---------------------------------------------------------- */
.trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 8px;
}
.trust__item { background: var(--white); padding: 20px 18px; }
.trust__num {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.trust__label { font-size: .9rem; color: var(--muted); margin: .35rem 0 0; }

/* --- Griglia card --------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.card__mark {
  width: 34px; height: 34px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
}
.card__mark span {
  width: 16px; height: 16px;
  background: var(--brand-light);
  transform: rotate(45deg);
  display: block;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .98rem; }
.card__link { display: inline-block; margin-top: 14px; font-weight: 600; }
.card__link::after { content: " \2192"; }

.card--link { text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
a.card--link:hover { border-color: var(--brand-light); transform: translateY(-2px); }

/* --- Liste con rombo ------------------------------------------------------ */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feature-list li { position: relative; padding-left: 28px; color: var(--ink); }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: .55em;
  width: 10px; height: 10px;
  background: var(--brand-light);
  transform: rotate(45deg);
}
.section--deep .feature-list li { color: #DCEBEE; }

/* --- Esami (tag) ---------------------------------------------------------- */
.exam-tags { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.exam-tags li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .92rem;
  color: var(--brand-deep);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
}

/* --- Passi (come funziona) ------------------------------------------------ */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 24px 68px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px; top: 22px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  background: var(--brand);
  border-radius: 8px;
}
.step h3 { margin-bottom: .25em; }
.step p { color: var(--muted); margin-bottom: 0; }

/* --- CTA band ------------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: .4em; }
.cta-band .btn { margin: 6px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }

/* --- Contatti ------------------------------------------------------------- */
.contact-grid { display: grid; gap: 28px; }
.contact-info dt { font-family: var(--font-display); font-weight: 600; color: var(--brand-deep); margin-top: 16px; font-size: .95rem; }
.contact-info dd { margin: 2px 0 0; color: var(--ink); }
.contact-info a { font-weight: 500; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; color: var(--brand-deep); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-light); }
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .85rem; color: var(--muted); }

/* --- Info box (nota) ------------------------------------------------------ */
.callout {
  border-left: 3px solid var(--brand-light);
  background: var(--bg-tint);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}
.callout p:last-child { margin-bottom: 0; }

/* --- Prose (pagine testo, es. privacy) ------------------------------------ */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: .4em; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--brand-deep); color: #B9D6DC; font-size: .92rem; }
.site-footer__top { display: grid; gap: 28px; padding: 48px 0 32px; }
.site-footer img { height: 46px; width: auto; margin-bottom: 14px; }
.site-footer h4 { color: var(--white); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer a { color: #B9D6DC; }
.site-footer a:hover { color: var(--white); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  align-items: center;
  color: #7FA7B0;
  font-size: .84rem;
}
.footer-legal a { color: #7FA7B0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-deep);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: var(--white); }

/* --- Breakpoint tablet ---------------------------------------------------- */
@media (min-width: 720px) {
  .trust { grid-template-columns: repeat(4, 1fr); }
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1.05fr .95fr; align-items: start; }
  .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* --- Breakpoint desktop --------------------------------------------------- */
@media (min-width: 900px) {
  body { font-size: 17px; }
  .section { padding: 76px 0; }
  .hero { padding: 64px 0 80px; }
  .brand-link img { height: 48px; }
  .site-header .nav { min-height: 92px; }
  .hero__inner { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
  .hero__panel { min-height: 320px; padding: 34px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }

  /* Nav orizzontale: niente hamburger da desktop */
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .nav-link { border-bottom: none; padding: 8px 12px; }
  .nav-cta { margin-top: 0; margin-left: 8px; }
}

/* --- Foto reali ----------------------------------------------------------- */
/* Media card: foto in testa alla scheda (pagina Dispositivi). */
.card--media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card--media:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 22px 24px 26px; }
.card__body h3 { margin-bottom: .35em; }
.card__body p { color: var(--muted); margin-bottom: 0; font-size: .98rem; }

/* Foto reale dentro il pannello hero (fusa nel gradiente turchese scuro). */
.hero__panel-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .30;
  z-index: 0;
}
.hero__panel-rombo,
.hero__panel .ecg,
.hero__panel-caption { position: relative; z-index: 1; }

/* --- Riduzione movimento -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ecg--hero .ecg__line { stroke-dashoffset: 0; }
}
