/* ==========================================================================
   EchoMetrics AI — design system
   Light, minimal, generous whitespace. One accent. Type does the work.
   ========================================================================== */

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

/* --- tokens --------------------------------------------------------------- */
:root {
  /* surface */
  --bg:           #ffffff;
  --bg-subtle:    #f7f8fa;
  --bg-sunken:    #f2f4f7;

  /* line */
  --border:       #e5e8ec;
  --border-strong:#d4d9e0;

  /* ink */
  --ink:          #0c1116;
  --ink-muted:    #5b6673;
  --ink-faint:    #8a939f;

  /* accent */
  --accent:       #1f5eff;
  --accent-hover: #1a4fd8;
  --accent-soft:  #eef3ff;
  --accent-line:  #d3e0ff;

  /* signal */
  --positive:     #0f9960;

  /* metrics */
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --container:    1120px;
  --gutter:       24px;

  --shadow-sm:    0 1px 2px rgba(12, 17, 22, 0.05);
  --shadow:       0 4px 16px -4px rgba(12, 17, 22, 0.08),
                  0 1px 2px rgba(12, 17, 22, 0.04);
  --shadow-lg:    0 24px 48px -12px rgba(12, 17, 22, 0.12);

  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- base ----------------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 650;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; }
h3 { font-size: 1.125rem; letter-spacing: -0.015em; }

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent-soft); color: var(--accent-hover); }

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

/* --- layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tight { padding-block: clamp(48px, 6vw, 72px); }
.section--subtle { background: var(--bg-subtle); }
.section--bordered { border-top: 1px solid var(--border); }

.stack > * + * { margin-top: 16px; }

.measure { max-width: 62ch; }
.measure-narrow { max-width: 46ch; }

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* --- typographic helpers -------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-muted);
}

.muted { color: var(--ink-muted); }
.small { font-size: 0.875rem; }
.fine  { font-size: 0.8125rem; color: var(--ink-faint); line-height: 1.6; }

.section-head { max-width: 60ch; margin-bottom: clamp(40px, 5vw, 56px); }
.section-head p { margin-top: 16px; }

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding-inline: 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn--secondary:hover { background: var(--bg-subtle); border-color: var(--ink-faint); }

.btn--sm { height: 36px; padding-inline: 14px; font-size: 0.875rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--accent);
}
.link-arrow svg { transition: transform 0.18s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* --- header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), #4f8bff);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}
.nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9063rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.16s, background 0.16s;
}
.nav a:hover { color: var(--ink); background: var(--bg-subtle); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 550; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* dropdown */
.nav-item { position: relative; }
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-size: 0.9063rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}
.nav-trigger:hover { color: var(--ink); background: var(--bg-subtle); }
.nav-trigger svg { transition: transform 0.18s var(--ease); }
.nav-item[data-open] > .nav-trigger { color: var(--ink); background: var(--bg-subtle); }
.nav-item[data-open] > .nav-trigger svg { transform: rotate(180deg); }

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 232px;
  list-style: none;
  display: none;
  gap: 2px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.nav-item[data-open] > .nav-menu { display: grid; }
.nav-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9063rem;
  color: var(--ink-muted);
}
.nav-menu a:hover { background: var(--bg-subtle); color: var(--ink); }
.nav-menu a[aria-current="page"] { color: var(--accent); font-weight: 550; }

@media (max-width: 860px) {
  .nav-item { position: static; }
  .nav-trigger { width: 100%; justify-content: space-between; padding: 10px 12px; font-size: 1rem; }
  .nav-menu {
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 6px 12px;
    min-width: 0;
    border-left: 1px solid var(--border);
    margin-left: 12px;
    border-radius: 0;
  }
  .nav-menu a { font-size: 0.9375rem; }
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}

@media (max-width: 860px) {
  .site-header .container { gap: 12px; }
  .nav-toggle { display: grid; }
  .nav,
  .header-actions {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter);
  }
  .site-header.is-open .nav,
  .site-header.is-open .header-actions { display: flex; }
  .site-header.is-open .header-actions { padding-top: 0; padding-bottom: 20px; }
  .nav a { padding: 10px 12px; font-size: 1rem; }
}

/* --- hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 10vw, 128px) clamp(56px, 8vw, 96px);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: '';
  position: absolute;
  inset: -40% 20% auto -10%;
  height: 720px;
  background:
    radial-gradient(60% 50% at 30% 40%, rgba(31, 94, 255, 0.07), transparent 70%),
    radial-gradient(45% 45% at 75% 30%, rgba(79, 139, 255, 0.06), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }

.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hero h1 { margin-bottom: 24px; }
.hero .lede { max-width: 52ch; }
.hero .btn-row { margin-top: 32px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding-inline: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--accent-hover);
  margin-bottom: 24px;
}
.pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 3px rgba(15, 153, 96, 0.15);
}

/* Abstract hero figure — deliberately says nothing specific. */
.figure {
  max-width: 460px;
  margin-inline: auto;
  width: 100%;
}
.figure svg { width: 100%; height: auto; }

