/* Phonetastico — index.css
   Home: hero, loghi brand, bento servizi, passi, negozio, recensioni.
   Richiede common.css. */

/* ---------- Hero (home) ---------- */
.hero { position: relative; padding-top: clamp(56px, 9vw, 112px); text-align: center; overflow: clip; }
.hero__copy { position: relative; z-index: 2; }
.hero .display { max-width: 15ch; margin-inline: auto; }
.hero .lead { max-width: 640px; margin: 22px auto 0; }
.hero .actions { justify-content: center; margin-top: 34px; }
.hero__stage {
  position: relative; margin-top: clamp(48px, 7vw, 80px);
  perspective: 1200px;
}
.hero__media {
  position: relative; margin-inline: auto; max-width: 1000px;
  transform-origin: 50% 0%;
  will-change: transform;
}
.hero__media img { width: 100%; }
.hero__glow {
  position: absolute; inset: 10% 15% auto; height: 70%; z-index: -1;
  background: radial-gradient(closest-side, rgba(224,53,43,.12), transparent 70%);
  filter: blur(30px);
}

/* ---------- Marquee brand ---------- */
.brands { padding-block: 40px 8px; }
.brands__label { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.brands__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 44px; }
.brands__row a { display: flex; align-items: center; height: 40px; opacity: .55; filter: grayscale(1); transition: opacity .25s, filter .25s, transform .4s var(--spring); }
.brands__row img, .brands__row svg { height: 22px; width: auto; max-width: 110px; object-fit: contain; }
.brands__row .tall img { height: 30px; }

