/* Lowbird: sito vetrina. Token copiati da lowbird-app/branding (tokens/tokens.css), stessi nomi di
   ui-kit. I pastelli servono per sfondi e illustrazioni, mai per il testo. */

:root {
  --lilac: #cfc8ff;
  --peach: #ffd3c2;
  --coral: #ff9f86;
  --mint: #c4edd6;
  --butter: #ffeba8;
  --sky: #cde6ff;
  --ink: #2e2a47;

  --bg: #fbf8f4;
  --surface: #ffffff;
  --surface-2: #f5f1fa;
  --text: #2e2a47;
  --muted: #6b6685;
  --faint: #9e99b3;
  --border: #e8e2f0;
  --accent: #5b4fd6;
  --accent-soft: #ece9ff;
  --button: #cfc8ff;
  --button-text: #2e2a47;
  --good: #1d7a50;
  --good-soft: #ddf4e7;
  --bad: #b3452a;
  --bad-soft: #ffe6dc;

  /* riquadri dei canali: pastello pieno in chiaro, tinta scura in scuro */
  --tile-ext: var(--lilac);
  --tile-app: var(--mint);
  --tile-swipe: var(--peach);
  --tile-tg: var(--sky);
  --tile-mobile: var(--butter);
  --tile-text: var(--ink);
  --blob-opacity: 1;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-lg: 32px;
  --shadow: 0 2px 10px rgb(46 42 71 / 6%);
  --shadow-lift: 0 18px 40px -18px rgb(46 42 71 / 28%);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --page: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a27;
    --surface: #252233;
    --surface-2: #2e2a3f;
    --text: #f3f0fa;
    --muted: #aba5c2;
    --faint: #7b7591;
    --border: #3a3550;
    --accent: #bdb4ff;
    --accent-soft: #322c5c;
    --button: #bdb4ff;
    --button-text: #1c1a27;
    --good: #95e0b7;
    --good-soft: #1e3a2e;
    --bad: #ffb09a;
    --bad-soft: #44281f;
    --tile-ext: #322c5c;
    --tile-app: #1e3a2e;
    --tile-swipe: #44281f;
    --tile-tg: #1f3048;
    --tile-mobile: #3d3317;
    --tile-text: #f3f0fa;
    --blob-opacity: 0.18;
    --shadow: none;
    --shadow-lift: 0 18px 40px -18px rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}

/* una lingua alla volta: il testo c'è in entrambe, main.js imposta <html lang> */
html[lang="it"] body [lang="en"],
html[lang="en"] body [lang="it"] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

img {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

/* logo chiaro o scuro secondo il tema */
.brand-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .brand-light {
    display: none;
  }
  .brand-dark {
    display: block;
  }
}

