/* Brightline Dental: bianco e menta, inchiostro verde petrolio, una sola azione in teal. */
@font-face { font-family: 'Albert Sans'; src: url('fonts/AlbertSans.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #ffffff;
  --mint: #e6f4f1;
  --mint-2: #d3ebe6;
  --teal: #0f766e;
  --teal-deep: #0b5a54;
  --ink: #0e2b28;
  --ink-2: #44625e;
  --line: #d4e5e1;
  --taken: #b9cbc7;
  --text: 'Albert Sans', 'Helvetica Neue', Arial, sans-serif;
  --t-hero: clamp(2.4rem, 1.2rem + 4vw, 4.75rem);
  --t-h2: clamp(1.9rem, 1.2rem + 2.2vw, 3.25rem);
  --t-lead: clamp(1.125rem, 1.04rem + 0.35vw, 1.3125rem);
  --t-small: 0.9375rem;
  --m: max(20px, 4.5vw);
  --r: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
::selection { background: var(--teal); color: var(--paper); }
html { accent-color: var(--teal); caret-color: var(--teal); scrollbar-color: #9fc9c1 var(--paper); }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.h2 { font-size: var(--t-h2); font-weight: 650; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.note { font-size: 0.8125rem; color: var(--ink-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--teal); color: var(--paper); font-weight: 650; text-decoration: none; cursor: pointer;
  transition: background-color 0.25s, transform 0.25s var(--ease);
}
.btn:hover { background: var(--teal-deep); }
.btn:active { transform: scale(0.98); }
.btn .ic { transition: transform 0.35s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: var(--t-small); }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.link { font-weight: 650; text-decoration: none; background: linear-gradient(var(--teal), var(--teal)) 0 100% / 100% 2px no-repeat; padding: 4px 0; color: var(--teal-deep); transition: background-size 0.35s var(--ease); }
.link:hover { background-size: 0 2px; background-position: 100% 100%; }

/* testata */
.top { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 24px; min-height: 72px; padding: 0 var(--m); background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); }
.top__back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; text-decoration: none; color: var(--ink-2); transition: border-color 0.25s, color 0.25s; }
.top__back:hover { border-color: var(--teal); color: var(--teal); }
.top__back .ic { width: 15px; height: 15px; }
.top__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal); }
.top__logo img { width: 32px; height: 32px; }
.top__logo span { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.top__logo b { font-weight: 450; }
.top__nav { justify-self: end; display: flex; gap: 28px; font-size: var(--t-small); font-weight: 550; }
.top__nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; transition: color 0.2s; }
.top__nav a:hover { color: var(--teal); }

