:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6675;
  --paper: #f7f3ea;
  --panel: #ffffff;
  --blue: #2563eb;
  --cyan: #12b6cb;
  --lime: #a3e635;
  --amber: #f6c453;
  --coral: #f36f56;
  --line: #121826;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px clamp(18px, 4vw, 58px);
  background: rgba(247, 243, 234, 0.94);
  border-bottom: 2px solid rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 228px;
}

.logo-canvas {
  width: 46px;
  height: 46px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.04rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 850;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.nav-action,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 7px;
  font-weight: 950;
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.nav-action {
  padding: 0 18px;
  background: var(--amber);
}

.primary-button {
  padding: 0 22px;
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  padding: 0 20px;
  background: #fff;
}

.nav-action:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: clamp(38px, 6vw, 88px) clamp(18px, 5vw, 74px) 48px;
  border-bottom: 2px solid rgba(17, 24, 39, 0.12);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7.3vw, 7.65rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.2vw, 4.55rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  font-size: clamp(1.16rem, 1.55vw, 1.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-text {
  max-width: 710px;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.5vw, 1.28rem);
}

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

.hero-visual {
  position: relative;
  min-height: 590px;
}

#systemCanvas {
  display: block;
  width: min(100%, 500px);
  height: auto;
  margin-left: auto;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 16px 18px 0 var(--line);
}

.floating-card {
  position: absolute;
  width: min(78%, 330px);
  padding: 16px 18px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--line);
}

.top-card {
  top: 72px;
  left: 0;
}

.bottom-card {
  right: 16px;
  bottom: 34px;
  background: #eef7bd;
}

.floating-card span,
.pattern-grid p,
.list-stack span {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.floating-card strong {
  display: block;
  font-size: clamp(1rem, 1.4vw, 1.24rem);
  line-height: 1.08;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 2px solid rgba(17, 24, 39, 0.16);
}

.metrics div {
  padding: 26px clamp(18px, 4vw, 54px);
  background: #fff2c7;
  border-right: 2px solid rgba(17, 24, 39, 0.16);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 0.9;
}

.metrics span {
  color: var(--muted);
  font-weight: 800;
}

.section-block,
.split-section,
.feature-row,
.guide,
.research-panel,
.faq,
.site-footer {
  padding: clamp(54px, 8vw, 112px) clamp(18px, 5vw, 74px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(280px, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: 34px;
}

.section-heading p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading.compact {
  display: block;
  max-width: 780px;
}

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

.pattern-grid article,
.resource-grid article {
  min-height: 282px;
  padding: 24px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--line);
}

.pattern-grid article:nth-child(1) {
  background: #dfe9ff;
}

.pattern-grid article:nth-child(2) {
  background: #dff8fb;
}

.pattern-grid article:nth-child(3) {
  background: #eef7bd;
}

.pattern-grid article:nth-child(4) {
  background: #ffe2d8;
}

.pattern-grid h3 {
  margin-bottom: 42px;
}

.pattern-grid span,
.resource-grid span {
  color: var(--muted);
  font-weight: 650;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(300px, 1.06fr) minmax(280px, 0.94fr);
  gap: 18px;
  background: #111827;
  color: #f7f3ea;
}

.large-panel {
  padding: clamp(28px, 5vw, 54px);
  border: 2px solid #f7f3ea;
  border-radius: 8px;
}

.large-panel .eyebrow,
.list-stack span {
  color: var(--amber);
}

.large-panel p:last-child {
  max-width: 720px;
  color: rgba(247, 243, 234, 0.76);
  font-size: 1.08rem;
}

.list-stack {
  display: grid;
  gap: 18px;
}

.list-stack article {
  min-height: 150px;
  padding: 24px;
  background: #f7f3ea;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 7px 7px 0 #05070c;
}

.list-stack strong {
  display: block;
  font-size: clamp(1.16rem, 1.8vw, 1.66rem);
  line-height: 1.06;
}

.muted {
  background: #ebe7dd;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.resource-grid article {
  min-height: 190px;
  background: #fff;
}

.resource-grid strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1.32rem;
  line-height: 1.08;
}

.feature-row,
.guide {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 94px);
  align-items: start;
  border-top: 2px solid rgba(17, 24, 39, 0.14);
}

.feature-copy {
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-copy ul,
.steps {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.feature-copy li {
  padding: 16px 18px;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(17, 24, 39, 0.2);
  border-radius: 8px;
  font-weight: 760;
}

.steps {
  margin: 0;
}

.steps li {
  display: grid;
  grid-template-columns: 62px 160px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px;
  background: #fff;
  border: 2px solid rgba(17, 24, 39, 0.18);
  border-radius: 8px;
}

.steps span {
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 950;
}

.steps strong {
  font-size: 1.2rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.research-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.48fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  background: var(--amber);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.research-panel p {
  max-width: 720px;
}

.research-card {
  padding: 24px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--line);
}

#miniCanvas {
  display: block;
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
}

.research-card strong {
  display: block;
  font-size: 1.28rem;
  line-height: 1.1;
}

.faq {
  display: grid;
  gap: 12px;
}

details {
  padding: 18px 22px;
  background: #fff;
  border: 2px solid rgba(17, 24, 39, 0.18);
  border-radius: 8px;
}

summary {
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
}

details p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  color: #f7f3ea;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  color: rgba(247, 243, 234, 0.72);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(247, 243, 234, 0.78);
  font-weight: 850;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .section-heading,
  .split-section,
  .feature-row,
  .guide,
  .research-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 560px;
  }

  #systemCanvas {
    margin: 0 auto;
  }

  .top-card {
    left: 6%;
  }

  .metrics,
  .pattern-grid,
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .brand {
    min-width: auto;
  }

  .logo-canvas {
    width: 40px;
    height: 40px;
  }

  .nav-action {
    padding: 0 12px;
  }

  h1 {
    font-size: clamp(2.46rem, 15vw, 4.12rem);
  }

  .hero-actions,
  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 470px;
  }

  #systemCanvas {
    box-shadow: 9px 10px 0 var(--line);
  }

  .floating-card {
    width: 88%;
  }

  .top-card {
    top: 42px;
    left: 0;
  }

  .bottom-card {
    right: 0;
    bottom: 18px;
  }

  .metrics,
  .pattern-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 2px solid rgba(17, 24, 39, 0.16);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .pattern-grid article,
  .resource-grid article {
    min-height: auto;
  }

  .steps li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
