/* =========================================================
   TESLADREAM – foglio di stile unico
   Palette: notte (blu asfalto di notte), argento (Model X),
   traiettoria (il blu della linea che la TAD disegna sullo schermo)
   ========================================================= */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --notte: #13243a;
  --notte-2: #1c3352;
  --argento: #e6eaef;
  --carta: #f5f7fa;
  --inchiostro: #16202f;
  --grigio: #586477;
  --traiettoria: #2f7bff;
  --traiettoria-chiara: #8db8ff;
  --ok: #1f8a5b;
  --err: #c0392b;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --r-sm: 6px;
  --r-lg: 18px;
  --line: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--inchiostro);
  background: var(--carta);
  font-stretch: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--traiettoria); text-underline-offset: 3px; }
a:hover { color: var(--notte); }
:focus-visible { outline: 3px solid var(--traiettoria); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Tipografia ---------- */
.display, .h1, .h2, .h3, .brand {
  font-stretch: 125%;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0 0 .5em;
}
.display { font-size: clamp(2.7rem, 7.4vw, 6.2rem); font-weight: 800; line-height: .95; letter-spacing: -0.02em; }
.h1 { font-size: clamp(2.3rem, 5.6vw, 4.6rem); font-weight: 800; }
.h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 750; }
.h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; line-height: 1.15; }
.lead { font-size: clamp(1.12rem, 1.6vw, 1.35rem); line-height: 1.5; max-width: 38em; }
.muted { color: var(--grigio); }
.measure { max-width: 40em; }

/* ---------- Barra in alto ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: #fff;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.topbar.is-solid { background: var(--notte); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: .04em; margin: 0; }
.brand:hover { color: #fff; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.nav a { color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.nav__cta { background: var(--traiettoria); }
.nav .nav__cta:hover { background: #fff; color: var(--notte); }
.menu-btn { display: none; background: none; border: 0; color: #fff; width: 44px; height: 44px; cursor: pointer; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
  display: block; width: 24px; height: 2px; background: currentColor; position: relative; margin: auto; transition: transform .2s;
}
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -7px; } .menu-btn__bars::after { top: 7px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 72px 0 auto 0; background: var(--notte); padding: 12px var(--gutter) 24px; display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav a { display: block; padding: 14px 12px; font-size: 1.15rem; }
  .topbar.menu-open { background: var(--notte); }
}


/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 650; font-size: 1.02rem;
  padding: 15px 26px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--traiettoria); color: #fff; }
.btn--primary:hover { background: #fff; color: var(--notte); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--notte); }
.btn--dark { background: var(--notte); color: #fff; }
.btn--dark:hover { background: var(--traiettoria); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; background: var(--notte);
  min-height: 100svh; display: flex; align-items: flex-end;
  padding: 120px 0 clamp(56px, 9vh, 110px);
  overflow: hidden; isolation: isolate;
}
.hero__img { position: absolute; inset: 0; z-index: -2; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(19,36,58,.55) 0%, rgba(19,36,58,0) 28%),
    linear-gradient(0deg, rgba(19,36,58,.96) 4%, rgba(19,36,58,.55) 42%, rgba(19,36,58,0) 70%);
}
.hero__content { max-width: 720px; }
.home .hero .display { font-size: clamp(2.7rem, 6.4vw, 5.4rem); }
/* home desktop: schermo della TAD a destra, testo a sinistra */
@media (min-width: 901px) {
  .home .hero__img img { object-position: 0% 45%; }
  .home .hero::before {
    background:
      linear-gradient(180deg, rgba(19,36,58,.5) 0%, rgba(19,36,58,0) 24%),
      linear-gradient(90deg, rgba(19,36,58,.94) 0%, rgba(19,36,58,.7) 40%, rgba(19,36,58,0) 62%),
      linear-gradient(0deg, rgba(19,36,58,.7) 0%, rgba(19,36,58,0) 40%);
  }
}
.hero .display { max-width: 11ch; }
.hero .lead { color: #dfe7f2; margin-bottom: 1.6em; }
.hero__tag {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; margin-bottom: 22px; font-size: .98rem;
  background: rgba(47,123,255,.22); border: 1px solid rgba(141,184,255,.5); padding: 7px 14px 7px 12px; border-radius: 999px;
}
.hero__tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--traiettoria-chiara); box-shadow: 0 0 0 4px rgba(141,184,255,.25); }

