/* ============================================================
   TennCore — Design system condiviso da tutte le pagine
   ============================================================ */

:root {
  --primary: #0f54ad;
  --primary-dark: #0b4186;
  --primary-light: #4282cf;
  --tertiary: #212b40;
  --tertiary-light: #394661;

  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-variant: #eef0fa;
  --border: #dfe3f0;

  --text-primary: #212b40;
  --text-secondary: #616b80;
  --text-disabled: #9ea6b3;

  --success: #2e9c39;
  --warning: #e08900;
  --tennis: #3f9142;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(33, 43, 64, 0.06);
  --shadow-md: 0 8px 24px rgba(33, 43, 64, 0.10);
  --shadow-lg: 0 20px 48px rgba(33, 43, 64, 0.16);

  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-secondary); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(15, 84, 173, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 84, 173, 0.28);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-light {
  background: #fff;
  color: var(--primary);
}
.btn-light:hover { background: #eef2fb; }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 245, 251, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--tertiary);
}
.brand .brand-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--tertiary); }

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(33, 43, 64, 0.14);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 17px;
  }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

.nav-links-cta { display: none; }
@media (max-width: 860px) {
  .nav-links-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }
  .nav-links-cta .btn { justify-content: center; }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--tertiary) 100%);
  color: #fff;
  padding: 88px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.10), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,0.08), transparent 40%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-inner {
  max-width: 720px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  color: #fff;
}
.hero p.lead {
  font-size: 19px;
  color: rgba(255,255,255,0.86);
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.hero-badges {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 48px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 600;
}
.hero-badges span { display: flex; align-items: center; gap: 8px; }
.hero-badges svg { width: 18px; height: 18px; }

.page-hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--tertiary) 100%);
  color: #fff;
  padding: 64px 0 72px;
  text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 44px); }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 620px; margin: 0 auto; font-size: 17px; }

/* ---------- Sections ---------- */

section { padding: 88px 0; }
.section-head {
  max-width: 620px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { font-size: 17px; }

.section-alt { background: var(--surface); }

/* ---------- Cards / Grids ---------- */

.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(15, 84, 173, 0.10);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.icon-tile svg { width: 26px; height: 26px; }

.icon-tile.tennis { background: rgba(63, 145, 66, 0.12); color: var(--tennis); }
.icon-tile.warn { background: rgba(224, 137, 0, 0.12); color: var(--warning); }

.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 15px; }

/* ---------- Feature split (image/text) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse .split-visual { order: 2; }
@media (max-width: 860px) {
  .split, .split.reverse .split-visual { grid-template-columns: 1fr; order: initial; }
  .split { gap: 40px; }
}

.split-visual {
  background: linear-gradient(160deg, var(--surface-variant), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checklist { list-style: none; padding: 0; margin: 24px 0 0; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 15.5px;
  color: var(--text-primary);
  font-weight: 500;
}
.checklist svg {
  width: 20px; height: 20px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Mock app card (visual filler, no real screenshots) ---------- */

.mock-phone {
  width: 100%;
  max-width: 280px;
  background: var(--tertiary);
  border-radius: 28px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
}
.mock-screen {
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
}
.mock-topbar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 18px 16px 34px;
  font-weight: 700;
  font-size: 14px;
}
.mock-topbar small { display: block; font-weight: 500; opacity: .8; font-size: 11px; margin-top: 2px; }
.mock-card {
  background: #fff;
  margin: -20px 12px 12px;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  font-size: 12px;
}
.mock-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.mock-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(46, 156, 57, 0.14);
  color: var(--success);
  margin-top: 6px;
}
.mock-list-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.mock-list-row:last-child { border-bottom: none; }

/* ---------- Stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats .num { font-size: 34px; font-weight: 800; color: var(--primary); }
.stats .label { font-size: 14px; color: var(--text-secondary); font-weight: 600; }

/* ---------- Pricing ---------- */

.pricing-toggle-note {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.price-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}
.price-card.featured::before {
  content: "Più scelto";
  position: absolute;
  top: -13px;
  left: 32px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}
.price-card h3 { font-size: 21px; }
.price-card .desc { font-size: 14px; margin-bottom: 24px; }
.price-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.price-amount .amount { font-size: 42px; font-weight: 800; color: var(--tertiary); }
.price-amount .period { font-size: 15px; color: var(--text-secondary); font-weight: 600; }
.price-note { font-size: 13px; color: var(--text-disabled); margin-bottom: 28px; }
.price-card .checklist { flex: 1; margin-top: 0; margin-bottom: 28px; }

.price-card.enterprise {
  max-width: 760px;
  margin: 24px auto 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  text-align: left;
  padding: 40px;
}
@media (max-width: 760px) {
  .price-card.enterprise { grid-template-columns: 1fr; text-align: left; }
}
.price-card.enterprise .checklist { margin-bottom: 0; }

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform .2s ease;
  color: var(--primary);
}
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item p { margin-top: 14px; font-size: 15px; }

/* ---------- CTA banner ---------- */

.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--tertiary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 500px; margin: 0 auto 28px; }
.cta-banner .hero-actions { justify-content: center; margin-top: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--tertiary);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; max-width: 280px; }
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14.5px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 12px;
  transition: color .15s ease;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ---------- Generic content pages (privacy/termini) ---------- */

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 22px; margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; margin-top: 28px; }
.prose ul { color: var(--text-secondary); padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose .updated {
  color: var(--text-disabled);
  font-size: 14px;
  margin-bottom: 40px;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-method {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.contact-method .icon-tile { margin-bottom: 0; flex-shrink: 0; }
.contact-method h4 { margin: 0 0 4px; font-size: 16px; }
.contact-method p { margin: 0; font-size: 14.5px; }
.contact-method a { color: var(--primary); font-weight: 600; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text-primary);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 13px; color: var(--text-disabled); margin-top: 16px; }

/* ---------- Utilities ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--warning);
  background: rgba(224, 137, 0, 0.10);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 640px;
  margin: 0 auto;
  background: var(--tertiary);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(33, 43, 64, 0.25));
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.cookie-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  flex: 1 1 260px;
}
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-banner button {
  flex: 0 0 auto;
  background: #fff;
  color: var(--tertiary);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.cookie-banner button:hover { background: var(--surface-variant); }
