/* Equity Data Solutions — base design tokens */
:root {
  /* Charcoal scale — pulled from logo background, slightly warm */
  --eds-ink-950: #1a1916;
  --eds-ink-900: #211f1b;
  --eds-ink-800: #2b2924;
  --eds-ink-700: #3a3831;
  --eds-ink-600: #58554c;
  --eds-ink-500: #807c70;
  --eds-ink-400: #a8a496;
  --eds-ink-300: #c9c5b8;
  --eds-ink-200: #e3e0d4;
  --eds-ink-100: #f1efe7;
  --eds-ink-50:  #faf8f1;

  /* Brushed gold — matched to the logo */
  --eds-gold-900: #6b4f25;
  --eds-gold-800: #8a6c38;
  --eds-gold-700: #a98852;
  --eds-gold-600: #c9a66b;   /* primary */
  --eds-gold-500: #d6b884;
  --eds-gold-400: #e2caa1;
  --eds-gold-300: #ecdcbd;
  --eds-gold-200: #f3e8d2;
  --eds-gold-100: #faf3e2;

  /* Status (used very sparingly) */
  --eds-pos: #5b8c5a;
  --eds-neg: #b1503a;

  /* Type */
  --eds-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --eds-sans:  "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --eds-mono:  "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --eds-display: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--eds-sans);
  color: var(--eds-ink-900);
  background: var(--eds-ink-50);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display headings */
.eds-display {
  font-family: var(--eds-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.eds-serif { font-family: var(--eds-serif); }
.eds-mono { font-family: var(--eds-mono); }

/* Eyebrow / kicker */
.eds-eyebrow {
  font-family: var(--eds-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eds-gold-700);
  font-weight: 500;
}

/* Hairlines (gold + neutral) */
.eds-rule-gold {
  height: 1px;
  background: linear-gradient(90deg, var(--eds-gold-700) 0%, var(--eds-gold-500) 50%, transparent 100%);
  border: none;
}
.eds-rule-thin { height: 1px; background: var(--eds-ink-200); border: none; }

/* Brushed-gold gradient utility for SVG fills via CSS */
.eds-gold-fill {
  background: linear-gradient(135deg, #e8d29a 0%, #c9a66b 35%, #b08a4f 65%, #7e5e2f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Lucide icons — restyled gold thin-stroke */
.eds-icon svg, svg.eds-icon {
  stroke: var(--eds-gold-700);
  stroke-width: 1.25;
  fill: none;
}

/* Numerical / tabular */
.eds-tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Container widths */
.eds-container { max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }
.eds-container-tight { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }

/* Buttons */
.eds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; font-family: var(--eds-sans); font-size: 14px; font-weight: 500; letter-spacing: 0.01em; cursor: pointer; transition: all 0.18s ease; border: 1px solid transparent; text-decoration: none; }
.eds-btn-primary { background: var(--eds-ink-900); color: var(--eds-ink-50); border-color: var(--eds-ink-900); }
.eds-btn-primary:hover { background: var(--eds-ink-950); border-color: var(--eds-gold-700); }
.eds-btn-ghost { background: transparent; color: var(--eds-ink-900); border-color: var(--eds-ink-300); }
.eds-btn-ghost:hover { border-color: var(--eds-gold-700); color: var(--eds-gold-800); }
.eds-btn-gold-outline { background: transparent; color: var(--eds-ink-50); border-color: var(--eds-gold-700); }
.eds-btn-gold-outline:hover { background: rgba(201, 166, 107, 0.1); }

/* "Live" data ticker dot */
.eds-pulse {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--eds-gold-600);
  box-shadow: 0 0 0 0 rgba(201, 166, 107, 0.7);
  animation: eds-pulse 2.4s infinite;
}
@keyframes eds-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 166, 107, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(201, 166, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 166, 107, 0); }
}

/* Subtle paper / charcoal textures via SVG noise */
.eds-paper {
  background-color: var(--eds-ink-50);
  background-image:
    radial-gradient(rgba(120,100,60,0.025) 1px, transparent 1px),
    radial-gradient(rgba(120,100,60,0.025) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px;
  background-position: 0 0, 16px 16px;
}
.eds-charcoal {
  background-color: var(--eds-ink-950);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.015) 0%, transparent 30%),
    radial-gradient(rgba(201,166,107,0.04) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px;
}

/* Grid scaffolding */
.eds-12col { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }

