/* ==========================================================================
   Ekkovia — marketing site
   Trace intelligence platform. Brand: gold + navy on cream (from logo).
   Cream #FCF3EB · Navy #07396B · Gold #FDAF33
   ========================================================================== */

:root {
  /* Surfaces */
  --cream: #FCF3EB;
  --cream-2: #F6E9D8;
  --cream-3: #F1DFC8;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --line: rgba(7, 57, 107, .12);
  --line-soft: rgba(7, 57, 107, .08);

  /* Ink (navy) */
  --navy: #07396B;
  --navy-deep: #052A4F;
  --navy-900: #04223F;
  --ink: #07396B;
  --muted: #46618A;
  --faint: #7C90AE;
  --on-navy: #EAF1FB;
  --on-navy-muted: #A9C0DE;

  /* Gold */
  --gold: #FDAF33;
  --gold-deep: #E89412;
  --gold-soft: #FFE6B5;

  /* Gradients */
  --brand: linear-gradient(115deg, #FDAF33 0%, #F08F1E 100%);
  --brand-navy: linear-gradient(135deg, #0A4880 0%, #052A4F 100%);

  /* Layout */
  --maxw: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(7, 57, 107, .10);
  --shadow-lg: 0 30px 80px rgba(7, 57, 107, .16);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --cream: #071A30;
  --cream-2: #0C2747;
  --cream-3: #123157;
  --surface: #0E2545;
  --card: #0E2545;
  --line: rgba(255, 255, 255, .13);
  --line-soft: rgba(255, 255, 255, .07);

  --navy: #EAF1FB;        /* headings / brand text → light */
  --navy-deep: #EAF1FB;
  --navy-900: #04223F;    /* stays dark: text on gold buttons */
  --ink: #DCE7F5;
  --muted: #9DB2D2;
  --faint: #6E84A6;

  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
}
[data-theme="dark"] body { background: var(--cream); }
[data-theme="dark"] header.nav {
  background: rgba(5, 19, 36, .85);
  border-bottom-color: rgba(255, 255, 255, .10);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .35);
}
/* keep dark navy text on the light gold accents in both modes */
[data-theme="dark"] .impact-card { color: #07396B; }
[data-theme="dark"] .chain .node.warn { color: #07396B; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: normal; color: var(--gold-deep); font-weight: 600; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }
.band { padding: 104px 0; }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); max-width: var(--maxw); margin: 0 auto; }

/* ---------- Typography ---------- */
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.08; font-weight: 700; color: var(--navy); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-deep); display: inline-block; margin-bottom: 14px;
}
.gold-text { color: var(--gold-deep); }
.muted { color: var(--muted); }
.band h2 { font-size: clamp(28px, 4vw, 46px); max-width: 20ch; }
.band .lead { font-size: 18px; color: var(--muted); max-width: 62ch; margin-top: 16px; }
.center h2 { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; border-radius: 999px;
  padding: 13px 24px; transition: .2s; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary {
  background: var(--brand); color: var(--navy-900);
  box-shadow: 0 10px 28px rgba(253, 175, 51, .4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 40px rgba(253, 175, 51, .5); }
.btn-ghost { border-color: var(--line); color: var(--navy); background: var(--surface); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-on-navy { background: var(--brand); color: var(--navy-900); }
.btn-on-navy.ghost { background: transparent; border-color: rgba(255, 255, 255, .3); color: var(--on-navy); }
.btn-on-navy.ghost:hover { border-color: var(--on-navy); }
.sub-os { font-size: 13px; color: var(--faint); margin-top: 14px; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold-deep); background: var(--gold-soft);
  margin-left: 10px; vertical-align: middle;
}

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(238, 222, 199, .88);
  border-bottom: 1px solid rgba(7, 57, 107, .14);
  box-shadow: 0 1px 0 rgba(7, 57, 107, .04), 0 6px 24px rgba(7, 57, 107, .05);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: var(--navy); }
.brand .brand-logo {
  height: 32px; width: 34px; flex: 0 0 auto; display: block;
  background: url("../img/ekkovia-mark.png") center/contain no-repeat;
}
.foot-brand .brand-logo { height: 34px; width: 36px; }
[data-theme="dark"] .brand .brand-logo { background-image: url("../img/ekkovia-mark-dark.png"); }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--navy); cursor: pointer; display: grid;
  place-items: center; transition: .2s; flex: 0 0 auto; padding: 0;
}
.theme-toggle:hover { border-color: var(--navy); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-size: 14.5px; color: var(--muted); transition: .15s; }
.nav-links a:hover { color: var(--navy); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 900px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 100px 0 80px; text-align: center; overflow: hidden; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); max-width: 18ch; margin: 0 auto 22px; }
.hero p.lead { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 64ch; margin: 0 auto 30px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: -1; }
.glow.a { width: 560px; height: 560px; background: radial-gradient(circle, rgba(253, 175, 51, .35), transparent 60%); top: -200px; left: 50%; transform: translateX(-55%); }
.glow.b { width: 420px; height: 420px; background: radial-gradient(circle, rgba(10, 72, 128, .18), transparent 60%); top: -40px; right: 4%; }

