/* ==========================================================================
   RocketMyCity — Shared Stylesheet
   Common styles for all pages (home, HVAC, Roofing, Plumbing, etc.)
   ========================================================================== */

/* CSS Reset & Variables */
:root {
  --bg-color: #09090b;
  --surface-color: #18181b;
  --surface-hover: #27272a;
  --border-color: #27272a;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --glow: rgba(249, 115, 22, 0.15);

  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --blue: #3b82f6;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Geist', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --max-width: 1200px;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.12), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(249, 115, 22, 0.08), transparent 28%),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 60px 60px, 60px 60px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 120px 0;
  position: relative;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

h1,
h2 {
  font-family: var(--font-display);
}

h1 {
  font-size: 4rem;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.eyebrow {
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(249, 115, 22, 0.39);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--surface-color);
  border-color: var(--text-secondary);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Navigation */
nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 1180px);
  z-index: 100;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 30px rgba(249, 115, 22, 0.08);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

/* Elevated state toggled by main.js on scroll */
nav.is-scrolled {
  background: rgba(10, 10, 10, 0.94);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 40px rgba(249, 115, 22, 0.14);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  max-width: none;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-actions {
  display: flex;
  gap: 24px;
  align-items: center;
}

/* Glow Effects */
.glow-bg {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
}

/* Cards */
.card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  transition:
    transform 0.3s,
    border-color 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.5);
}

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

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

/* Dashboard/Browser Mockup */
.mockup {
  background: linear-gradient(180deg, #0b0b0d 0%, #030303 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 80px -28px rgba(249, 115, 22, 0.18);
  margin-top: 64px;
}

.mockup-header {
  background: var(--surface-color);
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
}

.dot:nth-child(1) {
  background: #ef4444;
}
.dot:nth-child(2) {
  background: #eab308;
}
.dot:nth-child(3) {
  background: #22c55e;
}

.mockup-body {
  padding: 32px;
  background: #000;
}

/* Geo-Grid Heatmap */
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: fit-content;
}

.heatmap span {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: block;
}

.bg-green {
  background-color: var(--green);
}
.bg-yellow {
  background-color: var(--yellow);
}
.bg-red {
  background-color: var(--red);
}
.bg-blue {
  background-color: var(--blue);
}

/* Specific Sections */
.hero {
  padding-top: 180px;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 24px;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 1.25rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.microcopy {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.powered-line {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: #d4d4d8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Search Chips */
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.chip {
  padding: 12px 20px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.callout {
  margin-top: 48px;
  padding: 24px;
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, var(--surface-color), transparent);
  font-size: 1.25rem;
  font-weight: 500;
}

/* Split Panel */
.split-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

ul.check-list {
  list-style: none;
  margin-top: 32px;
}

ul.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

ul.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Pricing */
.pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-card h3 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}
.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.pricing-price span {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.pricing-card ul {
  flex-grow: 1;
  margin-bottom: 32px;
}

.popular {
  border-color: var(--accent);
  position: relative;
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* FAQ */
details {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

summary {
  padding: 24px;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.5rem;
}

details[open] summary::after {
  content: '−';
}

details p {
  padding: 0 24px 24px;
  margin: 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px;
  background: var(--surface-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 24px;
  color: #fff;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col a {
  color: var(--text-secondary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.offer-bundle {
  margin: 28px auto 0;
  max-width: 1080px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.offer-bundle-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.offer-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.offer-node {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 20px;
}

.offer-node-number {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 115, 22, 0.14);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}

.visual-note {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.03));
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 18px;
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.visual-note h3 {
  margin-bottom: 14px;
}

.proof-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.proof-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.booking-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  text-align: left;
}

.booking-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75), 0 0 60px -35px rgba(249, 115, 22, 0.35);
}

.booking-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}

.booking-kpis div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px;
}

.booking-list {
  list-style: none;
  margin: 18px 0 0;
}

.booking-list li {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.booking-list li strong {
  color: #fff;
}

/* Scroll-reveal animation (progressive enhancement via main.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .grid-3,
  .split-panel,
  .offer-bundle-grid,
  .booking-panel {
    grid-template-columns: 1fr;
  }
  .offer-stack,
  .booking-kpis {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 3rem;
  }
  .hero {
    padding-top: 140px;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}
