/* =========================================================
   Mimo × negozi TIM — Landing
   Fonte: Figma "MIMO X TIM" · frame 8:25 (desktop 1920px)
   Valori in px = Figma @1920. I clamp() scalano fino a mobile.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Colori */
  --c-green-900: #1a3a2a;   /* hero, chiusura, slot selezionato */
  --c-ink:       #0e1a13;   /* titoli su chiaro */
  --c-muted:     #6b8073;   /* testi secondari, placeholder */
  --c-paper:     #f5f7f3;   /* sfondo vantaggi / biglietto, testo su scuro */
  --c-white:     #ffffff;
  --c-line:      #e0e5de;   /* bordi input, card */
  --c-orange:    #ff8742;   /* primario / CTA */
  --c-neon:      #4dff91;   /* eyebrow su verde */
  --c-ok:        #0d7a3d;   /* "sempre disponibile" */
  --c-alert:     #e24b2b;   /* "solo 50", "restano 3 posti" */

  /* Font */
  --f-sans: "Google Sans Flex", "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --page-max: 1920px;
  --gutter: clamp(20px, 8.333vw, 160px);   /* 160px @1920 */

  /* Raggi */
  --r-pill: 99px;
  --r-card: 22px;
  --r-ticket: 28px;
  --r-field: 14px;
  --r-chip: 12px;

  /* Ombre */
  --shadow-card: 0 18px 20px rgba(26, 59, 43, .08);
}

/* ---------- Reset minimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-sans);
  color: var(--c-ink);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ul, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Tipografia comune ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.3;
}
.eyebrow--accent { color: var(--c-neon); }
.eyebrow--orange { color: var(--c-orange); }
.eyebrow--muted  { color: var(--c-muted); font-size: 12px; }

.h2 {
  font-weight: 600;
  font-size: clamp(34px, 3.125vw, 60px);   /* 60 @1920 */
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--c-ink);
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-orange);
  color: var(--c-white);
  font-family: var(--f-sans);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: #ff7526; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--c-neon); outline-offset: 3px; }

.btn--sm    { padding: 14px 26px; font-size: 16px; }
.btn--lg    { padding: 22px 40px; font-size: clamp(18px, 1.146vw, 22px); }
.btn--block { width: 100%; padding: 22px 40px; font-size: 18px; }

/* ---------- Lockup loghi ---------- */
.lockup { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.lockup img { width: auto; height: 75px; }
.lockup__tim { border-radius: 15px; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header { background: var(--c-white); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}
.site-header__right { display: flex; align-items: center; gap: 28px; }

/* =========================================================
   HERO
   ========================================================= */
.hero { background: var(--c-green-900); color: var(--c-paper); overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(0, 644px);
  justify-content: space-between;
  align-items: center;
  column-gap: 64px;
  row-gap: 72px;
  padding-top: clamp(56px, 5vw, 96px);
  padding-bottom: clamp(72px, 6.25vw, 120px);
}
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 34px; }
.hero__title {
  font-weight: 600;
  font-size: clamp(44px, 5vw, 96px);        /* 96 @1920 */
  line-height: .96;
  letter-spacing: -.035em;
  color: var(--c-paper);
}
.hero__lead {
  max-width: 720px;
  font-size: clamp(17px, 1.198vw, 23px);    /* 23 @1920 */
  line-height: 1.5;
  opacity: .78;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero__hint { font-size: 12px; opacity: .55; }

/* Scena: card foto + badge "50 posti" + mascotte.
   Posizioni in % ricavate dal frame Figma (643.7 × 697.4). */
.hero__visual {
  position: relative;
  aspect-ratio: 643.7 / 697.4;
  container-type: inline-size;
}
.hero__photo {
  position: absolute; inset: 0;
  border-radius: 39px;
  overflow: hidden;
  background: var(--c-orange);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute;
  left: 79.5%;
  top: -6.1%;
  width: 28.4%;
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4cqw;
  border-radius: 50%;
  background: var(--c-orange);
  color: var(--c-white);
  transform: rotate(-12deg);
  filter: drop-shadow(0 28px 28px rgba(0, 0, 0, .4));
}
.badge__num   { font-weight: 700; font-size: 9.6cqw; line-height: 1; }
.badge__label { font-family: var(--f-mono); font-size: 2.4cqw; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }

.hero__mascot {
  position: absolute;
  left: -29.6%;
  top: 59.9%;
  width: 60.4%;
  transform: rotate(-7.54deg);
  pointer-events: none;
}

/* =========================================================
   SEZIONI: intestazioni
   ========================================================= */
.section-head { display: flex; flex-direction: column; gap: 14px; }
.section-head--split {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head__left { display: flex; flex-direction: column; gap: 14px; }

/* =========================================================
   VANTAGGI
   ========================================================= */
.vantaggi { background: var(--c-paper); padding-block: clamp(64px, 5.73vw, 110px); }
.vantaggi .section-head { margin-bottom: 40px; }

.coupons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.coupon {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 26px 24px 22px;
  background: var(--c-white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.coupon__img   { width: 104px; height: 104px; object-fit: cover; margin-bottom: 16px; }
.coupon__title { font-weight: 600; font-size: 24px; letter-spacing: -.015em; line-height: 1.25; }
.coupon__text  { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--c-muted); }
.coupon__status {
  align-self: stretch;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1.5px dashed var(--c-line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.coupon__status--ok      { color: var(--c-ok); }
.coupon__status--limited { color: var(--c-alert); }

/* =========================================================
   FOTO FULL-WIDTH
   ========================================================= */
.full-photo { background: var(--c-green-900); }
.full-photo img {
  width: 100%;
  aspect-ratio: 1920 / 977;
  object-fit: cover;
}

/* =========================================================
   PRENOTA (biglietto in 3 passi)
   ========================================================= */
.prenota { background: var(--c-white); padding-block: clamp(72px, 6.25vw, 120px); }
.prenota .section-head { margin-bottom: 44px; }

.ticket {
  display: flex;
  align-items: stretch;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-ticket);
  overflow: hidden;
}
.ticket__step {
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column; gap: 28px;
  padding: clamp(24px, 2.083vw, 40px);
}
/* Perforazione tratteggiata tra i passi */
.ticket__perf {
  flex: 0 0 2px;
  border-left: 2px dashed rgba(14, 26, 19, .25);
}

/* Titolo passo */
.step-head { display: flex; flex-direction: column; gap: 10px; }
.step-head__num   { font-family: var(--f-mono); font-weight: 700; font-size: 44px; line-height: 1.1; color: var(--c-orange); }
.step-head__title { font-weight: 600; font-size: 26px; letter-spacing: -.01em; color: var(--c-ink); }
.step-head__text  { max-width: 380px; font-size: 15px; line-height: 1.5; color: var(--c-muted); }

/* Campi */
.field {
  width: 100%;
  padding: 18px 22px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-field);
  background: var(--c-white);
  font-size: 17px;
  color: var(--c-ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: var(--c-muted); opacity: 1; }
.field:focus { border-color: var(--c-green-900); box-shadow: 0 0 0 3px rgba(26, 58, 42, .12); }

/* Lista negozi (radio card) */
.stores { display: flex; flex-direction: column; gap: 10px; }
.store {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-field);
  background: var(--c-white);
  cursor: pointer;
  transition: border-color .15s ease;
}
.store input { position: absolute; opacity: 0; pointer-events: none; }
.store:has(input:checked) { border: 2px solid var(--c-green-900); padding: 15px 17px; }
.store:has(input:focus-visible) { outline: 3px solid var(--c-orange); outline-offset: 2px; }
.store__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.store__name { font-weight: 600; font-size: 17px; color: var(--c-ink); }
.store__addr { font-size: 13px; color: var(--c-muted); }
.store__warn { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-alert); }
.store__dist { flex-shrink: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-green-900); }

/* Chip giorno / orario */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: block;
  padding: 12px 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-chip);
  background: var(--c-white);
  font-size: 15px;
  line-height: 1.2;
  color: var(--c-ink);
  transition: background-color .15s ease, color .15s ease;
}
.chip:hover span { border-color: var(--c-muted); }
.chip input:checked + span { background: var(--c-green-900); color: var(--c-white); border-color: var(--c-line); }
.chip input:disabled + span { opacity: .35; cursor: not-allowed; }
.chip input:focus-visible + span { outline: 3px solid var(--c-orange); outline-offset: 2px; }

