/* HYBRID STYLES - Look moderno v2 + accessibilità v1
   Integrare eventualmente in styles.css mantenendo le regole di accessibilità
*/

:root {
  /* Palette v2 */
  --hyb-ink: #172223;
  --hyb-muted: #637071;
  --hyb-brand: #123c3c;
  --hyb-brand-2: #1f6662;
  --hyb-warm: #d5a96f;
  --hyb-paper: #fbfaf7;
  --hyb-soft: #eef3f0;
  --hyb-line: #dde4df;
  --hyb-white: #fff;
  --hyb-shadow: 0 24px 70px rgba(21, 45, 44, .12);
  --hyb-radius: 28px;
  --hyb-radius-sm: 18px;
  --hyb-max: 1180px;
}

/* Tipografia display stile v2 */
.hyb-hero__titolo,
.hyb-h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  margin: 0;
  color: #102526;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.hyb-hero__titolo {
  font-size: clamp(2.45rem, 4.6vw, 4.5rem);
  letter-spacing: -0.04em;
}

.hyb-h2 {
  font-size: clamp(2.15rem, 4vw, 3.8rem);
}

.hyb-hero__sottotitolo {
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: var(--hyb-muted);
  max-width: 62ch;
  margin-top: 1.5rem;
  line-height: 1.7;
}

.hyb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--hyb-brand-2);
  margin: 0 0 1.3rem;
}

.hyb-eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: #d5a96f;
}

/* Hero 2 colonne stile v2, mantenendo struttura semantica */
.hyb-hero {
  padding: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 76px);
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 90% -10%, rgba(213, 169, 111, .10), transparent 62%),
    radial-gradient(720px 380px at -6% 6%, rgba(213, 169, 111, .12), transparent 60%),
    var(--hyb-paper);
  border-bottom: 1px solid var(--hyb-line);
}

.hyb-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

@media (max-width: 980px) {
  .hyb-hero__grid {
    grid-template-columns: 1fr;
  }

  .hyb-hero__figura {
    order: -1;
  }
}

.hyb-hero__titolo span {
  color: var(--hyb-brand-2);
  font-style: italic;
}

.hyb-hero__azioni {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: clamp(1.5rem, 4vw, 2rem);
}

/* CTA hero: bottoni a pillola, palette v2 */
.hyb-hero__azioni .btn {
  border-radius: 999px;
  padding: .95rem 1.6rem;
}

.hyb-hero__azioni .btn--principale {
  background: var(--hyb-brand);
  box-shadow: 0 14px 34px rgba(18, 60, 60, .14);
}

.hyb-hero__azioni .btn--principale:hover {
  background: #0f2f2f;
  box-shadow: 0 18px 40px rgba(18, 60, 60, .14);
}

.hyb-hero__azioni .btn--chiaro {
  background: var(--hyb-white);
  color: var(--hyb-brand);
  border-color: var(--hyb-line);
  box-shadow: 0 6px 18px rgba(21, 45, 44, .06);
}

.hyb-hero__azioni .btn--chiaro:hover {
  background: var(--hyb-soft);
  color: var(--hyb-brand);
  border-color: rgba(31, 102, 98, .4);
}

/* Trust bar v2 (elenco semantico): 2x2, mai righe orfane */
.hyb-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.75rem;
  list-style: none;
  margin: clamp(2rem, 5vw, 2.8rem) 0 0;
  padding: clamp(1.35rem, 3vw, 1.8rem) 0 0;
  border-top: 1px solid var(--hyb-line);
}

@media (max-width: 30rem) {
  .hyb-trust {
    grid-template-columns: 1fr;
  }
}

.hyb-trust__item {
  min-width: 0;
  margin: 0;
}

.hyb-trust__item strong {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--hyb-brand-2);
  margin-bottom: .3rem;
}

.hyb-trust__item span {
  font-size: .88rem;
  line-height: 1.5;
  color: var(--hyb-muted);
}

/* Ritratto/figura hero stile v2 (elemento <figure>) */
.hyb-portrait {
  position: relative;
  margin: 0;
  min-height: clamp(420px, 70vw, 610px);
  --card-inset: clamp(20px, 4vw, 40px);
}

/* Cornice filoare sfalsata dietro la foto */
.hyb-portrait::before {
  content: "";
  position: absolute;
  inset: 0 0 var(--card-inset) var(--card-inset);
  border: 1.5px solid rgba(31, 102, 98, .34);
  border-radius: 44% 44% var(--hyb-radius) var(--hyb-radius);
  transform: translate(clamp(10px, 2vw, 20px), clamp(-14px, -2vw, -8px));
  pointer-events: none;
}

