/* Cohesa homepage. Aylith family: warm neutrals, DM Sans + Space Grotesk,
   with Cohesa's own teal as the product accent. */

: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.52 0.1 185);
  --accent-strong: oklch(0.44 0.09 185);
  --accent-soft: oklch(0.94 0.03 185);
  --accent-ink: oklch(0.4 0.08 185);
  --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.74 0.1 185);
  --accent-strong: oklch(0.8 0.09 185);
  --accent-soft: oklch(0.3 0.04 185);
  --accent-ink: oklch(0.8 0.09 185);
  --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.74 0.1 185);
    --accent-strong: oklch(0.8 0.09 185);
    --accent-soft: oklch(0.3 0.04 185);
    --accent-ink: oklch(0.8 0.09 185);
    --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;
}

/* ── Workspace illustration ─────────────────────────── */

.figure {
  margin: 0;
  position: relative;
}

.figure figcaption {
  margin-top: 14px;
  max-width: calc(100% - 290px);
  font-size: 12px;
  color: var(--faint);
}

.app {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
}

.app-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--faint);
  font-size: 12px;
}

.app-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}

.app-bar span {
  margin-left: 10px;
}

.app-side {
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
}

.app-side h4 {
  margin: 14px 8px 6px;
  font: 700 10px/1 "DM Sans", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.app-side h4:first-child {
  margin-top: 0;
}

.app-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-side li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--muted);
}

.app-side li.on {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line);
}

.app-side li b {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
}

.app-main {
  position: relative;
  padding: 0 0 14px;
  min-width: 0;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.app-head span {
  margin-left: auto;
  font-weight: 400;
  color: var(--faint);
  font-size: 12px;
}

.msgs {
  padding: 8px 18px 0;
}

.msg {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.msg .who {
  font-weight: 600;
}

.msg time {
  margin-left: 6px;
  font-size: 11px;
  color: var(--faint);
  font-family: var(--mono);
}

.msg p {
  color: var(--ink-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg);
  font-size: 12px;
  max-width: 100%;
}

.chip code {
  white-space: nowrap;
  color: var(--accent-ink);
  font-size: 11px;
}

.chip .st {
  margin-left: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: color-mix(in oklch, var(--violet) 14%, transparent);
  color: var(--violet);
  white-space: nowrap;
}

.reacts {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted);
}

.reacts span {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.reacts .thread {
  border: 0;
  color: var(--accent-ink);
  font-weight: 600;
  padding-left: 2px;
}

.composer {
  margin: 8px 18px 0;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
}

.composer kbd {
  font-size: 11px;
  color: var(--faint);
}

.typing {
  padding: 6px 18px 0;
  font-size: 11px;
  color: var(--faint);
}

.issue-card {
  position: absolute;
  right: -28px;
  bottom: -84px;
  width: 270px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  font-size: 12.5px;
}

.issue-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.issue-card h5 {
  margin: 8px 0 12px;
  font: 600 15px/1.3 "Space Grotesk", sans-serif;
  letter-spacing: -0.01em;
}

.issue-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
}

.issue-card dt {
  color: var(--faint);
}

.issue-card dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

/* ── 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;
}

.graph {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 0) 0 0 / 22px 22px,
    var(--paper);
  padding: 28px;
}

.graph svg {
  width: 100%;
  height: auto;
}

.graph text {
  font-family: "DM Sans", sans-serif;
  fill: var(--ink);
}

.graph .k {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--faint);
}

.graph .node {
  fill: var(--paper);
  stroke: var(--line-2);
}

.graph .edge {
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 4 5;
}

.graph .hub {
  fill: var(--accent-soft);
  stroke: var(--accent);
}

/* ── 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.09 185);
}

.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;
  }

  .issue-card {
    right: 16px;
  }

  .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;
  }

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

  .app-side {
    display: none;
  }

  .issue-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin: -20px 14px 0;
  }

  .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;
  }

  .graph {
    padding: 14px;
  }

  .figure figcaption {
    max-width: none;
  }

  .terminal pre {
    font-size: 12px;
    padding: 16px;
  }

  .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);
}
