/* ============================================================
   Studio Fidelio — studiofidelio.it
   Brand: navy #0d223d · azzurro #a1dae1
   ============================================================ */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/fraunces-500-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-600-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-500-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-600-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --navy: #0d223d;
  --navy-deep: #091931;
  --navy-soft: #16304f;
  --azzurro: #a1dae1;
  --azzurro-strong: #6fc3ce;
  --ink: #1b2b40;
  --ink-soft: #4a5b70;
  --paper: #fdfdfc;
  --paper-tint: #f2f7f8;
  --line: #dde6ea;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(13, 34, 61, .08);
  --shadow-md: 0 10px 34px -12px rgba(13, 34, 61, .25);
  --shadow-lg: 0 24px 60px -20px rgba(9, 25, 49, .45);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1140px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--navy); }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--azzurro-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: 860px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font: 600 1rem/1.2 var(--font-body);
  padding: .95rem 1.75rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn--accent {
  background: var(--azzurro);
  color: var(--navy-deep);
  box-shadow: 0 6px 20px -6px rgba(111, 195, 206, .55);
}
.btn--accent:hover { background: #b5e3e9; transform: translateY(-1px); }
.btn--accent:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--small { padding: .65rem 1.3rem; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 253, 252, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 76px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { width: 132px; height: auto; }
.brand-logo--light { display: none; }
.site-nav {
  display: flex;
  gap: 1.9rem;
  margin-left: auto;
}
.site-nav a {
  font: 500 .95rem/1 var(--font-body);
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: .5rem;
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--azzurro-strong);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .2s ease;
}
.site-nav a:hover { color: var(--navy); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  color: #eaf3f5;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(4.5rem, 9vw, 7.5rem);
}
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 82% 8%, rgba(161, 218, 225, .17), transparent 65%),
    radial-gradient(700px 520px at 8% 95%, rgba(111, 195, 206, .10), transparent 60%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .95fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font: 600 .8rem/1.3 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--azzurro);
  background: rgba(161, 218, 225, .1);
  border: 1px solid rgba(161, 218, 225, .3);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  margin: 0 0 1.6rem;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--azzurro);
  box-shadow: 0 0 0 0 rgba(161, 218, 225, .5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(161, 218, 225, .5); }
  70% { box-shadow: 0 0 0 9px rgba(161, 218, 225, 0); }
  100% { box-shadow: 0 0 0 0 rgba(161, 218, 225, 0); }
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.2rem;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: #c3d4de;
  max-width: 34em;
  margin-bottom: 2.2rem;
}
.hero-sub strong { color: var(--azzurro); font-weight: 600; }

/* Countdown */
.countdown { display: flex; gap: clamp(.8rem, 2vw, 1.4rem); }
.countdown-unit {
  display: grid;
  justify-items: center;
  gap: .15rem;
  min-width: 74px;
  padding: .85rem .6rem .7rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(161, 218, 225, .22);
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}
.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.countdown-label {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9fb4c4;
}

/* Form card */
.form-card {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-lg);
}
.form-card-title {
  font-size: 1.65rem;
  color: var(--navy);
  margin-bottom: .5rem;
}
.form-card-sub { color: var(--ink-soft); font-size: .98rem; margin-bottom: 1.4rem; }

.field-label {
  display: block;
  font: 600 .85rem/1.3 var(--font-body);
  color: var(--navy);
  margin-bottom: .45rem;
}
.field-row { display: flex; gap: .6rem; }
.field-input {
  flex: 1;
  min-width: 0;
  font: 400 1rem/1.4 var(--font-body);
  color: var(--ink);
  background: var(--paper-tint);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .9rem 1rem;
  transition: border-color .15s ease, background-color .15s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--azzurro-strong);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(111, 195, 206, .25);
}
.field-input.is-invalid { border-color: #c0392b; }

/* honeypot: visually gone, still in the form for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.consent {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-top: 1rem;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: .15rem;
  accent-color: var(--navy);
  cursor: pointer;
}
.form-message {
  display: none;
  margin-top: 1rem;
  padding: .8rem 1rem;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 500;
}
.form-message.is-error {
  display: block;
  background: #fdeceb;
  color: #a33025;
  border: 1px solid #f3c3bd;
}
.form-message.is-success {
  display: block;
  background: #e8f6ef;
  color: #14684b;
  border: 1px solid #bde3d2;
}
.lead-form.is-done .field-row,
.lead-form.is-done .consent,
.lead-form.is-done .field-label { display: none; }

.form-trust {
  margin-top: 1.1rem;
  font-size: .8rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section--tinted { background: var(--paper-tint); }
.section-head { max-width: 700px; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.kicker {
  font: 600 .8rem/1 var(--font-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--azzurro-strong);
  margin-bottom: .8rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  color: var(--navy);
  text-wrap: balance;
}
.section-sub { margin-top: .9rem; color: var(--ink-soft); font-size: 1.05rem; }

/* Lo Studio */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.studio-text p { font-size: 1.08rem; color: var(--ink-soft); }
.studio-text strong { color: var(--navy); }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.values li { display: flex; gap: 1.1rem; align-items: flex-start; }
.value-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--azzurro);
}
.value-icon svg { width: 26px; height: 26px; }
.values h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: .25rem; }
.values p { font-size: .95rem; color: var(--ink-soft); }

