/* Kethosbase marketing site (ADR-0021). Shares the product dashboard's visual
   identity: indigo→violet gradient, Space Grotesk (display) + Inter (body),
   self-hosted (no runtime CDN, CSP style-src 'self'), atmospheric accent glow.
   Dark only. Keep design tokens roughly in sync with website/docs. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #090b12;
  --surface: #14171f;
  --surface-2: #1a1e29;
  --surface-3: #222836;
  --border: #242a38;
  --border-strong: #353e52;
  --text: #edf0f8;
  --muted: #98a1b4;
  --faint: #5c6477;
  --accent: #7c8cff;
  --accent-2: #9b6bff;
  --accent-soft: rgba(124, 140, 255, 0.14);
  --grad: linear-gradient(135deg, #7c8cff, #9b6bff 55%, #b06bff);
  --grad-glow: 0 8px 22px rgba(124, 110, 255, 0.35);
  --ok: #34d8a0;
  --ok-soft: rgba(52, 216, 160, 0.14);
  --glow-1: rgba(155, 107, 255, 0.16);
  --glow-2: rgba(124, 140, 255, 0.13);

  --r: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --elev-2: 0 18px 44px rgba(0, 0, 0, 0.5);
  --ease: 0.16s cubic-bezier(0.4, 0, 0.2, 1);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  font-size: 16px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

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

/* Atmosphere: soft accent glow pinned behind the content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at 80% -10%, var(--glow-1), transparent 70%),
    radial-gradient(900px 520px at 2% -12%, var(--glow-2), transparent 70%);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.92em;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Typography ---- */

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.025em;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo:hover {
  text-decoration: none;
}
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 5px 16px rgba(124, 110, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.logo-mark svg {
  width: 16px;
  height: 16px;
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  align-items: center;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
}
.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ---- Buttons ---- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--grad);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 0.6rem 1.15rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--grad-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: filter var(--ease), transform var(--ease);
}
.button:hover {
  filter: brightness(1.08);
  text-decoration: none;
}
.button:active {
  transform: translateY(0.5px);
}
.button svg {
  width: 16px;
  height: 16px;
}
.button.ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.button.ghost:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  filter: none;
}

/* ---- Hero ---- */

.hero {
  padding: 6rem 0 4.5rem;
  text-align: center;
}
.hero .eyebrow {
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  line-height: 1.08;
  font-weight: 600;
  margin: 0 auto 1.1rem;
  max-width: 16ch;
}
.hero .sub {
  color: var(--muted);
  font-size: 1.2rem;
  max-width: 660px;
  margin: 0 auto 2rem;
}
.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Code card: a terminal-style snippet with a brand gradient hairline. */
.code-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  max-width: 720px;
  margin: 3rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-2);
}
.code-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.9;
}
.code-card .bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.78rem;
}
.code-card .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
}
.code-card .bar span {
  margin-left: auto;
  font-family: var(--mono);
}
.code-card pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  background: transparent;
  border: 0;
  line-height: 1.6;
}
.code-card .tok-cmd {
  color: var(--accent);
}
.code-card .tok-flag {
  color: var(--ok);
}
.code-card .tok-dim {
  color: var(--faint);
}

/* ---- Sections ---- */

section {
  padding: 4.5rem 0;
}
.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 2.75rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 600;
  margin: 0.6rem 0 0;
}
.section-head .lead {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0.7rem 0 0;
}

/* ---- Feature grid ---- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}
.feature {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--surface),
    color-mix(in srgb, var(--surface) 55%, var(--bg))
  );
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--elev-1);
  transition: transform var(--ease), border-color var(--ease),
    box-shadow var(--ease);
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity var(--ease);
}
.feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--elev-2);
}
.feature:hover::before {
  opacity: 0.85;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  margin-bottom: 1rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.feature-icon svg {
  width: 20px;
  height: 20px;
}
.feature h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}
.feature .api {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 0.1rem 0.6rem;
}

/* ---- Pillars (why Kethosbase) ---- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem 2rem;
}
.pillar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: var(--grad);
  box-shadow: var(--grad-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.pillar-icon svg {
  width: 18px;
  height: 18px;
}
.pillar h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0.35rem 0 0;
}
.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---- Steps ---- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  counter-increment: step;
}
.step h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.step h3::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  font-family: var(--display);
  font-size: 0.85rem;
  color: #fff;
  background: var(--grad);
  box-shadow: var(--grad-glow);
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---- CTA band ---- */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(
    180deg,
    var(--surface),
    color-mix(in srgb, var(--surface) 60%, var(--bg))
  );
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 3rem 1.5rem;
  box-shadow: var(--elev-1);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.9;
}
.cta h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.cta .lead {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
}
.cta .actions {
  margin-top: 0;
}

/* ---- Pricing ---- */

.pricing-hero {
  padding: 5rem 0 2rem;
}
.pricing-section {
  padding: 2.5rem 0;
}
.pricing-section.included {
  padding: 3.5rem 0;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    var(--surface),
    color-mix(in srgb, var(--surface) 55%, var(--bg))
  );
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--elev-1);
}
.tier.featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--elev-2);
}
.tier.featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.9;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.tier-badge {
  position: absolute;
  top: -0.7rem;
  left: 1.5rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad);
  border-radius: var(--r-pill);
  padding: 0.2rem 0.7rem;
  box-shadow: var(--grad-glow);
}
.tier-head h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
.tier-blurb {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 2.4em;
}
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 1.25rem 0 0.35rem;
}
.tier-price .amount {
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.tier-price .per {
  color: var(--faint);
  font-size: 0.92rem;
}
.tier-note {
  margin: 0;
  color: var(--faint);
  font-size: 0.82rem;
  min-height: 1.2em;
}
.tier-cta {
  width: 100%;
  justify-content: center;
  margin: 1.25rem 0 0;
}
.tier-quotas {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.6rem;
}
.tier-quotas li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.tier-quotas li strong {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pricing-fineprint {
  max-width: 720px;
  margin: 2rem auto 0;
  text-align: center;
  color: var(--faint);
  font-size: 0.88rem;
  line-height: 1.7;
}

.included-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem 1.5rem;
}
.included-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.96rem;
}
.included-item svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--ok);
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.site-footer nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--text);
}

/* ---- Legal pages (privacy, terms) ---- */

.legal {
  max-width: 760px;
  padding: 3rem 1.5rem 4rem;
}
.legal h1 {
  font-size: 2.1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2.5rem;
}
.legal h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2.5rem 0 0.6rem;
}
.legal h3 {
  font-size: 1.04rem;
  font-weight: 600;
  margin: 1.4rem 0 0.4rem;
}
.legal p,
.legal li {
  color: var(--muted);
}
.legal ul {
  padding-left: 1.25rem;
}
.legal li {
  margin: 0.3rem 0;
}
.legal .button.ghost {
  font-size: 0.9rem;
  padding: 0.4rem 0.85rem;
}

/* ---- 404 ---- */

.notfound {
  min-height: 64vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.notfound h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* ---- Cookie-consent banner (apex only, ADR-0043) ---- */

.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  margin: 0 auto;
  max-width: 760px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--elev-2);
  z-index: 1000;
}
.consent-banner .consent-text {
  margin: 0;
  flex: 1 1 18rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.consent-banner .consent-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

/* ---- Motion / responsive ---- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button,
  .feature {
    transition: none;
  }
}

@media (max-width: 640px) {
  .site-nav {
    gap: 1rem;
  }
  .site-nav .nav-hide {
    display: none;
  }
  .hero {
    padding: 4rem 0 3rem;
  }
  section {
    padding: 3.25rem 0;
  }
}