/* Pill above hero */
.kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--navy); background: var(--surface); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 24px; box-shadow: var(--shadow);
}
.kicker .dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(253, 175, 51, .25); }

/* Trace mock */
.appshot {
  margin: 56px auto 0; max-width: 940px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-lg); overflow: hidden; text-align: left;
}
.titlebar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); background: var(--cream); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.titlebar .t { margin-left: 10px; font-size: 12.5px; color: var(--faint); }
.trace-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; }
.trace-steps { padding: 22px; border-right: 1px solid var(--line-soft); display: grid; gap: 12px; align-content: start; }
.trace-steps .th { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 700; margin-bottom: 4px; }
.tstep { display: flex; gap: 12px; align-items: flex-start; }
.tstep .n { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-navy); color: var(--on-navy); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.tstep.active .n { background: var(--brand); color: var(--navy-900); }
.tstep .txt { font-size: 14px; color: var(--navy); }
.tstep .txt small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.trace-evidence { padding: 22px; display: grid; gap: 12px; align-content: start; background: var(--cream); }
.trace-evidence .th { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 700; }
.ev-shot { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); aspect-ratio: 16/10; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.ev-shot::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(7,57,107,.04) 0 1px, transparent 1px 16px); }
.ev-box { position: absolute; left: 18%; top: 30%; width: 46%; height: 26%; border: 2px solid var(--gold); border-radius: 6px; box-shadow: 0 0 0 4px rgba(253, 175, 51, .18); }
.ev-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.ev-meta span { background: var(--cream-2); border: 1px solid var(--line-soft); padding: 3px 8px; border-radius: 6px; }
@media (max-width: 760px) { .trace-body { grid-template-columns: 1fr; } .trace-steps { border-right: 0; border-bottom: 1px solid var(--line-soft); } }

/* ---------- Logos / trust strip ---------- */
.trust-strip { padding: 36px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--cream-2); }
.trust-strip p { text-align: center; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; margin-top: 18px; }
.trust-row span { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- Pain section ---------- */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; text-align: left; }
.pain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px; box-shadow: var(--shadow); }
.pain h4 { font-size: 16px; margin-bottom: 8px; color: var(--navy); }
.pain p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 880px) { .pain-grid { grid-template-columns: 1fr; } }
.sharp { margin: 48px auto 0; max-width: 720px; display: grid; gap: 14px; }
.sharp li { list-style: none; font-size: clamp(18px, 2.4vw, 22px); font-weight: 600; color: var(--navy); }
.sharp li::before { content: "“"; color: var(--gold); font-weight: 700; }
.sharp li::after { content: "”"; color: var(--gold); font-weight: 700; }

