/* =========================================================
   ODT Transfer - pagine pubbliche (accesso, invito)

   Palette da studio odontoiatrico: blu clinico profondo,
   verde acqua e bianco. Pulita, non appariscente.
   ========================================================= */

.is-public {
  --deep: #072a3d;
  --deep-2: #0b3a53;
  --teal: #2dd4bf;
  --teal-2: #22d3ee;
  --sand: #eef7f8;
  --ink-light: #eaf6f8;
  --muted-light: rgba(234, 246, 248, .70);

  margin: 0;
  min-height: 100vh;
  background: var(--deep);
  color: var(--ink-light);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------------------------------------------------------
   Impalcatura
   --------------------------------------------------------- */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(18px, 5vw, 56px);
  isolation: isolate;
}

/* ---------- Sfondo ---------- */
.stage-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 78% -8%, #10506b 0%, transparent 62%),
    radial-gradient(760px 520px at 6% 108%, #0d4a54 0%, transparent 60%),
    linear-gradient(160deg, #072a3d 0%, #0a3548 52%, #062534 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(78px);
  opacity: .5;
}
.blob-1 {
  width: 46vw; height: 46vw; min-width: 320px; min-height: 320px;
  right: -10vw; top: -14vw;
  background: radial-gradient(circle, rgba(45, 212, 191, .55), transparent 68%);
  animation: drift 26s ease-in-out infinite alternate;
}
.blob-2 {
  width: 38vw; height: 38vw; min-width: 260px; min-height: 260px;
  left: -12vw; bottom: -14vw;
  background: radial-gradient(circle, rgba(34, 211, 238, .38), transparent 68%);
  animation: drift 32s ease-in-out infinite alternate-reverse;
}

/* Reticolo tenue: dà profondità senza rubare l'occhio. */
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 78%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3vw, 4vw, 0) scale(1.12); }
}

/* ---------- Intestazione ---------- */
.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 10px;
}

.logo { display: flex; align-items: center; gap: 11px; }
.mark { width: 38px; height: 38px; flex: none; }

/* Il nome dello studio su due righe: sopra cos'è, sotto di chi è. */
.logo-lockup { display: flex; flex-direction: column; line-height: 1.2; }
.logo-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(234, 246, 248, .55);
}
.logo-text {
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -.01em;
}

.btn-top {
  color: var(--ink-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 17px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 99px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
  transition: background .16s, border-color .16s, transform .16s;
}
.btn-top:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .45);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   Sezione principale
   --------------------------------------------------------- */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(16px, 4vh, 48px) 0;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 10px;
  border-radius: 99px;
  background: rgba(45, 212, 191, .12);
  border: 1px solid rgba(45, 212, 191, .3);
  color: #9df0e4;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, .65);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45, 212, 191, .6); }
  70%  { box-shadow: 0 0 0 9px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.06;
  letter-spacing: -.028em;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* "Studio Odontoiatrico": più piccolo, così il nome del titolare domina. */
.hero-kicker {
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(234, 246, 248, .62);
}
.grad {
  background: linear-gradient(96deg, var(--teal) 0%, var(--teal-2) 55%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin: 0 0 30px;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.62;
  color: var(--muted-light);
  max-width: 50ch;
}

/* ---------- Pulsante principale ---------- */
.hero-cta { margin-bottom: 34px; }

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: linear-gradient(100deg, var(--teal) 0%, var(--teal-2) 100%);
  color: #04222f;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 700;
  padding: 15px 30px;
  border-radius: 99px;
  box-shadow: 0 10px 30px rgba(45, 212, 191, .32), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(45, 212, 191, .45), inset 0 1px 0 rgba(255, 255, 255, .55);
  filter: saturate(1.08);
}
.btn-cta:active { transform: translateY(0); }
.ico-lock { width: 19px; height: 19px; flex: none; }

.cta-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(234, 246, 248, .55);
}

/* ---------- Punti di forza ---------- */
.feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
}
.feats li {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  padding: 14px 14px 15px;
  transition: background .18s, border-color .18s, transform .18s;
}
.feats li:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(45, 212, 191, .38);
  transform: translateY(-2px);
}
.feat-ico {
  width: 21px; height: 21px;
  display: block;
  margin-bottom: 9px;
  color: var(--teal);
  flex: none;
}
.feats strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.feats em {
  font-style: normal;
  font-size: 12.2px;
  line-height: 1.45;
  color: rgba(234, 246, 248, .58);
  display: block;
}

/* ---------------------------------------------------------
   Illustrazione
   --------------------------------------------------------- */
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 400px;
}

