/* SORSO — thermos tascabile */
:root {
  --lavanda: #E6E0FF;
  --sabbia: #EBCDB7;
  --cobalto: #2848D8;
  --menta: #BFECD7;
  --pomodoro: #FF5B3A;
  --carta: #F4F4F2;
  --ink: #1E1640;
  --font: "Geist", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
/* scroll morbido (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--lavanda);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 999px; }

/* ---------- canvas 3D ---------- */
#stage {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh;
  z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity 1.2s ease;
}
#stage.ready { opacity: 1; }

/* ---------- vetro ---------- */
.glass {
  background: color-mix(in srgb, var(--glass-tint, #fff) 34%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid color-mix(in srgb, #fff 45%, transparent);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 10;
  top: max(16px, env(safe-area-inset-top)); left: 0; right: 0; margin: 0 auto;
  width: min(1120px, calc(100% - 2 * var(--gutter)));
  transform: translateZ(0); will-change: transform;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px 8px 22px; border-radius: 999px;
  color: var(--nav-ink, var(--ink));
  transition: color .4s ease;
}
.logo { font-weight: 700; font-size: 21px; letter-spacing: -0.06em; text-decoration: none; line-height: 1; }
.nav ul { display: flex; gap: 4px; list-style: none; font-size: 14px; font-weight: 500; }
.nav ul a { text-decoration: none; padding: 9px 14px; border-radius: 999px; transition: background .25s; }
.nav ul a:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 20px; border-radius: 999px;
  background: var(--nav-ink, var(--ink)); color: var(--btn-ink, #fff);
  font-weight: 600; font-size: 14px; text-decoration: none; letter-spacing: -0.01em;
  transition: transform .3s var(--ease);
}
.btn .ico {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--btn-ink, #fff); color: var(--nav-ink, var(--ink));
  transition: transform .35s var(--ease);
}
.btn:hover .ico { transform: rotate(-45deg); }
.btn.big { font-size: 17px; padding: 8px 8px 8px 28px; gap: 18px; background: var(--ink); color: #fff; }
.btn.big .ico { width: 48px; height: 48px; background: #fff; color: var(--ink); }
.btn svg { width: 16px; height: 16px; }

/* indicatore sezioni */
.dots {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 10;
  display: flex; flex-direction: column; gap: 10px; list-style: none;
  color: var(--nav-ink, var(--ink));
}
.dots a { display: block; width: 8px; height: 8px; border-radius: 99px; background: currentColor; opacity: .25; transition: height .4s var(--ease), opacity .3s; }
.dots a.on { height: 28px; opacity: 1; }
.dots a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- sections ---------- */
section { position: relative; color: var(--ink); }
.stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.content { position: relative; z-index: 2; }

.display { font-weight: 650; letter-spacing: -0.065em; line-height: .9; }
.h2 { font-size: clamp(46px, 7vw, 120px); }
.lede { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.45; max-width: 34ch; letter-spacing: -0.01em; }
.small { font-size: 13px; line-height: 1.5; opacity: .7; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: block; }

/* ---------- 1 · hero ---------- */
.hero { height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; --glass-tint: #ffffff; }
.hero .mega {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -52%);
  z-index: 0; font-size: 36vw; font-weight: 700; white-space: nowrap;
  letter-spacing: -0.085em; color: #7B5CFF;
}
.hero .mega span { display: inline-block; transform: translateY(110%); animation: rise 1.1s var(--ease) forwards; }
.hero .mega span:nth-child(2) { animation-delay: .06s; }
.hero .mega span:nth-child(3) { animation-delay: .12s; }
.hero .mega span:nth-child(4) { animation-delay: .18s; }
.hero .mega span:nth-child(5) { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }

.hero-foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.hero-foot p { max-width: 28ch; font-size: 16px; letter-spacing: -0.01em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.scroll-hint { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.scroll-hint i {
  width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid currentColor; position: relative; display: block;
}
.scroll-hint i::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: currentColor; animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- 2 · click ---------- */
.click { height: 280vh; --ink: #2A160B; }
.click .content {
  height: 100%; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; padding: 0 var(--gutter);
}
.click .words { padding-top: 6vh; }
.click .words .h2 { font-size: clamp(64px, 11vw, 190px); }
.click .words .h2 span { display: block; transition: opacity .5s ease, transform .6s var(--ease), filter .6s; }
.click .words .h2 .then { opacity: .12; transform: translateX(-.12em); filter: blur(6px); }
.click.opened .words .h2 .then { opacity: 1; transform: none; filter: none; }
.click .lede { margin-top: 32px; }

/* ---------- 3 · svita / esploso ---------- */
.svita { height: 360vh; --ink: #fff; --glass-tint: #6f86ff; }
.svita .content { height: 100%; padding: 96px var(--gutter) 40px; }
.svita .title { position: absolute; left: var(--gutter); bottom: 36px; max-width: 520px; }
.svita .title .h2 { font-size: clamp(44px, 5.2vw, 88px); }
.svita .title p { margin-top: 18px; max-width: 36ch; }
.parts { position: absolute; inset: 0; pointer-events: none; }
.part {
  position: absolute; display: flex; align-items: center; gap: 12px;
  opacity: 0; transform: translateY(10px) scale(.96);
  transition: opacity .5s ease, transform .5s var(--ease);
}
.part .chip { flex-direction: column; align-items: flex-start; gap: 0; border-radius: 18px; padding: 10px 16px; font-size: 13px; line-height: 1.3; }
.part .chip b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.part::before { content: ""; width: 7vw; max-width: 110px; height: 1px; background: currentColor; opacity: .55; }
.part.r { right: calc(var(--gutter) + 24px); }
.part.r::before { order: -1; }
.part.l { left: var(--gutter); }
.part.l::before { order: 2; }
.parts.on .part { opacity: 1; transform: none; }
.parts.on .part:nth-child(2) { transition-delay: .06s; }
.parts.on .part:nth-child(3) { transition-delay: .12s; }
.parts.on .part:nth-child(4) { transition-delay: .18s; }
.parts.on .part:nth-child(5) { transition-delay: .24s; }
.parts.on .part:nth-child(6) { transition-delay: .3s; }
.parts.on .part:nth-child(7) { transition-delay: .36s; }

/* ---------- 4 · doppia parete ---------- */
.parete { height: 240vh; --ink: #0B3A2A; --glass-tint: #e9fff5; }
.parete .content { height: 100%; padding: 120px var(--gutter) 48px; display: grid; grid-template-rows: auto 1fr auto; }
.parete .h2 { max-width: 10ch; }
.parete .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.temps { display: flex; gap: 14px; }
.temp { padding: 22px 26px 18px; border-radius: 28px; min-width: 200px; }
.temp .num { font-weight: 600; letter-spacing: -0.07em; line-height: .85; font-size: clamp(72px, 9vw, 150px); }
.temp .num sup { font-size: .32em; letter-spacing: -0.02em; vertical-align: top; margin-left: .08em; font-weight: 500; }
.temp p { margin-top: 10px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.temp p i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.parete .lede { align-self: start; margin-top: 28px; }

/* ---------- 5 · misure ---------- */
.misure { min-height: 110vh; --ink: #2B0D05; --glass-tint: #ffd2c4; }
.misure .content {
  min-height: 110vh; display: grid; grid-template-columns: 1fr 1fr;
  padding: 120px var(--gutter) 60px; align-items: center;
}
.misure .copy { grid-column: 2; max-width: 520px; }
.seg { display: inline-flex; padding: 6px; border-radius: 999px; margin: 36px 0 22px; position: relative; }
.seg::before {
  content: ""; position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc(50% - 6px);
  background: var(--ink); border-radius: 999px; transition: transform .45s var(--ease);
}
.seg[data-v="1"]::before { transform: translateX(100%); }
.size-btn { position: relative; z-index: 1; padding: 12px 26px; border-radius: 999px; text-align: left; line-height: 1.1; min-width: 150px; transition: color .3s; }
.size-btn b { display: block; font-size: 26px; letter-spacing: -0.05em; font-weight: 650; }
.size-btn span { font-size: 13px; opacity: .8; }
.size-btn[aria-pressed="true"] { color: #FFD9CC; }
.size-note { min-height: 3em; max-width: 36ch; }

/* ---------- 6 · colori ---------- */
.colori { min-height: 110vh; --ink: var(--colori-ink, #1E1640); touch-action: pan-y; cursor: grab; }
.colori:active { cursor: grabbing; }
.colori .content {
  min-height: 110vh; display: grid; grid-template-columns: 1fr 1fr;
  padding: 120px var(--gutter) 60px; align-items: center;
}
.colori .copy { max-width: 540px; }
.swatches { display: inline-flex; gap: 10px; margin: 36px 0 18px; padding: 8px; border-radius: 999px; }
.swatch {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--c); position: relative;
  box-shadow: inset 0 -5px 10px rgba(0,0,0,.14), inset 0 3px 6px rgba(255,255,255,.4);
  transition: transform .3s var(--ease);
}
.swatch::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--ink); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .35s var(--ease);
}
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"]::after { opacity: 1; transform: none; }
.drag-hint { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .75; }
.drag-hint svg { width: 22px; height: 22px; }

/* ---------- 7 · galleria ---------- */
.galleria { --ink: #1E1E1C; padding: 160px var(--gutter) 120px; }
.galleria .content { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.galleria .intro { grid-column: 1 / 8; margin-bottom: 70px; }
.galleria .intro p { margin-top: 22px; }
.galleria figure { position: relative; overflow: hidden; border-radius: 28px; background: #e6e6e3; }
.galleria figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.galleria figure:hover img { transform: scale(1.04); }
.galleria figcaption { position: absolute; left: 14px; bottom: 14px; color: #1E1E1C; --glass-tint: #fff; }
.g1 { grid-column: 1 / 8; aspect-ratio: 1 / 1; }
.g2 { grid-column: 8 / 13; aspect-ratio: 4 / 5; margin-top: 22vh; }
.g3 { grid-column: 2 / 6; aspect-ratio: 1 / 1; margin-top: -10vh; }
.g4 { grid-column: 6 / 13; aspect-ratio: 16 / 10; }
.g5 { grid-column: 1 / 5; aspect-ratio: 4 / 5; }
.g6 { grid-column: 5 / 9; aspect-ratio: 4 / 5; margin-top: 12vh; }
.g7 { grid-column: 9 / 13; aspect-ratio: 4 / 5; margin-top: 4vh; }
.g9 { grid-column: 1 / 7; aspect-ratio: 3 / 2; }
.g10 { grid-column: 7 / 13; aspect-ratio: 3 / 2; margin-top: 8vh; }
.g8 { grid-column: 3 / 11; margin-top: 60px; background: #f1f1f1; }
.galleria .g8 img { height: auto; object-fit: contain; }
.quote {
  grid-column: 2 / 10; align-self: center; padding: 12vh 0 10vh;
  font-weight: 550; font-size: clamp(28px, 3.2vw, 48px); line-height: 1.05; letter-spacing: -0.045em;
}

/* ---------- 8 · finale ---------- */
.finale { height: 130vh; --ink: #1E1640; overflow: hidden; }
.finale .content { height: 100%; position: relative; }
.finale .top {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 29vw; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.finale .top .lede { font-size: clamp(24px, 2.4vw, 36px); font-weight: 550; letter-spacing: -0.045em; line-height: 1.05; max-width: 14ch; }
.finale .mega {
  position: absolute; left: 50%; bottom: -0.14em; transform: translateX(-50%);
  font-size: 24vw; font-weight: 700; white-space: nowrap; letter-spacing: -0.085em; color: #7B5CFF; z-index: 0;
}
footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px var(--gutter); font-size: 14px; color: #E6E0FF; background: #1E1640;
}
footer nav { display: flex; gap: 22px; }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  body { font-size: 16px; }
  .nav { top: max(10px, env(safe-area-inset-top)); padding-left: 18px; }
  .nav ul, .dots { display: none; }
  .hero .mega { font-size: 44vw; top: 42%; }
  .hero-foot { flex-direction: column; align-items: flex-start; bottom: 22px; }
  .scroll-hint { display: none; }

  .click .content, .misure .content, .colori .content { grid-template-columns: 1fr; align-items: end; }
  .click .content { padding-bottom: 8vh; }
  .click .words .h2 { font-size: 20vw; }
  .click .lede { margin-top: 18px; }

  .svita .title { bottom: 22px; right: var(--gutter); }
  .svita .title p { font-size: 15px; }
  .parts { display: none; }

  .parete .row { flex-direction: column; align-items: flex-start; grid-row: 3; gap: 14px; }
  .parete .content { padding-top: 96px; padding-bottom: 28px; }
  .parete .lede { display: none; }
  .temp { min-width: 0; padding: 16px 18px 14px; border-radius: 22px; }

  .misure .copy, .colori .copy { grid-column: 1; }
  .misure .content, .colori .content { padding-top: 52vh; min-height: 110vh; }
  .size-btn { min-width: 0; padding: 10px 18px; }
  .size-btn b { font-size: 22px; }
  .swatch { width: 40px; height: 40px; }
  .swatches { gap: 8px; }

  .galleria .content { grid-template-columns: 1fr 1fr; gap: 10px; }
  .galleria figure { border-radius: 20px; }
  .galleria .intro, .quote, .g1, .g4, .g8 { grid-column: 1 / -1; }
  .g2, .g3, .g5, .g6, .g7, .g9, .g10 { grid-column: auto; margin-top: 0; }
  .g7 { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .finale .top { flex-direction: column; align-items: flex-start; gap: 16px; bottom: 28vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