.hyb-portrait__card {
  position: absolute;
  inset: 0 0 var(--card-inset) var(--card-inset);
  border-radius: 44% 44% var(--hyb-radius) var(--hyb-radius);
  box-shadow: var(--hyb-shadow);
  overflow: hidden;
  background: #eef3f0;
  border: 1px solid rgba(18, 60, 60, .14);
}

@media (max-width: 980px) {
  .hyb-portrait {
    --card-inset: 0px;
  }

  .hyb-portrait::before {
    transform: translate(clamp(8px, 2vw, 16px), clamp(-12px, -2vw, -6px));
  }

  .hyb-portrait__card {
    inset: 0;
  }
}

.hyb-portrait__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease;
}

.hyb-portrait__card:hover img {
  transform: scale(1.015);
}

@media (prefers-reduced-motion: reduce) {
  .hyb-portrait__card img {
    transition: none;
  }

  .hyb-portrait__card:hover img {
    transform: none;
  }
}

.hyb-portrait__badge {
  position: absolute;
  left: calc(var(--card-inset) + 16px);
  bottom: calc(var(--card-inset) + 16px);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  max-width: calc(100% - 2 * var(--card-inset) - 32px);
  background: var(--hyb-white);
  color: var(--hyb-ink);
  border: 1px solid var(--hyb-line);
  border-radius: 999px;
  padding: .7rem 1.1rem;
  font-size: .8rem;
  line-height: 1.35;
  letter-spacing: .01em;
  box-shadow: 0 16px 40px rgba(21, 45, 44, .16);
}

.hyb-portrait__badge strong {
  color: var(--hyb-brand);
  font-weight: 700;
}

.hyb-portrait__badge svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  color: var(--hyb-brand-2);
}

/* Foto grande sezione studio stile v2 */
.studio-photo {
  max-width: 820px;
  margin: 2rem auto 0;
  border-radius: var(--hyb-radius);
  overflow: hidden;
  box-shadow: var(--hyb-shadow);
  border: 1px solid var(--hyb-line);
  background: var(--hyb-white);
}

.studio-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.studio-photo figcaption {
  padding: 1rem 1.2rem;
  color: var(--hyb-muted);
  font-size: .9rem;
}

.studio-photo figcaption strong {
  color: var(--hyb-ink);
}

/* Step numerati v2 */
.hyb-steps {
  counter-reset: step;
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.25rem);
  margin-top: clamp(1.5rem, 4vw, 2rem);
}

.hyb-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: clamp(.85rem, 2.5vw, 1.25rem);
  padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1rem, 3vw, 1.5rem);
  background: var(--hyb-white);
  border: 1px solid var(--hyb-line);
  border-radius: var(--hyb-radius-sm);
  box-shadow: 0 10px 40px rgba(21, 45, 44, .06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.hyb-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--hyb-shadow);
  border-color: rgba(31, 102, 98, .25);
}

@media (prefers-reduced-motion: reduce) {
  .hyb-step {
    transition: none;
  }

  .hyb-step:hover {
    transform: none;
  }
}

.hyb-step::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: clamp(42px, 4vw, 50px);
  height: clamp(42px, 4vw, 50px);
  border-radius: 50%;
  background: var(--hyb-brand);
  color: var(--hyb-white);
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 12px 30px rgba(18, 60, 60, .14);
}

.hyb-step__titolo {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  color: var(--hyb-ink);
  letter-spacing: -0.01em;
}

.hyb-step__testo {
  margin: .5rem 0 0;
  color: var(--hyb-muted);
}