.tooth-svg {
  width: clamp(230px, 26vw, 330px);
  height: auto;
  display: block;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(-9px); }
  50%      { transform: translateY(9px); }
}

.art-arrow { animation: nudge 2.8s ease-in-out infinite; transform-origin: 110px 108px; }
@keyframes nudge {
  0%, 100% { transform: translateY(3px); opacity: .92; }
  50%      { transform: translateY(-3px); opacity: 1; }
}

/* Anelli concentrici dietro al dente */
.art-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.art-rings span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(45, 212, 191, .17);
}
.art-rings span:nth-child(1) { width: 280px; height: 280px; animation: breathe 6s ease-in-out infinite; }
.art-rings span:nth-child(2) { width: 380px; height: 380px; animation: breathe 6s ease-in-out infinite .7s; }
.art-rings span:nth-child(3) { width: 480px; height: 480px; animation: breathe 6s ease-in-out infinite 1.4s; border-color: rgba(45, 212, 191, .09); }
@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: .55; }
  50%      { transform: scale(1.05); opacity: .95; }
}

/* Etichette dei file che fluttuano attorno */
.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 45, 63, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  border-radius: 11px;
  padding: 9px 13px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(2, 16, 24, .45);
}
.chip i {
  font-style: normal;
  font-weight: 500;
  font-size: 11.5px;
  color: rgba(234, 246, 248, .5);
}

