/* ══════════════════════════════════════════════════════════════════
   CONTRATAR POSICIONAMIENTO SEO — DESIGN SYSTEM
   Versión rebuild 2.0 · Sustenta Web
   ══════════════════════════════════════════════════════════════════ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700;900&display=swap');

/* ══════════════════════════════════════════════════
   1. RESET & BASE
   ══════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-body);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════
   2. DESIGN TOKENS
   ══════════════════════════════════════════════════ */
:root {
  /* Brand palette */
  --brand:        #004B87;
  --brand-dark:   #00325B;
  --brand-light:  #0070CC;
  --accent:       #3B82F6;
  --emerald:      #10B981;
  --emerald-dark: #059669;
  --amber:        #F59E0B;
  --rose:         #EF4444;

  /* Neutral scale */
  --navy:         #0B1120;
  --navy-2:       #0F172A;
  --navy-3:       #1E293B;
  --slate-700:    #334155;
  --slate-500:    #64748B;
  --slate-400:    #94A3B8;
  --slate-300:    #CBD5E1;
  --slate-200:    #E2E8F0;
  --slate-100:    #F1F5F9;
  --slate-50:     #F8FAFC;
  --white:        #FFFFFF;

  /* Semantic aliases */
  --bg-base:      var(--slate-50);
  --bg-surface:   var(--white);
  --bg-dark:      var(--navy);
  --text-heading: var(--navy-2);
  --text-body:    var(--slate-700);
  --text-muted:   var(--slate-500);
  --border:       var(--slate-200);
  --border-dark:  var(--navy-3);

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Radii */
  --r-sm:  0.5rem;
  --r-md:  0.75rem;
  --r-lg:  1rem;
  --r-xl:  1.25rem;
  --r-2xl: 1.75rem;
  --r-3xl: 2.5rem;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 32px rgba(0,75,135,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-xl:  0 20px 48px rgba(0,75,135,0.14), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-dark: 0 24px 56px rgba(11,17,32,0.4), 0 4px 16px rgba(0,0,0,0.2);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:  cubic-bezier(0.64, 0, 0.78, 0);
  --t-fast: 0.15s var(--ease-out);
  --t-base: 0.25s var(--ease-out);
  --t-slow: 0.4s  var(--ease-out);
}

/* ══════════════════════════════════════════════════
   3. LAYOUT
   ══════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--sp-8); }
}

.section { padding-block: var(--sp-20); }
.section-sm { padding-block: var(--sp-12); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ══════════════════════════════════════════════════
   4. TYPOGRAPHY
   ══════════════════════════════════════════════════ */
.display-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-heading);
  margin-bottom: var(--sp-4);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════
   5. UTILITY HELPERS
   ══════════════════════════════════════════════════ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.max-w-lg { max-width: 38rem; }
.max-w-xl { max-width: 44rem; }
.max-w-2xl { max-width: 52rem; }
.max-w-3xl { max-width: 60rem; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.z-10 { z-index: 10; }

/* ══════════════════════════════════════════════════
   6. HEADER & NAV
   ══════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 4.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-base), box-shadow var(--t-base);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.logo-img { height: 2rem; width: auto; object-fit: contain; }

.nav-links {
  display: none;
  align-items: center;
  gap: var(--sp-6);
}
@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: var(--sp-2) var(--sp-1);
  position: relative;
  transition: color var(--t-fast);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.nav-link:hover { color: var(--brand); }
.nav-link:hover::after { transform: scaleX(1); }

/* Mobile hamburger */
.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1.125rem;
  z-index: 210;
}
@media (min-width: 1024px) { .menu-btn { display: none; } }

.menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-fast);
}
.menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,17,32,0.5);
  backdrop-filter: blur(2px);
  z-index: 180;
  opacity: 0;
  transition: opacity var(--t-base);
}
.nav-backdrop.visible { display: block; opacity: 1; }

