:root {
  --bg: #eef2f8;
  --card: #f8faff;
  --card-strong: #f3f7ff;
  --text: #0f172a;
  --muted: #5b6578;
  --line: #dbe3ef;
  --blue: #1f7ae7;
  --blue-deep: #1559b8;
  --green: #45a26a;
  --yellow: #d0a13d;
  --red: #cb5959;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 15% -10%, #ffffff 0, #f2f5fb 45%, var(--bg) 100%);
}

a { color: inherit; }

/* Failsafe for legacy templates: avoid oversized App Store badge images. */
.appstore-badge-link {
  display: none !important;
}

img[src*="app-store-badge"] {
  width: 170px !important;
  max-width: 45vw !important;
  height: auto !important;
}

img[alt*="Download on the App Store"],
img[alt*="Scarica su App Store"] {
  width: 170px !important;
  max-width: 45vw !important;
  height: auto !important;
}

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 30px);
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.logo-dark { display: none; }

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f6f8fd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}

.lang-wrap label {
  font-size: 13px;
  color: var(--muted);
}

#lang {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px 8px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 44px;
}

.section {
  margin-top: 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}

.hero-copy {
  padding: clamp(22px, 2.7vw, 34px);
  background: linear-gradient(170deg, #ffffff 0%, var(--card-strong) 100%);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.36;
}

.muted {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.56;
}

.hero-ctas {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--blue);
}

.button-primary:hover {
  background: var(--blue-deep);
}

.button-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.button-link {
  border: 1px solid transparent;
  color: var(--blue-deep);
  padding-left: 4px;
  padding-right: 4px;
}

.button.small {
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.traffic {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
  font-weight: 600;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--red); }

.hero-card {
  padding: 18px;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fdfefe 0%, #f2f5fd 100%);
}

.device-shot {
  width: 100%;
  display: block;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.ipad-shot {
  max-width: 560px;
  max-height: 760px;
}

.phone-shot {
  max-width: 320px;
  max-height: 620px;
  justify-self: end;
}


.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 40px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
}

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

.card {
  padding: 20px;
}

.card h2,
.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.card li {
  margin: 7px 0;
  line-height: 1.45;
}

.step-card {
  background: #f6f9ff;
}

.step-index {
  margin: 0 0 8px;
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
}

.showcase {
  display: grid;
  gap: 14px;
}

.showcase-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}


.plan-card h3 {
  font-size: 22px;
}

.plan-card.pro {
  border-color: #b6cff3;
  background: linear-gradient(165deg, #f7fbff 0%, #edf4ff 100%);
}

.flags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  background: #fff;
}

.disclaimer {
  margin-top: 12px;
  font-weight: 600;
  color: #1d2c45;
}

.final-cta {
  text-align: center;
  background: linear-gradient(168deg, #f6f9ff 0%, #edf3ff 100%);
  padding-top: 30px;
  padding-bottom: 30px;
}

.final-cta h2 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 48px);
}

.final-cta p {
  margin: 10px auto 0;
  max-width: 620px;
}

.final-cta .button {
  margin-top: 16px;
}

.footer {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 14px 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #657287;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links {
  display: inline-flex;
  gap: 12px;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  border-bottom-color: currentColor;
}

.legal-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 20px 40px;
}

.legal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-top: 14px;
}

.legal-card h1,
.legal-card h2 {
  margin-top: 0;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1521;
    --card: #141c2a;
    --card-strong: #121a27;
    --text: #ecf2ff;
    --muted: #b2bfd5;
    --line: #28344b;
    --blue: #5ea3ff;
    --blue-deep: #79b6ff;
    --green: #62b57d;
    --yellow: #d7b65f;
    --red: #d06f6f;
  }

  body {
    background:
      radial-gradient(1000px 500px at 15% -10%, #182438 0, #121b2b 45%, var(--bg) 100%);
  }

  .logo-light { display: none; }
  .logo-dark { display: inline; }

  #lang,
  .lang-wrap,
  .button-ghost,
  .traffic,
  .flags span {
    background: #111b2c;
  }

  .lang-wrap label {
    color: #d8e3fb;
  }

  #lang {
    color: #ecf2ff;
    -webkit-text-fill-color: #ecf2ff;
  }

  #lang option {
    color: #ecf2ff;
    background: #111b2c;
  }

  .button-ghost {
    color: var(--text);
  }

  .hero-copy,
  .hero-card,
  .plan-card.pro,
  .final-cta {
    background: linear-gradient(170deg, #152035 0%, #11192a 100%);
  }

  .step-card {
    background: #15233a;
    border-color: #2a3b5a;
  }

  .step-card h3 {
    color: #e8efff;
  }

  .step-card p {
    color: #c4d1e9;
  }

  .step-index {
    color: #9fc3ff;
  }

  .disclaimer {
    color: #d8e3fb;
  }
}

@media (max-width: 1020px) {
  .hero,
  .showcase-card,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 0;
  }

  .device-shot {
    max-height: 560px;
  }

  .phone-shot {
    max-width: 300px;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .button-ghost {
    font-size: 13px;
    padding: 9px 12px;
  }

  .hero-copy {
    padding: 20px;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 10vw, 44px);
  }
}
