/* ==========================================================
   Montana Court Company — Design System
   Colors: Charcoal / White / Court Blue / Lime accent
   Type: Space Grotesk (display) + Inter (body)
   ========================================================== */
:root {
  --charcoal: #181c20;
  --charcoal-2: #22282e;
  --charcoal-3: #2d343c;
  --white: #fafaf7;
  --paper: #f3f3ee;
  --blue: #1b5fa8;
  --blue-deep: #14477e;
  --lime: #c6f32e;
  --lime-dark: #a8d31a;
  --ink: #23282d;
  --muted: #5c6670;
  --line: #e3e3da;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(24, 28, 32, 0.12);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--charcoal);
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.22rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-dark { background: var(--charcoal); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #c8cdd2; }
.section-paper { background: var(--paper); }

.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}
.kicker::before { content: ""; width: 26px; height: 3px; background: var(--lime); border-radius: 2px; }
.section-dark .kicker { color: var(--lime); }

.lead { font-size: 1.13rem; color: var(--muted); max-width: 68ch; }
.section-dark .lead { color: #b6bdc4; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 15px 30px; border-radius: 10px; border: 0; cursor: pointer;
  text-decoration: none !important; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lime { background: var(--lime); color: var(--charcoal); box-shadow: 0 6px 24px rgba(198, 243, 46, 0.35); }
.btn-lime:hover { background: var(--lime-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(250,250,247,0.35); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; border-radius: 8px; }

/* ---------- Header ---------- */
.topbar {
  background: var(--charcoal); color: #aeb6bd;
  font-size: 0.82rem; padding: 7px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar a { color: var(--lime); font-weight: 600; }
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 74px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none !important; }
.logo-mark { width: 40px; height: 40px; flex: 0 0 40px; }
.logo-lockup { height: 46px; width: auto; display: block; }
.logo-icononly { height: 42px; width: auto; display: none; }
.logo-chip { background: var(--white); border-radius: 9px; padding: 6px 9px; display: inline-flex; align-items: center; }
.logo-chip img { display: block; height: 34px; width: auto; }
@media (max-width: 480px) {
  .logo-lockup { display: none; }
  .logo-icononly { display: block; }
}
.logo-text { display: inline-flex; flex-direction: column; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; line-height: 1.15; color: var(--charcoal); letter-spacing: -0.01em; }
.logo-text small { display: block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav > a { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; color: var(--charcoal); text-decoration: none !important; }
.nav > a:hover { color: var(--blue); }
.nav .btn { margin-left: 6px; }
.header-phone { font-family: var(--font-display); font-weight: 700; color: var(--charcoal) !important; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--charcoal); margin: 5px 0; border-radius: 2px; }

/* dropdown */
.dropdown { position: relative; }
.dropdown > a::after { content: " ▾"; font-size: 0.7em; }
.dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 10px; min-width: 480px;
  display: none; grid-template-columns: 1fr 1fr; gap: 2px;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: grid; }
.dropdown-menu a {
  display: block; padding: 9px 14px; border-radius: 8px;
  font-size: 0.92rem; color: var(--ink); text-decoration: none !important;
}
.dropdown-menu a:hover { background: var(--paper); color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--charcoal) 0%, #1d2b38 55%, var(--blue-deep) 130%);
  color: var(--white);
}
.hero .wrap { position: relative; z-index: 2; padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(64px, 9vw, 128px); }
.hero--photo {
  background: linear-gradient(105deg, rgba(20,23,26,0.94) 0%, rgba(20,23,26,0.80) 42%, rgba(20,23,26,0.40) 100%),
              url("/assets/img/hero/court-hero.webp");
  background-size: cover; background-position: center;
}
.hero--photo .hero-court { display: none; }
@media (max-width: 640px) {
  .hero--photo {
    background: linear-gradient(180deg, rgba(20,23,26,0.80) 0%, rgba(20,23,26,0.88) 100%),
                url("/assets/img/hero/court-hero.webp");
    background-size: cover; background-position: center;
  }
}
.hero h1 { color: var(--white); max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero .lead { color: #c4ccd3; margin: 22px 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-court {
  position: absolute; right: -140px; top: 50%; transform: translateY(-50%) rotate(8deg);
  width: 620px; opacity: 0.16; z-index: 1; pointer-events: none;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 42px; }
.hero-badges div { display: flex; align-items: center; gap: 9px; font-size: 0.88rem; color: #aeb6bd; font-family: var(--font-display); font-weight: 500; }
.hero-badges svg { width: 18px; height: 18px; flex: 0 0 18px; }

/* breadcrumbs */
.breadcrumbs { font-size: 0.82rem; color: #8b949c; margin-bottom: 22px; }
.breadcrumbs a { color: #aeb6bd; }
.hero-light .breadcrumbs, .hero-light .breadcrumbs a { color: var(--muted); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .icon {
  width: 46px; height: 46px; border-radius: 11px; background: var(--charcoal);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
a.card { text-decoration: none !important; display: block; }
a.card .cardlink { font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; color: var(--blue); margin-top: 14px; display: inline-block; }

/* numbered process */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 74px; margin-bottom: 30px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--charcoal); background: var(--lime);
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: 5px; }
.step p { color: var(--muted); }

/* stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats b { display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; color: var(--lime); }
.stats span { font-size: 0.86rem; color: #aeb6bd; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-display); }

/* reviews */
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.review .stars { color: #f5b301; letter-spacing: 2px; font-size: 0.95rem; margin-bottom: 12px; }
.review p { font-size: 0.97rem; color: var(--ink); }
.review footer { margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; color: var(--muted); }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 4px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--charcoal);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--blue); font-weight: 400; transition: transform 0.2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq div { padding: 0 4px 22px; color: var(--muted); max-width: 75ch; }

/* gallery placeholders */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ph {
  border-radius: var(--radius); aspect-ratio: 4/3; overflow: hidden; position: relative;
  display: flex; align-items: flex-end; padding: 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: rgba(250,250,247,0.92);
}
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(24,28,32,0.55)); }
.ph span { position: relative; z-index: 2; }
.ph-1 { background: linear-gradient(135deg, #1b5fa8, #14477e); }
.ph-2 { background: linear-gradient(135deg, #2d343c, #181c20); }
.ph-3 { background: linear-gradient(135deg, #3d7ec2, #1b5fa8); }
.ph-4 { background: linear-gradient(135deg, #22282e, #14477e); }
.ph-5 { background: linear-gradient(135deg, #14477e, #181c20); }
.ph-6 { background: linear-gradient(135deg, #1b5fa8, #2d343c); }
.ph .court-lines { position: absolute; inset: 0; opacity: 0.35; }

/* ---------- Quote form ---------- */
.quote-panel {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 44px); border-top: 5px solid var(--lime);
}
.quote-panel h2 { margin-bottom: 6px; }
.quote-panel .sub { color: var(--muted); margin-bottom: 26px; font-size: 0.98rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.84rem; margin-bottom: 6px; color: var(--charcoal); }
input, select, textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 9px;
  font-family: var(--font-body); font-size: 0.97rem; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,95,168,0.14); }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue-deep), var(--blue)); border-radius: 22px; padding: clamp(36px, 6vw, 64px); color: #fff; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-band p { color: #cfe0f2; margin: 14px 0 26px; max-width: 55ch; }
.cta-band .court-lines { position: absolute; right: -60px; top: -40px; width: 340px; opacity: 0.18; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #9aa3ab; padding: 70px 0 0; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.site-footer h4 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #9aa3ab; display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--lime); text-decoration: none; }
.footer-bottom { border-top: 1px solid #2d343c; padding: 20px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: #6d767e; }
.footer-brand .logo-text { color: var(--white); }
.footer-brand p { margin-top: 14px; max-width: 34ch; }
.trust-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.trust-chips span { border: 1px solid #3a424b; border-radius: 100px; padding: 5px 13px; font-size: 0.74rem; font-family: var(--font-display); font-weight: 500; color: #aeb6bd; }

/* ---------- Sticky mobile bar ---------- */
.sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  display: none; grid-template-columns: 1fr 1fr;
  box-shadow: 0 -8px 30px rgba(24,28,32,0.25);
}
.sticky-bar a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  text-decoration: none !important;
}
.sticky-bar .call { background: var(--charcoal); color: var(--white); }
.sticky-bar .quote { background: var(--lime); color: var(--charcoal); }

/* desktop floating quote button */
.float-quote {
  position: fixed; right: 26px; bottom: 26px; z-index: 70;
  box-shadow: 0 10px 34px rgba(24,28,32,0.3);
}

/* exit intent */
.exit-modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; background: rgba(24,28,32,0.7); padding: 20px;
}
.exit-modal.open { display: flex; }
.exit-card { background: #fff; border-radius: 18px; max-width: 480px; padding: 40px; position: relative; text-align: center; border-top: 6px solid var(--lime); }
.exit-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.exit-card p { color: var(--muted); margin-bottom: 22px; }
.exit-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }

/* two-col layout */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.sticky-side { position: sticky; top: 100px; }

/* misc */
.checklist { list-style: none; }
.checklist li { padding: 9px 0 9px 34px; position: relative; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 20px; height: 20px;
  background: var(--lime); border-radius: 6px;
  clip-path: none;
}
.checklist li::after {
  content: ""; position: absolute; left: 5px; top: 17px; width: 10px; height: 6px;
  border-left: 2.5px solid var(--charcoal); border-bottom: 2.5px solid var(--charcoal); transform: rotate(-45deg);
}
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-row a {
  border: 1.5px solid var(--line); background: #fff; border-radius: 100px;
  padding: 9px 18px; font-family: var(--font-display); font-weight: 500; font-size: 0.88rem;
  color: var(--ink); text-decoration: none !important;
}
.pill-row a:hover { border-color: var(--blue); color: var(--blue); }
.map-band { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-band svg { width: 100%; height: auto; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .nav { display: none; position: absolute; top: 74px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: stretch; padding: 18px 22px 26px; gap: 4px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav > a { padding: 11px 4px; font-size: 1.05rem; }
  .dropdown-menu { position: static; transform: none; display: grid; min-width: 0; border: 0; box-shadow: none; padding: 0 0 6px 14px; }
  .dropdown > a::after { content: ""; }
  .nav-toggle { display: block; }
  .header-phone { display: none; }
  .hero-court { display: none; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sticky-bar { display: grid; }
  .float-quote { display: none; }
  body { padding-bottom: 58px; }
  .topbar .wrap { justify-content: center; }
  .topbar .tb-left { display: none; }
}