.mobile-nav {
  position: fixed;
  top: 4.5rem;
  right: 0;
  bottom: 0;
  width: min(80vw, 320px);
  background: var(--bg-surface);
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  transform: translateX(110%);
  transition: transform var(--t-slow);
  z-index: 190;
  box-shadow: var(--shadow-xl);
  border-left: 1px solid var(--border);
}
.mobile-nav.open { transform: translateX(0); }

.mobile-nav .nav-link {
  font-size: 1.05rem;
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-heading);
}
.mobile-nav .nav-link:last-child { border-bottom: none; }

/* ══════════════════════════════════════════════════
   7. BUTTONS
   ══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.8125rem 1.75rem;
  border-radius: var(--r-lg);
  transition: all var(--t-base);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,75,135,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,75,135,0.4);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}
.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16,185,129,0.4);
}

.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-heading);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--slate-100);
  border-color: var(--slate-300);
  transform: translateY(-1px);
}

.btn-sm { padding: 0.5rem 1.125rem; font-size: 0.8125rem; border-radius: var(--r-md); }
.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; border-radius: var(--r-xl); }

/* ══════════════════════════════════════════════════
   8. HERO SECTION
   ══════════════════════════════════════════════════ */
.hero {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  padding-block: var(--sp-24);
}
@media (min-width: 768px) { .hero { padding-block: 7rem; } }

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(59,130,246,0.12) 0%, transparent 70%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -5%;
  width: 50%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(16,185,129,0.07) 0%, transparent 65%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: #93C5FD;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-6);
}
.hero-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.01em;
}
.hero-h1 .accent { color: #60A5FA; }
.hero-h1 .accent-green { color: #34D399; }

.hero-sub {
  font-size: 1.0625rem;
  color: #94A3B8;
  line-height: 1.75;
  margin-bottom: var(--sp-8);
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.hero-stats {
  display: flex;
  gap: var(--sp-6);
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.hero-stat-label {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 500;
}

/* Hero Widget / Dashboard mockup */
.hero-widget {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-2xl);
  padding: var(--sp-6);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-dark);
  animation: float-widget 6s ease-in-out infinite;
}

@keyframes float-widget {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.widget-dots { display: flex; gap: 6px; }
.widget-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.widget-metric-big {
  background: rgba(11,17,32,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
}
.metric-value {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--white);
}
.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  margin-bottom: var(--sp-1);
  font-weight: 600;
}
.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16,185,129,0.12);
  color: #34D399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.widget-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
.widget-metric-sm {
  background: rgba(11,17,32,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.metric-value-sm {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--white);
  margin-top: var(--sp-1);
}

/* ══════════════════════════════════════════════════
   9. TICKER
   ══════════════════════════════════════════════════ */
.ticker-wrap {
  overflow: hidden;
  background: #060C18;
  padding-block: var(--sp-4);
  border-block: 1px solid var(--border-dark);
}
.ticker {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}
.ticker:hover { animation-play-state: paused; }

.ticker-item {
  padding-inline: var(--sp-8);
  color: var(--slate-400);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  white-space: nowrap;
}
.ticker-dot {
  width: 5px; height: 5px;
  background: var(--emerald);
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════
   10. BENEFITS / FEATURE CARDS
   ══════════════════════════════════════════════════ */
.card {
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #C7D9F0;
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-5);
  flex-shrink: 0;
}
.card-icon-brand {
  background: linear-gradient(135deg, rgba(0,75,135,0.12), rgba(0,75,135,0.06));
  color: var(--brand);
}
.card-icon-emerald {
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06));
  color: var(--emerald);
}
.card-icon-amber {
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.06));
  color: var(--amber);
}

.card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-3);
  line-height: 1.35;
}
.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Tool cards (glass effect on dark bg) */
.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0,75,135,0.04));
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #BFD4EE;
}

.tool-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  background: rgba(0,75,135,0.08);
  padding: 4px 10px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-4);
}

