/* ============================================================
   CourtFlow Theme — Main Stylesheet v1.0.0
   ============================================================ */

:root {
  --navy:     #1F2A44;
  --green:    #5FAF63;
  --light-bg: #F8F9FB;
  --dark-text:#1E1E1E;
  --muted:    #6B7280;
  --white:    #FFFFFF;
  --border:   #E5E7EB;
  --radius:   8px;
  --radius-sm:6px;
  --max-w:    1100px;
  --font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease:     0.2s ease;
  --shadow-s: 0 1px 3px rgba(0,0,0,0.07);
  --shadow:   0 4px 18px rgba(0,0,0,0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--dark-text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 680px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.022em;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--dark-text); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  border: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), opacity var(--ease);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover {
  background: #4fa153;
  border-color: #4fa153;
}

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

.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-s);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-logo { flex-shrink: 0; display: flex; align-items: center; }
.site-logo .custom-logo-link { display: flex; align-items: center; }
.site-logo .custom-logo { height: 36px; width: auto; display: block; }
.logo-mark {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 26px;
}
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--ease);
}
.header-nav a:hover { color: var(--navy); }

.header-cta { display: none; margin-left: auto; }

.mobile-menu-toggle {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
}
.mobile-menu-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.mobile-menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mobile-menu nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  padding: 2px 0;
}

@media (min-width: 768px) {
  .header-nav  { display: flex; }
  .header-cta  { display: block; }
  .mobile-menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ============================================================
   SECTIONS — SHARED
   ============================================================ */
section { padding: 88px 0; }

.section-title { text-align: center; margin-bottom: 16px; }
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.6;
}
.section-support {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin-top: 28px;
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   HERO
   ============================================================ */
.section-hero {
  padding-top: 140px;
  padding-bottom: 88px;
  background: var(--light-bg);
}
.section-hero .container {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero-headline { margin-bottom: 18px; }
.hero-sub {
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.55;
}
.hero-support {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; }
.mockup-phone {
  width: 260px;
  background: var(--white);
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px 18px;
}
.mockup-screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mockup-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.mockup-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.mockup-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.mockup-event {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--light-bg);
}
.mockup-event-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.mockup-event-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}
.mockup-event-meta {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mockup-event-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

@media (min-width: 900px) {
  .section-hero .container {
    grid-template-columns: 1fr 1fr;
  }
  .mockup-phone { width: 290px; }
}

/* ============================================================
   BEFORE / AFTER
   ============================================================ */
.section-before-after {
  background: var(--white);
}
.section-before-after .section-title { margin-bottom: 48px; }

.comparison-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 700px) {
  .comparison-grid { grid-template-columns: 1fr 1fr; }
}

.comparison-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.comparison-before { background: var(--white); }
.comparison-after  { background: var(--navy); border-color: var(--navy); }

.comparison-label {
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-bottom: 1px solid var(--border);
  background: #f2f3f5;
  color: var(--muted);
}
.comparison-after .comparison-label {
  background: rgba(255,255,255,0.06);
  border-bottom-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
}

.comparison-visual { padding: 20px; }

/* Before / embed mockup */
.embed-mockup {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.embed-toolbar {
  padding: 7px 10px;
  background: #efefef;
  border-bottom: 1px solid #ddd;
}
.embed-dots { display: flex; gap: 5px; }
.embed-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ccc;
}
.embed-content { padding: 12px; }
.embed-iframe-sim {
  border: 1px solid #ddd;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.embed-row {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.embed-row:last-child { border-bottom: none; }
.embed-cell {
  padding: 5px 7px;
  font-size: 10px;
  color: #777;
  border-right: 1px solid #f0f0f0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.embed-cell.wide { flex: 2.2; }
.embed-cell.tiny { flex: 0.7; font-size: 9px; }
.embed-note {
  font-size: 11px;
  color: #bbb;
  text-align: center;
}

/* After / CourtFlow mockup */
.courtflow-mockup {
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cf-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cf-filter {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}
.cf-filter.active {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.cf-event-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-s);
}
.cf-event-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 5px;
}
.cf-event-tag.tennis { color: var(--navy); }
.cf-event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 3px;
}
.cf-event-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 9px;
}
.cf-event-cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
}

.comparison-caption {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 10px 16px;
}

/* ============================================================
   WHAT IT DOES
   ============================================================ */
.section-what { background: var(--light-bg); }

.section-two-col {
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 900px) {
  .section-two-col { grid-template-columns: 1fr 1fr; }
}

.col-text h2  { margin-bottom: 18px; }
.col-text p   { color: var(--muted); margin-bottom: 14px; line-height: 1.65; }

