:root {
  color-scheme: light;
  --background: #faf7f0;
  --surface: #ffffff;
  --surface-soft: #fffaf0;
  --text: #1a1a1c;
  --muted: #6f6757;
  --accent: #e0952a;
  --accent-strong: #9d5c00;
  --border: #e9ddc4;
  --success: #2c7254;
  --shadow: 0 18px 55px rgb(71 52 20 / 8%);
  --radius: 18px;
  --content: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgb(224 149 42 / 13%), transparent 28rem),
    var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgb(224 149 42 / 45%);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 32px), var(--content));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(233 221 196 / 82%);
  background: rgb(250 247 240 / 90%);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 760;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgb(55 40 14 / 12%);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--text);
}

main {
  min-height: calc(100vh - 220px);
}

.eyebrow,
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  padding: 7px 11px;
  text-transform: uppercase;
}

.eyebrow::before,
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(224 149 42 / 16%);
}

h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  max-width: 16ch;
  margin: 22px 0 20px;
  font-size: clamp(2.65rem, 7vw, 5.6rem);
  letter-spacing: -0.055em;
}

.page-hero h1 {
  max-width: 19ch;
  font-size: clamp(2.35rem, 6vw, 4.6rem);
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.lead {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 720;
  padding: 11px 18px;
  text-decoration: none;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgb(65 48 18 / 10%);
}

.section {
  padding: 54px 0;
}

.section-tight {
  padding: 30px 0 54px;
}

.card p,
.legal-copy p,
.legal-copy li,
.muted {
  color: var(--muted);
}

.grid-2 {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 9px 32px rgb(64 45 14 / 5%);
  padding: 25px;
}

.card p:last-child {
  margin-bottom: 0;
}

.notice {
  border: 1px solid #d6e9df;
  border-radius: var(--radius);
  background: #f3faf6;
  color: #204f3b;
  padding: 22px 24px;
}

.notice strong {
  color: var(--success);
}

.notice ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.notice li + li {
  margin-top: 8px;
}

.page-hero {
  padding: 80px 0 44px;
}

.meta-line {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 56px;
  padding-bottom: 84px;
}

.toc {
  position: sticky;
  top: 104px;
  border-left: 2px solid var(--border);
  padding-left: 18px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  margin: 7px 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
}

.legal-copy {
  max-width: 760px;
}

.legal-copy section {
  scroll-margin-top: 110px;
  padding: 14px 0 38px;
  border-bottom: 1px solid var(--border);
}

.legal-copy section:first-child {
  padding-top: 0;
}

.legal-copy section:last-child {
  border-bottom: 0;
}

.legal-copy ul,
.legal-copy ol {
  padding-left: 1.25rem;
}

.legal-copy li + li {
  margin-top: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.94rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 17px 18px 17px 64px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 13px;
  left: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--text);
  font-weight: 800;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 48px);
}

.contact-address {
  display: inline-block;
  margin: 10px 0 2px;
  font-size: clamp(1.22rem, 3vw, 1.7rem);
  font-weight: 780;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgb(255 255 255 / 45%);
  padding: 30px 0 42px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a,
.site-footer p {
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  max-width: 560px;
  margin: 5px 0 0;
}

/* ---------- Home: hero con l'immagine ---------- */

.hero-shot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(640px, 56.302vw, 900px);
  background: linear-gradient(180deg, #0383be 0%, #2ab3cb 58%, #57c9c2 100%);
  color: var(--text);
  padding: clamp(52px, 6vw, 80px) 0 clamp(108px, 14vw, 172px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% top;
}

/* Velo chiaro solo a sinistra: alza il contrasto sotto al testo senza spegnere
   il cielo e senza toccare la piramide di animali sulla destra. */
.hero-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(101deg, rgb(228 249 253 / 68%) 0%, rgb(228 249 253 / 46%) 30%, rgb(228 249 253 / 12%) 52%, rgb(228 249 253 / 0%) 70%);
}

.hero-shot h1 {
  max-width: 12ch;
  font-size: clamp(2.7rem, 6vw, 4.8rem);
}

.hero-lead {
  max-width: 38ch;
  margin: 0;
  color: rgb(14 32 38 / 94%);
  font-size: clamp(1.06rem, 2vw, 1.25rem);
}

.hero-note {
  max-width: 38ch;
  margin: 26px 0 0;
  color: rgb(14 32 38 / 88%);
  font-size: 0.9rem;
}

.store-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 464px;
  margin-top: 16px;
  scroll-margin-top: 110px;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 20px;
  border: 1px solid rgb(14 32 38 / 18%);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgb(14 32 38 / 12%);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.store-button-android {
  background: #142c32;
  color: #fff;
}

.store-button-android .store-icon {
  fill: #9de6b6;
}

.store-button-ios {
  background: #fffaf0;
  color: #142c32;
}

.store-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  fill: currentColor;
}