/* Avviso disponibilità */
.notice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-chip);
  background: var(--c-white);
  font-size: 14px;
}
.notice__dot { flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--c-alert); }

/* Checkbox */
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 20px; width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--c-green-900);
  border-radius: 5px;
  background: var(--c-white) center / 12px no-repeat;
  cursor: pointer;
}
.check input:checked {
  background-color: var(--c-green-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.check input:focus-visible { outline: 3px solid var(--c-orange); outline-offset: 2px; }
.check span { max-width: 330px; font-size: 13px; line-height: 1.5; color: var(--c-muted); }

/* =========================================================
   CHIUSURA
   ========================================================= */
.chiusura { background: var(--c-green-900); color: var(--c-paper); }
.chiusura__inner {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding-block: clamp(64px, 5.2vw, 100px);
  text-align: center;
}
.chiusura__title {
  font-weight: 600;
  font-size: clamp(34px, 3.333vw, 64px);   /* 64 @1920 */
  line-height: 1.1;
  letter-spacing: -.025em;
}
.chiusura__text { font-size: clamp(17px, 1.146vw, 22px); line-height: 1.4; opacity: .7; }

/* =========================================================
   NOTE LEGALI + FOOTER
   ========================================================= */
.legal { background: var(--c-white); padding-block: 56px 0; }
.legal p { font-size: 13px; line-height: 1.6; color: var(--c-muted); }

.site-footer { background: var(--c-white); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: 30px;
}
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--c-ink); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1440px) {
  .coupons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .site-header__claim { display: none; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { width: min(100%, 560px); justify-self: center; margin-left: 12%; }

  .ticket { flex-direction: column; }
  .ticket__perf { flex-basis: 2px; border-left: 0; border-top: 2px dashed rgba(14, 26, 19, .25); }
  .step-head__text { max-width: none; }
  .check span { max-width: none; }
}

@media (max-width: 760px) {
  .coupons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .coupon { padding: 20px 18px 18px; }
  .coupon__img { width: 80px; height: 80px; }
  .coupon__title { font-size: 20px; }

  .lockup { gap: 10px; }
  .lockup img { height: 48px; }
  .lockup__tim { border-radius: 10px; }
  .btn--sm { padding: 12px 18px; font-size: 14px; }

  .hero__visual { margin-left: 18%; width: 78%; }
  .hero__text { gap: 24px; }

  .full-photo img { aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
  .coupons { grid-template-columns: 1fr; }
  .site-header .btn--sm { padding: 10px 14px; font-size: 13px; }
  .lockup img { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
