/* EviTrac — starter homepage styles. Static, no build step, no web fonts. */

:root {
  --bg:          #f6f5f2;
  --bg-alt:      #ffffff;
  --surface:     #ffffff;
  --ink:         #17211f;
  --ink-soft:    #53605c;
  --brand:       #0c6b62;
  --brand-strong:#0a544d;
  --brand-tint:  #e6efed;
  --accent:      #cf7a24;
  --accent-strong:#b3691c;
  --on-accent:   #1c1206;
  --line:        #e3e1da;
  --shadow-sm:   0 1px 2px rgba(20,30,28,.06);
  --shadow-lg:   0 18px 40px -18px rgba(20,30,28,.28);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --step--1: 0.86rem;
  --step-0:  1.0625rem;
  --step-1:  1.22rem;
  --step-2:  1.46rem;
  --step-3:  1.78rem;
  --step-4:  2.15rem;
  --step-hero: clamp(2.35rem, 1.7rem + 3vw, 3.6rem);

  --wrap: 1140px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #101615;
    --bg-alt:      #151d1b;
    --surface:     #17201e;
    --ink:         #eef2f0;
    --ink-soft:    #a2b1ac;
    --brand:       #45b4a8;
    --brand-strong:#63c6bb;
    --brand-tint:  #142b28;
    --accent:      #e6a04a;
    --accent-strong:#f0b365;
    --on-accent:   #1c1206;
    --line:        #273733;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
    --shadow-lg:   0 22px 46px -20px rgba(0,0,0,.65);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand-strong); }

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.25rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-strong);
  margin-bottom: .9rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--brand-tint); border-color: var(--brand); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.brand-name { font-size: var(--step-1); letter-spacing: -0.02em; }
.brand-mark svg rect { fill: var(--brand); }
.brand-mark svg circle { fill: none; stroke: #fff; stroke-width: 2.4; }
.brand-mark svg .mark-dot { fill: #fff; stroke: none; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-cta { padding: .55rem 1rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding: clamp(2.75rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.25rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: center;
}
.hero h1 { font-size: var(--step-hero); }
.hero .lede {
  margin-top: 1.15rem;
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 34ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.75rem;
}

.hero-visual .scene { width: 100%; height: auto; }
.scene-frame { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.scene-grid { stroke: var(--line); stroke-width: 1; }
.card rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.card-2 rect, .card-3 rect { fill: color-mix(in srgb, var(--surface) 92%, var(--ink)); opacity: .55; }
.card-3 rect { opacity: .32; }
.card-status { fill: var(--brand); }
.card-line { fill: var(--ink); opacity: .8; }
.card-line.soft { opacity: .28; }
.card-tag { fill: var(--brand-tint); }
.chip rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.chip text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--ink-soft);
  text-anchor: middle;
  letter-spacing: .04em;
}
.chip-accent rect { fill: var(--brand-tint); stroke: var(--brand); }
.chip-accent text { fill: var(--brand-strong); }

/* ---------- value strip ---------- */
.valuestrip {
  background: var(--brand);
  color: #fff;
}
.valuestrip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 2rem;
  padding-block: 1.1rem;
}
.valuestrip p {
  font-weight: 600;
  font-size: var(--step-0);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.valuestrip p::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section h2 {
  font-size: var(--step-4);
  max-width: 22ch;
  margin-bottom: 2.25rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.feature, .audience {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}
.feature h3, .audience h3 {
  font-size: var(--step-1);
  margin-bottom: .55rem;
}
.feature p, .audience p { color: var(--ink-soft); font-size: var(--step-0); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}
.step-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--step-1);
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-tint);
  color: var(--brand-strong);
}
.step h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.step p { color: var(--ink-soft); }

/* ---------- cta ---------- */
.cta {
  background: var(--brand-strong);
  color: #fff;
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.cta .eyebrow { color: #d7e9e6; color: color-mix(in srgb, #fff 78%, var(--brand)); }
.cta h2 { color: #fff; font-size: var(--step-4); max-width: 20ch; }
.cta .lede {
  color: #e4efed;
  color: color-mix(in srgb, #fff 82%, var(--brand));
  font-size: var(--step-1);
  margin-top: 1rem;
  max-width: 46ch;
}
.cta .btn-secondary { color: #fff; border-color: rgba(255,255,255,.45); border-color: color-mix(in srgb, #fff 45%, transparent); }
.cta .btn-secondary:hover { background: color-mix(in srgb, #fff 12%, transparent); border-color: #fff; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.footer-brand p { color: var(--ink-soft); font-size: var(--step--1); margin-top: .5rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-size: var(--step--1); }
.footer-nav a:hover { color: var(--ink); }
.footer-legal { color: var(--ink-soft); font-size: var(--step--1); font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: .75rem clamp(1.1rem, 4vw, 2.25rem) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul li a {
    display: block;
    padding: .8rem .25rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta { margin-top: .75rem; text-align: center; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; }
  .hero .lede { max-width: none; }
  .valuestrip-grid { grid-template-columns: 1fr; gap: .55rem; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: .75rem; }
  .btn { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
}