/* pagine interne: hero più basso */
.hero--page { min-height: 72svh; }
.hero--page .display { max-width: 13ch; }

/* ---------- La traiettoria: linea blu che attraversa le sezioni ---------- */
.journey { position: relative; }
.journey::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: max(calc((100vw - var(--wrap)) / 2 - 8px), 14px);
  width: var(--line); background: linear-gradient(var(--traiettoria), var(--traiettoria) 92%, transparent);
  z-index: 1; pointer-events: none;
}
.stop { position: relative; }
.stop > .wrap > .stop__title, .stop .stop__title { position: relative; }
.stop__title::before {
  content: ""; position: absolute; top: .32em;
  left: calc(-1 * (var(--gutter) + 8px) - 7px);
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--carta); border: var(--line) solid var(--traiettoria); z-index: 2;
}
.section--dark .stop__title::before { background: var(--notte); }
@media (max-width: 1260px) {
  .journey::before { left: 10px; }
  .stop__title::before { left: calc(-1 * var(--gutter) + 3px); }
}
@media (max-width: 600px) {
  .journey::before { left: 6px; width: 2px; }
  .stop__title::before { left: calc(-1 * var(--gutter) - 2px); width: 13px; height: 13px; border-width: 2px; }
}

/* ---------- Sezioni ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section--dark { background: var(--notte); color: #e8eef6; }
.section--dark .muted { color: #a9b8cc; }
.section--dark a:not(.btn) { color: var(--traiettoria-chiara); }
.section--silver { background: var(--argento); }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--rev > :first-child { order: 2; }
.split__media img { border-radius: var(--r-lg); width: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }

/* tre capacità della TAD */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px; margin-top: 48px; }
.facts h3 { margin-bottom: .35em; }
.facts p { color: var(--grigio); margin: 0; }
.section--dark .facts p { color: #b9c6d8; }
.facts > div { border-top: 2px solid var(--traiettoria); padding-top: 18px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

.callout {
  margin-top: 40px; padding: 22px 24px; border-radius: var(--r-sm);
  background: rgba(47,123,255,.1); border-left: 4px solid var(--traiettoria);
  max-width: 48em;
}
.section--dark .callout { background: rgba(141,184,255,.1); }
.callout p:last-child { margin: 0; }

/* video */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; border-radius: 50%;
  border: 0; background: var(--traiettoria); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(47,123,255,.25); transition: transform .2s, box-shadow .2s;
}
.video__play svg { width: 40px; height: 40px; margin-left: 5px; }
.video__play:hover { transform: scale(1.06); box-shadow: 0 0 0 16px rgba(47,123,255,.22); }
.video__note { position: absolute; left: 16px; bottom: 10px; margin: 0; font-size: .85rem; color: #dbe4f0; }
.video.is-playing .video__note, .video.is-playing .video__play, .video.is-playing img { display: none; }

/* servizi in home: righe alternate */
.services { display: grid; gap: clamp(56px, 8vw, 96px); margin-top: 56px; }
.service { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.service:nth-child(even) > .service__media { order: 2; }
.service__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.service__media img { width: 100%; height: 100%; object-fit: cover; }
.service__name { font-stretch: 125%; font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1; margin: 0 0 .15em; }
.service__sub { font-weight: 600; color: var(--traiettoria); margin-bottom: 1em; }
.service ul { padding-left: 1.1em; color: var(--grigio); }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; } .service:nth-child(even) > .service__media { order: 0; } }

/* passaggi (sequenza reale: qui la numerazione ha senso) */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--traiettoria); color: #fff; font-weight: 700; margin-bottom: 16px;
}
.steps h3 { font-size: 1.2rem; margin-bottom: .3em; }
.steps p { margin: 0; color: var(--grigio); }
.section--dark .steps p { color: #b9c6d8; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* galleria Model X */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: clamp(150px, 19vw, 240px); gap: 12px; margin-top: 40px; }
.gallery figure { margin: 0; border-radius: var(--r-sm); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g-big { grid-row: span 2; }
.gallery .g-tall { grid-row: span 2; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery .g-big { grid-column: span 2; } }

/* recensioni */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.review { margin: 0; }
.review blockquote { margin: 0 0 14px; font-size: 1.05rem; }
.review figcaption { font-weight: 700; }
.review figcaption span { display: block; font-weight: 400; color: var(--grigio); font-size: .95rem; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 48px; }
.badges img { height: 110px; width: auto; }
.badges .badges__logo { height: 44px; }
@media (max-width: 900px) { .reviews { grid-template-columns: 1fr; } }

/* tappe (timeline pagine wedding/shuttle) */
.timeline { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 36px; }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: center; }
.timeline img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 3px solid var(--traiettoria); }
.timeline h3 { margin-bottom: .3em; font-size: 1.3rem; }
.timeline p { margin: 0; color: var(--grigio); }
@media (max-width: 560px) { .timeline li { grid-template-columns: 88px 1fr; gap: 18px; } .timeline img { width: 88px; height: 88px; } }

