/* ==========================================================================
   PlanEsy – pagina "sito in costruzione"
   Mobile first (< 1100 px: colonna). Desktop (>= 1100 px): overlay sullo
   sfondo 2576x1438 con coordinate in % / cqw (vedi CLAUDE.md).
   ========================================================================== */

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #0A4DD9;
  --orange: #FF6400;
  --ink: #10265A;
  --muted: #4A5878;
  --tape-yellow: #FFC400;
  --tape-black: #1A1A1A;
  --ratio: calc(2576 / 1438); /* 1,791 */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-easy: "Fredoka", "Poppins", system-ui, sans-serif;
}

/* ---------- Reset minimo ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: #EEF4FF;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

/* Sfondo pagina: stessa immagine, ingrandita e sfocata */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #EEF4FF url("../img/sfondo-mobile-4x5.jpg") center / cover no-repeat;
  filter: blur(40px);
  transform: scale(1.2);
  pointer-events: none;
}

img,
svg { display: block; max-width: 100%; }

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ==========================================================================
   MOBILE (< 1100 px)
   ========================================================================== */

.page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  background: rgba(255, 255, 255, .82);
  padding-bottom: 24px;
}

.hero__img { width: 100%; height: auto; }

/* Slogan */
.slogan {
  margin: 24px 16px 20px;
  text-align: center;
  font-weight: 700;
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
}
.slogan__line { display: block; }
.slogan__easy {
  font-family: var(--font-easy);
  font-weight: 700;
  font-size: 1.56em;
  line-height: 1;
  color: var(--orange);
}

/* Card "under construction" */
.card {
  position: relative;
  margin: 0 16px;
  padding: 30px 18px;
  text-align: center;
  background: rgba(255, 255, 255, .93);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 38, 90, .14);
  --tape-h: 10px;
  --tape-stripe: 8px;
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--tape-h);
  background: repeating-linear-gradient(
    45deg,
    var(--tape-yellow) 0 var(--tape-stripe),
    var(--tape-black) 0 calc(var(--tape-stripe) * 2)
  );
}
.card::before { top: 0; }
.card::after { bottom: 0; }

.card__title {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
}
.card__subtitle {
  margin-top: 6px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.35;
  color: var(--muted);
}
.card__title,
.card__subtitle,
.card__stores { text-wrap: balance; }
.card__stores {
  margin-top: 4px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  color: var(--blue);
}

/* Dispositivi */
.devices {
  display: block;
  width: 92%;
  margin: 24px auto 8px;
}
.devices__img { width: 100%; height: auto; }

/* Footer */
.site-footer {
  margin: 8px 16px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(10, 77, 217, .16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
}
.social { display: flex; gap: 8px; }
.social__link,
.email {
  display: flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
.icon { width: 44px; height: 44px; flex: none; }
.email { gap: 10px; }
.email__text {
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}
.twina {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.twina__label {
  font-weight: 400;
  font-size: 15px;
  color: var(--muted);
}
.twina__logo { height: 30px; width: auto; }

/* ==========================================================================
   DESKTOP (>= 1100 px)
   Contenitore con il rapporto dello sfondo (2576x1438), centrato e sempre
   dentro la finestra. 1cqw = 1% della larghezza del contenitore.
   ========================================================================== */

@media (min-width: 1100px) {
  body {
    display: grid;
    place-items: center;
    overflow: hidden;
  }
  body::before {
    background-image: url("../img/sfondo-desktop-1600.jpg");
  }

  .page {
    position: relative;
    max-width: none;
    width: min(100vw, 100vh * var(--ratio));
    width: min(100vw, 100svh * var(--ratio));
    aspect-ratio: 2576 / 1438;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: none;
    container-type: inline-size;
    overflow: hidden;
  }

  /* Sfondo hero */
  .hero {
    position: absolute;
    inset: 0;
  }
  .hero__img {
    width: 100%;
    height: 100%;
  }

  /* Slogan: ogni riga è posizionata sulla propria linea di base.
     Con line-height: 1 la base di Poppins cade a 0,85 em dall'alto della riga. */
  .slogan {
    margin: 0;
    font-size: 2.48cqw;
    line-height: 1;
    text-align: left;
  }
  .slogan__line {
    position: absolute;
    left: 4.66%;
    white-space: nowrap;
    line-height: 1;
  }
  .slogan__line--1 { top: calc(10.4% - 0.85 * 2.48cqw); }
  .slogan__line--2 { top: calc(17.5% - 0.85 * 2.48cqw); }
  .slogan__line--3 { top: calc(23.4% - 0.85 * 2.48cqw); }
  .slogan__easy {
    font-size: 3.88cqw;
    line-height: 0; /* non allarga la riga: resta sulla base di "la gestione" */
    margin-right: .35cqw; /* spazio dopo "easy" come nel riferimento */
  }

  /* Dispositivi */
  .devices {
    position: absolute;
    left: 4.96%;
    top: 26.65%;
    width: 31.29%;
    margin: 0;
  }

  /* Card */
  .card {
    position: absolute;
    left: 57.84%;
    top: 69.82%;
    width: 33.77%;
    height: 17.94%;
    margin: 0;
    padding: 1cqw 1.2cqw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 1.32cqw;
    box-shadow: 0 1cqw 2.6cqw rgba(16, 38, 90, .16);
    --tape-h: 1cqw;
    --tape-stripe: .82cqw; /* larghezza orizzontale della riga ≈ 1,16cqw */
  }
  .card__title {
    font-size: clamp(16px, 1.94cqw, 80px);
    line-height: 1.2;
  }
  .card__subtitle {
    margin-top: .3cqw;
    font-size: clamp(12px, 1.2cqw, 48px);
    line-height: 1.3;
  }
  .card__stores {
    margin-top: .35cqw;
    font-size: clamp(12px, 1.16cqw, 46px);
    line-height: 1.3;
  }

  /* Footer */
  .site-footer {
    position: absolute;
    left: 0;
    right: 0;
    top: 91.1%;
    height: 8.9%;
    margin: 0;
    padding: 0 4.66cqw;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, .78);
    border-top: 1px solid rgba(10, 77, 217, .16);
  }
  /* Contatti in flex con gap: aggiungendo o togliendo un'icona social
     (es. YouTube) l'email si sposta da sola, senza buchi. */
  .footer__contacts {
    flex-wrap: nowrap;
    gap: 2.16cqw;                      /* stacco social → email del riferimento */
  }
  .social { gap: .62cqw; }             /* passo 3,1cqw = 2,48 + 0,62 */
  .social__link,
  .email,
  .twina {
    min-height: 0;
    min-width: 0;
  }
  .icon {
    width: 2.48cqw;
    height: 2.48cqw;
  }
  .email { gap: .85cqw; }
  .email__text { font-size: clamp(12px, 1.2cqw, 48px); }

  .twina { gap: .8cqw; }
  .twina__label { font-size: clamp(12px, 1.2cqw, 48px); }
  .twina__logo { height: 2.4cqw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
