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

:root {
  --green: #3ecf5a;
  --green-dark: #2db348;
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #242424;
  --surface3: #2e2e2e;
  --text: #ffffff;
  --text-secondary: #8a8a8a;
  --border: rgba(255,255,255,0.07);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.green { color: var(--green); }

/* ── NAVBAR ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,15,15,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 2.5rem;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-apple { font-size: 1.5rem; line-height: 1; color: #22C55E; }
.logo-apple .fas { color: #22C55E; }
.logo-wordmark { display: flex; flex-direction: column; line-height: 1; gap: 0; }
.logo-dr {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  margin-bottom: -3px;
}
.logo-milox {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.logo-x { color: #22C55E; font-weight: 900; }

/* NAV LINKS */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--green) !important;
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--green-dark) !important; }
.nav-webapp {
  color: var(--green) !important;
  font-weight: 600;
  font-size: 0.88rem !important;
  border: 1.5px solid var(--green);
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s !important;
}
.nav-webapp:hover { background: var(--green) !important; color: #fff !important; }

/* LANG SELECTOR */
.lang-selector { position: relative; }
.lang-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  transition: border-color 0.2s;
  white-space: nowrap;
}
.lang-btn:hover { border-color: rgba(255,255,255,0.2); }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.4rem;
  min-width: 160px;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.lang-dropdown.open { display: block; }
.lang-dropdown button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.45rem 0.75rem;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: 'Poppins', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.lang-dropdown button:hover { background: var(--surface2); color: var(--text); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9rem 1.5rem 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(62,207,90,0.12) 0%, transparent 70%),
    var(--bg);
}

.hero-inner { max-width: 780px; width: 100%; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(62,207,90,0.08);
  border: 1px solid rgba(62,207,90,0.2);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}
.badge-dot { font-size: 0.9rem; }

.hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--green);
  color: #fff;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface2);
  color: var(--text-secondary);
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover { background: var(--surface3); color: var(--text); }

.btn-webapp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--green);
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--green);
  transition: background 0.2s, color 0.2s;
}
.btn-webapp:hover { background: var(--green); color: #fff; }

/* HERO STATS */
.hero-stats {
  width: 100%;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2rem 0 2.5rem;
}
.hero-stat { text-align: center; padding: 0 3rem; }
.hero-stat-num {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── SECTIONS ── */
section { padding: 6rem 1.5rem; }
.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ── CHI È ── */
#chi { background: var(--surface); padding: 6rem 1.5rem; }

.chi-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 5rem;
  align-items: center;
}

.chi-text .section-title { margin-bottom: 1.5rem; }

.chi-text p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  font-size: 0.97rem;
  line-height: 1.75;
}

.chi-quote {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--green);
  background: rgba(62,207,90,0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* CHI CARD */
.chi-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
}
.chi-card-logo { font-size: 3rem; margin-bottom: 1rem; color: #22C55E; }
.chi-card-logo .fas { color: #22C55E; }
.chi-card-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.chi-card-tagline {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
}
.chi-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.tag {
  display: inline-block;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  transition: color 0.2s, border-color 0.2s;
}
.tag:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

/* ── FUNZIONALITÀ ── */
#funzionalita { background: var(--bg); }

.features-header {
  max-width: 680px;
  margin-bottom: 3.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(62,207,90,0.25);
  transform: translateY(-3px);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(62,207,90,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.pro-badge {
  display: inline-block;
  background: #f59e0b;
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ── DOWNLOAD ── */
#download {
  background: var(--surface);
  text-align: center;
}

.download-inner { max-width: 640px; margin: 0 auto; }
.download-inner .section-label { justify-content: center; }
.download-inner .section-title { margin-bottom: 1rem; }
.download-inner .section-sub { margin: 0 auto 2.5rem; }

.store-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-radius: 14px;
  padding: 0.9rem 1.6rem;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
  min-width: 185px;
}
.store-btn:hover { transform: translateY(-3px); opacity: 0.9; }

.store-apple {
  background: #111;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
}
.store-google {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  color: #111;
}

.store-logo { width: 28px; height: 28px; flex-shrink: 0; }
.store-small { font-size: 0.68rem; opacity: 0.65; font-weight: 500; }
.store-big { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }

.store-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 2.5rem 2rem;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.footer-apple { font-size: 1.3rem; color: #22C55E; line-height: 1; }
.footer-apple .fas { color: #22C55E; }
.footer-wordmark { display: flex; flex-direction: column; line-height: 1; gap: 0; }
.footer-dr { color: #ffffff; font-weight: 700; font-size: 0.6rem; letter-spacing: 0.08em; margin-bottom: 1px; }
.footer-milox { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.footer-milo { color: #ffffff; }

.footer-brand-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 260px;
}

.footer-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.65rem; }
.footer-col ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--text); }

.footer-contact-note {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 0.35rem !important;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* RTL */
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .chi-grid { direction: rtl; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .lang-dropdown button { text-align: right; }
[dir="rtl"] .chi-quote { border-left: none; border-right: 3px solid var(--green); border-radius: 8px 0 0 8px; }
[dir="rtl"] .footer-brand-desc { direction: rtl; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .chi-grid { grid-template-columns: 1fr; gap: 3rem; }
  .chi-card { max-width: 420px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .hero-title { font-size: clamp(2.4rem, 8vw, 3.5rem); }
  .hero-stat { padding: 0 1.5rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand-desc { max-width: 100%; }
  .store-buttons { flex-direction: column; align-items: center; }
  .store-btn { width: 100%; max-width: 280px; justify-content: center; }
}
