:root {
  --bg: #f6f0e6;
  --bg-soft: #fbf7f0;
  --surface: rgba(255, 252, 246, 0.94);
  --surface-strong: #fffdf8;
  --surface-alt: #e9dfd0;
  --text: #29211d;
  --muted: #70665e;
  --line: rgba(55, 43, 36, 0.14);
  --sage: #7d8a72;
  --sage-deep: #5d6b58;
  --copper: #a86d50;
  --moss: #8a8b6e;
  --forest: #35483b;
  --espresso: #241b17;
  --rose: #c9928b;
  --rose-soft: #ead2ce;
  --ivory: #f8f2e8;
  --shadow: 0 24px 54px rgba(49, 38, 31, 0.10);
  --shadow-soft: 0 12px 28px rgba(49, 38, 31, 0.07);
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1180px;
}

html {
  background: var(--ivory);
}

body {
  color: var(--text);
  font-family: "Inter", "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 7% 4%, rgba(125, 138, 114, 0.14), transparent 25rem),
    radial-gradient(circle at 94% 8%, rgba(201, 146, 139, 0.13), transparent 23rem),
    linear-gradient(180deg, #fffdf8 0%, #f7f0e6 48%, #eee4d7 100%);
}

h1,
h2,
h3,
h4,
.hero-card h2,
.quote-card blockquote,
.archive-figure span,
.ecosystem-node {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(3.6rem, 8vw, 7.5rem);
  line-height: 0.88;
}

h2 {
  font-size: clamp(2.45rem, 5vw, 4.4rem);
  line-height: 0.96;
}

h3 {
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  line-height: 1.02;
}

p,
li {
  text-wrap: pretty;
}

::selection {
  color: #fffdf8;
  background: var(--forest);
}

.site-header {
  border-bottom: 1px solid rgba(55, 43, 36, 0.12);
  background: rgba(255, 252, 246, 0.92);
  box-shadow: 0 8px 28px rgba(47, 36, 29, 0.045);
}

.site-header .container {
  padding: 0.82rem 0;
}

.brand-image {
  width: min(20rem, 67vw);
  max-height: 4.8rem;
}

.site-nav {
  gap: 0.7rem 1rem;
}

.site-nav a {
  position: relative;
  color: #665d56;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--sage), var(--rose));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--espresso);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.menu-toggle {
  border-color: rgba(55, 43, 36, 0.16);
  background: var(--surface-strong);
  color: var(--espresso);
}

.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
}

.surface {
  border-color: rgba(55, 43, 36, 0.09);
  background:
    linear-gradient(135deg, rgba(125, 138, 114, 0.055), transparent 42%),
    linear-gradient(315deg, rgba(201, 146, 139, 0.055), transparent 38%),
    rgba(255, 253, 248, 0.56);
}

.eyebrow,
.card-label,
.section-kicker,
.meta-label,
.page-kicker {
  color: var(--copper);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.hero,
.page-hero,
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before,
.home-hero::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(53, 72, 59, 0.24), transparent 34%),
    radial-gradient(circle at 70% 70%, rgba(201, 146, 139, 0.26), transparent 29%),
    radial-gradient(circle at 50% 50%, rgba(255, 253, 248, 0.75), transparent 59%);
  opacity: 0.72;
}

.hero::after,
.home-hero::after {
  background-image:
    linear-gradient(rgba(53, 72, 59, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 72, 59, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
}

.hero-card,
.panel,
.card,
.story-card,
.archive-entry,
.visual-tile,
.feature-chip,
.quote-card,
.contact-card,
.footer-card,
.disclosure,
.hero-rail,
.ecosystem-card {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card,
.story-card,
.archive-entry,
.visual-tile,
.quote-card,
.footer-card,
.contact-card,
.disclosure,
.panel {
  padding: clamp(1.25rem, 2.6vw, 1.8rem);
}

.card,
.story-card,
.project-link-card,
.signal-card,
.credential-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.story-card:hover,
.project-link-card:hover,
.signal-card:hover,
.credential-item:hover {
  transform: translateY(-3px);
  border-color: rgba(93, 107, 88, 0.32);
  box-shadow: var(--shadow);
}

.hero-card,
.hero-rail {
  background:
    linear-gradient(145deg, rgba(125, 138, 114, 0.11), rgba(201, 146, 139, 0.09)),
    rgba(255, 253, 248, 0.92);
}

.hero-graphic {
  border-color: rgba(55, 43, 36, 0.12);
  background:
    radial-gradient(circle at 48% 42%, rgba(201, 146, 139, 0.2), transparent 24%),
    radial-gradient(circle at 54% 58%, rgba(125, 138, 114, 0.18), transparent 34%),
    rgba(255, 253, 248, 0.72);
}

.hero-orbit {
  border-radius: 50%;
  border-color: rgba(53, 72, 59, 0.28);
}

.hero-signal span {
  background: linear-gradient(180deg, var(--forest), var(--rose));
}

.button {
  min-height: 3.15rem;
  padding: 0.82rem 1.25rem;
  border-radius: 999px;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.button.primary,
.hero .button.primary,
.home-hero .button.primary {
  border-color: var(--espresso);
  background: var(--espresso);
  color: #fffaf2;
  box-shadow: 0 16px 34px rgba(36, 27, 23, 0.18);
}

.button.primary:hover,
.hero .button.primary:hover,
.home-hero .button.primary:hover {
  border-color: var(--forest);
  background: var(--forest);
}

.button.secondary {
  border-color: rgba(55, 43, 36, 0.18);
  background: rgba(255, 253, 248, 0.78);
}

.button.secondary:hover {
  border-color: rgba(93, 107, 88, 0.38);
  background: #fffdf8;
}

.button.ghost {
  color: var(--forest);
}

.checklist li,
.stack-list li,
.clean-list li {
  border-color: rgba(55, 43, 36, 0.09);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.62);
}

.checklist li::before,
.stack-list li::before,
.clean-list li::before {
  color: var(--rose);
}

.section-heading h2::after,
.hero-copy h1::after,
.footer-brand h2::after {
  width: 4.6rem;
  background: linear-gradient(90deg, var(--sage-deep), var(--rose), var(--copper));
}

.page-hero {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0 3.5rem;
}

.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -12rem;
  right: -10rem;
  width: 35rem;
  height: 35rem;
  border: 1px solid rgba(53, 72, 59, 0.10);
  border-radius: 50%;
  box-shadow:
    0 0 0 4rem rgba(125, 138, 114, 0.025),
    0 0 0 9rem rgba(201, 146, 139, 0.02);
}

.quote-card {
  border-left: 3px solid var(--rose);
}

.quote-card cite {
  color: var(--sage-deep);
}

.stat-card strong,
.card .meta,
.workflow-demo-meta {
  color: var(--sage-deep);
}

.workflow-step {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.72);
}

.workflow-step.is-active {
  border-color: var(--forest);
  background: var(--forest);
}

.workflow-demo-panel {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(125, 138, 114, 0.12), rgba(201, 146, 139, 0.09)),
    var(--surface);
}