/* ══════════════════════════════════════════════════
   11. PROCESS STEPS
   ══════════════════════════════════════════════════ */
.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  position: relative;
}
@media (min-width: 768px) {
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
  }
  .process-grid::before {
    content: '';
    position: absolute;
    top: 2rem;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--emerald));
    z-index: 0;
    opacity: 0.3;
  }
}

.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
}

.step-number {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
  box-shadow: 0 4px 20px rgba(0,75,135,0.3);
  position: relative;
  z-index: 2;
  transition: transform var(--t-base);
}
.process-step:hover .step-number {
  transform: scale(1.1);
}

.step-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-2);
}
.step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════
   12. DIAGNÓSTICO SEO WIDGET
   ══════════════════════════════════════════════════ */
.diag-wrapper {
  background: var(--bg-surface);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}

.diag-header {
  background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy-3) 100%);
  padding: var(--sp-6) var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.diag-header-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.diag-header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}
.diag-header p {
  font-size: 0.8rem;
  color: var(--slate-400);
}

.diag-layout {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .diag-layout {
    grid-template-columns: 1.4fr 1fr;
  }
}

.diag-body {
  padding: var(--sp-6) var(--sp-8);
}
.diag-legend {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.diag-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.diag-label {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--t-base);
  user-select: none;
}
.diag-label:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
}
.diag-label.checked {
  border-color: rgba(16,185,129,0.35);
  background: rgba(16,185,129,0.04);
}

.diag-check-box {
  position: relative;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.diag-check {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}
.diag-check-custom {
  width: 100%; height: 100%;
  border: 2px solid var(--slate-300);
  border-radius: 5px;
  background: var(--white);
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.diag-check:checked + .diag-check-custom {
  background: var(--emerald);
  border-color: var(--emerald);
}
.diag-check:checked + .diag-check-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.diag-text-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.4;
  margin-bottom: 2px;
}
.diag-text-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Sidebar results */
.diag-sidebar {
  background: var(--slate-50);
  border-left: 1px solid var(--border);
  padding: var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
@media (max-width: 899px) {
  .diag-sidebar { border-left: none; border-top: 1px solid var(--border); }
}

.diag-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.progress-ring {
  transform: rotate(-90deg);
  transform-origin: center;
  filter: drop-shadow(0 4px 12px rgba(0,75,135,0.12));
}
#risk-ring {
  transition: stroke-dashoffset 0.45s var(--ease-out), stroke 0.35s ease;
}
.ring-label-center {
  text-align: center;
}
.ring-score {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1;
}
.ring-score-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

#risk-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  min-height: 1.25rem;
}

.risk-bar-track {
  height: 8px;
  background: var(--slate-200);
  border-radius: var(--r-full);
  overflow: hidden;
}
.risk-bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--text-muted);
  transition: width 0.45s var(--ease-out), background-color 0.35s ease;
}

.diag-levels {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.diag-level-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.diag-level-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* CTA Reveal */
.diag-cta {
  animation: fade-up 0.4s var(--ease-out) forwards;
}
.diag-cta-inner {
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  border: 1.5px solid rgba(16,185,129,0.25);
  background: rgba(16,185,129,0.05);
  text-align: center;
}
.cta-alert-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: var(--sp-3);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}
#cta-headline {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-2);
}
#cta-body {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   13. FAQ ACCORDION
   ══════════════════════════════════════════════════ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.faq-item {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.faq-item:hover { border-color: var(--slate-300); }
.faq-item.open {
  border-color: rgba(0,75,135,0.25);
  box-shadow: var(--shadow-sm);
}

.faq-trigger {
  width: 100%;
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-heading);
  text-align: left;
  transition: color var(--t-fast);
}
.faq-trigger:hover { color: var(--brand); }

.faq-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--t-base);
}
.faq-item.open .faq-icon {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out);
}
.faq-content-inner {
  padding: 0 var(--sp-6) var(--sp-5);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
}

