:root {
  color-scheme: light dark;
  --background: #f3f6f4;
  --foreground: #16211d;
  --surface: #ffffff;
  --surface-subtle: #e9efec;
  --muted-foreground: #63716b;
  --border: #d2ddd8;
  --primary: #146c5a;
  --primary-strong: #0e5849;
  --primary-foreground: #ffffff;
  --accent: #d9a441;
  --hero-ink: #f1f8f5;
  --hero-muted: #c1d1ca;
  --focus: #146c5a;
  --radius: 6px;
  --font-sans: "Avenir Next", Avenir, "Segoe UI", "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 8px 30px rgba(4, 15, 11, 0.2);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(18px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(243, 246, 244, 0.95);
  background: color-mix(in srgb, var(--background) 95%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: var(--radius);
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 150ms, color 150ms, transform 150ms;
}

nav a:hover {
  background: var(--surface-subtle);
  color: var(--foreground);
}

nav a:active,
.button:active,
.product-link:active {
  transform: scale(0.97);
}

nav .nav-app {
  background: var(--primary);
  color: var(--primary-foreground);
}

nav .nav-app:hover {
  background: var(--primary-strong);
  color: #ffffff;
}

.hero {
  position: relative;
  height: clamp(480px, calc(100svh - 176px), 690px);
  min-height: 480px;
  overflow: hidden;
  background: #0b120f;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(7, 14, 11, 0.05), rgba(7, 14, 11, 0.38));
  pointer-events: none;
}

.hero-scrim {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: min(62%, 850px);
  background: linear-gradient(90deg, rgba(7, 17, 13, 0.97) 0%, rgba(7, 17, 13, 0.91) 67%, rgba(7, 17, 13, 0) 100%);
}

.hero-inner,
.section-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(580px, 54%);
  color: var(--hero-ink);
}

.eyebrow {
  margin: 0 0 10px;
  color: #7fd0b8;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2 {
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 86px;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-summary {
  max-width: 560px;
  margin: 22px 0 0;
  color: #e1ece7;
  font-size: 23px;
  line-height: 1.44;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: background-color 150ms, color 150ms, transform 150ms;
}

.button-primary {
  background: #75cbb1;
  color: #081713;
}

.button-primary:hover {
  background: #94dac5;
}

.button-quiet {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.button-quiet:hover {
  background: rgba(255, 255, 255, 0.13);
}

.hero-note {
  margin: 20px 0 0;
  color: var(--hero-muted);
  font-size: 14px;
}

.trust-band {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.trust-list {
  min-height: 108px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

.trust-list p {
  min-width: 0;
  margin: 0;
  padding: 10px 28px;
  border-left: 1px solid var(--border);
}

.trust-list p:first-child {
  padding-left: 0;
  border-left: 0;
}

.trust-list strong,
.trust-list span {
  display: block;
}

.trust-list strong {
  color: var(--primary);
  font-size: 14px;
  text-transform: uppercase;
}

.trust-list span {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 14px;
}

.workflow-band,
.ecosystem-band {
  padding: 86px 0 96px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-heading .eyebrow,
.principles-band .eyebrow {
  color: var(--primary);
}

h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.13;
  letter-spacing: 0;
}

.section-heading > p:last-child {
  margin: 16px 0 0;
  color: var(--muted-foreground);
  font-size: 18px;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.workflow-list li {
  min-width: 0;
  min-height: 230px;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 25px 30px 30px;
  border-left: 1px solid var(--border);
}

.workflow-list li:first-child {
  padding-left: 0;
  border-left: 0;
}

.step-number {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

.workflow-list h3 {
  margin: 48px 0 0;
  font-size: 21px;
  line-height: 1.25;
}

.workflow-list p {
  margin: 9px 0 0;
  color: var(--muted-foreground);
}

.principles-band {
  padding: 88px 0;
  border-block: 1px solid #263c34;
  background: #12221c;
  color: #f0f7f4;
}

.principles-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 8vw, 112px);
  align-items: start;
}

.principles-band .eyebrow {
  color: #78cbb1;
}

.principles-copy {
  padding-top: 28px;
  color: #bacac3;
  font-size: 18px;
}

.principles-copy p {
  margin: 0 0 22px;
}

.text-link {
  display: inline-flex;
  gap: 8px;
  color: #8cd6bf;
  font-weight: 750;
}

.ecosystem-band {
  background: var(--surface-subtle);
}

.ecosystem-heading {
  max-width: 780px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-link {
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--foreground);
  text-decoration: none;
  transition: border-color 150ms, background-color 150ms, transform 150ms;
}

.product-link:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  background: color-mix(in srgb, var(--surface) 91%, var(--primary));
}

.product-current {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
}

.product-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #263a33;
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
}

.kee-mark {
  background: var(--primary);
}

.matrix-mark {
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 2px;
}

.matrix-mark i {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: currentColor;
}

.matrix-mark i:nth-child(even) {
  opacity: 0.6;
}

.type-mark,
.tier-mark {
  font-family: var(--font-sans);
}

.product-link strong,
.product-link small {
  display: block;
}

.product-link strong {
  font-size: 17px;
}

.product-link small {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.product-arrow {
  color: var(--primary);
  font-size: 18px;
}

footer {
  padding: 24px 0;
  background: #09130f;
  color: #dbe8e2;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
}

.footer-inner a {
  color: #8dd4bd;
}

@media (max-width: 780px) {
  .site-header {
    padding-inline: 14px;
  }

  nav a:not(.nav-app) {
    display: none;
  }

  .hero {
    height: calc(100svh - 152px);
    min-height: 430px;
    max-height: 680px;
  }

  .hero-media {
    object-position: 35% top;
  }

  .hero-scrim {
    width: 100%;
    background: rgba(7, 17, 13, 0.84);
  }

  .hero-inner,
  .section-inner {
    width: min(calc(100% - 28px), 1180px);
  }

  .hero-copy {
    width: 100%;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 36px;
  }

  .hero-summary {
    font-size: 19px;
  }

  .trust-list {
    min-height: 0;
    grid-template-columns: 1fr;
    padding-block: 12px;
  }

  .trust-list p,
  .trust-list p:first-child {
    padding: 13px 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .trust-list p:first-child {
    border-top: 0;
  }

  .workflow-band,
  .ecosystem-band,
  .principles-band {
    padding-block: 58px;
  }

  .workflow-list {
    grid-template-columns: 1fr;
  }

  .workflow-list li,
  .workflow-list li:first-child {
    min-height: 0;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .workflow-list li:first-child {
    border-top: 0;
  }

  .workflow-list h3 {
    margin: 0;
  }

  .principles-layout,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .principles-layout {
    gap: 0;
  }

  .principles-copy {
    padding-top: 24px;
  }
}

@media (max-width: 390px) {
  .brand {
    font-size: 17px;
  }

  nav .nav-app {
    padding-inline: 10px;
  }

  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .product-link {
    padding-inline: 14px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0e1613;
    --foreground: #eef5f2;
    --surface: #151f1b;
    --surface-subtle: #1a2722;
    --muted-foreground: #a5b4ad;
    --border: #304039;
    --primary: #6fc8ad;
    --primary-strong: #8dd6c0;
    --primary-foreground: #071511;
    --focus: #78d0b5;
  }

  .site-header {
    background: rgba(14, 22, 19, 0.95);
  }

  nav .nav-app {
    color: var(--primary-foreground);
  }

  nav .nav-app:hover {
    color: #071511;
  }

  .product-mark {
    background: #3a5047;
  }

  .kee-mark {
    background: #4ba98e;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}