/* pulsanti: pillole lilla, testo inchiostro */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  font: 700 16px/1 var(--font);
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.btn:active {
  transform: translateY(0);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-small {
  padding: 10px 18px;
  font-size: 15px;
}

/* intestazione */
.top {
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand img {
  height: 36px;
  width: auto;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.top-nav > a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.top-nav > a:not(.btn):hover {
  color: var(--text);
}
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font: 800 12px/1 var(--font);
  color: var(--muted);
}
.lang-opt {
  padding: 6px 9px;
  border-radius: 999px;
}
html[lang="it"] .lang-opt[data-opt="it"],
html[lang="en"] .lang-opt[data-opt="en"] {
  background: var(--accent-soft);
  color: var(--text);
}

/* hero */
.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: 32px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 24px;
}
.hero h1 {
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.lead {
  margin-top: 24px;
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--muted);
  max-width: 34em;
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.hero-art {
  margin: 0;
}
.branch-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.blob {
  opacity: var(--blob-opacity);
}
.avg-line {
  stroke: var(--faint);
  stroke-width: 2;
  stroke-dasharray: 6 8;
}
.avg-label {
  fill: var(--muted);
  font: 700 15px var(--font);
}
.branch {
  fill: none;
  stroke: var(--coral);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.tag rect {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1.5;
}
.tag text {
  fill: var(--text);
  font: 800 17px var(--font);
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}
.tag-good rect {
  fill: var(--good-soft);
  stroke: none;
}
.tag-good .tag-price {
  fill: var(--good);
  font-size: 26px;
}
.tag-good .tag-sub {
  fill: var(--good);
  font-size: 13px;
  font-weight: 700;
}
/* sul fondo scuro l'uccellino inchiostro si perde: un alone lilla lo stacca */
@media (prefers-color-scheme: dark) {
  .bird-body {
    filter: drop-shadow(0 0 1.5px var(--lilac)) drop-shadow(0 0 6px rgb(207 200 255 / 45%));
  }
}

/* uccellino: piedi (64, 96) sul posatoio finale (600, 384), scalato di 1,1 attorno ai piedi */
.bird {
  transform: translate(536px, 288px);
}
.bird-body {
  transform-origin: 64px 96px;
  transform: scale(1.1);
}

/* l'unica animazione automatica: il ramo si disegna e l'uccellino scende di posatoio in posatoio */
@media (prefers-reduced-motion: no-preference) {
  .branch {
    animation: draw 1.6s cubic-bezier(0.45, 0, 0.25, 1) 0.2s both;
  }
  .leaves path {
    animation: pop 0.4s ease-out both;
  }
  .leaves path:nth-child(1) { animation-delay: 0.6s; }
  .leaves path:nth-child(2) { animation-delay: 1.15s; }
  .leaves path:nth-child(3) { animation-delay: 1.5s; }
  .leaves path {
    transform-box: fill-box;
    transform-origin: center;
  }
  .tag {
    animation: fade 0.4s ease-out both;
  }
  .tag-1 { animation-delay: 0.9s; }
  .tag-2 { animation-delay: 2s; }
  .tag-3 { animation-delay: 2.8s; }
  .tag-good { animation: rise 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 3.65s both; }
  .bird {
    animation: hop 3.6s ease-in-out 0.1s both;
  }
  .bird-body {
    animation: settle 0.5s ease-out 3.65s both;
  }
}

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; transform: translate(470px, 432px) scale(0.85); }
  to { opacity: 1; transform: translate(470px, 412px) scale(1); }
}
/* posatoi: (40,120) (270,150) (380,248) (600,384) → piedi meno (64,96); tra uno e l'altro un salto */
@keyframes hop {
  0%, 30% { transform: translate(-24px, 24px); }
  42% { transform: translate(90px, -40px); }
  52%, 58% { transform: translate(206px, 54px); }
  66% { transform: translate(262px, 60px); }
  74%, 80% { transform: translate(316px, 152px); }
  89% { transform: translate(430px, 150px); }
  100% { transform: translate(536px, 288px); }
}
@keyframes settle {
  0% { transform: scale(1.1); }
  40% { transform: scale(1.2, 0.98); }
  100% { transform: scale(1.1); }
}

/* sezioni */
.how,
.where,
.closing {
  max-width: var(--page);
  margin: 0 auto;
  padding: 72px 24px;
}
.how h2,
.where h2 {
  font-size: clamp(34px, 4.4vw, 52px);
}
.section-lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 19px;
  max-width: 36em;
}

/* come funziona: tre passi lungo un filo che scende */
.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  position: relative;
}
.step:nth-child(2) {
  margin-top: 40px;
}
.step:nth-child(3) {
  margin-top: 80px;
}
.step-n {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lilac);
  color: var(--ink);
  font: 600 26px/1 var(--font-display);
  margin-bottom: 18px;
}
.step:nth-child(2) .step-n {
  background: var(--peach);
}
.step:nth-child(3) .step-n {
  background: var(--mint);
}
.step h3 {
  font-size: 24px;
}
.step p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 26em;
}

/* canali: mosaico di riquadri di misure diverse */
.mosaic {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}
.tile {
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--tile-text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  position: relative;
}
.tile h3 {
  font-size: 28px;
}
.tile p {
  margin-top: 10px;
  max-width: 30em;
}
.tile .btn {
  margin-top: 22px;
  background: var(--surface);
  color: var(--text);
}
/* riquadro largo in testa: Swipe, il feed delle offerte */
.tile-wide {
  grid-column: span 6;
  flex-direction: row;
  align-items: center;
}
.tile-wide .tile-text {
  flex: 1 1 0;
}
.tile-wide .mock {
  flex: 1.1 1 0;
}
.tile-ext {
  grid-column: span 3;
  background: var(--tile-ext);
}
.tile-app {
  grid-column: span 3;
  background: var(--tile-app);
}
.tile-swipe {
  background: var(--tile-swipe);
}
.tile-tg {
  grid-column: span 3;
  background: var(--tile-tg);
}
.tile-mobile {
  grid-column: span 3;
  background: var(--tile-mobile);
}