/* ---------- Solution / pillars ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split.rev .copy { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } .split.rev .copy { order: 0; } }
ul.checks { margin-top: 22px; display: grid; gap: 12px; }
ul.checks li { list-style: none; display: flex; gap: 11px; align-items: flex-start; color: var(--muted); font-size: 15.5px; }
ul.checks li::before {
  content: ""; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; margin-top: 1px;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/14px no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/14px no-repeat;
}

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.pillar { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 28px; box-shadow: var(--shadow); transition: .2s; text-align: left; }
.pillar:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pillar .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-navy); display: grid; place-items: center; margin-bottom: 16px; font-size: 20px; color: var(--gold); }
.pillar h4 { font-size: 18px; margin-bottom: 8px; }
.pillar p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

.pullquote { margin: 56px auto 0; text-align: center; font-size: clamp(22px, 3vw, 32px); font-weight: 700; max-width: 22ch; line-height: 1.25; color: var(--navy); }
.pullquote .gold-text { display: inline; }

/* ---------- Module showcase panels ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.panel .ph { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 8px; align-items: center; background: var(--cream); }
.panel .pb { padding: 24px; min-height: 250px; display: grid; place-items: center; background: var(--cream-2); }
.modkey { font-size: 13px; font-weight: 700; color: var(--gold-deep); margin-top: 14px; }

/* Impact diff mock */
.diff { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff .col { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 12.5px; }
.diff .ttl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 700; margin-bottom: 10px; }
.diff .row { padding: 5px 7px; border-radius: 5px; margin-bottom: 5px; color: var(--muted); }
.diff .add { background: rgba(40, 160, 90, .14); color: #1d6b40; }
.diff .del { background: rgba(220, 70, 60, .12); color: #a8392f; text-decoration: line-through; }
.impact-card { grid-column: 1 / -1; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--navy-deep); }
.impact-card b { color: var(--gold-deep); }

/* Rule chain mock */
.chain { width: 100%; display: grid; gap: 10px; }
.chain .node { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--navy); box-shadow: var(--shadow); }
.chain .node .badge { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--brand-navy); color: var(--on-navy); }
.chain .node.warn { border-color: var(--gold); background: var(--gold-soft); }
.chain .node.warn .badge { background: var(--brand); color: var(--navy-900); }
.chain .arrow { text-align: center; color: var(--faint); font-size: 14px; }

/* ---------- Who it's for ---------- */
.audience { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 44px; }
.audience span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 14px; color: var(--navy); font-weight: 500; box-shadow: var(--shadow); }

/* ---------- Before / After ---------- */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 48px; text-align: left; }
.ba .col { border-radius: var(--radius); padding: 28px; }
.ba .before { background: var(--cream-2); border: 1px solid var(--line); }
.ba .after { background: var(--brand-navy); border: 1px solid var(--navy-deep); }
.ba h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 18px; }
.ba .before h4 { color: var(--faint); }
.ba .after h4 { color: var(--gold); }
.ba ul { list-style: none; display: grid; gap: 12px; }
.ba li { font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.ba .before li { color: var(--muted); }
.ba .before li::before { content: "✕"; color: #b06a5e; font-weight: 700; }
.ba .after li { color: var(--on-navy); }
.ba .after li::before { content: "✓"; color: var(--gold); font-weight: 700; }
@media (max-width: 760px) { .ba { grid-template-columns: 1fr; } }

/* ---------- Trust & safety (navy band) ---------- */
.safety { background: var(--brand-navy); color: var(--on-navy); padding: 96px 0; text-align: center; }
.safety .eyebrow { color: var(--gold); }
.safety h2 { color: var(--on-navy); }
.safety .lead { color: var(--on-navy-muted); margin: 16px auto 0; }
.safety .pullquote { color: var(--on-navy); }
.safety-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; text-align: left; }
.safety-point { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-sm); padding: 22px; }
.safety-point h4 { color: var(--on-navy); font-size: 16px; margin-bottom: 6px; }
.safety-point p { color: var(--on-navy-muted); font-size: 14px; }
@media (max-width: 760px) { .safety-points { grid-template-columns: 1fr; } }

/* ---------- CTA / early access ---------- */
.cta { padding: 110px 0; text-align: center; overflow: hidden; }
.cta h2 { font-size: clamp(30px, 4.4vw, 50px); max-width: 20ch; margin: 0 auto 16px; }
.cta p { color: var(--muted); font-size: 18px; margin-bottom: 30px; }
.signup { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 480px; margin: 0 auto; }
.signup input {
  flex: 1 1 240px; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--navy); font-size: 15px; font-family: inherit;
}
.signup input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(253, 175, 51, .25); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--cream-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.foot-grid h5 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 14px; }
.foot-grid a { display: block; font-size: 14px; color: var(--muted); margin-bottom: 9px; transition: .15s; }
.foot-grid a:hover { color: var(--navy); }
.foot-brand p { color: var(--faint); font-size: 13.5px; margin-top: 14px; max-width: 32ch; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 13px; flex-wrap: wrap; gap: 12px;
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
