:root {
  color-scheme: light;
  --bg: #f5f7f2;
  --ink: #101512;
  --muted: #5a625e;
  --line: #d9dfd8;
  --dark: #111918;
  --dark-2: #192725;
  --dark-line: rgba(255, 255, 255, 0.16);
  --light: #fbfcf8;
  --accent: #22b8cf;
  --accent-2: #ffdd2d;
  --red: #e54f4f;
  --green: #2f7d60;
  --radius: 8px;
  --header-h: 72px;
  --shadow: 0 28px 80px rgba(6, 18, 18, 0.22);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 28px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

code,
pre,
.config-grid dd,
.product-id {
  font-family:
    "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(18px, 4vw, 52px);
  color: #fff;
  transition:
    background 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    backdrop-filter 220ms ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(245, 247, 242, 0.9);
  border-bottom-color: rgba(16, 21, 18, 0.1);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.nav-cta {
  display: flex;
  align-items: center;
}

.brand {
  justify-self: start;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 36%, #fff 0 13%, transparent 14%),
    conic-gradient(from 215deg, #1f4d9a 0 48%, #fff 48% 55%, #d44657 55% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.brand-name {
  font-size: 1rem;
}

.nav-links {
  justify-self: center;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.88rem;
  color: currentColor;
}

.nav-links a {
  opacity: 0.82;
  transition: opacity 180ms ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-cta {
  justify-self: end;
  height: 38px;
  padding: 0 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 720;
}

.section {
  padding: clamp(84px, 11vw, 150px) clamp(20px, 5vw, 72px);
  scroll-margin-top: calc(var(--header-h) + 28px);
}

.section-dark {
  background: var(--dark);
  color: #fff;
}

.section-kicker {
  margin-bottom: 20px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-dark .section-kicker {
  color: var(--accent-2);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  max-width: 920px;
  font-weight: 780;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3rem, 5.25vw, 5.8rem);
}

h2 {
  font-size: clamp(2.4rem, 5.5vw, 5.2rem);
}

h3 {
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  line-height: 1.18;
  font-weight: 760;
}

.hero {
  position: relative;
  min-height: 92svh;
  padding: var(--header-h) clamp(20px, 5vw, 72px) 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 15, 15, 0.9) 0%, rgba(8, 15, 15, 0.72) 38%, rgba(8, 15, 15, 0.25) 100%),
    url("assets/kaska-chat-bg.png") center / cover no-repeat;
  transform: scale(1.04);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: calc(92svh - var(--header-h));
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.65fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  padding-bottom: clamp(44px, 7vw, 86px);
}

.hero-copy {
  max-width: 980px;
}

.product-id {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.hero-lead {
  max-width: 680px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.08rem, 1.8vw, 1.42rem);
  line-height: 1.46;
}

.hero-actions,
.final-inner .button {
  margin-top: 28px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 760;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent-2);
  color: #151615;
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
}

.chat-stage {
  position: relative;
  margin: 0;
  align-self: end;
  max-height: min(72svh, 790px);
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(18px);
}

.chat-stage img {
  width: 100%;
  height: 100%;
  max-height: min(72svh, 790px);
  object-fit: cover;
  object-position: top left;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.split-heading p,
.scenario-copy p,
.architecture-head p,
.value-head p,
.proof-copy p,
.trust-inner p,
.final-inner p {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(56px, 7vw, 92px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-step {
  min-height: 260px;
  padding: 32px clamp(18px, 2.4vw, 34px);
  border-right: 1px solid var(--line);
}

.workflow-step:last-child {
  border-right: 0;
}

.step-number {
  display: block;
  margin-bottom: 56px;
  color: var(--red);
  font-weight: 780;
  font-size: 0.8rem;
}

.workflow-step p,
.value-item p,
.scenario-row p {
  margin-top: 16px;
  color: var(--muted);
}

.scenarios-section {
  background: var(--light);
}

.scenario-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.45fr) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.scenario-copy {
  position: sticky;
  top: calc(var(--header-h) + 36px);
}

.scenario-copy p {
  margin-top: 26px;
}

.scenario-list {
  border-top: 1px solid var(--line);
}

.scenario-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  align-items: center;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
}

.scenario-row span {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.scenario-row p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.5vw, 1.34rem);
  line-height: 1.36;
}

.architecture-section {
  overflow: hidden;
}

.architecture-head {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.4fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: end;
}

.architecture-head p,
.final-inner p {
  color: rgba(255, 255, 255, 0.74);
}

.architecture-map {
  display: flex;
  align-items: center;
  margin-top: clamp(48px, 7vw, 90px);
  overflow-x: auto;
  padding-bottom: 20px;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.arch-node {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--dark-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 760;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.arch-node:hover,
.arch-node.active {
  transform: translateY(-2px);
  border-color: rgba(255, 221, 45, 0.75);
  background: rgba(255, 221, 45, 0.12);
}

.arch-line {
  flex: 0 0 clamp(34px, 4vw, 68px);
  height: 1px;
  background: var(--dark-line);
}

.architecture-detail {
  margin-top: 20px;
  min-height: 112px;
  max-width: 760px;
  padding-top: 26px;
  border-top: 1px solid var(--dark-line);
}

.architecture-detail p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 1px;
  margin: clamp(42px, 6vw, 70px) 0 0;
  background: var(--dark-line);
  border: 1px solid var(--dark-line);
}

.config-grid div {
  min-height: 160px;
  padding: 22px;
  background: var(--dark);
}

.config-grid dt {
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.config-grid dd {
  margin: 42px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.55;
}

.value-head {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(260px, 0.34fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: end;
}

.value-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 64px);
  margin-top: clamp(54px, 7vw, 90px);
}

.value-item {
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}

.proof-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: center;
  background: #e8eee8;
}

.proof-copy p {
  margin-top: 26px;
}

.terminal {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0d1413;
  color: #d8eee9;
  box-shadow: 0 18px 50px rgba(12, 24, 22, 0.18);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff6159;
}

.terminal-bar span:nth-child(2) {
  background: #ffbd2e;
}

.terminal-bar span:nth-child(3) {
  background: #28c840;
}

.terminal pre {
  margin: 0;
  padding: clamp(22px, 4vw, 40px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: clamp(0.82rem, 1.2vw, 0.98rem);
}

.copy-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 760;
  cursor: pointer;
}

.trust-section {
  padding-top: clamp(70px, 9vw, 120px);
  padding-bottom: clamp(70px, 9vw, 120px);
}

.trust-inner {
  max-width: 980px;
}

.trust-inner p {
  margin-top: 28px;
}

.trust-inner ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  margin: clamp(38px, 6vw, 64px) 0 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.trust-inner li {
  min-height: 150px;
  padding: 24px;
  background: var(--bg);
  color: var(--muted);
}

.sources-section {
  background: var(--light);
}

.sources-section h2 {
  max-width: 720px;
}

.sources-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(38px, 6vw, 68px);
  background: var(--line);
  border: 1px solid var(--line);
}