.store-label {
  display: grid;
  gap: 3px;
  line-height: 1.2;
}

.store-label > span {
  font-size: 0.72rem;
  font-weight: 550;
}

.store-label strong {
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.store-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgb(14 32 38 / 22%);
}

.store-button:focus-visible {
  outline: 3px solid #142c32;
  outline-offset: 4px;
}

.hero-secondary {
  display: inline-block;
  margin-top: 20px;
  color: #142c32;
  font-size: 0.92rem;
  font-weight: 650;
}

.hero-secondary::after {
  content: " →";
}

/* ---------- Home: schermate dell'app ---------- */

.showcase {
  position: relative;
  z-index: 1;
  margin-top: clamp(-104px, -8vw, -52px);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 52px);
  justify-items: center;
}

.phone {
  max-width: 264px;
  margin: 0;
  text-align: center;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgb(23 23 26 / 10%);
  border-radius: clamp(14px, 3vw, 24px);
  background: var(--surface);
  box-shadow: 0 24px 60px rgb(23 23 26 / 24%);
}

.phone figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Home: come funziona ---------- */

.steps-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
  padding-top: 26px;
}

.step-n {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.step-item h2 {
  margin: 14px 0 8px;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.step-item p {
  margin: 0;
  color: var(--muted);
}

.trust {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: center;
}

/* ---------- Beta testing ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The simulator keeps its own scoped styles and sandbox inside the public site. */
.simulator-page {
  background: #f4f6fa;
}

.simulator-shell {
  width: min(calc(100% - 32px), 1240px);
  margin-inline: auto;
  padding-block: 24px 40px;
}

.rating-simulator-frame {
  display: block;
  width: 100%;
  height: 2200px;
  border: 0;
}

.beta-hero h1 {
  max-width: 15ch;
}

.beta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.beta-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 38px);
}

.beta-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--platform-color);
}

.beta-card-android {
  --platform-color: #4c9e75;
  --platform-soft: #edf8f2;
}

.beta-card-ios {
  --platform-color: #71747a;
  --platform-soft: #f1f2f4;
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.platform-badge {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  place-items: center;
  border-radius: 18px;
  background: var(--platform-soft);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.platform-icon {
  width: 36px;
  height: 36px;
  fill: var(--platform-color);
}

.platform-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.platform-header h2 {
  margin: 0;
}

.beta-steps {
  flex: 1;
  margin-bottom: 26px;
}

.beta-steps li {
  background: var(--surface-soft);
  color: var(--muted);
}

.beta-steps li::before {
  background: var(--platform-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--platform-color) 34%, transparent);
}

.beta-steps strong {
  color: var(--text);
}

.beta-steps p {
  margin: 5px 0 0;
}

.step-button {
  width: fit-content;
  margin-top: 16px;
}

.account-error {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  border: 1px solid #edcfca;
  border-radius: 18px;
  background: #fff7f5;
  padding: 18px;
}

.account-error img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #eadbd7;
  border-radius: 14px;
  background: #fff;
}

.account-error h3 {
  margin-bottom: 8px;
}