/* Contact dock fisso mobile (stile v2) */
.hyb-contact-dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: none;
  padding: .6rem max(.75rem, env(safe-area-inset-right)) calc(.6rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
  background: linear-gradient(to top, rgba(247, 250, 252, .98) 0%, rgba(247, 250, 252, .92) 60%, rgba(247, 250, 252, 0) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hyb-contact-dock__inner {
  width: min(calc(100% - .5rem), 680px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  padding: .45rem;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(221, 228, 223, .9);
  border-radius: 999px;
  box-shadow: 0 20px 60px rgba(21, 45, 44, .16);
}

.hyb-contact-dock__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .65rem .85rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  will-change: transform;
  border: 1px solid transparent;
  white-space: nowrap;
}

.hyb-contact-dock__btn:hover {
  transform: translateY(-1px);
}

.hyb-contact-dock__btn:focus-visible {
  outline: 3px solid var(--hyb-brand-2);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hyb-contact-dock__btn {
    transition: none;
  }

  .hyb-contact-dock__btn:hover {
    transform: none;
  }
}

.hyb-contact-dock__call {
  background: var(--hyb-brand);
  color: var(--hyb-white);
  box-shadow: 0 12px 30px rgba(18, 60, 60, .14);
}

.hyb-contact-dock__call:hover {
  background: #0f2f2f;
}

.hyb-contact-dock__wa {
  background: #25D366;
  color: var(--hyb-white);
  box-shadow: 0 12px 30px rgba(37, 211, 102, .25);
}

.hyb-contact-dock__wa:hover {
  background: #1fb85a;
}

@media (max-width: 900px) {
  .hyb-contact-dock {
    display: block;
  }

  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

/* Utility per sezioni con header sticky: la compensazione è unica e
   avviene su html (scroll-padding-top). scroll-margin è riportato a 0
   per non sommare i due offset e creare un vuoto eccessivo. */
html {
  scroll-padding-top: 5.75rem;
}

[id] {
  scroll-margin-top: 0;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 5.5rem;
  }
}

/* Miglioramenti focus su bottoni stile v2 */
.btn:focus-visible,
.bottone:focus-visible,
.hyb-contact-dock__btn:focus-visible {
  outline: 3px solid var(--hyb-brand-2);
  outline-offset: 3px;
}

/* =====================================================================
   PARTE ALTA — header, dettagli hero
   Restyling sobrio ispirato alla palette v2. Sovrascrive i blocchi
   omologhi di styles.css per la sola pagina index-hybrid.html:
   il foglio base e index.html restano invariati.
   ===================================================================== */

/* ---------- Header (sticky, vetro leggero) ---------- */
/* In styles.css la regola è scritta ".HEADER" e quindi non si applica:
   qui l'header torna sticky con un aspetto allineato alla palette v2. */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hyb-line);
  box-shadow: 0 10px 30px rgba(21, 45, 44, .06);
}

.header__interno {
  min-height: 4.9rem;
  gap: 1rem 1.75rem;
  padding-block: .6rem;
}

/* Marchio */
.marchio {
  gap: .7rem;
}

.marchio__simbolo {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--hyb-brand-2), var(--hyb-brand));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16),
              0 8px 20px rgba(18, 60, 60, .14);
}

.marchio__nome {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--hyb-ink);
}

.marchio__qualifica {
  font-size: .66rem;
  letter-spacing: .13em;
  color: var(--hyb-brand-2);
}

/* Navigazione */
.nav-principale a {
  color: var(--hyb-ink);
  font-size: .78rem;
  letter-spacing: .05em;
}

.nav-principale a:hover {
  color: var(--hyb-brand-2);
  border-bottom-color: #d5a96f;
}

.nav-principale a[aria-current] {
  color: var(--hyb-brand);
  border-bottom-color: var(--hyb-brand-2);
}

/* Azioni header: sola pillola CTA, telefono come link testuale discreto */
.header__azioni {
  gap: .35rem 1.1rem;
}

.header .btn {
  border-radius: 999px;
  padding: .72rem 1.35rem;
  font-size: .76rem;
}

.header .btn--principale {
  background: var(--hyb-brand);
  border-color: transparent;
}

.header .btn--principale:hover {
  background: #0f2f2f;
}

.header .btn--bordo {
  padding: .2rem 0;
  border: 0;
  background: none;
  color: var(--hyb-ink);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.header .btn--bordo svg {
  color: var(--hyb-brand-2);
}

.header .btn--bordo:hover {
  background: none;
  color: var(--hyb-brand);
}

/* Tasto menu mobile */
.tasto-menu {
  border-radius: 12px;
  border-color: var(--hyb-line);
  color: var(--hyb-ink);
}

.tasto-menu:hover {
  background: var(--hyb-soft);
  border-color: rgba(31, 102, 98, .38);
}

/* Menu mobile */
.menu-mobile {
  background: rgba(255, 255, 255, .98);
  border-top-color: var(--hyb-line);
  padding-block: .75rem 1.25rem;
}

.menu-mobile a {
  color: var(--hyb-ink);
  border-bottom-color: var(--hyb-soft);
  padding: .75rem .25rem;
}

.menu-mobile a:hover {
  color: var(--hyb-brand-2);
  background: var(--hyb-soft);
}

/* Il .btn dentro il menu deve restare un bottone, non un link elenco */
.menu-mobile .btn {
  display: inline-flex;
  margin-top: .5rem;
  padding: .9rem 1.5rem;
  border-bottom: 0;
  border-radius: 999px;
  background: var(--hyb-brand);
}

.menu-mobile .btn:hover {
  background: #0f2f2f;
  color: var(--hyb-white);
}

/* ---------- Focus della parte alta ---------- */
.marchio:focus-visible,
.nav-principale a:focus-visible,
.menu-mobile a:focus-visible,
.tasto-menu:focus-visible {
  outline: 3px solid var(--hyb-brand-2);
  outline-offset: 4px;
}

.skip-link:focus {
  background: var(--hyb-brand);
}

.skip-link:focus-visible {
  outline-color: var(--hyb-warm);
}