/* ---------- Tile / Bento ---------- */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.tile {
  position: relative; overflow: hidden;
  background: var(--bg-soft); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  display: flex; flex-direction: column;
  min-height: 260px;
  transition: transform .5s var(--spring), box-shadow .4s;
}
a.tile:active { transform: scale(.985); }
.tile--2 { grid-column: span 2; }
.tile--3 { grid-column: span 3; }
.tile--4 { grid-column: span 4; }
.tile--6 { grid-column: span 6; }
.tile__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--accent); box-shadow: var(--sh-1); margin-bottom: auto; }
.tile__icon svg { width: 24px; height: 24px; }
.tile h3 { margin-top: 28px; }
.tile p { margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.tile__price { margin-top: 18px; font-size: 14px; color: var(--muted); }
.tile__price strong { font-size: 22px; color: var(--ink); font-weight: 650; letter-spacing: -0.02em; margin-left: 4px; }
.tile--dark { background: var(--navy); color: #fff; }
.tile--dark p, .tile--dark .tile__price { color: rgba(255,255,255,.66); }
.tile--dark .tile__price strong { color: #fff; }
.tile--dark .tile__icon { background: rgba(255,255,255,.08); box-shadow: none; color: #ff6a5f; }
.tile--accent { background: var(--accent); color: #fff; }
.tile--accent p { color: rgba(255,255,255,.82); }
.tile--accent .tile__icon { background: rgba(255,255,255,.16); color: #fff; box-shadow: none; }
.tile__badge { position: absolute; top: 20px; right: 20px; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); }
.tile__arrow { position: absolute; right: 22px; bottom: 22px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.05); transition: transform .45s var(--spring), background-color .2s; }
.tile--dark .tile__arrow, .tile--accent .tile__arrow { background: rgba(255,255,255,.14); }
.tile__arrow svg { width: 16px; height: 16px; }
.tile--big { min-height: 380px; }
.tile--big h3 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.032em; line-height: 1.08; }

@media (max-width: 1000px) {
  .tile--2 { grid-column: span 3; }
  .tile--4 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile--3, .tile--4, .tile--6 { grid-column: span 2; }
  .tile--2 { grid-column: span 1; padding: 20px 18px; border-radius: 22px; }
  .tile--2 .tile__icon { width: 38px; height: 38px; }
  .tile--2 h3 { font-size: 18px; margin-top: 18px; }
  .tile--2 p { font-size: 14px; }
  .tile--2 .tile__price strong { font-size: 19px; }
  .tile { min-height: 0; }
  .tile h3 { margin-top: 22px; }
  .tile--big { min-height: 320px; }
}

/* ---------- Passi ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); counter-reset: step; }
.step { position: relative; padding-top: 28px; border-top: 1px solid var(--line-strong); }
.step__n { font-size: 14px; font-weight: 650; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.step h3 { margin-top: 14px; }
.step p { margin-top: 10px; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Capitolo scuro ---------- */
.dark { background: #000; color: #f5f5f7; }
.dark .lead, .dark .muted { color: #a1a1a6; }

/* Negozio */
.store { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.store__photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; background: #111; }
.store__photo img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.store__photo figcaption { position: absolute; left: 16px; bottom: 16px; }
.store__copy .lead { margin-top: 18px; }
.store__copy .actions { margin-top: 32px; }
.store__addr { margin-top: 28px; display: grid; gap: 6px; font-size: 16px; color: #a1a1a6; }
.store__addr a { color: #f5f5f7; }
@media (max-width: 860px) { .store { grid-template-columns: minmax(0, 1fr); } .store__photo { aspect-ratio: 4 / 4.2; } }

/* ---------- Recensioni ---------- */
.rating { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stars { display: flex; gap: 6px; color: #f5b301; margin-bottom: 22px; }
.stars svg { width: clamp(28px, 4vw, 40px); height: clamp(28px, 4vw, 40px); }
.rating .actions { margin-top: 28px; }

.store__photo img { object-position: 50% 30%; }
.steps--stack { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 40px; }

@media (hover: hover) and (pointer: fine) {
  .brands__row a:hover { opacity: 1; filter: none; transform: translateY(-2px); }
  a.tile:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
  a.tile:hover .tile__arrow { transform: translateX(3px); }
  .store__addr a:hover { text-decoration: underline; text-underline-offset: 3px; }
  a.tile:hover:active { transform: translateY(-2px) scale(.99); }
}

/* ---------- JustFix ---------- */
.justfix {
  margin-top: 100px;
  --jf: #6a99f9;          /* blu del logo JustFix */
  --jf-sky: #8cc4ff;      /* azzurro del titolo */
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 80% at 50% 58%, #0b1630 0%, #050914 55%, #03050b 100%);
  color: #f5f5f7; text-align: center;
}
.justfix__inner { display: flex; flex-direction: column; align-items: center; }
.justfix__title {
  color: var(--jf-sky);
  background: linear-gradient(180deg, #b6dcff 0%, var(--jf-sky) 45%, var(--jf) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.justfix__lead { margin-top: 18px; max-width: 620px; color: #a9b4c8; text-wrap: balance; }

.justfix__stage {
  --size: clamp(150px, 26vw, 230px);
  position: relative; display: grid; place-items: center;
  width: min(100%, 560px); aspect-ratio: 1;
  margin-block: clamp(4px, 2vw, 16px);
}
.justfix__aura { position: absolute; inset: -18%; width: 136%; height: 136%; pointer-events: none; }
.justfix__glow {
  position: absolute; width: calc(var(--size) * 1.9); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(106,153,249,.42), rgba(106,153,249,.12) 55%, transparent 100%);
  filter: blur(8px);
  animation: jf-breathe 6s ease-in-out infinite;
}
.justfix__stage picture { position: relative; z-index: 1; display: block; width: var(--size); }
.justfix__logo {
  width: 100%; height: auto;
  filter: drop-shadow(0 18px 40px rgba(20,60,160,.55));
  animation: jf-float 7s ease-in-out infinite;
}
@keyframes jf-float { 50% { transform: translateY(-8px) rotate(-1.2deg); } }
@keyframes jf-breathe { 50% { transform: scale(1.08); opacity: .8; } }

.justfix__cta svg { transition: transform .35s var(--spring); }
.justfix__note { margin-top: 14px; font-size: 13px; color: #6f7b92; }

@media (hover: hover) and (pointer: fine) {
  .justfix__cta:hover svg { transform: translate(2px, -2px); }
}
@media (prefers-reduced-motion: reduce) {
  .justfix__logo, .justfix__glow { animation: none; }
}