/* Subtle hover lift used on cards */
.eds-card-hover { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.eds-card-hover:hover { transform: translateY(-2px); border-color: var(--eds-gold-600); box-shadow: 0 12px 32px -16px rgba(26, 25, 22, 0.25); }

/* Link with gold underline animation */
.eds-link-gold {
  color: inherit; text-decoration: none; padding-bottom: 2px;
  background-image: linear-gradient(90deg, var(--eds-gold-700), var(--eds-gold-700));
  background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 100%;
  transition: background-size 0.25s ease, color 0.25s ease;
}
.eds-link-gold:hover { color: var(--eds-gold-800); }

/* Footnote-style superscript */
.eds-footnote-ref {
  font-size: 0.7em; color: var(--eds-gold-700); vertical-align: super; font-family: var(--eds-mono); margin-left: 1px;
}

/* Scrollbar tuning */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--eds-ink-300); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--eds-gold-700); }

/* ===================================================== */
/* ===============   RESPONSIVE LAYER   ================ */
/* ===================================================== */

/* Prevent horizontal page scroll on small screens */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }

/* Hamburger button — hidden on desktop */
.a-nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--eds-ink-300);
  cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: border-color 0.2s;
}
.a-nav-toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--eds-ink-800);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
nav.a-nav.open .a-nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
nav.a-nav.open .a-nav-toggle span:nth-child(2) { opacity: 0; }
nav.a-nav.open .a-nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
body.dark .a-nav-toggle { border-color: var(--eds-ink-700); }
body.dark .a-nav-toggle span { background: var(--eds-ink-200); }