.account-error p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.steps li.beta-steps-action {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.steps li.beta-steps-action::before {
  content: none;
  counter-increment: none;
}

.beta-steps-action .step-button {
  margin-top: 0;
}

.steps li.testflight-ready-step {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 14px 20px;
}

.testflight-ready-step > strong {
  grid-column: 1 / -1;
}

.testflight-ready-step img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d8dade;
  border-radius: 14px;
  background: #000;
}

.testflight-ready-step p {
  margin: 0;
}

.update-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.5fr);
  gap: clamp(28px, 6vw, 72px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface-soft);
  padding: clamp(26px, 5vw, 48px);
}

.update-panel h2 {
  margin-top: 18px;
}

.update-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.update-grid p {
  margin: 0;
  color: var(--muted);
}

.production-panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 52px);
}

.production-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.production-heading h2 {
  margin-top: 18px;
}

.production-heading p {
  margin: 0;
  color: var(--muted);
}

.production-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.production-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  padding: clamp(22px, 3vw, 30px);
}

.production-card p,
.production-card li {
  color: var(--muted);
}

.production-card ul {
  margin: 18px 0;
  padding-left: 1.2rem;
}

.production-card li + li {
  margin-top: 8px;
}

.production-note {
  border-left: 3px solid var(--accent);
  padding-left: 13px;
  font-size: 0.9rem;
}

.source-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 720;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .site-header {
    position: static;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  /* Su schermi stretti l'immagine resta dietro all'intero contenuto. Il velo
     chiaro e il contrasto ridotto mantengono leggibili titolo e didascalie. */
  .hero-shot {
    min-height: clamp(520px, 145vw, 680px);
    padding: clamp(52px, 10vw, 76px) 0 clamp(94px, 18vw, 128px);
  }

  .hero-bg {
    inset: 0;
    height: 100%;
    object-position: 80% top;
    filter: saturate(0.8) contrast(0.88);
    transform: scale(1.015);
  }

  .hero-shot::after {
    background:
      linear-gradient(90deg, rgb(226 248 252 / 78%) 0%, rgb(226 248 252 / 68%) 58%, rgb(226 248 252 / 54%) 100%),
      linear-gradient(180deg, rgb(226 248 252 / 48%) 0%, rgb(226 248 252 / 20%) 100%);
    backdrop-filter: blur(1.5px);
  }

  .hero-shot h1,
  .hero-lead,
  .hero-note {
    text-shadow: 0 1px 0 rgb(255 255 255 / 72%), 0 0 18px rgb(226 248 252 / 88%);
  }

  .toc {
    position: static;
    columns: 2;
  }

  .steps-3 {
    grid-template-columns: 1fr;
  }

  .beta-grid,
  .update-panel,
  .production-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .shell {
    width: min(calc(100% - 22px), var(--content));
  }

  .site-nav {
    gap: 8px 14px;
  }

  .site-nav a {
    font-size: 0.84rem;
  }

  h1 {
    font-size: clamp(2.45rem, 15vw, 3.8rem);
  }

  .hero-shot h1 {
    font-size: clamp(2.45rem, 11.5vw, 3.8rem);
  }

  .store-button {
    gap: 10px;
    min-height: 72px;
    padding: 12px;
  }

  .store-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .store-label strong {
    font-size: 1.15rem;
  }

  .page-hero {
    padding-top: 54px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .update-grid {
    grid-template-columns: 1fr;
  }

  .beta-card {
    padding: 24px 17px;
  }

  .account-error {
    grid-template-columns: 1fr;
  }

  .account-error img {
    width: min(100%, 210px);
    margin-inline: auto;
  }

  .steps li.testflight-ready-step {
    grid-template-columns: 1fr;
  }

  .testflight-ready-step img {
    width: min(100%, 210px);
    margin-inline: auto;
  }

  .platform-header {
    align-items: flex-start;
  }

  .step-button {
    width: 100%;
  }

  .toc {
    columns: 1;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table tr {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
  }

  .data-table td {
    border: 0;
    padding: 5px 0;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 760;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .showcase-grid {
    gap: 13px;
  }

  .phone {
    max-width: 100%;
  }

  .phone figcaption {
    margin-top: 11px;
    font-size: 0.82rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .store-downloads {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .store-button:hover {
    transform: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