/* schede con immagine (pagine interne) */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; }
.feature img { border-radius: var(--r-sm); aspect-ratio: 1 / 1; object-fit: cover; width: 100%; margin-bottom: 14px; }
.feature h3 { font-size: 1.25rem; margin-bottom: .25em; }
.feature p { color: var(--grigio); margin: 0; }
@media (max-width: 800px) { .features { grid-template-columns: 1fr; } }

/* formati / prezzi */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.plan { background: #fff; border-radius: var(--r-sm); padding: 28px; border-top: 4px solid var(--traiettoria); }
.plan--evid { background: var(--notte); color: #e8eef6; }
.plan h3 { margin-bottom: .2em; }
.plan .plan__dur { font-weight: 600; color: var(--traiettoria); margin-bottom: 1em; }
.plan--evid .plan__dur { color: var(--traiettoria-chiara); }
.plan p { margin: 0; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq { margin-top: 36px; max-width: 52em; }
.faq details { border-bottom: 1px solid #cfd6df; }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 650; font-size: 1.12rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; color: var(--traiettoria); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--grigio); padding-bottom: 18px; margin: 0; }

.quote { font-size: 1.05rem; color: var(--grigio); border-left: 3px solid var(--traiettoria); padding-left: 20px; max-width: 52em; }

/* ---------- Contatti ---------- */
.contact { background: var(--notte); color: #e8eef6; padding: clamp(64px, 9vw, 112px) 0; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 80px); }
.contact__intro p { color: #b9c6d8; }
.contact__direct a { color: #fff; font-size: 1.6rem; font-weight: 700; font-stretch: 115%; text-decoration: none; }
.contact__direct a:hover { color: var(--traiettoria-chiara); }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 6px; }
.form__row--half { grid-template-columns: 1fr 1fr; gap: 18px; }
.form__row--half > div { display: grid; gap: 6px; }
@media (max-width: 560px) { .form__row--half { grid-template-columns: 1fr; } }
.form label { font-weight: 600; font-size: .98rem; }
.form .opt { font-weight: 400; color: #9fb0c6; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=date], .form select, .form textarea {
  font: inherit; font-size: 1rem; width: 100%; padding: 13px 14px;
  background: #fff; color: var(--inchiostro); border: 2px solid #fff; border-radius: var(--r-sm);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--traiettoria); }
.form [aria-invalid="true"] { border-color: #ff8a7a; }
.form textarea { resize: vertical; min-height: 130px; }
.form__check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .95rem; }
.form__check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--traiettoria); }
.form__check label { font-weight: 400; color: #cbd6e4; }
.form__check a { color: #fff; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form__status:empty { display: none; }
.form__status { padding: 14px 16px; border-radius: var(--r-sm); font-weight: 600; }
.form__status[data-kind="ok"] { background: #dff5e9; color: #0f5133; }
.form__status[data-kind="err"] { background: #ffe5e1; color: #7d1d10; }

/* ---------- Footer ---------- */
.footer { background: #0d1a2b; color: #a9b8cc; padding: 56px 0 28px; font-size: .95rem; }
.footer a { color: #dfe7f2; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.brand--footer { font-size: 1.1rem; margin-bottom: .6em; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer__legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* pagina semplice (privacy) */
.prose { max-width: 46em; }
.prose h2 { font-stretch: 115%; font-size: 1.4rem; margin: 2em 0 .5em; }
.page-plain { padding-top: 150px; }
.timeline__price { width: 140px; height: 140px; border-radius: 50%; border: 3px solid var(--traiettoria); display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: var(--traiettoria); background: #fff; }
@media (max-width: 560px) { .timeline__price { width: 88px; height: 88px; font-size: 2rem; } }
.split > .video { align-self: center; }
.service ul, .split ul { margin: 0 0 1.4em; }
body.page-solid .topbar { background: var(--notte); }
