:root {
  --ff-orange: #ff9933;
  --ff-orange-dark: #e6862b;
  --ff-green: #33cc66;
  --ff-green-soft: #e8f9ef;
  --ff-blue: #4d9fff;
  --ff-red: #ff5959;
  --ff-bg: #f5f5f7;
  --ff-surface: #ffffff;
  --ff-text: #1d1d1f;
  --ff-muted: #6e6e73;
  --ff-line: rgba(60, 60, 67, 0.12);
  --ff-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  --ff-radius: 22px;
  --ff-radius-sm: 14px;
  --ff-max: 1080px;
  --ff-nav-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ff-bg: #000000;
    --ff-surface: #1c1c1e;
    --ff-text: #f5f5f7;
    --ff-muted: #a1a1a6;
    --ff-line: rgba(84, 84, 88, 0.65);
    --ff-green-soft: rgba(51, 204, 102, 0.12);
    --ff-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  }
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ff-text);
  background: var(--ff-bg);
  line-height: 1.55;
}

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

a { color: var(--ff-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Language toggle — html[lang] set by site.js */
html:not([lang="en"]) .lang-en { display: none !important; }
html[lang="en"] .lang-it { display: none !important; }

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--ff-nav-h);
  border-bottom: 1px solid var(--ff-line);
  background: color-mix(in srgb, var(--ff-bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.site-nav-inner {
  max-width: var(--ff-max);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ff-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.brand:hover { text-decoration: none; }

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: var(--ff-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ff-text);
  background: color-mix(in srgb, var(--ff-text) 6%, transparent);
  text-decoration: none;
}

.lang-toggle {
  border: 1px solid var(--ff-line);
  background: var(--ff-surface);
  color: var(--ff-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 4px;
}

.lang-toggle:hover { border-color: var(--ff-orange); color: var(--ff-orange); }

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--ff-text);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
}

/* Layout */
.container {
  max-width: var(--ff-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-header p {
  margin: 0;
  color: var(--ff-muted);
  font-size: 1.05rem;
}

/* Hero */
.hero {
  padding: 48px 0 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 420px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--ff-orange) 18%, transparent), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  justify-items: center;
}

.hero-copy { max-width: 620px; }

.hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: var(--ff-shadow);
  border: 1px solid var(--ff-line);
  margin: 0 auto 20px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero .tagline {
  margin: 14px 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--ff-muted);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--ff-orange);
  color: #fff;
  box-shadow: none;
}

.btn-primary:hover { background: var(--ff-orange-dark); color: #fff; }

.btn-secondary {
  background: var(--ff-surface);
  color: var(--ff-text);
  border: 1px solid var(--ff-line);
}

.btn-secondary:hover { color: var(--ff-text); border-color: var(--ff-orange); }

.hero-mascot {
  width: min(280px, 70vw);
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.12));
}

/* KPI strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 40px;
}

.kpi-pill {
  background: var(--ff-surface);
  border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius-sm);
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.kpi-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 auto 8px;
}

.kpi-pill strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.25;
}

.kpi-pill span {
  font-size: 0.72rem;
  color: var(--ff-muted);
}

.dot-red { background: var(--ff-red); }
.dot-orange { background: var(--ff-orange); }
.dot-yellow { background: #ffcc00; }
.dot-green { background: var(--ff-green); }

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius);
  padding: 22px;
  box-shadow: var(--ff-shadow);
  transition: transform 0.2s ease;
}

.feature-card:hover { transform: translateY(-3px); }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: var(--ff-muted);
  font-size: 0.92rem;
}

.icon-orange { background: color-mix(in srgb, var(--ff-orange) 16%, transparent); }
.icon-green { background: var(--ff-green-soft); }
.icon-blue { background: color-mix(in srgb, var(--ff-blue) 14%, transparent); }
.icon-red { background: color-mix(in srgb, var(--ff-red) 12%, transparent); }

/* Highlight bands */
.highlight-band {
  background: var(--ff-surface);
  border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: var(--ff-shadow);
  margin-bottom: 16px;
}