/* ══════════════════════════════════════════════════
   14. CONTACT FORM
   ══════════════════════════════════════════════════ */
.contact-card {
  background: var(--bg-surface);
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-10);
}
@media (max-width: 640px) { .contact-card { padding: var(--sp-6); } }

.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }

.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-heading);
}
.required-mark { color: var(--rose); margin-left: 2px; }

.form-input {
  width: 100%;
  padding: 0.75rem var(--sp-4);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--slate-50);
  font-size: 0.9rem;
  color: var(--text-heading);
  transition: all var(--t-base);
  line-height: 1.5;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(0,75,135,0.08);
}
.form-input::placeholder { color: var(--slate-400); }

textarea.form-input { resize: vertical; min-height: 100px; }

/* ══════════════════════════════════════════════════
   15. FOOTER
   ══════════════════════════════════════════════════ */
.footer {
  background: var(--navy);
  color: var(--slate-400);
  border-top: 1px solid var(--border-dark);
  padding-top: var(--sp-20);
  padding-bottom: var(--sp-10);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.footer-logo { height: 2rem; width: auto; object-fit: contain; }
.footer-desc { font-size: 0.8125rem; line-height: 1.75; margin-block: var(--sp-4); }
.footer-contact { font-size: 0.8rem; line-height: 1.9; }
.footer-contact strong { color: var(--slate-300); }

.footer-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-300);
  margin-bottom: var(--sp-4);
}
.footer-links { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-link {
  font-size: 0.8125rem;
  color: var(--slate-400);
  transition: color var(--t-fast);
}
.footer-link:hover { color: var(--white); }

.footer-divider {
  border: none;
  border-top: 1px solid var(--border-dark);
  margin-bottom: var(--sp-6);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.8rem;
}

/* City quick links */
.city-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.city-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--slate-400);
  border: 1px solid var(--border-dark);
  padding: 3px 10px;
  border-radius: var(--r-full);
  transition: all var(--t-fast);
}
.city-pill:hover { color: var(--white); border-color: var(--slate-500); background: rgba(255,255,255,0.05); }
.city-pill.active { color: #60A5FA; border-color: rgba(96,165,250,0.3); }

/* ══════════════════════════════════════════════════
   16. ANIMATIONS & REVEAL
   ══════════════════════════════════════════════════ */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Shimmer for loading states */
@keyframes shimmer {
  to { background-position: 200% center; }
}
.shimmer {
  background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-50) 50%, var(--slate-100) 75%);
  background-size: 200% auto;
  animation: shimmer 1.5s linear infinite;
}

/* ══════════════════════════════════════════════════
   17. SECTION BACKGROUNDS
   ══════════════════════════════════════════════════ */
.bg-white  { background-color: var(--white); }
.bg-light  { background-color: var(--slate-50); }
.bg-dark   { background-color: var(--navy); color: var(--white); }

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* CTA banner strip */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy-3) 100%);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(59,130,246,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Success message */
.form-success {
  text-align: center;
  padding: var(--sp-10) 0;
}
.success-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
  color: white;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
  animation: fade-up 0.5s var(--ease-out);
}

/* ══════════════════════════════════════════════════
   18. CITY THEME OVERRIDES (via CSS custom properties)
   ══════════════════════════════════════════════════ */
/* City pages can override these in a <style> block */
/* --city-brand, --city-accent, --city-bg-hero */

/* ══════════════════════════════════════════════════
   19. RESPONSIVE TWEAKS
   ══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero-stats { gap: var(--sp-4); }
  .hero-stat-num { font-size: 1.25rem; }
  .hero { padding-block: var(--sp-16); }
  .section { padding-block: var(--sp-16); }
  .contact-card { padding: var(--sp-6); }
  .diag-body { padding: var(--sp-4); }
  .diag-sidebar { padding: var(--sp-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-widget { animation: none; }
  .ticker { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