/* Trattamenti cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--azzurro);
  margin-bottom: 1.2rem;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: .5rem; }
.card p { font-size: .95rem; color: var(--ink-soft); }

/* Dove siamo */
.dove-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.dove-card {
  background: var(--navy);
  color: #dcebf0;
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  display: grid;
  gap: 1.3rem;
  justify-items: start;
  box-shadow: var(--shadow-md);
}
.dove-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(161, 218, 225, .14);
  color: var(--azzurro);
}
.dove-icon svg { width: 26px; height: 26px; }
.dove-card address { line-height: 1.7; }
.dove-card strong { color: #fff; }
.dove-card .btn--outline { color: var(--azzurro); border-color: var(--azzurro); }
.dove-card .btn--outline:hover { background: var(--azzurro); color: var(--navy-deep); }
.dove-text p { font-size: 1.08rem; color: var(--ink-soft); }
.dove-text strong { color: var(--navy); }

/* FAQ */
.faq { display: grid; gap: .8rem; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font: 600 1.05rem/1.4 var(--font-body);
  color: var(--navy);
  padding: 1.15rem 3.2rem 1.15rem 1.4rem;
  position: relative;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--azzurro-strong);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p {
  padding: 0 1.4rem 1.3rem;
  color: var(--ink-soft);
  font-size: .98rem;
}

/* CTA finale */
.cta-final {
  position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #dcebf0;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(640px 420px at 50% 0%, rgba(161, 218, 225, .14), transparent 65%);
}
.cta-inner { position: relative; text-align: center; }
.cta-logo { margin: 0 auto 1.8rem; width: 190px; }
.cta-inner h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: #fff;
  margin-bottom: .9rem;
}
.cta-inner > p {
  color: #c3d4de;
  max-width: 36em;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.lead-form--inverted { max-width: 560px; margin-inline: auto; text-align: left; }
.lead-form--inverted .field-label { color: var(--azzurro); }
.lead-form--inverted .field-input {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(161, 218, 225, .3);
  color: #fff;
}
.lead-form--inverted .field-input::placeholder { color: #8da3b5; }
.lead-form--inverted .field-input:focus { background: rgba(255, 255, 255, .12); }
.lead-form--inverted .consent { color: #a9bccb; }
.lead-form--inverted .consent a { color: var(--azzurro); }
.lead-form--inverted .consent input { accent-color: var(--azzurro); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #a9bccb;
  padding-top: clamp(3rem, 6vw, 4.5rem);
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: 2.5rem;
}
.footer-brand img { width: 170px; margin-bottom: 1.1rem; }
.footer-col h3 {
  font: 600 .8rem/1 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--azzurro);
  margin-bottom: 1rem;
}
.site-footer a { color: #d5e5ec; }
.site-footer a:hover { color: var(--azzurro); }
.footer-col address { line-height: 2; }
.privacy-note { font-size: .8rem; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid rgba(161, 218, 225, .12);
  padding-block: 1.4rem;
  font-size: .82rem;
  color: #7f95a8;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .eyebrow-dot { animation: none; }
  .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .countdown { justify-content: center; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .studio-grid, .dove-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .cards { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .countdown-unit { min-width: 64px; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-cta { margin-left: auto; }
  .brand-logo { width: 110px; }
}