.highlight-band.reverse { direction: rtl; }
.highlight-band.reverse > * { direction: ltr; }

.highlight-band img {
  width: min(220px, 100%);
  margin: 0 auto;
}

.highlight-band h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.highlight-band p {
  margin: 0 0 12px;
  color: var(--ff-muted);
}

.highlight-band ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ff-muted);
  font-size: 0.92rem;
}

.highlight-band li { margin-bottom: 6px; }

/* CTA */
.cta-section {
  text-align: center;
  padding: 64px 0;
}

.cta-box {
  background: var(--ff-orange);
  color: #fff;
  border-radius: var(--ff-radius);
  padding: 48px 32px;
  box-shadow: var(--ff-shadow);
}

.cta-box h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.cta-box p {
  margin: 0 auto 24px;
  max-width: 480px;
  opacity: 0.92;
}

.cta-box .btn-primary {
  background: #fff;
  color: var(--ff-orange-dark);
  box-shadow: none;
}

.cta-box .btn-primary:hover { background: #f0f0f2; color: var(--ff-orange-dark); }

/* Legal / support pages */
.page-hero {
  padding: 40px 0 24px;
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.page-hero .meta {
  margin-top: 10px;
  color: var(--ff-muted);
}

.legal-stack {
  display: grid;
  gap: 12px;
  padding-bottom: 64px;
}

.legal-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius-sm);
  padding: 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.legal-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.legal-card p,
.legal-card li {
  margin: 0 0 8px;
  color: var(--ff-muted);
  font-size: 0.95rem;
}

.legal-card ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

.faq-item {
  border-bottom: 1px solid var(--ff-line);
  padding: 16px 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--ff-orange);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  margin: 10px 0 0;
  color: var(--ff-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--ff-line);
  padding: 32px 0 48px;
  margin-top: 16px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
  color: var(--ff-muted);
  font-size: 0.875rem;
}

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

.footer-links a {
  color: var(--ff-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-links a:hover { color: var(--ff-text); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* App showcase */
.showcase-section {
  padding-top: 16px;
}

.showcase-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 28px;
  align-items: start;
}

.showcase-phone-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: calc(var(--ff-nav-h) + 16px);
}

.phone-mockup {
  width: 100%;
  max-width: 280px;
  padding: 14px 10px 16px;
  border-radius: 46px;
  background: #1c1c1e;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-notch {
  width: 96px;
  height: 24px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #000;
}

.phone-screen {
  border-radius: 34px;
  overflow: hidden;
  background: #f2f2f7;
  line-height: 0;
}

.phone-screen img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-phone-caption {
  margin: 14px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ff-muted);
  text-align: center;
}

.showcase-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ui-preview-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius);
  overflow: hidden;
  box-shadow: var(--ff-shadow);
  display: flex;
  flex-direction: column;
}

.ui-preview-frame {
  background: #ececf0;
  min-height: 148px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-color-scheme: dark) {
  .ui-preview-frame { background: #2c2c2e; }
  .phone-screen { background: #000; }
}

.ui-preview-frame img {
  max-width: 100%;
  max-height: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ui-preview-copy {
  padding: 16px 18px 18px;
  flex: 1;
}

.ui-preview-copy h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.ui-preview-copy p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ff-muted);
  line-height: 1.45;
}

/* Responsive */
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: left;
    justify-items: stretch;
  }

  .hero-copy { justify-self: start; }
  .hero-icon { margin: 0 0 20px; }
  .hero-actions { justify-content: flex-start; }
  .hero-visual { justify-self: end; }
}

@media (max-width: 899px) {
  .showcase-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .showcase-phone-col {
    position: static;
  }

  .highlight-band,
  .highlight-band.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    text-align: center;
  }

  .highlight-band ul { text-align: left; }
}

@media (max-width: 760px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .showcase-cards { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .phone-mockup { max-width: 240px; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--ff-nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 16px;
    background: var(--ff-surface);
    border-bottom: 1px solid var(--ff-line);
    box-shadow: var(--ff-shadow);
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: 10px 12px; }
}