/* Etichetta col formato del file: niente emoji, niente sorprese sui font. */
.ext {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 3px 5px;
  border-radius: 5px;
  color: #04222f;
  flex: none;
}
.ext-stl { background: #5eead4; }
.ext-dcm { background: #7dd3fc; }
.ext-jpg { background: #fcd34d; }

.chip-1 { top: 8%;  left: -4%;  animation: float2 8s  ease-in-out infinite; }
.chip-2 { top: 44%; right: -4%; animation: float2 9.5s ease-in-out infinite 1.1s; }
.chip-3 { bottom: 9%; left: 2%; animation: float2 8.6s ease-in-out infinite 2.2s; }
@keyframes float2 {
  0%, 100% { transform: translateY(-7px); }
  50%      { transform: translateY(7px); }
}

/* ---------- Piede ---------- */
.stage-foot {
  padding: 18px 0 26px;
  font-size: 12.5px;
  color: rgba(234, 246, 248, .4);
  display: flex;
  gap: 8px;
  justify-content: center;
}
.sep { opacity: .5; }

/* ---------------------------------------------------------
   Maschera di accesso
   --------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Senza JavaScript funziona lo stesso: apre il CSS :target. */
.modal:target,
.modal.is-open { display: flex; }

.modal-veil {
  position: absolute;
  inset: 0;
  background: rgba(3, 17, 25, .72);
  backdrop-filter: blur(7px);
  animation: fade .22s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  color: #16181d;
  border-radius: 18px;
  padding: 30px 30px 24px;
  box-shadow: 0 30px 80px rgba(2, 14, 22, .6);
  animation: rise .26s cubic-bezier(.2, .9, .3, 1.2);
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-x {
  position: absolute;
  top: 12px; right: 14px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: #8a929c;
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
  transition: background .15s, color .15s;
}
.modal-x:hover { background: #f1f3f5; color: #16181d; }

.modal-head { text-align: center; margin-bottom: 22px; }
.modal-head .mark {
  width: 46px; height: 46px;
  margin: 0 auto 12px;
  display: block;
  /* Il marchio è pensato su fondo scuro: qui gli serve un disco dietro. */
  background: var(--deep-2);
  border-radius: 50%;
  padding: 3px;
}
.modal-head h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.02em; }
.modal-head p { margin: 0; font-size: 13.5px; color: #6b7280; }

.modal-card .field { margin-bottom: 15px; }
.modal-card label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}
.modal-card input[type=email],
.modal-card input[type=password] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #dcdfe4;
  border-radius: 9px;
  background: #f8fafb;
  color: #16181d;
  font: inherit;
  font-size: 14.5px;
}
.modal-card input::placeholder { color: #a9b1bb; }
.modal-card input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .18);
}

/* Occhio per mostrare la password */
.pw { position: relative; }
.pw input { padding-right: 44px; }
.pw-eye {
  position: absolute;
  right: 5px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 7px;
  font-size: 15px;
  opacity: .5;
  transition: opacity .15s, background .15s;
}
.pw-eye:hover { opacity: 1; background: #f1f3f5; }
.pw-eye.on { opacity: 1; }

.modal-card .btn {
  width: 100%;
  margin-top: 6px;
  background: linear-gradient(100deg, var(--deep-2) 0%, #0f5b74 100%);
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 9px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.modal-card .btn:hover { filter: brightness(1.14); transform: translateY(-1px); }

.modal-card .flash {
  padding: 10px 13px;
  border-radius: 9px;
  margin-bottom: 16px;
  font-size: 13.5px;
  background: #fdecea;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, .22);
}

.modal-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: #8a929c;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   Pagina con una sola scheda al centro (invito)
   --------------------------------------------------------- */
.solo-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 20px 0 40px;
}

.solo-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  color: #16181d;
  border-radius: 18px;
  padding: 32px 30px 26px;
  box-shadow: 0 30px 80px rgba(2, 14, 22, .5);
}

.solo-head { text-align: center; margin-bottom: 24px; }
.solo-head .mark {
  width: 50px; height: 50px;
  margin: 0 auto 14px;
  display: block;
  background: var(--deep-2);
  border-radius: 50%;
  padding: 3px;
}
.solo-head h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.solo-head p { margin: 0; font-size: 13.5px; color: #6b7280; line-height: 1.5; }
.solo-head strong { color: #16181d; }

.solo-ico {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 23px;
}
.solo-ico-warn { background: #fff4e5; }

.solo-card .field { margin-bottom: 15px; }
.solo-card label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}
.solo-card input[type=password] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #dcdfe4;
  border-radius: 9px;
  background: #f8fafb;
  color: #16181d;
  font: inherit;
  font-size: 14.5px;
}
.solo-card input::placeholder { color: #a9b1bb; }
.solo-card input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .18);
}
.solo-card .pw input { padding-right: 44px; }

.solo-card .btn {
  width: 100%;
  margin-top: 6px;
  background: linear-gradient(100deg, var(--deep-2) 0%, #0f5b74 100%);
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 9px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.solo-card .btn:hover { filter: brightness(1.14); transform: translateY(-1px); }

.solo-card .flash {
  padding: 10px 13px;
  border-radius: 9px;
  margin-bottom: 16px;
  font-size: 13.5px;
  background: #fdecea;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, .22);
}

.solo-note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: #8a929c;
  line-height: 1.55;
}

/* ---------------------------------------------------------
   Messaggi temporanei (es. "sei uscito")
   --------------------------------------------------------- */
.toasts {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
}
.toast {
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(10px);
  animation: drop .3s ease-out;
  box-shadow: 0 8px 24px rgba(2, 14, 22, .35);
}
.toast-ok {
  background: rgba(45, 212, 191, .16);
  border: 1px solid rgba(45, 212, 191, .4);
  color: #b6f5e9;
}
.toast-err {
  background: rgba(248, 113, 113, .16);
  border: 1px solid rgba(248, 113, 113, .4);
  color: #fecaca;
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   Schermi piccoli
   --------------------------------------------------------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 8px;
  }
  .hero-lede { margin-left: auto; margin-right: auto; }
  .eyebrow { margin-inline: auto; }
  .feats { margin-inline: auto; }
  .hero-art { order: -1; min-height: 250px; margin-bottom: 6px; }
  .tooth-svg { width: clamp(150px, 34vw, 200px); }
  .art-rings span:nth-child(1) { width: 190px; height: 190px; }
  .art-rings span:nth-child(2) { width: 258px; height: 258px; }
  .art-rings span:nth-child(3) { display: none; }

  /* In colonna le etichette devono restare DENTRO lo schermo:
     con offset negativi verrebbero tagliate dal bordo. */
  .chip-1 { left: 2%;  top: 4%; }
  .chip-2 { right: 2%; top: 38%; }
  .chip-3 { display: none; }
}

@media (max-width: 620px) {
  .feats { grid-template-columns: 1fr; max-width: 340px; gap: 8px; }
  .feats li { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 13px; }
  .feat-ico { margin: 0; }
  .feats em { display: none; }
  .chip { font-size: 11px; padding: 7px 10px; }
  .chip i { display: none; }
  .btn-top { display: none; }
  .modal-card { padding: 26px 20px 20px; }
}

@media (max-height: 720px) and (min-width: 981px) {
  .feats { display: none; }
  .hero-art { min-height: 320px; }
}

/* ---------------------------------------------------------
   Rispetto delle preferenze di movimento
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .blob, .tooth-svg, .art-arrow, .art-rings span, .chip, .dot {
    animation: none !important;
  }
  .modal-card, .modal-veil, .toast { animation: none !important; }
  .btn-cta:hover, .btn-top:hover, .feats li:hover { transform: none; }
}
