/*
 * site-chrome.css — shared styles for AI Growth Genie nav + footer + consent modal.
 *
 * Loaded by every page via <link rel="stylesheet" href="/site-chrome.css">.
 * Markup injected at runtime by /site-chrome.js into <div data-chrome="header">
 * and <div data-chrome="footer"> placeholders.
 *
 * Brand tokens at the top so every page inherits them. Edit once, propagate
 * site-wide.
 */

:root {
  /* Surfaces */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f5f5f7;

  /* Text */
  --text: #0f172a;
  --text-2: #52526a;
  --text-3: #8a8a9a;

  /* Borders */
  --border: rgba(15, 23, 42, 0.08);
  --border-2: rgba(15, 23, 42, 0.16);

  /* Accent (AI Growth Genie indigo, consolidated from widgets) */
  --accent: #4f46e5;
  --accent-deep: #4338ca;
  --accent-soft: #eef2ff;
  --accent-dim: #64748b;

  /* Hero gradient (signature) */
  --gradient-from: #0055FF;
  --gradient-to: #00C6FF;

  /* Type */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Page baseline */
html { box-sizing: border-box; scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--sans); letter-spacing: -0.015em; line-height: 1.18; margin: 0; }
p { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* ---- HEADER (fixed, blurred-on-scroll) ---- */
.header-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s, transform 0.3s;
}
.header-wrap.scrolled {
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom-color: rgba(15, 23, 42, 0.05);
}
header {
  max-width: 1320px; margin: 0 auto;
  height: 72px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo { height: 28px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.nav-cta) {
  font-size: 0.92rem; font-weight: 500;
  color: var(--text-2); letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-links a.is-current { color: var(--accent); }

.nav-cta {
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 10px 18px;
  background: var(--text);
  color: #ffffff;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

/* ---- FOOTER ---- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 80px 0 36px;
}
.footer-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer-brand-mark { height: 28px; width: auto; display: block; margin-bottom: 20px; }
.footer-brand-line {
  font-size: 1rem; line-height: 1.6; font-weight: 500;
  color: var(--text-2); max-width: 380px; margin: 0;
}
.footer-entity {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-3); letter-spacing: 0.04em;
  margin-top: 24px;
}
.footer-col-label {
  font-size: 0.72rem; font-weight: 700;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col li:last-child { margin-bottom: 0; }
.footer-col a {
  font-size: 0.94rem; line-height: 1.5; font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.footer-col a:hover { color: var(--accent); }
.footer-col-arrow { font-size: 0.78rem; opacity: 0.7; transition: transform 0.2s ease; }
.footer-col a:hover .footer-col-arrow { transform: translateX(2px); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; gap: 24px; flex-wrap: wrap;
  font-size: 0.84rem; color: var(--text-3);
}
.footer-bottom-copyright { font-weight: 500; letter-spacing: 0.01em; }
.footer-legal {
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap; font-weight: 500;
}
.footer-legal a { color: var(--text-3); transition: color 0.2s ease; }
.footer-legal a:hover { color: var(--accent); }
.footer-legal-sep { color: var(--text-3); opacity: 0.45; padding: 0 4px; }

/* ---- BUTTONS (shared, used across pages) ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  padding: 14px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.22);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-gradient {
  background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to));
  color: #ffffff; border-color: transparent;
  box-shadow: 0 6px 20px rgba(0, 85, 255, 0.28);
}
.btn-gradient:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0, 85, 255, 0.34); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  header { padding: 0 20px; height: 60px; }
  .header-logo { height: 22px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-cta { padding: 8px 14px; font-size: 0.86rem; border-radius: 6px; }

  footer { padding: 56px 0 28px; }
  .footer-inner { padding: 0 20px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 32px;
  }
  .footer-brand-mark { height: 24px; margin-bottom: 16px; }
  .footer-brand-line { font-size: 0.96rem; max-width: none; }
  .footer-entity { margin-top: 20px; font-size: 0.76rem; }
  .footer-col-label { margin-bottom: 16px; font-size: 0.7rem; }
  .footer-col li { margin-bottom: 10px; }
  .footer-col a { font-size: 0.92rem; }
  .footer-bottom {
    flex-direction: column; align-items: flex-start;
    gap: 12px; padding-top: 20px; font-size: 0.78rem;
  }
}

/* ---- COOKIE CONSENT MODAL ---- */
.consent-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 32, 0.62);
  backdrop-filter: blur(6px) saturate(1.2);
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.consent-overlay[hidden] { display: none; }
.consent-overlay.is-visible { opacity: 1; }
.consent-modal {
  position: relative;
  width: 100%; max-width: 540px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 40px 32px;
  box-shadow: 0 24px 80px rgba(20, 20, 32, 0.18), 0 6px 24px rgba(20, 20, 32, 0.06);
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: auto;
}
.consent-overlay.is-visible .consent-modal { transform: scale(1) translateY(0); opacity: 1; }
.consent-eyebrow {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.consent-title {
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.78rem);
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 12px;
}
.consent-body {
  font-size: 0.96rem; line-height: 1.65;
  color: var(--text-2);
  margin: 0 0 24px;
}
.consent-body a {
  color: var(--accent);
  text-decoration: underline; text-underline-offset: 2px;
}
.consent-body a:hover { color: var(--text); }
.consent-categories {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}
.consent-category {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.consent-category-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 6px;
}
.consent-category-head h3 {
  font-size: 0.92rem; font-weight: 600; color: var(--text); margin: 0;
}
.consent-required {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
}
.consent-category-desc {
  font-size: 0.86rem; line-height: 1.55;
  color: var(--text-2); margin: 0;
}
.consent-toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.consent-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent-toggle-track {
  position: relative; display: inline-block;
  width: 36px; height: 20px;
  background: #d4d4dc;
  border-radius: 12px;
  transition: background 0.25s ease;
}
.consent-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.25s ease;
}
.consent-toggle input:checked + .consent-toggle-track { background: var(--accent); }
.consent-toggle input:checked + .consent-toggle-track .consent-toggle-thumb { transform: translateX(16px); }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.consent-btn {
  font-family: var(--sans);
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 12px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.consent-btn-primary { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.consent-btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.consent-btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.consent-btn-ghost:hover { border-color: var(--text-3); background: var(--surface-2); }
.consent-btn-text {
  background: transparent; color: var(--text-2); border-color: transparent;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 10px 8px;
}
.consent-btn-text:hover { color: var(--accent); }

@media (max-width: 600px) {
  .consent-overlay { padding: 16px; align-items: flex-end; }
  .consent-modal { padding: 24px 22px 22px; max-height: calc(100vh - 32px); }
  .consent-title { font-size: 1.32rem; }
  .consent-body { font-size: 0.9rem; margin-bottom: 20px; }
  .consent-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .consent-btn { width: 100%; text-align: center; padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .consent-overlay, .consent-modal { transition: opacity 0.2s ease; transform: none; }
  .consent-overlay.is-visible .consent-modal { transform: none; }
}

/* ---- SCROLL REVEAL ---- */
.r  { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.r.v{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .r { opacity: 1; transform: none; transition: none; }
}
