/* ──────────────────────────────────────────────────────────────────────
 * site-chrome.css
 *
 * Canonical styling for the site header + footer shared across the
 * React landing/legal pages AND the statically-generated SEO pages
 * (served from /var/www/readysetlaunch.ai/ via the seo_generator
 * Jinja templates). Keep this file the single source of truth —
 * both sides link to it at /site-chrome.css.
 * ────────────────────────────────────────────────────────────────────── */

:root {
  --rsl-space-black:  #0B0F14;
  --rsl-deep-slate:   #11161D;
  --rsl-panel:        rgba(17, 22, 29, 0.95);
  --rsl-panel-border: rgba(148, 163, 184, 0.12);
  --rsl-panel-border-strong: rgba(148, 163, 184, 0.28);

  --rsl-slate-100: #F1F5F9;
  --rsl-slate-200: #E2E8F0;
  --rsl-slate-300: #CBD5E1;
  --rsl-slate-400: #94A3B8;
  --rsl-slate-500: #64748B;

  --rsl-sky-300:  #7DD3FC;
  --rsl-sky-400:  #38BDF8;
  --rsl-sky-500:  #0EA5E9;
  --rsl-sky-600:  #0284C7;
}

/* ── Header ─────────────────────────────────────────────────────────── */
header.site {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 20, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 50;
}
header.site .site-chrome-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.site .brand {
  flex-shrink: 0;
  transition: opacity 0.2s ease;
  text-decoration: none;
  line-height: 0;
}
header.site .brand:hover { opacity: 0.8; }
header.site .brand img {
  height: 20px;
  width: auto;
  display: block;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
nav.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
/* Top-level nav items only (direct children). Dropdown menu items are
   styled separately below and must NOT inherit this padding: 0 reset. */
nav.site-nav > a,
nav.site-nav > .nav-dropdown > .nav-dropdown-trigger {
  font-family: "Geist", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 500;
  color: var(--rsl-slate-400);
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}
nav.site-nav > a:hover,
nav.site-nav > .nav-dropdown > .nav-dropdown-trigger:hover { color: #fff; }

/* ── Cases dropdown (CSS-only; open on hover + focus-within) ────────── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-dropdown-trigger .caret {
  display: inline-flex;
  align-items: center;
  color: var(--rsl-slate-500);
  transition: transform 0.2s ease, color 0.2s ease;
}
.nav-dropdown-trigger .caret svg {
  width: 14px;
  height: 14px;
  display: block;
}
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger { color: #fff; }
.nav-dropdown:hover .nav-dropdown-trigger .caret,
.nav-dropdown:focus-within .nav-dropdown-trigger .caret {
  color: var(--rsl-sky-400);
  transform: rotate(180deg);
}
/* Invisible bridge so the cursor can cross the gap without closing the menu */
.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -8px;
  right: -8px;
  height: 14px;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 480px;
  padding: 18px 14px;
  background: rgba(11, 15, 20, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.44);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 22px;
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown-group-label {
  padding: 4px 10px 8px;
  margin: 0;
  font-family: "Geist Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 600;
  color: var(--rsl-slate-500);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  margin-bottom: 4px;
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 10px;
  font-family: "Geist", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 500;
  color: var(--rsl-slate-300);
  text-decoration: none;
  border-radius: 0;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-menu a:hover {
  background: rgba(14, 165, 233, 0.12);
  color: #fff;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  min-height: 36px;
  background: rgba(14, 165, 233, 0.06);
  color: var(--rsl-sky-300);
  text-decoration: none;
  font-family: "Geist", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
}
.header-cta:hover {
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(56, 189, 248, 0.7);
  color: #BAE6FD;
  text-decoration: none;
}

/* Mobile menu toggle — hidden on desktop, shown < 768px */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--rsl-slate-400);
  cursor: pointer;
  transition: color 0.2s ease;
}
.mobile-menu-toggle:hover { color: #fff; }
.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 20, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.mobile-nav.open { display: block; }
.mobile-nav .mobile-nav-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* Scope to DIRECT children of the inner panel only. A blanket
   `.mobile-nav a, .mobile-nav button` (0,1,1) beats single-class
   Tailwind utilities (0,1,0) and silently clobbers the GlowButton CTA
   nested inside `.mobile-cta-wrap` — stripping its background, border,
   and padding. Same cascading-descendant trap as the old nav/footer
   bugs. */
.mobile-nav-inner > a,
.mobile-nav-inner > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border-radius: 0;
  font-family: "Geist", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
  font-weight: 500;
  color: var(--rsl-slate-400);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.mobile-nav-inner > a:hover,
.mobile-nav-inner > button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.mobile-nav .mobile-submenu {
  padding-left: 16px;
  display: none;
}
.mobile-nav .mobile-submenu.open { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav .mobile-submenu a { font-size: 13px; padding: 8px 12px; }
.mobile-nav .mobile-submenu-group-label {
  font-family: "Geist Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 600;
  color: var(--rsl-slate-500);
  padding: 12px 12px 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.mobile-nav .mobile-submenu-group-label:first-child {
  border-top: none;
  padding-top: 8px;
}
.mobile-nav .mobile-caret {
  transition: transform 0.2s ease, color 0.2s ease;
  color: var(--rsl-slate-500);
  font-size: 10px;
}
.mobile-nav .mobile-caret.open {
  transform: rotate(180deg);
  color: var(--rsl-sky-400);
}
.mobile-nav .mobile-cta-wrap {
  padding: 8px 12px 4px;
}

@media (max-width: 768px) {
  nav.site-nav { display: none; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  /* Hide the desktop CTA on mobile — the burger is the only action in the
     header; the CTA re-appears inside the mobile nav panel via
     .mobile-cta-wrap .header-cta. Scoped to direct children of .header-actions
     so it does not hide the mobile-nav CTA. */
  .header-actions > .header-cta { display: none; }
  /* Smaller CTA padding inside the mobile nav panel. */
  .mobile-cta-wrap .header-cta {
    padding: 7px 12px;
    font-size: 11px;
  }
}

/* ── Footer ─────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  padding: 48px 0;
  color: var(--rsl-slate-400);
  font-size: 14px;
}
@media (min-width: 768px) {
  footer.site { padding: 64px 0; }
}
footer.site .site-chrome-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
}
/* Scope the paragraph reset narrowly. A blanket `footer.site p { margin: 0 }`
   has specificity (0,1,2) which beats single-class selectors like
   `.footer-col-title` (0,1,0) and silently erases their margins. Target only
   the paragraphs that actually need a reset. */
.footer-bottom > p { margin: 0; color: var(--rsl-slate-400); }
/* Same cascading-descendant trap as the old `nav.site-nav a` rule we
   already fixed: `footer.site a` (0,1,1) beats single-class selectors
   and would clobber any classed anchor dropped into the footer (e.g. a
   future `.header-cta` in `.footer-bottom`). Scope to the column nav
   links where these defaults are actually wanted. The brand anchor has
   its own `.footer-brand-col .brand` rule and is image-only (no colour
   needed). */
.footer-col nav a {
  color: var(--rsl-slate-400);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col nav a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 40px;
  }
}
.footer-brand-col { grid-column: span 2; }
@media (min-width: 768px) {
  .footer-brand-col { grid-column: span 1; }
}
.footer-brand-col .brand {
  text-decoration: none;
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease;
}
.footer-brand-col .brand:hover { opacity: 0.8; }
.footer-brand-col img {
  height: 16px;
  width: auto;
  display: block;
}
.footer-brand-col .tagline {
  margin-top: 12px;
  font-size: 14px;
  color: var(--rsl-slate-400);
  line-height: 1.6;
}
.footer-col-title {
  font-family: "Geist", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rsl-slate-200);
  margin: 0 0 24px;
}
.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col nav a { font-size: 14px; }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
/* Direct-child scope. `.footer-bottom button` (0,1,1) would clobber any
   classed button dropped in here (e.g. a `.header-cta`). Only target the
   copyright paragraph and the cookie preferences text-button. */
.footer-bottom > p,
.footer-bottom > button {
  font-size: 12px;
  color: var(--rsl-slate-400);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: color 0.2s ease;
}
.footer-bottom > button:hover { color: var(--rsl-slate-300); }
@media (min-width: 640px) {
  .footer-bottom > button { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  header.site *,
  header.site *::before,
  header.site *::after,
  footer.site *,
  footer.site *::before,
  footer.site *::after {
    transition: none !important;
  }
}