/* pulsanti degli store */
.stores {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
}
a.store:not(.is-soon):hover {
  box-shadow: var(--shadow-lift);
}
.soon {
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.store.is-soon .soon {
  display: inline;
}
.store.is-soon {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  cursor: default;
}

/* anteprime finte (prodotti inventati) */
.mock {
  font-size: 14px;
  color: var(--text);
}
.mock-img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex: none;
}
.mock-img-lilac { background: linear-gradient(140deg, var(--lilac), var(--sky)); }
.mock-img-peach { background: linear-gradient(140deg, var(--peach), var(--butter)); }
.mock-img-sky { background: linear-gradient(140deg, var(--sky), var(--mint)); }
.mock-img-butter { background: linear-gradient(140deg, var(--butter), var(--peach)); }
.mock-img-mint { background: linear-gradient(140deg, var(--mint), var(--sky)); }
.mock-price {
  display: block;
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pill-good {
  background: var(--good-soft);
  color: var(--good);
}
.pill-bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.mock-browser {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  transform: rotate(1.5deg);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
}
.mock-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.mock-bar span {
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.mock-page {
  padding: 18px;
}
.mock-product {
  display: flex;
  gap: 14px;
  align-items: center;
}
.mock-product .mock-img {
  width: 64px;
  height: 64px;
}
.mock-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}
.mock-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mock-panel-head img {
  border-radius: 5px;
}
.spark {
  width: 100%;
  height: 64px;
  margin: 10px 0 6px;
}
.spark polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.spark circle {
  fill: var(--good);
}
.spark-avg {
  stroke: var(--faint);
  stroke-dasharray: 4 5;
}
.mock-stats {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mock-stats small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.mock-list {
  list-style: none;
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-lift);
}
.mock-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}
.mock-list li + li {
  border-top: 1px solid var(--border);
}
.mock-list b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-deck {
  position: relative;
  height: 250px;
}
.card {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 200px;
  height: 236px;
  margin-left: -100px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}
.card-back {
  transform: rotate(-9deg) translateX(-34px);
  opacity: 0.55;
}
.card-mid {
  transform: rotate(-4deg) translateX(-16px);
  opacity: 0.8;
}
.card-front {
  transform: rotate(6deg) translateX(24px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-img {
  width: 100%;
  height: 104px;
  margin-bottom: 4px;
}
.card-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
}
.card-actions span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 800;
}
.card-actions .no {
  background: var(--bad-soft);
  color: var(--bad);
}
.card-actions .yes {
  background: var(--good-soft);
  color: var(--good);
}

.mock-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.bubble.me {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
}
.bubble.bot {
  border-bottom-left-radius: 6px;
}
.bubble-good {
  background: var(--good-soft);
  color: var(--good);
}

.mock-phone {
  display: flex;
  justify-content: center;
}
.phone {
  width: 120px;
  height: 200px;
  border-radius: 28px;
  border: 6px solid var(--ink);
  background: var(--surface);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
}
@media (prefers-color-scheme: dark) {
  .phone {
    border-color: var(--faint);
  }
}
.phone img {
  border-radius: 15px;
}
.phone-soon {
  font: 600 16px var(--font-display);
  color: var(--muted);
}

/* chiusura */
.closing {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-bottom: 96px;
}
.closing img {
  border-radius: 22px;
}
.closing h1,
.closing h2 {
  font-size: clamp(30px, 4vw, 46px);
  max-width: 16em;
}

/* piede */
.foot {
  border-top: 1px solid var(--border);
  max-width: var(--page);
  margin: 0 auto;
  padding: 40px 24px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  font-size: 15px;
}
.foot-brand img {
  height: 31px;
  width: auto;
}
.foot-brand p {
  margin-top: 8px;
  color: var(--muted);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}
.foot-links a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--accent);
}
.foot-legal {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  max-width: 60em;
}

/* tablet */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 40px;
  }
  .hero-art {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
  }
  .tile-wide {
    flex-direction: column;
    align-items: stretch;
  }
  .tile-wide .tile-text,
  .tile-wide .mock {
    flex: none;
  }
}

/* telefono */
@media (max-width: 680px) {
  body {
    font-size: 16px;
  }
  .top {
    padding: 14px 16px;
  }
  .brand img {
    height: 30px;
  }
  .top-nav {
    gap: 10px;
  }
  .hide-sm {
    display: none;
  }
  .hero,
  .how,
  .where,
  .closing {
    padding-left: 16px;
    padding-right: 16px;
  }
  .how,
  .where {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .step:nth-child(n) {
    margin-top: 0;
  }
  .mosaic {
    gap: 14px;
  }
  .tile-app,
  .tile-swipe,
  .tile-tg,
  .tile-mobile {
    grid-column: span 6;
  }
  .tile {
    padding: 24px;
    border-radius: 26px;
  }
  .foot {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }
}
