/* Il sito di iter-app.it. Token «Macchia» (src/core/theme/palette.ts), gli stessi di style.css,
   tranne --text-dim e il --tufo chiaro, scuriti per il contrasto AA del testo piccolo (14/10:
   i valori dell'app danno 2,9–4,4 su queste carte, questi 4,6–5,7). */
@font-face { font-family: 'Bricolage'; src: url('/fonts/BricolageGrotesque-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/IBMPlexSans-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/IBMPlexSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --canvas: #F4F2EA;
  --surface: #FFFFFF;
  --surface-alt: #EDEAE0;
  --text: #16151A;
  --text-muted: #57554E;
  --text-dim: #6B6860;
  --accent: #2F6B4F;
  --accent-fill: #2F6B4F;
  --on-accent: #FFFFFF;
  --tufo: #A9431F;
  --border: rgba(22, 21, 26, 0.09);
  --shadow: 0 24px 60px -24px rgba(22, 21, 26, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0F1110;
    --surface: #1A1D19;
    --surface-alt: #171A16;
    --text: #F2F1EA;
    --text-muted: #A8A69C;
    --text-dim: #8F8D85;
    --accent: #6FBF92;
    --accent-fill: #2F6B4F;
    --tufo: #E08A62;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; background: var(--canvas); color: var(--text); }
body {
  font-family: 'Plex', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: 'Bricolage', system-ui, sans-serif; font-weight: 700; margin: 0; text-wrap: balance; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 12px 16px; min-height: 44px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Testata */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--accent); }
.logo img { width: 28px; height: 28px; border-radius: 7px; }
.logo span { font-family: 'Bricolage', system-ui, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.top nav { display: flex; align-items: center; gap: 20px; }
.top nav a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.top nav a:hover { color: var(--text); }
.top nav .nav-cta { color: var(--on-accent); background: var(--accent-fill); padding: 0 18px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; }
.top nav .nav-cta:hover { color: var(--on-accent); }
@media (max-width: 560px) { .top nav a:not(.nav-cta) { display: none; } }

/* Apertura */
.hero { padding: 40px 0 56px; }
.hero-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 72px 0 88px; } .hero-in { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.overline {
  margin: 0 0 14px; font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tufo);
}
.hero h1 { font-size: clamp(44px, 9vw, 84px); line-height: 0.98; letter-spacing: -0.035em; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-muted); margin: 20px 0 0; max-width: 34em; }
.where { margin: 14px 0 0; font-weight: 600; color: var(--text); }
.stores-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0 24px; border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-fill { background: var(--accent-fill); color: var(--on-accent); }
.btn-line { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
@media (max-width: 480px) { .stores-row .btn { flex: 1 1 100%; } }

.hero-media { position: relative; margin: 0; padding-bottom: 28px; }
.hero-photo {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; background: var(--surface-alt);
}
.phone {
  position: absolute; right: 6%; bottom: 0; width: 34%; min-width: 120px;
  border-radius: 22px; border: 6px solid #16151A; box-shadow: var(--shadow); background: #16151A;
}
.hero-media .credit { margin-top: 10px; max-width: 58%; }

/* Fasce */
.band { padding: 64px 0; }
.band-alt { background: var(--surface-alt); }
.band h2 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.025em; line-height: 1.05; }
.section-lead { color: var(--text-muted); margin: 14px 0 0; max-width: 40em; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px;
}
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); font-weight: 600; font-size: 15px;
}
.steps h3 { font-size: 20px; margin-top: 16px; letter-spacing: -0.01em; }
.steps p { margin: 8px 0 0; color: var(--text-muted); font-size: 16px; }

.routes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 24px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .routes { gap: 28px 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.route-link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.route-link img, .route-noimg {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; background: var(--border);
  transition: transform 0.25s ease;
}
.route-link:hover img { transform: scale(1.015); }
@media (prefers-reduced-motion: reduce) { .route-link img, .btn { transition: none; } }
.route-meta { margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-dim); }
.route-title { font-family: 'Bricolage', system-ui, sans-serif; font-weight: 700; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.15; letter-spacing: -0.01em; }
.route .credit { margin: 6px 0 0; }
.secrets { margin: 32px 0 0; padding-left: 14px; border-left: 3px solid var(--tufo); color: var(--text-muted); max-width: 40em; }

.screens { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.screens img { width: 100%; max-width: 300px; margin: 0 auto; border-radius: 24px; border: 6px solid #16151A; background: #16151A; box-shadow: var(--shadow); }
.screens p { text-align: center; color: var(--text-muted); margin: 14px auto 0; max-width: 18em; font-size: 16px; }
.band .stores-row { justify-content: center; margin-top: 40px; }

.contact p { margin: 12px 0 0; color: var(--text-muted); }
.contact a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }

.credit { font-size: 12px; line-height: 1.4; color: var(--text-dim); }
.credit a { color: inherit; }

/* Piede */
.foot { border-top: 1px solid var(--border); padding: 28px 0 max(28px, env(safe-area-inset-bottom)); font-size: 15px; color: var(--text-dim); }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--text-muted); display: inline-flex; align-items: center; min-height: 44px; }

/* /app da un computer */
.app-page {
  max-width: 520px; margin: 0 auto; padding: max(40px, env(safe-area-inset-top)) 16px 48px;
  display: flex; flex-direction: column; gap: 12px;
}
.app-page h1 { font-size: clamp(36px, 8vw, 52px); letter-spacing: -0.03em; margin-top: 24px; }
.app-page .lead { margin-top: 0; }
.app-page p a { display: inline-flex; align-items: center; min-height: 44px; }
