/* Simherd homepage. Aylith family: warm neutrals, DM Sans + Space Grotesk,
   with a coral product accent taken from the primer palette. */

:root {
  color-scheme: light;
  --bg: #f8f7f4;
  --bg-2: #f0eee9;
  --paper: #fffdf9;
  --ink: #1c1a16;
  --ink-2: #332f29;
  --muted: #5d574c;
  --faint: #8a8374;
  --line: #e1ddd3;
  --line-2: #d4cdbf;
  --accent: oklch(0.56 0.15 32);
  --accent-strong: oklch(0.48 0.14 32);
  --accent-soft: oklch(0.94 0.035 40);
  --accent-ink: oklch(0.47 0.14 32);
  --copper: oklch(0.56 0.13 50);
  --warn: oklch(0.55 0.13 70);
  --violet: oklch(0.52 0.14 290);
  --rose: oklch(0.55 0.14 20);
  --shadow: 0 1px 2px rgb(28 26 22 / 0.05), 0 18px 50px -20px rgb(28 26 22 / 0.22);
  --radius: 14px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121110;
  --bg-2: #171512;
  --paper: #1c1a16;
  --ink: #f3efe8;
  --ink-2: #e1d9cc;
  --muted: #b5aa98;
  --faint: #8d8474;
  --line: #2f2b25;
  --line-2: #403a31;
  --accent: oklch(0.75 0.13 35);
  --accent-strong: oklch(0.8 0.11 38);
  --accent-soft: oklch(0.3 0.05 35);
  --accent-ink: oklch(0.8 0.11 38);
  --copper: oklch(0.74 0.11 50);
  --warn: oklch(0.78 0.12 75);
  --violet: oklch(0.74 0.11 290);
  --rose: oklch(0.74 0.11 20);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 60px -24px rgb(0 0 0 / 0.7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121110;
    --bg-2: #171512;
    --paper: #1c1a16;
    --ink: #f3efe8;
    --ink-2: #e1d9cc;
    --muted: #b5aa98;
    --faint: #8d8474;
    --line: #2f2b25;
    --line-2: #403a31;
    --accent: oklch(0.75 0.13 35);
    --accent-strong: oklch(0.8 0.11 38);
    --accent-soft: oklch(0.3 0.05 35);
    --accent-ink: oklch(0.8 0.11 38);
    --copper: oklch(0.74 0.11 50);
    --warn: oklch(0.78 0.12 75);
    --violet: oklch(0.74 0.11 290);
    --rose: oklch(0.74 0.11 20);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 60px -24px rgb(0 0 0 / 0.7);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
.wordmark {
  font-family: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

code,
pre,
kbd {
  font-family: var(--mono);
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
}

.skip:focus {
  top: 16px;
}

.wrap {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.wordmark svg {
  width: 30px;
  height: 30px;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 8px;
}

.site-nav a:hover {
  color: var(--accent-ink);
}

.theme-switch {
  margin: 0;
  min-width: 0;
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.theme-switch button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-switch button:hover {
  color: var(--ink);
}

.theme-switch button[aria-pressed="true"] {
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.theme-switch svg {
  width: 16px;
  height: 16px;
}

/* ── Hero ───────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
  padding-block: 88px 104px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hero h1 {
  font-size: clamp(46px, 6.4vw, 88px);
  margin: 24px 0 28px;
}

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

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--ink-2);
}

.link-arrow {
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-block: 6px;
}

.link-arrow:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.meta {
  margin-top: 28px;
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.01em;
}

/* ── Sections ───────────────────────────────────────── */

.section {
  padding-block: 104px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  margin-top: 18px;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
  max-width: 32em;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  padding: 32px 30px 34px;
  background: var(--paper);
}

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

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.feature p {
  color: var(--muted);
  font-size: 15.5px;
}

.feature ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--ink-2);
}

.feature li {
  padding: 3px 0 3px 18px;
  position: relative;
}

.feature li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 7px;
  height: 1.5px;
  background: var(--accent);
}

/* ── Connected work ─────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: center;
}

.split h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  margin: 18px 0 24px;
}

.split p + p {
  margin-top: 16px;
}

.split .body {
  color: var(--muted);
  font-size: 17.5px;
}

/* ── Self-host ──────────────────────────────────────── */

.terminal {
  border-radius: var(--radius);
  background: #161412;
  color: #e8e1d5;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #2a2622;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2622;
  font-size: 12px;
  color: #8d8474;
}

.terminal-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a352f;
}

.terminal-bar span {
  margin-left: 8px;
}

.terminal pre {
  margin: 0;
  padding: 20px 22px 24px;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.terminal .c {
  color: #8d8474;
}

.terminal .p {
  color: oklch(0.8 0.11 38);
}

.terminal .ok {
  color: oklch(0.78 0.13 150);
}

.terminal .h {
  color: #b5aa98;
}

.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font: 600 13px/1.9 var(--mono);
  color: var(--accent-ink);
}

.steps strong {
  display: block;
  font-weight: 600;
}

.steps span {
  color: var(--muted);
  font-size: 15px;
}

.steps code {
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

/* ── Status ─────────────────────────────────────────── */

.status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.status article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.status h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 14px 0 10px;
}

.status p {
  color: var(--muted);
  font-size: 15.5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.tag.ready {
  color: var(--accent-ink);
}

.tag.partial {
  color: var(--warn);
}

.tag.planned {
  color: var(--faint);
}

/* ── Closing + footer ───────────────────────────────── */

.closing {
  text-align: center;
  padding-block: 120px;
  border-top: 1px solid var(--line);
}

.closing h2 {
  font-size: clamp(38px, 5.4vw, 72px);
  margin-bottom: 22px;
}

.closing h2 em {
  font-style: normal;
  color: var(--accent);
}

.closing p {
  color: var(--muted);
  max-width: 36em;
  margin-inline: auto;
}

.closing .actions {
  justify-content: center;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding-block: 32px 44px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

.aylith {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: var(--ink-2);
}

.aylith b {
  color: var(--copper);
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 1080px) {
  .hero,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: min(1200px, 100% - 32px);
  }

  .site-header {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding-block: 14px;
    min-height: 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 22px;
    overflow-x: auto;
  }

  .theme-switch {
    margin-left: auto;
  }

  .hero {
    padding-block: 52px 88px;
  }

  .section {
    padding-block: 72px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 36px;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature {
    padding: 26px 22px;
  }

  .terminal pre {
    font-size: 12px;
    padding: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .closing {
    padding-block: 80px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .reveal {
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .reveal-2 {
    animation-delay: 0.12s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

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

.lead code,
.body code {
  font-size: 0.86em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ── Simherd: hero stack ────────────────────────────── */

.stack {
  position: relative;
  margin: 0;
  padding: 0 0 0 64px;
}

.stack figcaption {
  margin-top: 16px;
  font-size: 12px;
  color: var(--faint);
}

.json-card {
  position: absolute;
  left: 0;
  top: -46px;
  width: 300px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
  font-size: 12px;
}

.card-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  font-family: var(--mono);
}

.json-card pre {
  margin: 0;
  padding: 12px 14px 16px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
  overflow: hidden;
}

.jk {
  color: var(--accent-ink);
}

.js {
  color: oklch(0.5 0.1 150);
}

.jn {
  color: var(--violet);
}

.jp {
  color: var(--faint);
}

:root[data-theme="dark"] .js {
  color: oklch(0.78 0.11 150);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .js {
    color: oklch(0.78 0.11 150);
  }
}

.stack .terminal {
  position: relative;
  margin-top: 150px;
}

.terminal b {
  color: #fffaf0;
  font-weight: 600;
}

.terminal .bad {
  color: oklch(0.74 0.14 25);
}

/* ── Simherd: layers ────────────────────────────────── */

.layers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 56px repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.layers li {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.layers .n {
  font: 600 13px/1 var(--mono);
  color: var(--accent-ink);
}

.layers h3 {
  font-size: 22px;
  margin: 18px 0 8px;
  letter-spacing: -0.02em;
}

.layers p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.layers code {
  margin-top: auto;
  align-self: flex-start;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.layers li:nth-child(n + 4) {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-2);
}

.layers .seam {
  padding: 0;
  border: 0;
  background: none;
  align-items: center;
  justify-content: center;
  position: relative;
}

.layers .seam::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px dashed var(--accent);
}

.layers .seam span {
  position: relative;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 10px 4px;
  background: var(--bg);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.note {
  margin-top: 28px;
  max-width: 52em;
  color: var(--muted);
  font-size: 15.5px;
}

/* ── Simherd: clients ───────────────────────────────── */

.clients {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.client {
  padding: 22px 22px 26px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

.client.live {
  border: 1px solid var(--accent);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.client svg {
  width: 100%;
  height: 86px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--bg-2);
  padding: 8px;
}

.client .f {
  fill: var(--paper);
  stroke: var(--line-2);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.client .s {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.client.live .s {
  stroke: var(--accent);
  stroke-width: 2.5;
}

.client h3 {
  font-size: 20px;
  margin: 12px 0 6px;
  letter-spacing: -0.02em;
}

.client p {
  color: var(--muted);
  font-size: 15px;
}

.fine {
  margin-top: 22px;
  font-size: 14px;
  color: var(--faint);
}

.steps code {
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .stack {
    padding-left: 0;
  }

  .stack .terminal {
    margin-top: 0;
  }

  .json-card {
    display: none;
  }

  .layers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layers .seam {
    grid-column: 1 / -1;
    min-height: 40px;
  }

  .layers .seam::before {
    top: 50%;
    bottom: auto;
    left: 0;
    right: 0;
    border-left: 0;
    border-top: 2px dashed var(--accent);
  }

  .layers .seam span {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 4px 12px;
  }

  .clients {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .layers,
  .clients {
    grid-template-columns: minmax(0, 1fr);
  }
}
