/* ================================================================
   Rallika — landing page
   Design system "Soft Club v2" (token allineati all'app, lug 2026):
   light-first su canvas caldo, card bianche morbide, CTA navy,
   giallo palla come accento-brand, terra battuta, doppio tema.
   Pure CSS, no dependencies. Deployable on any static hosting.
   ================================================================ */

:root {
  color-scheme: light;
  --bg: #faf8f4;
  --bg-2: #f3efe7;
  --text: #1f2937;
  --title: #14213d;
  --muted: #737b8c;
  --muted-2: #a3a9b7;
  --primary: #4d6b00;
  --primary-soft: #eef7d8;
  --accent: #c96a45;
  --accent-soft: #f7e6de;
  --sky-soft: #e5f1f8;
  --warn: #d98a2b;
  --warn-soft: #fdf3e2;
  --surface: #ffffff;
  --surface-soft: rgba(31, 41, 55, 0.05);
  --border: #ece8df;
  --border-strong: #d8d2c4;
  --cta: #14213d;
  --cta-ink: #ffffff;
  --ball: #d7f14c;
  --ball-ink: #3a4b00;
  --ball-deep: #a8c22e;
  --video-bg: #101d33;
  --nav-bg: rgba(250, 248, 244, 0.82);
  --shadow-card: 0 8px 30px -12px rgba(31, 41, 55, 0.12);
  --shadow-pop: 0 18px 50px -18px rgba(31, 41, 55, 0.30);
  --radius: 22px;
  --radius-lg: 30px;
  --dur: 280ms;
  --ease: cubic-bezier(0.25, 0.8, 0.3, 1);
  --maxw: 1140px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Gabarito", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1424;
  --bg-2: #0e1c33;
  --text: #e8edf8;
  --title: #f2f5fc;
  --muted: #93a3c2;
  --muted-2: #5f7095;
  --primary: #d7f14c;
  --primary-soft: rgba(215, 241, 76, 0.14);
  --accent: #d3805f;
  --accent-soft: rgba(201, 106, 69, 0.18);
  --sky-soft: rgba(88, 183, 230, 0.13);
  --warn: #fb923c;
  --warn-soft: rgba(251, 146, 60, 0.14);
  --surface: #101f38;
  --surface-soft: rgba(148, 163, 200, 0.10);
  --border: #223454;
  --border-strong: #35507e;
  --cta: #eef2fb;
  --cta-ink: #14213d;
  --ball-ink: #d7f14c;
  --video-bg: #0c1830;
  --nav-bg: rgba(10, 20, 36, 0.82);
  --shadow-card: 0 10px 34px -12px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 20px 56px -18px rgba(0, 0, 0, 0.65);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------------- typography ---------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--title);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 800; }

/* Parola evidenziata: marker giallo palla sul chiaro, giallo pieno sul navy */
.accent {
  background: linear-gradient(transparent 62%, var(--ball) 62%, var(--ball) 94%, transparent 94%);
  padding: 0 0.08em;
}
[data-theme="dark"] .accent {
  background: none;
  color: var(--ball);
  padding: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.lead { font-size: 1.12rem; color: var(--muted); margin-top: 1.2rem; max-width: 34rem; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.985); }

.btn-primary {
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: var(--shadow-pop);
}

.btn-ghost { border-color: var(--border-strong); color: var(--title); }
.btn-ghost:hover { background: var(--surface-soft); }

.btn-small {
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  background: var(--cta);
  color: var(--cta-ink);
}
.btn-big { font-size: 1.05rem; padding: 1rem 2.3rem; }

/* ---------------- nav ---------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--title);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-ball {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eaff8a, var(--ball) 70%);
  box-shadow: 0 1px 4px rgba(31, 41, 55, 0.25);
}
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { font-size: 0.92rem; color: var(--muted); font-weight: 600; transition: color 0.15s; }
.nav-links a:hover { color: var(--title); }
.nav-actions { display: flex; align-items: center; gap: 0.7rem; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), color 0.15s;
}
.theme-toggle:hover { color: var(--title); transform: rotate(15deg); }

.lang-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.lang-toggle:hover { border-color: var(--border-strong); }
.lang-toggle .active { color: var(--primary); }
.lang-sep { margin: 0 0.3rem; opacity: 0.5; }

/* ---------------- hero ---------------- */
.hero { position: relative; padding: 9.5rem 1.5rem 5rem; }
.hero-glow {
  position: absolute;
  top: -200px; right: -160px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--primary-soft) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-cta { display: flex; gap: 1rem; margin-top: 2.1rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.3rem; font-size: 0.85rem; color: var(--muted); }

/* phone mockup */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  width: min(300px, 78vw);
  border-radius: 42px;
  border: 3px solid #2b3a55;
  background: #14213d;
  padding: 10px;
  position: relative;
  box-shadow: var(--shadow-pop);
  animation: phoneFloat 7s ease-in-out infinite;
}
.phone-notch {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 88px; height: 20px;
  background: rgba(6, 12, 26, 0.25);
  border-radius: 999px;
  z-index: 2;
}
.phone-screen { border-radius: 32px; width: 100%; height: auto; }

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--title);
  padding: 0.55rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
.chip-1 { top: 14%; left: -4%; animation: chipFloat 6s ease-in-out infinite; }
.chip-2 { bottom: 16%; right: -6%; animation: chipFloat 6s ease-in-out 1.6s infinite; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ball-deep); }
.chip-dot-alt { background: var(--accent); }

