/* ============================================================
   Studio Medico Dentistico Carlo Medici — Refresh
   Webbro.ch | mobile-first, custom properties, grid/flexbox
   ============================================================ */

:root {
  /* Brand palette — medical teal/blue refresh */
  --c-primary:        #0a6b78;   /* teal */
  --c-primary-dark:   #064e58;
  --c-primary-light:  #128a98;
  --c-accent:         #d8a24a;   /* warm gold accent */
  --c-ink:            #16292c;
  --c-body:           #41555a;
  --c-muted:          #6f8388;
  --c-line:           #e1eaeb;
  --c-bg:             #ffffff;
  --c-bg-soft:        #f4f8f9;
  --c-bg-deep:        #eef5f6;

  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1160px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(6, 78, 88, .06);
  --shadow-md: 0 14px 40px rgba(6, 78, 88, .10);
  --shadow-lg: 0 24px 60px rgba(6, 78, 88, .16);
  --t-fast: .18s ease;
  --t: .32s cubic-bezier(.2, .7, .2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--c-ink);
  line-height: 1.15;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--soft { background: var(--c-bg-soft); }
.section--deep { background: var(--c-bg-deep); }
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--c-primary);
  display: inline-block;
  margin-bottom: .8rem;
}
.section__head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section__head.center { margin-inline: auto; text-align: center; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--c-body); }
.muted { color: var(--c-muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: .85rem 1.6rem; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--c-primary-dark); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-dark); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--c-primary-dark); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--block { width: 100%; justify-content: center; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow var(--t), background var(--t);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); background: rgba(255, 255, 255, .96); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-weight: 700; color: var(--c-primary-dark); font-size: 1rem; letter-spacing: -.01em; }
.brand__sub { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }

.nav__links { display: none; }
.nav__cta { display: none; }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--c-line); border-radius: 12px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--c-ink); border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.nav__panel {
  position: fixed; inset: 72px 0 auto 0;
  background: #fff; border-bottom: 1px solid var(--c-line);
  padding: 1rem var(--gutter) 1.6rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform var(--t), opacity var(--t);
  box-shadow: var(--shadow-md);
}
.nav__panel.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav__panel a {
  display: block; font-family: var(--font-head); font-weight: 500; color: var(--c-ink);
  padding: .85rem .5rem; border-bottom: 1px solid var(--c-line);
}
.nav__panel a.active { color: var(--c-primary); }
.nav__panel .btn { margin-top: 1.1rem; }

@media (min-width: 920px) {
  .nav-toggle, .nav__panel { display: none; }
  .nav__links { display: flex; align-items: center; gap: .35rem; }
  .nav__links a {
    font-family: var(--font-head); font-weight: 500; font-size: .94rem; color: var(--c-body);
    padding: .55rem .85rem; border-radius: 999px; position: relative; transition: color var(--t-fast), background var(--t-fast);
  }
  .nav__links a:hover { color: var(--c-primary-dark); background: var(--c-bg-soft); }
  .nav__links a.active { color: var(--c-primary); }
  .nav__links a.active::after {
    content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
    width: 18px; height: 2px; background: var(--c-accent); border-radius: 2px;
  }
  .nav__cta { display: inline-flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(18,138,152,.16), transparent 60%),
    linear-gradient(180deg, var(--c-bg-soft), #fff 70%);
}
.hero__grid { display: grid; gap: 2.5rem; padding-block: clamp(2.8rem, 7vw, 5rem); align-items: center; }
.hero__title { margin-bottom: 1.1rem; }
.hero__title em { color: var(--c-primary); font-style: normal; }
.hero__text { font-size: clamp(1.05rem, 2vw, 1.18rem); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.2rem; }
.hero__badge { display: flex; align-items: center; gap: .55rem; font-size: .86rem; color: var(--c-muted); font-weight: 500; }
.hero__badge svg { width: 20px; height: 20px; color: var(--c-primary); flex: none; }

.hero__visual {
  position: relative; border-radius: var(--radius);
  background: linear-gradient(145deg, var(--c-primary), var(--c-primary-light));
  min-height: 320px; padding: 2rem; color: #fff; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.hero__visual::before {
  content: ""; position: absolute; top: -30%; right: -20%; width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
}
.hero__visual .tooth { position: absolute; top: 1.5rem; right: 1.5rem; width: 84px; height: 84px; opacity: .9; }
.hero__card-label { font-family: var(--font-head); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.hero__card-h { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; margin: .3rem 0 .8rem; }
.hero__card-list { display: grid; gap: .55rem; }
.hero__card-list li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.hero__card-list svg { width: 18px; height: 18px; flex: none; }

@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 3.5rem; }
}

/* ============================================================
   FEATURE / SERVICE CARDS
   ============================================================ */
.grid-cards { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .grid-cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1.7rem; box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--c-bg-deep); color: var(--c-primary); margin-bottom: 1.1rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .95rem; }

/* ---------- info / stats ---------- */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; padding: 1.4rem 1rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--c-line); }
.stat__n { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; color: var(--c-primary); line-height: 1; }
.stat__l { font-size: .82rem; color: var(--c-muted); margin-top: .4rem; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- split / about ---------- */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } .split--reverse > :first-child { order: 2; } }
.media-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  background: linear-gradient(145deg, var(--c-bg-deep), #fff); min-height: 300px;
  display: grid; place-items: center; border: 1px solid var(--c-line); position: relative;
}
.media-card svg { width: 130px; height: 130px; color: var(--c-primary-light); opacity: .9; }
.checklist { display: grid; gap: .8rem; margin-top: 1.4rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; }
.checklist svg { width: 22px; height: 22px; color: var(--c-primary); flex: none; margin-top: 2px; }

