/* Race Marks — racemarks.app shared styles */

:root {
  --navy: #0b1d3a;
  --navy-light: #132d5e;
  --white: #ffffff;
  --off-white: #f5f6f8;
  --gold: #d4a843;
  --gold-light: #e8c96e;
  --blue: #2a7de1;
  --blue-light: #e8f0fc;
  --green: #28a745;
  --red: #dc3545;
  --gray: #6c757d;
  --gray-light: #dee2e6;
  --gray-dark: #343a40;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 960px;
  --radius: 8px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ── Nav ─────────────────────────────────────────────────────── */

.site-nav {
  background: var(--navy);
  color: var(--white);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-nav .logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}
.site-nav .logo:hover { text-decoration: none; }
.site-nav .logo span { color: var(--gold); }

.site-nav .nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.site-nav .nav-links a {
  color: rgba(255,255,255,.8);
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s;
}
.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  color: var(--gold);
  text-decoration: none;
}

/* hamburger */
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: var(--navy);
    padding: 1rem 1.5rem;
    gap: .75rem;
  }
  .site-nav .nav-links.open { display: flex; }
}

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

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 2rem 1.5rem;
  margin-top: auto;
  font-size: .85rem;
}

.site-footer .footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: var(--gold); }

.footer-links { list-style: none; display: flex; gap: 1.25rem; }

/* ── Container ───────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

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

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: .75rem;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,.8);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero .cta {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  padding: .75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: background .15s;
}
.hero .cta:hover { background: var(--gold-light); text-decoration: none; }

/* ── Section ─────────────────────────────────────────────────── */

.section { padding: 3rem 1.5rem; }
.section.alt { background: var(--off-white); }

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

/* ── Cards / Grid ────────────────────────────────────────────── */

.card-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow .15s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }

.card .card-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
}

.card h3 { margin-bottom: .5rem; }

/* ── Pricing table ───────────────────────────────────────────── */

.pricing-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.tier-card {
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  position: relative;
  background: var(--white);
}

.tier-card.featured {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(212,168,67,.15);
}

.tier-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy);
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .75rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tier-card h3 { font-size: 1.25rem; margin-bottom: .25rem; }

.tier-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin: .5rem 0 .25rem;
}

.tier-card .price-period {
  font-size: .85rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

.tier-card ul {
  list-style: none;
  text-align: left;
  font-size: .9rem;
  margin-bottom: 1.25rem;
}

.tier-card li {
  padding: .35rem 0;
  border-bottom: 1px solid var(--gray-light);
}

.tier-card li::before {
  content: "\2713 ";
  color: var(--green);
  font-weight: 700;
  margin-right: .35rem;
}

.tier-card .tier-cta {
  display: inline-block;
  padding: .6rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  transition: background .15s;
}

.tier-card .tier-cta.primary { background: var(--gold); color: var(--navy); }
.tier-card .tier-cta.primary:hover { background: var(--gold-light); text-decoration: none; }
.tier-card .tier-cta.secondary { background: var(--off-white); color: var(--navy); }
.tier-card .tier-cta.secondary:hover { background: var(--gray-light); text-decoration: none; }

/* ── Prose (privacy, terms) ──────────────────────────────────── */

.prose { max-width: 720px; margin: 0 auto; }
.prose h1 { font-size: 2rem; margin-bottom: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; text-align: left; }
.prose h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: .35rem; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: .9rem; }
.prose th, .prose td { padding: .5rem .75rem; border: 1px solid var(--gray-light); text-align: left; }
.prose th { background: var(--off-white); font-weight: 600; }

/* ── FAQ ─────────────────────────────────────────────────────── */

.faq-item { border-bottom: 1px solid var(--gray-light); padding: 1rem 0; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+ "; color: var(--gold); font-weight: 700; }
.faq-item[open] summary::before { content: "- "; }
.faq-item p { margin-top: .5rem; color: var(--gray-dark); }

/* ── Buttons / forms ─────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: .6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); text-decoration: none; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); text-decoration: none; }

/* ── Admin-specific ──────────────────────────────────────────── */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}

.cap-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  font-size: .85rem;
  border: 1px solid var(--gray-light);
  background: var(--white);
}

.cap-chip .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-free { background: var(--green); }
.dot-season { background: var(--blue); }
.dot-navigator { background: var(--gold); }
.dot-tactician { background: var(--red); }

.layer-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.layer-badge.l1 { background: #e8f5e9; color: #2e7d32; }
.layer-badge.l2 { background: #fff3e0; color: #e65100; }
.layer-badge.l3 { background: #e3f2fd; color: #1565c0; }

/* ── Utility ─────────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-muted { color: var(--gray); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.75rem; }
  .hero .subtitle { font-size: 1rem; }
  .section h2 { font-size: 1.35rem; }
}