.footer {
  border-top-color: rgba(55, 43, 36, 0.12);
  background:
    radial-gradient(circle at 8% 0%, rgba(125, 138, 114, 0.12), transparent 20rem),
    radial-gradient(circle at 90% 20%, rgba(201, 146, 139, 0.10), transparent 20rem),
    #eee4d7;
}

.footer-card {
  background: rgba(255, 253, 248, 0.64);
}

.footer-links a,
.social-links a,
.site-links a {
  color: #665d56;
}

.footer-links a:hover,
.social-links a:hover,
.site-links a:hover {
  color: var(--forest);
}

/* New home-page system */
.home-hero {
  padding: clamp(5.5rem, 10vw, 9rem) 0 clamp(4.5rem, 8vw, 7rem);
  border-bottom: 1px solid rgba(55, 43, 36, 0.09);
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -18rem;
  right: -12rem;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 0;
  opacity: 0.7;
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.home-hero h1 {
  max-width: 10ch;
}

.home-hero .brand-statement {
  max-width: 43rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.home-hero-card {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(125, 138, 114, 0.13), rgba(201, 146, 139, 0.10)),
    rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.home-hero-card::before {
  content: "KS";
  display: grid;
  place-items: center;
  width: 8.5rem;
  height: 8.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(53, 72, 59, 0.28);
  border-radius: 50%;
  color: var(--espresso);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4.4rem;
  line-height: 1;
  box-shadow: 0 0 0 0.55rem rgba(125, 138, 114, 0.045);
}

.signal-grid,
.credential-strip,
.project-index,
.principle-grid {
  display: grid;
  gap: 1rem;
}

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

.signal-card,
.credential-item,
.project-link-card,
.principle-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.signal-card {
  min-height: 13rem;
  padding: 1.4rem;
}

.signal-card .signal-number,
.principle-step .step-number {
  display: block;
  margin-bottom: 1.8rem;
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.signal-card h3,
.project-link-card h3 {
  margin-bottom: 0.55rem;
}

.credential-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.credential-item {
  padding: 1.3rem;
}

.credential-item strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--forest);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
}

.credential-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.project-link-card {
  position: relative;
  min-height: 15rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  overflow: hidden;
}

.project-link-card::after {
  content: "↗";
  position: absolute;
  top: 1.25rem;
  right: 1.35rem;
  color: var(--sage-deep);
  font-size: 1.3rem;
}

.project-link-meta {
  margin-bottom: 1.3rem;
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-link-card p {
  max-width: 38rem;
  color: var(--muted);
}

.project-link-card.care {
  background:
    linear-gradient(145deg, rgba(125, 138, 114, 0.14), transparent 58%),
    var(--surface);
}

.project-link-card.human {
  background:
    linear-gradient(145deg, rgba(201, 146, 139, 0.15), transparent 58%),
    var(--surface);
}

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

.principle-step {
  padding: 1.35rem;
}

.care-callout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(53, 72, 59, 0.17);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 20%, rgba(201, 146, 139, 0.15), transparent 16rem),
    linear-gradient(135deg, rgba(125, 138, 114, 0.14), transparent 55%),
    rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.care-callout .clean-list li {
  background: rgba(255, 253, 248, 0.56);
}

.site-notice {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--sage);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(125, 138, 114, 0.09);
  color: var(--muted);
}

.registry-link {
  color: var(--forest);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(201, 146, 139, 0.65);
  text-underline-offset: 0.2em;
}

@media (max-width: 1080px) {
  .home-hero-grid,
  .care-callout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .brand-image {
    width: min(15.5rem, 68vw);
    max-height: 4rem;
  }

  .site-nav a {
    font-size: 0.82rem;
  }

  .home-hero {
    padding-top: 4.5rem;
  }

  .signal-grid,
  .credential-strip,
  .project-index,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-card::before {
    width: 7rem;
    height: 7rem;
    font-size: 3.7rem;
  }
}

@media print {
  .site-header,
  .footer,
  .menu-toggle,
  .hero-actions,
  .button,
  form {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .section,
  .page-hero,
  .home-hero {
    padding: 1.2rem 0;
  }

  .card,
  .panel,
  .story-card,
  .hero-rail,
  .quote-card,
  .credential-item {
    break-inside: avoid;
    box-shadow: none;
  }
}