/* ============================================================
   TEAM
   ============================================================ */
.team-grid { display: grid; gap: 1.3rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.member {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden;
  text-align: center; padding-bottom: 1.5rem; box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.member:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.member__avatar {
  height: 150px; display: grid; place-items: center; color: #fff; font-family: var(--font-head);
  font-weight: 700; font-size: 2.4rem; background: linear-gradient(145deg, var(--c-primary), var(--c-primary-light));
}
.member__body { padding: 1.2rem 1.2rem 0; }
.member h3 { margin-bottom: .25rem; }
.member__role { color: var(--c-primary); font-weight: 600; font-size: .9rem; font-family: var(--font-head); }
.member__note { font-size: .88rem; color: var(--c-muted); margin-top: .5rem; }

/* ============================================================
   URGENZE — alert block
   ============================================================ */
.alert {
  background: linear-gradient(145deg, var(--c-primary-dark), var(--c-primary));
  color: #fff; border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.alert::after { content:""; position:absolute; inset:auto -10% -40% auto; width:55%; height:80%; background:radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); }
.alert h2 { color: #fff; }
.alert .phone-big {
  display: inline-flex; align-items: center; gap: .7rem; margin-top: 1.2rem;
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.2rem); color:#fff;
}
.alert .phone-big svg { width: 30px; height: 30px; }
.alert .phone-big:hover { color: var(--c-accent); }
.steps { display: grid; gap: 1rem; counter-reset: s; margin-top: .5rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background:#fff; border:1px solid var(--c-line); border-radius: var(--radius); padding: 1.5rem; position: relative; }
.step::before {
  counter-increment: s; content: counter(s); font-family: var(--font-head); font-weight: 700;
  width: 38px; height: 38px; border-radius: 50%; background: var(--c-bg-deep); color: var(--c-primary);
  display: grid; place-items: center; margin-bottom: .9rem; font-size: 1.1rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { font-size: .92rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.info-list { display: grid; gap: 1.1rem; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-item__ic { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--c-bg-deep); color: var(--c-primary); display: grid; place-items: center; }
.info-item__ic svg { width: 22px; height: 22px; }
.info-item h3 { font-size: 1rem; margin-bottom: .15rem; }
.info-item a { color: var(--c-primary); font-weight: 600; }
.info-item a:hover { color: var(--c-primary-dark); }

.form { display: grid; gap: 1rem; background:#fff; border:1px solid var(--c-line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.2rem); box-shadow: var(--shadow-sm); }
.field { display: grid; gap: .4rem; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: .85rem; color: var(--c-ink); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 1rem; color: var(--c-ink);
  padding: .8rem .9rem; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-bg-soft);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--c-primary); background:#fff; box-shadow: 0 0 0 3px rgba(18,138,152,.14);
}
.field textarea { resize: vertical; min-height: 120px; }
.form__note { font-size: .82rem; color: var(--c-muted); }
.form__status { font-size: .9rem; font-weight: 600; color: var(--c-primary); min-height: 1.2em; }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-line); box-shadow: var(--shadow-sm); }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }

/* hours table */
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: .6rem 0; border-bottom: 1px solid var(--c-line); font-size: .95rem; }
.hours td:last-child { text-align: right; font-family: var(--font-head); font-weight: 600; color: var(--c-ink); }
.hours tr:last-child td { border-bottom: 0; }

/* ============================================================
   CTA strip
   ============================================================ */
.cta {
  background: linear-gradient(145deg, var(--c-primary), var(--c-primary-light));
  color:#fff; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.4rem); text-align: center;
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.cta h2 { color:#fff; }
.cta p { color: rgba(255,255,255,.9); max-width: 46ch; margin: .8rem auto 1.6rem; }
.cta__actions { display:flex; flex-wrap: wrap; gap:.8rem; justify-content:center; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--c-ink); color: #c7d4d6; padding-block: clamp(2.6rem, 6vw, 3.6rem); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand__name { color:#fff; }
.site-footer .brand__sub { color: #7e9396; }
.footer-col h4 { color:#fff; font-size: .95rem; margin-bottom: 1rem; letter-spacing:.02em; }
.footer-col p, .footer-col a { font-size: .9rem; color:#a9bcbf; }
.footer-col a:hover { color:#fff; }
.footer-col ul { display:grid; gap:.55rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.2rem; padding-top: 1.4rem; display:flex; flex-wrap:wrap; gap:.6rem; justify-content: space-between; font-size:.82rem; color:#7e9396; }
.footer-bottom a { color:#a9bcbf; }
.footer-bottom a:hover { color:#fff; }

/* ============================================================
   reveal animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* page hero (interior) */
.page-hero { background: linear-gradient(180deg, var(--c-bg-soft), #fff); padding-block: clamp(2.6rem, 6vw, 4rem); border-bottom:1px solid var(--c-line); }
.breadcrumb { font-size:.82rem; color:var(--c-muted); margin-bottom:.8rem; }
.breadcrumb a:hover { color: var(--c-primary); }
.page-hero p { max-width: 60ch; margin-top:.8rem; }
