/* Rally Chrono — shared stylesheet
   Dark theme, modern but minimal. System fonts for native feel. */

:root {
  --bg:        #0a0a0a;
  --bg-soft:   #121212;
  --bg-card:   #181818;
  --border:    #232323;
  --text:      #f2f2f2;
  --text-dim:  #9a9a9a;
  --text-mute: #6a6a6a;
  --accent:    #ff9300;   /* arancione "currentValueHighlight" dell'app */
  --accent-2:  #34c759;   /* verde "on target" dell'app */
  --accent-3:  #ff453a;   /* rosso "fuori target" dell'app */
  --radius:    16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Helvetica Neue", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.75; }

/* ───────────────  Layout  ─────────────── */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────────────  Navbar  ─────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.brand:hover { opacity: 1; }

.brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #ff5e00);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 15px;
}
.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); opacity: 1; }

/* ───────────────  Hero  ─────────────── */

.hero {
  padding: 96px 24px 80px;
  text-align: center;
  background: radial-gradient(ellipse at center top,
                              rgba(255, 147, 0, 0.12),
                              transparent 60%);
}

.hero-icon {
  width: 120px; height: 120px;
  margin: 0 auto 32px;
  border-radius: 27px;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 147, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%,
                              rgba(255, 147, 0, 0.25),
                              transparent 55%);
}

.hero-icon svg {
  width: 56%; height: 56%;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero .tagline {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--text-dim);
  margin: 0 auto 40px;
  max-width: 560px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.cta:hover { transform: translateY(-1px); opacity: 1; }

.cta-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  margin-left: 12px;
}

/* ───────────────  Sections  ─────────────── */

section { padding: 80px 0; }

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 56px;
}

/* ───────────────  Feature grid  ─────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover {
  border-color: rgba(255, 147, 0, 0.35);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255, 147, 0, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

/* ───────────────  Document pages (privacy, terms, support)  ─────────────── */

.doc {
  padding: 64px 0 96px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.doc .updated {
  color: var(--text-mute);
  font-size: 14px;
  margin: 0 0 40px;
}

.doc h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}

.doc h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 10px;
}

.doc p, .doc li {
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }

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

.doc-back {
  display: inline-block;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ───────────────  Footer  ─────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-mute);
  font-size: 14px;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

footer .footer-links a {
  color: var(--text-dim);
  font-weight: 500;
}

/* ───────────────  404  ─────────────── */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 40px 24px;
}

.notfound .code {
  font-size: 120px;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.notfound h1 {
  font-size: 28px;
  margin: 0 0 12px;
}

.notfound p {
  color: var(--text-dim);
  margin: 0 0 32px;
}

/* ───────────────  Responsive  ─────────────── */

@media (max-width: 600px) {
  .hero { padding: 64px 20px 56px; }
  .nav-links { gap: 16px; font-size: 14px; }
  section { padding: 56px 0; }
  .cta-secondary { margin-left: 0; margin-top: 12px; }
}