@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------------- strip ---------------- */
.strip { border-block: 1px solid var(--border); background: var(--bg-2); transition: background 0.4s ease; }
.strip-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.strip-item { display: flex; flex-direction: column; gap: 0.15rem; }
.strip-item strong { font-family: var(--font-display); font-size: 0.98rem; color: var(--title); }
.strip-item span { font-size: 0.83rem; color: var(--muted); }

/* ---------------- sections ---------------- */
.section { padding: 6rem 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.section-alt {
  max-width: none;
  background: var(--bg-2);
  border-block: 1px solid var(--border);
  transition: background 0.4s ease;
}
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 3.5rem; }
.section-sub { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

/* ---------------- feature cards ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  max-width: 900px;
  margin-inline: auto;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background 0.4s ease, border-color 0.4s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px -16px rgba(31, 41, 55, 0.20);
}
.card-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
/* pastelli a rotazione, come le stat card dell'app */
.card:nth-child(4n + 1) .card-icon { background: var(--primary-soft); color: var(--primary); }
.card:nth-child(4n + 2) .card-icon { background: var(--accent-soft); color: var(--accent); }
.card:nth-child(4n + 3) .card-icon { background: var(--sky-soft); color: var(--title); }
.card:nth-child(4n + 4) .card-icon { background: var(--warn-soft); color: var(--warn); }
.card-icon svg { width: 24px; height: 24px; }
.card p { color: var(--muted); font-size: 0.94rem; margin-top: 0.55rem; }

/* ---------------- steps ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem 1.8rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.step-num {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ball);
  color: #3a4b00;
  font-family: var(--font-display);
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px -4px rgba(168, 194, 46, 0.6);
}
.step-visual { height: 90px; display: flex; justify-content: center; margin-bottom: 0.8rem; color: var(--primary); }
.step-visual svg { height: 100%; width: auto; }
.step p { color: var(--muted); font-size: 0.92rem; margin-top: 0.5rem; }

/* match teaser: il blocco terra battuta, gesto firma Soft Club */
.match-teaser {
  margin-top: 3.4rem;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
  background: linear-gradient(135deg, #c96a45, #ab4f2e);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  box-shadow: var(--shadow-pop);
}
.match-copy h3 { color: #ffffff; font-size: 1.45rem; }
.match-copy p { color: rgba(255, 255, 255, 0.85); margin-top: 0.7rem; font-size: 0.97rem; }
.court { filter: drop-shadow(0 16px 34px rgba(90, 35, 15, 0.35)); }

/* ---------------- technology ---------------- */
.tech-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.tech-copy p { color: var(--muted); margin-top: 1rem; }
.tech-list { list-style: none; margin-top: 1.6rem; display: grid; gap: 0.7rem; }
.tech-list li {
  position: relative;
  padding-left: 1.7rem;
  font-size: 0.96rem;
}
.tech-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ball);
  border: 2px solid var(--ball-deep);
}

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}
.pipe-node {
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--title);
  box-shadow: var(--shadow-card);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.pipe-accent { border-color: var(--ball-deep); background: var(--primary-soft); }
.pipe-ico { font-size: 1.4rem; }
.pipe-arrow {
  width: 2px; height: 34px;
  background: linear-gradient(var(--border-strong), var(--ball-deep));
  position: relative;
}
.pipe-arrow::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ball-deep);
}

/* ---------------- about ---------------- */
.about-wrap { text-align: center; max-width: 780px !important; }
.vision {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--title);
}
.about-p { color: var(--muted); margin-top: 1.6rem; font-size: 1.02rem; }

/* ---------------- CTA ---------------- */
.cta-section { padding-bottom: 7rem; }
.cta-box {
  text-align: center;
  background:
    radial-gradient(600px 260px at 50% 0%, var(--primary-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4.2rem 2rem;
  box-shadow: var(--shadow-card);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.cta-box p { color: var(--muted); margin: 1.1rem auto 2rem; max-width: 32rem; }
.cta-mini { font-size: 0.82rem !important; margin-top: 1.4rem !important; }
.cta-mini a { color: var(--primary); font-weight: 700; }
.cta-mini a:hover { text-decoration: underline; }

/* ---------------- contact ---------------- */
.contact-section { border-bottom: 0; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  max-width: var(--maxw);
}
.contact-mail {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--primary);
}
a.contact-mail:hover { text-decoration: underline; }
.contact-place { color: var(--title); }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); transition: background 0.4s ease; }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.brand-footer { font-size: 1.05rem; }
.footer-note { color: var(--muted); font-size: 0.82rem; margin-right: auto; }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { font-size: 0.85rem; color: var(--muted); }
.footer-links a:hover { color: var(--title); }

/* ---------------- reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone, .chip-1, .chip-2 { animation: none; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 960px) {
  .hero-inner, .tech-wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 8rem; text-align: center; }
  .lead, .hero-cta { margin-left: auto; margin-right: auto; justify-content: center; }
  .hero-visual { margin-top: 2.5rem; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.4rem; }
  .match-teaser { grid-template-columns: 1fr; }
  .strip-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .grid, .steps, .contact-grid { grid-template-columns: 1fr; }
  .strip-inner { grid-template-columns: 1fr; gap: 1rem; }
  .float-chip { display: none; }
  .section { padding: 4.2rem 1.25rem; }
}
