@font-face {
  font-family: "Fredoka";
  src: url("/assets/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --cream: #F7EFD9;
  --ivory: #FFFBF2;
  --peach: #FFB997;
  --brown: #5C3A21;
  --ombra-card: 0 18px 40px rgba(92, 58, 33, .18);
  --ombra-chip: 0 6px 18px rgba(92, 58, 33, .08);
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 400;
  color: var(--brown);
  background: var(--cream);
  overflow-x: hidden;
}

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

section {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

/* Pattern a puntini e macchie decorative, in coordinate su 1920×1080. */
section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(92, 58, 33, .16) 1.6px, transparent 1.6px);
  background-size: 34px 34px;
}

.macchie {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 4.69% 90.74%, rgba(255, 213, 107, .45) 3.65vw, transparent 3.7vw),
    radial-gradient(circle at 88.54% 10.19%, rgba(201, 182, 228, .45) 2.4vw, transparent 2.45vw),
    radial-gradient(circle at 96.88% 93.52%, rgba(168, 216, 185, .4) 4.69vw, transparent 4.74vw),
    radial-gradient(circle at 36.46% 92.59%, rgba(244, 168, 181, .45) 1.56vw, transparent 1.61vw);
}

h1, h2 { font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; }
h1 { font-size: clamp(44px, 4.5vw, 86px); line-height: 1.02; }
h2 { font-size: clamp(36px, 4vw, 76px); line-height: 1.08; }

.sotto {
  font-size: clamp(18px, 1.6vw, 30px);
  line-height: 1.4;
  opacity: .85;
}

.wordmark {
  font-weight: 600;
  font-size: clamp(30px, 2.3vw, 44px);
  letter-spacing: -.025em;
}
.wordmark span { color: var(--peach); }

.chip-lista { display: flex; flex-wrap: wrap; gap: 14px; padding: 0; list-style: none; }
.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--ivory);
  box-shadow: var(--ombra-chip);
  font-weight: 500;
  font-size: clamp(16px, 1.25vw, 24px);
}
.chip i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.chip img { width: clamp(30px, 2.1vw, 40px); height: auto; flex: none; }

.store { display: inline-block; align-self: flex-start; border-radius: 12px; }
.store img { display: block; width: clamp(170px, 12vw, 230px); height: auto; }
.store img { transition: transform .2s; }
.store:hover img { transform: translateY(-2px); }
.store:focus-visible { outline: 3px solid var(--peach); outline-offset: 4px; }
.centrati-store { display: flex; justify-content: center; margin-top: 28px; }

/* 01 — Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 48fr);
  align-items: center;
  gap: clamp(32px, 3vw, 60px);
  padding: 48px clamp(40px, 5.7vw, 110px) 48px clamp(40px, 7.3vw, 140px);
}
.testo { display: flex; flex-direction: column; gap: clamp(20px, 1.9vw, 36px); }
.sotto { max-width: 640px; }

.ipad {
  padding: clamp(10px, 1.15vw, 22px);
  border-radius: clamp(26px, 3.1vw, 60px);
  background: #1C1C1E;
  box-shadow: 0 50px 100px rgba(0, 0, 0, .18);
}
.ipad img { width: 100%; border-radius: clamp(16px, 2.1vw, 40px); }

/* 02 — Dalla foto al disegno */
.magia {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 3.5vw, 64px);
  padding: 64px 32px;
  background: var(--ivory);
}
.magia::before { opacity: .7; }
.magia header { display: flex; flex-direction: column; gap: 18px; text-align: center; align-items: center; }
.magia header .sotto { max-width: none; }
.magia .chip { background: var(--cream); }

.riga {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4.7vw, 90px);
  width: 100%;
}
.polaroid, .carta {
  flex: 0 1 376px;
  min-width: 0;
  background: #fff;
  box-shadow: var(--ombra-card);
}
.polaroid { padding: 18px 18px 70px; border-radius: 8px; transform: rotate(-3deg); }
.polaroid img { border-radius: 3px; }
.carta { padding: 18px; border-radius: 28px; transform: rotate(2.5deg); }
.carta img { border-radius: 14px; }

.centro { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 0 0 auto; width: clamp(110px, 10vw, 190px); }
.centrati { justify-content: center; gap: 18px; }

