/* ═══════════════════════════════════════════════
   Intelligent Designs — Shared Design System
   Source of truth for all CSS custom properties,
   resets, and shared component styles.
   ═══════════════════════════════════════════════ */

/* ─── RESET ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ─── DESIGN TOKENS ──────────────────────────── */
:root {
  /* Backgrounds */
  --bg:        #080A0F;
  --surface:   #0D1018;
  --surface2:  #111520;

  /* Borders */
  --border:    #1C2235;
  --border2:   #242D45;

  /* Accent */
  --accent:    #00D4FF;
  --accent-dim:#007A94;
  --accent-bg: rgba(0,212,255,0.05);

  /* Text */
  --white:     #F2F5FA;
  --muted:     #5E6B85;
  --mid:       #8A96B0;

  /* Semantic colors */
  --amber:     #C98B3A;
  --green:     #3DAA72;
  --red:       #C25E5E;
  --blue:      #4A7FA5;

  /* Typography */
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;

  /* Layout */
  --max-width: 1160px;
  --container-pad: 48px;
}

/* ─── BASE ───────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grid background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(28,34,53,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,34,53,0.5) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

nav, main, section, footer, .footer-bottom { position: relative; z-index: 1; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ─── TYPOGRAPHY ─────────────────────────────── */
h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 24px;
}
h1 strong { font-weight: 600; }
h1 .hi { color: var(--accent); font-weight: 300; }

h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 16px;
}
h2 strong { font-weight: 600; }

h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 8px;
}

p { color: var(--mid); line-height: 1.75; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ─── NAVIGATION ─────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(8,10,15,0.88);
  backdrop-filter: blur(16px);
  z-index: 100;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.1em;
  text-decoration: none;
}
.wordmark span { color: var(--accent); }

nav ul { list-style: none; display: flex; gap: 36px; align-items: center; }
nav ul li a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}
nav ul li a:hover { color: var(--white); }

.nav-cta {
  padding: 8px 20px !important;
  border: 1px solid var(--accent) !important;
  border-radius: 4px !important;
  color: var(--accent) !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  transition: all 0.15s !important;
}
.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

/* Dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown > button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.nav-dropdown > button:hover { color: var(--white); }
.nav-dropdown > button::after {
  content: ' ▾';
  font-size: 10px;
  opacity: 0.6;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 0;
  min-width: 220px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
/* Invisible bridge that keeps hover alive across the gap */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-label {
  display: block;
  padding: 8px 20px 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.dropdown-menu a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--mid);
  text-decoration: none;
  transition: all 0.15s;
}
.dropdown-menu a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

/* ─── BUTTONS ────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 13px 18px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  background: transparent;
  color: var(--mid);
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--mid); color: var(--white); }

/* Secondary button alias */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  background: transparent;
  color: var(--mid);
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--mid); color: var(--white); }

/* ─── BADGES / TAGS ──────────────────────────── */
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  font-weight: 600;
  white-space: nowrap;
}
.badge-cold   { color: #6B9BD1; background: rgba(107,155,209,0.1); border: 1px solid rgba(107,155,209,0.2); }
.badge-risk   { color: var(--amber); background: rgba(201,139,58,0.1); border: 1px solid rgba(201,139,58,0.25); }
.badge-active { color: var(--green); background: rgba(61,170,114,0.1); border: 1px solid rgba(61,170,114,0.2); }

/* Inline label badge */
.label-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(0,212,255,0.2);
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 64px 48px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.footer-brand span { color: var(--accent); }

.footer-tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--mid);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-copy {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ─── CTA ALIAS ─────────────────────────────── */
/* cta-primary is an alias for btn-primary used on some pages */
.cta-primary {
  display: inline-block;
  padding: 13px 28px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity 0.15s;
}
.cta-primary:hover { opacity: 0.85; }

/* ─── FADE-IN ANIMATION ─────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── MOBILE NAV TOGGLE ─────────────────────── */
/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 201;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle span + span { margin-top: 5px; }

/* Hamburger → X transform when menu is open */
body.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Full-screen mobile overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  /* 100dvh = dynamic viewport height — shrinks when iOS Safari
     shows its bottom toolbar, so the menu never gets clipped */
  height: calc(100dvh - 64px);
  background: var(--bg);
  z-index: 99;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transition: opacity 0.25s ease;
}
body.menu-open .mobile-menu {
  opacity: 1;
}

.mobile-menu-inner {
  padding: 32px 24px;
  /* env(safe-area-inset-bottom) accounts for the iOS home
     indicator bar and Safari's collapsed toolbar */
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 48px));
  max-width: 400px;
}

/* Section labels inside mobile menu */
.mobile-menu .dropdown-label {
  padding: 20px 0 8px;
  border: none;
}
.mobile-menu .dropdown-label:first-child {
  padding-top: 0;
}

/* Links inside mobile menu */
.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.15s;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: solid; }
.mobile-menu a:hover,
.mobile-menu a:active { color: var(--white); }

/* Spacer between solutions and other links.
   No background line — the preceding <a> border-bottom
   already provides a visual separator. */
.mobile-menu-divider {
  height: 0;
  margin: 24px 0;
}

/* CTA button in mobile menu */
.mobile-menu .mobile-cta {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 24px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s;
}
.mobile-menu .mobile-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Lock body scroll when menu is open */
body.menu-open { overflow: hidden; }

/* ─── HORIZONTAL SNAP SCROLL (mobile carousels) ── */
/* Apply .snap-scroll-row to any grid that should become
   a horizontal swipeable strip on mobile. Each direct
   child becomes a snap stop. */
.snap-scroll-row {
  /* desktop: behaves like a normal grid (set columns inline or in page CSS) */
}

/* Scroll indicators (dots) — hidden on desktop */
.scroll-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 0;
}
.scroll-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.scroll-dots .dot.active {
  background: var(--accent);
  transform: scale(1.25);
}

/* ─── MOBILE STACK HELPER ────────────────────── */
/* Apply .mobile-stack to any flex row that should
   stack vertically on mobile. */
.mobile-stack {
  /* desktop: unchanged */
}

/* ─── RESPONSIVE ────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  nav ul { display: none; }
  .nav-toggle { display: flex; flex-direction: column; }
  .mobile-menu { display: block; pointer-events: none; }
  body.menu-open .mobile-menu { pointer-events: auto; }
  .container { padding: 0 24px; }
  footer {
    grid-template-columns: 1fr;
    padding: 48px 24px;
  }
  .footer-bottom {
    padding: 24px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Snap-scroll carousel on mobile */
  .snap-scroll-row {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 8px;
    /* hide scrollbar but keep swipe */
    scrollbar-width: none;
  }
  .snap-scroll-row::-webkit-scrollbar { display: none; }
  .snap-scroll-row > * {
    flex: 0 0 80vw;
    max-width: 80vw;
    scroll-snap-align: start;
  }

  /* Stack helper */
  .mobile-stack {
    flex-direction: column !important;
  }

  /* Show scroll dots on mobile */
  .scroll-dots { display: flex; }
}

/* ─── GOOGLE FONTS IMPORT ────────────────────── */
/* Import is handled per-page via <link> tag in <head>.
   Do not duplicate here. Each page includes:
   <link href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap" rel="stylesheet">
*/
