/* KoderStack landing page — brand tokens per asset/brand/README.md */

@font-face { font-display: swap; }

:root {
  /* brand literals — never change with theme */
  --brand-ink: #0B1F22;
  --brand-teal: #0E8F88;
  --brand-teal-light: #4FD1C5;
  --brand-teal-deep: #0A6360;
  --brand-ground: #F3F6F5;
  --brand-line: #DCE4E2;

  /* semantic tokens — light (default) */
  --bg: var(--brand-ground);
  --surface: #FFFFFF;
  --surface-alt: #EAF3F1;
  --text: var(--brand-ink);
  --text-muted: #4E6467;
  --border: var(--brand-line);
  --accent: var(--brand-teal);
  --accent-contrast: #FFFFFF;
  --link: var(--brand-teal-deep);
  --focus: var(--brand-teal-deep);
  --ks-ink: var(--brand-ink);
  --ks-accent: var(--brand-teal);

  --shadow-card: 0 1px 2px rgba(11, 31, 34, 0.04), 0 8px 24px rgba(11, 31, 34, 0.06);
  --radius-card: 18px;
  --radius-pill: 999px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1719;
    --surface: #102428;
    --surface-alt: #0D2023;
    --text: #EAF3F1;
    --text-muted: #93ACAE;
    --border: rgba(255, 255, 255, 0.12);
    --accent: var(--brand-teal-light);
    --accent-contrast: var(--brand-ink);
    --link: var(--brand-teal-light);
    --focus: var(--brand-teal-light);
    --ks-ink: #EAF3F1;
    --ks-accent: var(--brand-teal-light);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #0A1719;
  --surface: #102428;
  --surface-alt: #0D2023;
  --text: #EAF3F1;
  --text-muted: #93ACAE;
  --border: rgba(255, 255, 255, 0.12);
  --accent: var(--brand-teal-light);
  --accent-contrast: var(--brand-ink);
  --link: var(--brand-teal-light);
  --focus: var(--brand-teal-light);
  --ks-ink: #EAF3F1;
  --ks-accent: var(--brand-teal-light);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

h1, h2, h3 {
  font-family: "Archivo", "Arial Black", sans-serif;
  font-weight: 700;
  color: var(--text);
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "<";
  font-weight: 600;
  color: var(--text-muted);
}
.eyebrow::after {
  content: "/>";
  font-weight: 600;
  color: var(--text-muted);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- header ---------- */

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
}

.logo-mark {
  display: block;
  height: 26px;
  width: auto;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a { color: var(--text); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.nav-toggle-btn span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; }
.nav-toggle-btn span::before, .nav-toggle-btn span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text);
}
.nav-toggle-btn span::before { top: -6px; }
.nav-toggle-btn span::after { top: 6px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 80px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.08;
  margin: 18px 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }

.hero-fineprint {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.hero-fineprint li { list-style: none; display: flex; align-items: center; gap: 8px; }
.hero-fineprint li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}
.hero-fineprint { padding: 0; margin: 0; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art svg { width: 100%; height: 100%; }

.hero-watermark {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 62vw;
  max-width: 780px;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}
[data-theme="dark"] .hero-watermark,
@media (prefers-color-scheme: dark) { }

/* ---------- section shell ---------- */

.section { padding: 84px 0; }
.section-alt { background: var(--surface-alt); }
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin-top: 14px;
}
.section-head p {
  margin-top: 14px;
  font-size: 17px;
  color: var(--text-muted);
}

/* ---------- how it works (stacked blocks) ---------- */

.stack-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.stack-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.stack-step .step-block {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  margin-bottom: 18px;
}

.stack-step .step-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.stack-step h3 { font-size: 20px; margin-bottom: 10px; }
.stack-step p { color: var(--text-muted); font-size: 15px; }

.stack-connector {
  display: none;
}

/* ---------- services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.service-icon svg { width: 22px; height: 22px; }

.service-card h3 { font-size: 18px; }
.service-card p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- promise strip ---------- */

.promise-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.promise-item {
  padding: 26px 4px;
  border-top: 2px solid var(--accent);
}
.promise-item .num {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 26px;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}
.promise-item .label {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ---------- faq ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  color: var(--accent);
  flex: none;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 68ch;
}

/* ---------- final cta ---------- */

.final-cta {
  background: var(--brand-ink);
  color: #F3F6F5;
  border-radius: 24px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.final-cta h2 { color: #F3F6F5; font-size: clamp(24px, 3vw, 32px); max-width: 20ch; }
.final-cta p { color: #A9C4C1; margin-top: 10px; max-width: 42ch; }
.final-cta .btn-primary { background: var(--brand-teal-light); color: var(--brand-ink); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--brand-ink);
  color: #C7D9D7;
  padding: 56px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 24px;
}
.footer-logo { height: 24px; width: auto; margin-bottom: 14px; }
.footer-tagline { max-width: 34ch; color: #9FB6B8; font-size: 14.5px; }
.footer-contact { text-align: right; }
.footer-contact a { color: #F3F6F5; font-family: "Archivo", sans-serif; font-weight: 600; font-size: 18px; }
.footer-contact .footer-label { display: block; font-size: 13px; color: #9FB6B8; margin-bottom: 6px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #7C9698;
  font-family: "IBM Plex Mono", monospace;
}

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

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 320px; margin: 0 auto; order: -1; }
  .stack-steps { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .promise-strip { grid-template-columns: 1fr; gap: 28px; }
  .final-cta { padding: 40px 28px; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .nav-toggle-btn { display: flex; }
  .nav-toggle-input:checked ~ .nav-links {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px;
  }
  .service-grid { grid-template-columns: 1fr; }
  .final-cta { flex-direction: column; align-items: flex-start; }
}