.sources-list a {
  min-height: 82px;
  display: flex;
  align-items: center;
  padding: 18px 20px;
  background: var(--light);
  color: var(--ink);
  font-weight: 720;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.sources-list a:hover {
  background: var(--ink);
  color: #fff;
}

.final-cta {
  padding: clamp(84px, 12vw, 160px) clamp(20px, 5vw, 72px);
  scroll-margin-top: calc(var(--header-h) + 28px);
}

.final-inner {
  max-width: 880px;
}

.final-inner p {
  max-width: 560px;
  margin-top: 24px;
}

.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 620ms ease,
    transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1120px) {
  .hero-inner,
  .split-heading,
  .architecture-head,
  .value-head,
  .proof-section {
    grid-template-columns: 1fr;
  }

  .chat-stage {
    width: min(620px, 100%);
    justify-self: start;
    max-height: 520px;
  }

  .workflow,
  .config-grid,
  .value-columns,
  .trust-inner ul,
  .sources-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-step:nth-child(2) {
    border-right: 0;
  }

  .workflow-step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .scenario-layout {
    grid-template-columns: 1fr;
  }

  .scenario-copy {
    position: static;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    height: 36px;
    padding-inline: 14px;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .hero {
    min-height: 84svh;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(8, 15, 15, 0.98) 0%, rgba(8, 15, 15, 0.92) 58%, rgba(8, 15, 15, 0.86) 100%),
      url("assets/kaska-chat-bg.png") center / cover no-repeat;
  }

  .hero-inner {
    min-height: calc(84svh - var(--header-h));
    padding-top: 36px;
    padding-bottom: 30px;
  }

  h1 {
    font-size: clamp(2.28rem, 10.5vw, 2.95rem);
    line-height: 1.03;
  }

  h2 {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .hero-lead {
    margin-top: 22px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    flex: 1 1 170px;
    min-height: 44px;
    padding-inline: 16px;
  }

  .chat-stage {
    display: none;
  }

  .workflow,
  .config-grid,
  .value-columns,
  .trust-inner ul,
  .sources-list {
    grid-template-columns: 1fr;
  }

  .workflow-step {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-step:last-child {
    border-bottom: 0;
  }

  .step-number {
    margin-bottom: 38px;
  }

  .scenario-row {
    grid-template-columns: 54px 1fr;
    gap: 16px;
    min-height: 96px;
  }

  .scenario-row span {
    width: 44px;
    height: 44px;
  }

  .architecture-map {
    align-items: stretch;
  }

  .arch-node {
    min-height: 52px;
  }

  .arch-line {
    flex-basis: 24px;
    align-self: center;
  }

  .config-grid div,
  .trust-inner li {
    min-height: auto;
  }

  .copy-button {
    position: static;
    margin: 0 18px 18px;
  }
}

@media (max-width: 430px) {
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .product-id {
    font-size: 0.8rem;
    overflow-wrap: anywhere;
  }

  .terminal pre {
    font-size: 0.76rem;
  }
}