/* ============ Tablet / small desktop (≤ 1024px) ============ */
@media (max-width: 1024px) {
  .eds-container, .eds-container-tight { padding-left: 24px; padding-right: 24px; }

  /* Drop hero columns into a 1-up stack but keep generous size */
  .a-hero { padding: 64px 0 56px; }
  .a-hero .grid { grid-template-columns: 1fr; gap: 48px; }
  .a-hero .mark-wrap .mark { max-width: 320px; margin: 0 auto; }
  .a-hero h1 { font-size: clamp(40px, 6vw, 64px); }

  /* Stats: 2x2 */
  .a-stats .grid { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .a-stats .cell { padding: 0 24px; }
  .a-stats .cell:nth-child(2n) { border-right: none; }
  .a-stats .cell:nth-child(odd) { padding-left: 0; }
  .a-stats .v { font-size: 38px; }

  /* Section heads stack */
  .a-section { padding: 72px 0; }
  .a-section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; align-items: start; }
  .a-section-head h2 { font-size: clamp(32px, 4.5vw, 44px); }

  /* Capabilities: 2 cols */
  .a-caps { grid-template-columns: repeat(2, 1fr); }

  /* Feature: stack */
  .a-feature { padding: 72px 0; }
  .a-feature .grid { grid-template-columns: 1fr; gap: 48px; }
  .a-feature h2 { font-size: clamp(30px, 4.2vw, 40px); }
  .a-graph { height: 420px; }

  /* Methodology: 2x2 */
  .a-methodology { padding: 72px 0; }
  .a-methodology .steps { grid-template-columns: repeat(2, 1fr); }

  /* CTA stack */
  .a-cta { padding: 80px 0; }
  .a-cta .grid { grid-template-columns: 1fr; gap: 48px; align-items: start; }
  .a-cta h2 { font-size: clamp(34px, 5vw, 48px); }

  /* Footer: 2-col grid (brand spans full row) */
  .a-footer .top { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .a-footer .brand-block { grid-column: 1 / -1; }

  /* Subhero (interior pages) */
  .a-subhero .grid { grid-template-columns: 1fr !important; gap: 24px !important; align-items: start !important; }

  /* Override inline-styled grids on Contact + Methodology */
  [style*="grid-template-columns:5fr 7fr"],
  [style*="grid-template-columns: 5fr 7fr"] { grid-template-columns: 1fr !important; gap: 40px !important; }
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============ Mobile nav threshold (≤ 860px) ============ */
@media (max-width: 860px) {
  .a-nav .row { height: 64px; }
  .a-nav .brand .mark { height: 28px; }
  .a-nav .brand .name { font-size: 17px; }
  .a-nav .brand .sub { font-size: 8px; letter-spacing: 0.18em; margin-top: 3px; }

  /* Show hamburger, hide desktop nav list */
  .a-nav-toggle { display: inline-flex; }
  .a-nav ul {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--eds-ink-50);
    border-bottom: 1px solid var(--eds-ink-200);
    padding: 8px 24px 24px;
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: transform 0.25s ease, opacity 0.2s ease;
    z-index: 50;
  }
  body.dark .a-nav ul { background: var(--eds-ink-950); border-bottom-color: var(--eds-ink-800); }
  nav.a-nav { position: relative; }
  nav.a-nav.open ul { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .a-nav ul li { width: 100%; }
  .a-nav ul a {
    display: block; padding: 14px 0; font-size: 15px;
    border-bottom: 1px solid var(--eds-ink-200);
  }
  body.dark .a-nav ul a { border-bottom-color: var(--eds-ink-800); }
  .a-nav ul a.active::after { display: none; }
  /* Theme toggle inline inside the open menu */
  .a-nav ul li:has(> .a-theme-toggle),
  .a-nav ul li:has(> .eds-btn) { padding-top: 12px; }
  .a-nav ul .a-theme-toggle { width: auto; height: 40px; padding: 0 14px; }
  .a-nav ul .eds-btn { width: 100%; }

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

/* ============ Phone (≤ 768px) ============ */
@media (max-width: 768px) {
  .eds-container, .eds-container-tight { padding-left: 18px; padding-right: 18px; }

  /* Utility ticker — let it scroll horizontally instead of overflowing */
  .a-utility .row { gap: 16px; }
  .a-utility .ticker {
    overflow-x: auto; gap: 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .a-utility .ticker::-webkit-scrollbar { display: none; }
  .a-utility .row > div:last-child { display: none; } /* hide EN · CLIENT PORTAL on phone */

  /* Hero */
  .a-hero { padding: 48px 0 40px; }
  .a-hero .grid { gap: 36px; }
  .a-hero h1 { font-size: clamp(34px, 9vw, 44px); margin-bottom: 18px; }
  .a-hero .lede { font-size: 16px; margin-bottom: 28px; }
  .a-hero .meta-row { flex-wrap: wrap; gap: 20px 32px; }
  .a-hero .meta-item .v { font-size: 18px; }
  .a-hero .cta-row { flex-direction: column; align-items: stretch; }
  .a-hero .cta-row .eds-btn { width: 100%; }
  .a-hero .mark-wrap .mark-meta { position: static; margin-top: 12px; }
  body.dark .a-hero .mark-wrap { padding: 20px; }

  /* Stats — single column, no dividers */
  .a-stats { padding: 32px 0; }
  .a-stats .grid { grid-template-columns: 1fr; gap: 24px; }
  .a-stats .cell { padding: 0; border-right: none; border-bottom: 1px solid var(--eds-ink-800); padding-bottom: 20px; }
  .a-stats .cell:last-child { border-bottom: none; padding-bottom: 0; }
  .a-stats .v { font-size: 34px; }

  /* Capabilities single column */
  .a-caps { grid-template-columns: 1fr; }
  .a-cap { min-height: auto; padding: 24px 20px; }

  /* Methodology single column */
  .a-methodology { padding: 56px 0; }
  .a-methodology .steps { grid-template-columns: 1fr; }
  .a-methodology .step { min-height: auto; padding: 28px 22px; }
  .a-methodology .step .num { font-size: 44px; margin-bottom: 16px; }

  /* Coverage table — horizontal scroll wrapper */
  .a-coverage { padding: 56px 0; }
  .a-coverage .table-wrap,
  .a-coverage .eds-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .a-coverage .table { min-width: 640px; }

  /* Built-for marquee */
  .a-builtfor { padding: 36px 0; }
  .a-builtfor .row { gap: 20px; }
  .a-builtfor .items { gap: 20px 28px; }
  .a-builtfor .items span { font-size: 15px; }

  /* CTA */
  .a-cta { padding: 64px 0; }
  .a-cta h2 { font-size: clamp(28px, 7vw, 38px); }
  .a-cta p { font-size: 16px; }
  .a-cta .actions .btn { padding: 16px 18px; font-size: 16px; }

  /* Footer collapse to 1 col + group links */
  .a-footer { padding: 56px 0 32px; }
  .a-footer .top { grid-template-columns: 1fr; gap: 32px; padding-bottom: 36px; }
  .a-footer .brand-block { grid-column: auto; }
  .a-footer .bottom { flex-direction: column; gap: 8px; padding-top: 24px; }

  /* Override more inline-styled grids on Contact form */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Section padding */
  .a-section { padding: 56px 0; }
  .a-feature { padding: 56px 0; }
  .a-feature .table .row { grid-template-columns: 24px 1fr auto; gap: 10px; font-size: 11px; }
  .a-graph { height: 320px; }
  .a-graph .corner { font-size: 9px; }
}

/* ============ Small phone (≤ 540px) ============ */
@media (max-width: 540px) {
  .a-hero h1 { font-size: clamp(30px, 9vw, 38px); }
  .a-section-head h2 { font-size: clamp(26px, 7.5vw, 34px); }
  .a-feature h2 { font-size: clamp(26px, 7.5vw, 32px); }
  .a-cta h2 { font-size: clamp(26px, 8vw, 32px); }

  /* Hide the brand subtitle on tiny screens to keep header tidy */
  .a-nav .brand .sub { display: none; }
}