/* --- hero visual (inline "viewer" mock) ----------------------------------- */
.viewer {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--ink-muted);
}
.viewer-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.viewer-body { padding: 20px; display: grid; gap: 16px; }

.scan {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: radial-gradient(70% 70% at 50% 55%, #2b3442 0%, #131922 70%, #0c1116 100%);
  position: relative;
  overflow: hidden;
}
.scan svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.readout { display: grid; gap: 10px; }
.readout-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
}
.readout-row span:first-child { color: var(--ink-muted); }
.readout-row b { font-variant-numeric: tabular-nums; font-weight: 600; }
.meter { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.meter i.is-positive { background: var(--positive); }

/* --- stats ---------------------------------------------------------------- */
.stat-strip {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 28px 24px;
}
.stat b {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 6px; font-size: 0.875rem; color: var(--ink-muted); }

/* --- reading posture: one narrow reading column, no product imagery ------- */
.column { max-width: 660px; }
.column h1 { margin-bottom: 32px; }
.column h2 { margin-bottom: 24px; }
.column .lede + .lede { margin-top: 20px; }

.hero--plain {
  padding-block: clamp(72px, 12vw, 144px) clamp(56px, 8vw, 96px);
}
.hero--plain::before { inset: -50% 30% auto -20%; }

/* belief blocks — rules instead of cards; quieter, reads as a document */
.belief {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}
.belief h3 { margin-bottom: 8px; }
.belief p { color: var(--ink-muted); }

.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 48px;
}

.contact-list dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-list dd { margin: 6px 0 20px; }
.contact-list dd:last-child { margin-bottom: 0; }
.contact-list a { color: var(--accent); }
.contact-list a:hover { text-decoration: underline; }

.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a:hover { color: var(--ink); }

/* --- statement (single high-conviction claim) ----------------------------- */
.statement { max-width: 52ch; }
.statement-text {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.45;
  letter-spacing: -0.022em;
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
}

/* --- cards ---------------------------------------------------------------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
              transform 0.2s var(--ease);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-muted); font-size: 0.9375rem; }
.card--link:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card > .link-arrow { margin-top: 18px; }

.icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

/* numbered steps */
.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}

/* --- feature rows --------------------------------------------------------- */
.feature-row {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(40px, 5vw, 64px);
}
.feature-row + .feature-row { border-top: 1px solid var(--border); }
@media (min-width: 900px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-row--flip > *:first-child { order: 2; }
}

.check-list { list-style: none; display: grid; gap: 12px; margin-top: 24px; }
.check-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}
.check-list svg { color: var(--accent); margin-top: 4px; }

/* --- page header (interior pages) ----------------------------------------- */
.page-head {
  padding-block: clamp(56px, 8vw, 88px) clamp(40px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.page-head .lede { margin-top: 20px; }

/* --- prose (about / legal) ------------------------------------------------ */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; margin-top: 48px; margin-bottom: 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-muted); margin-bottom: 16px; }
.prose ul { color: var(--ink-muted); padding-left: 20px; margin-bottom: 16px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }

/* --- team ----------------------------------------------------------------- */
.person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent-soft), var(--bg-sunken));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 1rem;
  color: var(--accent-hover);
  letter-spacing: 0;
  margin-bottom: 18px;
}
/* Name is intentionally blank until announced — reserve the line so cards stay aligned. */
.person-name { min-height: 1.25em; }
.person-role { font-size: 0.875rem; color: var(--accent); font-weight: 550; margin-top: 2px; }

/* --- contact form --------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.875rem; font-weight: 550; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.contact-panel {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.contact-panel dt { font-size: 0.8125rem; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-panel dd { margin: 6px 0 24px; font-size: 0.9375rem; color: var(--ink-muted); }
.contact-panel dd:last-child { margin-bottom: 0; }
.contact-panel a { color: var(--accent); }
.contact-panel a:hover { text-decoration: underline; }

/* --- cta band ------------------------------------------------------------- */
.cta {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 400px;
  background: radial-gradient(50% 60% at 50% 50%, rgba(31, 94, 255, 0.35), transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.66); margin: 16px auto 0; max-width: 52ch; }
.cta .btn-row { justify-content: center; margin-top: 32px; }
.cta .btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.cta .btn--secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); }

/* --- disclaimer ----------------------------------------------------------- */
.notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* --- footer --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding-block: 56px 32px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 40px;
}
.footer-grid > div:first-child { grid-column: span 2; min-width: 240px; }
@media (max-width: 600px) { .footer-grid > div:first-child { grid-column: span 1; } }

.footer-grid h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a { font-size: 0.9063rem; color: var(--ink-muted); }
.footer-grid a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* --- motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