/* apertura */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; padding: clamp(56px, 7vw, 104px) var(--m) clamp(48px, 6vw, 88px); }
.hero__text { display: grid; gap: 24px; }
.hero__title { font-size: var(--t-hero); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; max-width: 15ch; text-wrap: balance; }
.hero__lead { max-width: 40ch; font-size: var(--t-lead); color: var(--ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: 2px; }
.facts b { font-size: 1.125rem; font-weight: 700; color: var(--teal-deep); }
.facts span { font-size: var(--t-small); color: var(--ink-2); }

.next { display: grid; gap: 18px; padding: 28px; border-radius: 22px; background: var(--mint); }
.next__head { display: grid; gap: 2px; }
.next__head h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.next__for { font-size: var(--t-small); color: var(--ink-2); }
.next__list { display: grid; gap: 10px; }
.next__slot {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; border: 1px solid transparent; border-radius: var(--r);
  background: var(--paper); text-align: left; cursor: pointer; transition: border-color 0.2s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.next__slot:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(11, 90, 84, 0.45); }
.next__day { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--mint); line-height: 1.05; }
.next__day b { font-size: 1.25rem; }
.next__day small { font-size: 0.75rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.next__time { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.next__go { font-size: var(--t-small); font-weight: 650; color: var(--teal); }
.next__all { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--teal-deep); text-decoration: none; }
.next__all:hover .ic { transform: translateX(3px); }
.next__all .ic { transition: transform 0.3s var(--ease); }

/* l'orizzonte del logo come divisore */
.horizon { display: grid; gap: 6px; padding: 0 var(--m); }
.horizon i { display: block; height: 7px; background: var(--mint); }
.horizon i + i { height: 4px; }

/* sezioni */
.treat, .visit, .book, .practice, .faq { padding: clamp(80px, 10vw, 136px) var(--m) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head p { max-width: 40ch; color: var(--ink-2); }

/* la mappa del sorriso */
.concerns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 600; cursor: pointer; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed='true'] { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.smile { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: stretch; }
.smile__map { position: relative; display: grid; place-items: center; padding: 28px; border-radius: 26px; background: var(--mint); }
.arch { width: 100%; max-width: 560px; height: auto; overflow: visible; }
.tooth { cursor: pointer; }
.tooth .groove { fill: none !important; stroke: #b9d9d2; stroke-width: 1.2; stroke-linecap: round; }
.tooth.is-lit .groove { stroke: #4fa597; }
.tooth.is-pick .groove { stroke: #9ad6c9; }
.tooth path { fill: #ffffff; stroke: #9fc9c1; stroke-width: 1.5; transition: fill 0.35s var(--ease), stroke 0.35s, transform 0.4s var(--ease); transform-box: fill-box; transform-origin: center; }
.tooth:hover path { stroke: var(--teal); transform: scale(1.06); }
.tooth.is-lit path { fill: #9ad6c9; stroke: var(--teal); }
.tooth.is-pick path { fill: var(--teal); stroke: var(--teal-deep); transform: scale(1.1); }
.tooth:focus-visible { outline: none; }
.tooth:focus-visible path { stroke: var(--teal-deep); stroke-width: 3; }
.arch__label { font-size: 13px; fill: var(--ink-2); font-family: var(--text); letter-spacing: 0.08em; text-transform: uppercase; }
.smile__tooth { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 8px 14px; border-radius: 999px; background: var(--paper); font-size: var(--t-small); font-weight: 600; white-space: nowrap; box-shadow: 0 10px 24px -16px rgba(11, 90, 84, 0.5); }
.plan { display: grid; align-self: start; align-content: start; gap: 16px; padding: 30px; border: 1px solid var(--line); border-radius: 26px; }
.plan__for { font-size: var(--t-small); color: var(--ink-2); }
.plan__name { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.plan__text { color: var(--ink-2); }
.plan__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 0; border-block: 1px solid var(--line); }
.plan__facts div { display: grid; gap: 2px; }
.plan__facts dt { font-size: 0.8125rem; color: var(--ink-2); }
.plan__facts dd { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan .btn { justify-self: start; }
.plan.is-swap > * { animation: swap 0.5s var(--ease) both; }
.plan.is-swap > :nth-child(2) { animation-delay: 0.04s; }
.plan.is-swap > :nth-child(3) { animation-delay: 0.08s; }
.plan.is-swap > :nth-child(4) { animation-delay: 0.12s; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }

.prices { margin-top: 56px; }
.prices__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.prices__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 1px solid var(--line); }
.prices__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.prices__list span { color: var(--ink-2); font-size: var(--t-small); }
.prices__list b { font-variant-numeric: tabular-nums; }
.prices .note { margin-top: 12px; }

/* la prima visita: la linea si riempie scorrendo */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-top: 36px; }
.steps::before, .steps::after { content: ''; position: absolute; left: 0; top: 7px; height: 3px; border-radius: 3px; }
.steps::before { right: 0; background: var(--mint); }
.steps::after { width: calc(var(--fill, 0) * 100%); background: var(--teal); transition: width 0.2s linear; }
.step { position: relative; display: grid; gap: 8px; align-content: start; }
.step::before { content: ''; position: absolute; left: 0; top: -36px; width: 17px; height: 17px; border-radius: 50%; background: var(--paper); border: 3px solid var(--mint-2); transition: border-color 0.3s, background-color 0.3s; }
.step.is-past::before { border-color: var(--teal); background: var(--teal); }
.step__time { font-size: var(--t-small); font-weight: 650; color: var(--teal); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; }
.step p { color: var(--ink-2); }

/* prenota */
.booker { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
.booker__pick { display: grid; gap: 14px; }
.booker__label { font-size: var(--t-small); font-weight: 650; color: var(--ink-2); }
.booker__label:not(:first-child) { margin-top: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 600; font-size: var(--t-small); cursor: pointer; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.pill:hover { border-color: var(--teal); }
.pill[aria-checked='true'] { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.day { display: grid; place-items: center; gap: 0; min-height: 72px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); cursor: pointer; line-height: 1.15; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.day small { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.day b { font-size: 1.375rem; }
.day:hover { border-color: var(--teal); }
.day[aria-checked='true'] { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.day[aria-checked='true'] small { color: var(--mint); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; min-height: 52px; }
.slot { min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease); }
.slot:hover:not(:disabled) { border-color: var(--teal); transform: translateY(-1px); }
.slot[aria-checked='true'] { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.slot:disabled { color: var(--taken); text-decoration: line-through; cursor: not-allowed; background: #f7faf9; }
.slots__empty { grid-column: 1 / -1; color: var(--ink-2); }

.ticket { position: sticky; top: 96px; display: grid; gap: 16px; padding: 28px; border-radius: 22px; background: var(--mint); }
.ticket__title { font-size: 1.375rem; font-weight: 700; }
.ticket__sum { display: grid; gap: 0; border-top: 1px solid var(--mint-2); }
.ticket__sum div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--mint-2); }
.ticket__sum dt { color: var(--ink-2); font-size: var(--t-small); }
.ticket__sum dd { font-weight: 650; text-align: right; }
.field { display: grid; gap: 6px; font-size: var(--t-small); font-weight: 600; color: var(--ink-2); }
.field input { min-height: 50px; padding: 0 16px; border: 1px solid var(--mint-2); border-radius: 12px; background: var(--paper); font-size: 1rem; color: var(--ink); transition: border-color 0.2s; }
.field input:focus { outline: none; border-color: var(--teal); }
.field input[aria-invalid='true'] { border-color: #b42318; }
.ticket__err { color: #b42318; font-size: var(--t-small); }
.ticket__ok { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--paper); color: var(--teal-deep); font-weight: 600; }

/* orari e luogo */
.practice { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.practice__info { display: grid; gap: 20px; }
.openstate { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 8px 14px; border-radius: 999px; background: var(--mint); font-weight: 650; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-2); }
.openstate.is-open .dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.18); }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; color: var(--ink-2); }
.hours tr.is-today td { font-weight: 700; color: var(--teal-deep); }
.addr { display: flex; gap: 12px; align-items: flex-start; }
.addr .ic { margin-top: 4px; color: var(--teal); }
.addr--ins { margin-top: -6px; }
.addr small { color: var(--ink-2); font-size: var(--t-small); }
.map { overflow: hidden; border-radius: 26px; }
.map svg { display: block; width: 100%; height: auto; }

/* domande */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; padding-bottom: clamp(80px, 10vw, 136px); }
.faq__list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-size: 1.125rem; font-weight: 650; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; flex: none; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat; color: var(--teal); transition: transform 0.35s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { max-width: 58ch; padding-bottom: 20px; color: var(--ink-2); }

/* piede */
.foot { padding-bottom: 48px; }
.horizon--foot { margin-bottom: 40px; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 40px; padding: 0 var(--m); }
.foot__logo { height: 36px; width: auto; }
.foot__in p { max-width: 60ch; font-size: var(--t-small); color: var(--ink-2); }
.foot__in a { color: var(--teal-deep); font-weight: 600; }

/* entrata della pagina: una sola, l'apertura */
.js .hero__text > *, .js .next { animation: rise 0.8s var(--ease) both; }
.js .hero__text > :nth-child(2) { animation-delay: 0.06s; }
.js .hero__text > :nth-child(3) { animation-delay: 0.12s; }
.js .hero__text > :nth-child(4) { animation-delay: 0.18s; }
.js .next { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* tablet e telefono */
@media (max-width: 1000px) {
  .top { grid-template-columns: auto 1fr auto; }
  .top__logo { justify-self: center; }
  .top__nav { display: none; }
  .hero, .smile, .booker, .practice, .faq { grid-template-columns: 1fr; }
  .ticket { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; }
  .steps::before, .steps::after { display: none; }
  .step::before { top: -28px; }
}
@media (max-width: 700px) {
  .top { gap: 12px; }
  .top__logo img { width: 28px; height: 28px; }
  .top__logo span { font-size: 1rem; }
  .top__back span { display: none; }
  .top__back { padding: 8px; }
  .top .btn--small { padding: 0 14px; }
  .sec-head { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 12px; }
  .facts li { grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; }
  .next { padding: 20px; }
  .smile__map { padding: 12px; }
  .plan { padding: 22px; }
  .plan__name { font-size: 1.625rem; }
  .prices__list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 32px; padding: 0 0 0 36px; }
  .steps::before { display: block; left: 7px; top: 8px; bottom: 8px; width: 3px; height: auto; right: auto; }
  .step::before { left: -36px; top: 4px; }
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