.feature-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 500;
}
.feature-list li::before {
  content: '';
  width: 18px; height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235FAF63'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Schedule grid mockup */
.feature-grid-mockup {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.fgm-header {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.fgm-tab {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
}
.fgm-tab.active {
  background: var(--navy);
  color: var(--white);
}
.fgm-day {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.fgm-day:last-child { border-bottom: none; }
.fgm-day-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 7px;
}
.fgm-event {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.fgm-event:last-child { margin-bottom: 0; }
.fgm-event.green {
  background: rgba(95,175,99,0.1);
  color: #3c8a3f;
}
.fgm-event.navy {
  background: rgba(31,42,68,0.07);
  color: var(--navy);
}

/* ============================================================
   WHY IT MATTERS
   ============================================================ */
.section-why { background: var(--white); }
.section-why .section-title { margin-bottom: 12px; }

.why-grid {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}
@media (min-width: 640px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
}

.why-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--light-bg);
}
.why-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--navy);
  margin-bottom: 16px;
}
.why-card h3 { margin-bottom: 7px; }
.why-card p  { font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.section-how { background: var(--light-bg); }
.section-how .section-title { margin-bottom: 48px; }

.steps-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.step {
  text-align: center;
  max-width: 280px;
}
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step h3 { margin-bottom: 8px; }
.step p  { font-size: 15px; color: var(--muted); }
.step-arrow {
  font-size: 22px;
  color: var(--muted);
  display: none;
}

@media (min-width: 768px) {
  .steps-grid {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
  }
  .step-arrow { display: block; margin-top: 28px; }
}

/* ============================================================
   PRICING
   ============================================================ */
.section-pricing { background: var(--navy); }
.section-pricing .section-title { color: var(--white); }

.pricing-card {
  background: var(--white);
  border-radius: 12px;
  padding: 48px 40px;
  max-width: 460px;
  margin: 48px auto 0;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.pricing-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 28px;
}
.pricing-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
}
.pricing-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1;
}
.pricing-period { font-size: 14px; color: var(--muted); margin-top: 4px; }
.pricing-savings { font-size: 12px; font-weight: 600; color: var(--green); margin-top: 3px; }
.pricing-divider { font-size: 14px; color: var(--muted); font-weight: 500; }

.pricing-includes {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 32px;
}
.pricing-includes li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  color: var(--dark-text);
}
.pricing-includes li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
}

@media (max-width: 480px) {
  .pricing-card { padding: 32px 24px; }
  .pricing-amount { font-size: 2.4rem; }
}

/* ============================================================
   FAQ
   ============================================================ */
.section-faq { background: var(--white); }
.section-faq .section-title { margin-bottom: 48px; }

.faq-list {
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  transition: color var(--ease);
}
.faq-question:hover { color: var(--green); }
.faq-icon {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.22s ease;
  flex-shrink: 0;
  line-height: 1;
}
.faq-item.open .faq-icon  { transform: rotate(45deg); }
.faq-answer {
  padding-bottom: 20px;
}
.faq-answer p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.section-cta {
  background: var(--light-bg);
  text-align: center;
}
.section-cta h2 { margin-bottom: 32px; }

/* ============================================================
   FORM SECTION
   ============================================================ */
.section-form { background: var(--white); text-align: center; }
.section-form h2  { margin-bottom: 8px; }
.form-intro { color: var(--muted); margin-bottom: 40px; }
.form-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  color: var(--muted);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  padding: 52px 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.footer-inner .logo-mark { color: var(--white); }
.footer-brand a { display: inline-flex; align-items: center; text-decoration: none; }
.footer-logo { height: 40px; width: auto; display: block; }
.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.footer-nav a {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  transition: color var(--ease);
}
.footer-nav a:hover { color: var(--white); }
.footer-disclaimer {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  max-width: 500px;
  line-height: 1.65;
}
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.page-login-template {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  background: var(--light-bg);
}
.login-card {
  background: var(--white);
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 32px;
}
@media (max-width: 480px) {
  .login-card { padding: 32px 20px; }
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.page-legal-template {
  padding: 120px 0 88px;
}
.legal-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}
.legal-content h1 { margin-bottom: 10px; }
.legal-date {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 48px;
}
.legal-body h2 {
  font-size: 1.15rem;
  margin: 36px 0 10px;
}
.legal-body p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.72;
}
.legal-body ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

/* ============================================================
   GENERIC PAGE
   ============================================================ */
.page-template { padding: 120px 0 88px; }
.page-title { margin-bottom: 32px; }

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 480px) {
  section { padding: 64px 0; }
  .section-hero { padding-top: 100px; padding-bottom: 64px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .comparison-grid { grid-template-columns: 1fr; }
}