/* Movimento: entrata morbida e mascotte che oscilla. */
@media (prefers-reduced-motion: no-preference) {
  .entra { animation: entra 400ms ease-out both; }
  .entra:nth-child(2) { animation-delay: 80ms; }
  .entra:nth-child(3) { animation-delay: 160ms; }
  .entra:nth-child(4) { animation-delay: 240ms; }
  .entra:nth-child(5) { animation-delay: 320ms; }
  .goccio { animation: oscilla 2.4s ease-in-out infinite alternate; }
}
@keyframes entra {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes oscilla { to { transform: translateY(-8px); } }

.vetrina { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.vetrina .ipad { width: 100%; }
.scorre { display: grid; }
.scorre img { grid-area: 1 / 1; opacity: 0; transition: opacity .8s ease-in-out; }
.scorre img.attiva { opacity: 1; }
.freccia-slide {
  position: absolute;
  top: calc(50% - 50px);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: var(--ombra-chip);
  color: var(--brown);
  cursor: pointer;
  transition: transform .2s;
}
.freccia-slide:hover { transform: scale(1.08); }
.freccia-slide.prima { left: -26px; }
.freccia-slide.dopo { right: -26px; }
.freccia-slide:focus-visible, .puntini button:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }
.puntini { display: flex; }
.puntini button { position: relative; width: 32px; height: 32px; border: 0; background: none; cursor: pointer; }
.puntini button::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--brown);
  opacity: .25;
  transition: opacity .2s, transform .2s;
}
.puntini button[aria-current="true"]::after { opacity: 1; transform: scale(1.25); }

@media (max-width: 1279px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 767px) {
  section { min-height: 0; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 40px 16px 56px; }
  .magia { padding: 48px 16px 56px; }
  .riga { flex-direction: column; gap: 28px; }
  .polaroid, .carta { flex: none; width: 80vw; max-width: 376px; }
  .freccia { transform: rotate(90deg); margin-block: 40px; }
  .macchie { display: none; }
  .freccia-slide { width: 44px; height: 44px; top: calc(50% - 44px); }
  .freccia-slide.prima { left: -8px; }
  .freccia-slide.dopo { right: -8px; }
}

/* Footer */
.piede {
  padding: 56px clamp(16px, 7.3vw, 140px) 32px;
  background: var(--brown);
  color: var(--ivory);
}
.piede a { color: var(--ivory); }
.piede a:hover { color: var(--peach); }
.piede-colonne { display: flex; flex-wrap: wrap; gap: 32px clamp(48px, 8vw, 140px); }
.piede h2 { font-size: 22px; font-weight: 600; letter-spacing: 0; line-height: 1.2; margin-bottom: 14px; }
.piede ul { display: flex; flex-direction: column; gap: 10px; padding: 0; list-style: none; font-size: 18px; }
.copyright { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 251, 242, .25); font-size: 16px; opacity: .85; }

/* Avviso sui cookie */
.avviso {
  position: fixed;
  z-index: 10;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 16px 20px;
  border-radius: 28px;
  background: var(--ivory);
  box-shadow: var(--ombra-card);
  font-size: 17px;
  line-height: 1.35;
}
.avviso[hidden] { display: none; }
.avviso a { color: var(--brown); }
.avviso a:hover { color: #C9683C; }
.avviso button {
  flex: none;
  min-height: 44px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--peach);
  color: var(--brown);
  font: 600 17px "Fredoka", system-ui, sans-serif;
  cursor: pointer;
}
.avviso button:hover { background: #FFA67F; }

/* Pagine di testo */
.pagina { background: var(--ivory); }
.testata { padding: 24px clamp(16px, 7.3vw, 140px); background: var(--cream); }
.testata .wordmark { color: var(--brown); text-decoration: none; }
.documento {
  max-width: 760px;
  margin-inline: auto;
  padding: 48px 16px 72px;
  font-size: 18px;
  line-height: 1.55;
}
.documento h1 { font-size: clamp(36px, 4vw, 56px); margin-bottom: 12px; }
.documento h2 { font-size: 26px; line-height: 1.2; letter-spacing: 0; margin: 36px 0 10px; }
.documento h3 { font-size: 19px; font-weight: 600; margin: 20px 0 4px; }
.documento p + p { margin-top: 12px; }
.documento ul { display: flex; flex-direction: column; gap: 8px; padding-left: 22px; margin-top: 8px; }
.documento a { color: var(--brown); }
.documento a:hover { color: #C9683C; }
.documento strong { font-weight: 600; }
.data { font-size: 16px; opacity: .75; margin-bottom: 20px; }
.tabella { overflow-x: auto; margin: 12px 0; }
table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; }
th, td { padding: 10px 12px; border: 1px solid rgba(92, 58, 33, .2); text-align: left; vertical-align: top; }
th { font-weight: 600; background: var(--cream); }

@media (max-width: 600px) {
  .avviso { flex-direction: column; align-items: stretch; border-radius: 22px; }
}
