:root {
  --ink: #17241c;
  --ink-soft: #3d4a42;
  --paper: #f3efe6;
  --paper-2: #e7e1d4;
  --line: #d5cec0;
  --forest: #145c45;
  --white: #fbfaf6;
  --muted: #8d887c;
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

.ribbon {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(243, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.ribbon-brand {
  font-family: Fraunces, Georgia, serif;
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -0.03em;
  justify-self: start;
}

.ribbon-nav {
  display: flex;
  gap: 22px;
  justify-self: center;
  font-size: 13px;
  font-weight: 460;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.ribbon-nav a:hover { color: var(--ink); }

.ribbon-keela {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.01em;
}
.ribbon-keela:hover { background: #0f1813; }

.hero {
  position: relative;
  min-height: calc(100vh - 58px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    url("/portal/assets/hero.jpg") center / cover no-repeat;
  transform: scale(1.02);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 36, 28, 0.35) 0%, rgba(23, 36, 28, 0.72) 55%, rgba(23, 36, 28, 0.88) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 48px 28px 64px;
}

.hero-brand {
  margin: 0 0 18px;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 560;
  letter-spacing: -0.03em;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 560;
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.hero-lead {
  margin: 0 0 28px;
  max-width: 42ch;
  font-size: 17px;
  line-height: 1.45;
  color: rgba(251, 250, 246, 0.88);
  font-weight: 360;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-ghost,
.btn-ink {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 560;
}

.btn-primary {
  background: var(--white);
  color: var(--ink);
}
.btn-primary:hover { background: #fff; }

.btn-ghost {
  border: 1px solid rgba(251, 250, 246, 0.45);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--white); }

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}
.btn-ink:hover { background: #0f1813; }

.band {
  padding: 88px 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.band-ink {
  max-width: none;
  margin: 0;
  padding: 88px 28px;
  background: var(--ink);
  color: var(--paper);
}
.band-ink .eyebrow { color: #7eb89a; }
.band-ink .band-lead { color: rgba(243, 239, 230, 0.78); }

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  font-weight: 560;
}

.band h2 {
  margin: 0 0 20px;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18ch;
}

.band-lead {
  margin: 0 0 36px;
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 360;
}

.audience {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.audience h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 560;
}

.audience p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 15px;
  font-weight: 360;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin-inline: auto;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 18px;
  font-weight: 560;
  padding-top: 18px;
  border-top: 1px solid rgba(243, 239, 230, 0.22);
}

.steps span {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #7eb89a;
  font-weight: 560;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px;
  border-top: 1px solid var(--line);
  font-family: Fraunces, Georgia, serif;
  font-size: 18px;
}
.foot .muted {
  font-family: Outfit, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.foot p { margin: 0; }

/* —— System unlock diagram —— */
.system {
  padding: 72px 28px 88px;
  background: #ebe6da;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.system-head {
  max-width: 1100px;
  margin: 0 auto 28px;
}
.system-head h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18ch;
  color: var(--ink);
}
.system-stage {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 28px;
  align-items: stretch;
  min-height: 460px;
}
.system-explain {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 18px 40px rgba(23, 36, 28, 0.06);
  align-self: start;
  position: sticky;
  top: 82px;
}
.system-explain-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  font-weight: 560;
}
.system-explain h3 {
  margin: 0 0 12px;
  font-family: Fraunces, Georgia, serif;
  font-size: 26px;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}
.system-explain p:last-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 15px;
  font-weight: 360;
}
.system-canvas {
  position: relative;
  background: #f4f4ef;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 8px 32px;
  overflow: hidden;
}
.system-diagram-wrap {
  width: 100%;
}
.system-diagram-wrap svg,
.system-diagram {
  width: 100%;
  height: auto;
  display: block;
}
.system-hint {
  position: absolute;
  left: 18px;
  bottom: 10px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.ke-flow {
  stroke-dasharray: 2.5, 15;
  animation: keFlowMove 3.6s linear infinite;
}
.ke-flow--fast {
  stroke-dasharray: 2, 10;
  animation: keFlowFast 2.2s linear infinite;
}
.ke-mgmt {
  stroke-dasharray: 3, 6;
  animation: keMgmtMove 12s linear infinite;
}
/* Delta Charge original class names (1:1 diagram) */
.dc-flow {
  stroke-dasharray: 2.5, 15;
  animation: keFlowMove 3.6s linear infinite;
}
.dc-flow--fast {
  stroke-dasharray: 2, 10;
  animation: keFlowFast 2.2s linear infinite;
}
.dc-mgmt {
  stroke-dasharray: 3, 6;
  animation: keMgmtMove 12s linear infinite;
}
.dc-label {
  font-family: Outfit, sans-serif;
  font-size: 13px;
  font-weight: 560;
  fill: #012c29;
  letter-spacing: 0.02em;
}
@keyframes keFlowMove {
  to { stroke-dashoffset: -70; }
}
@keyframes keFlowFast {
  to { stroke-dashoffset: -72; }
}
@keyframes keMgmtMove {
  to { stroke-dashoffset: -72; }
}
@media (prefers-reduced-motion: reduce) {
  .ke-flow, .ke-flow--fast, .ke-mgmt,
  .dc-flow, .dc-flow--fast, .dc-mgmt { animation: none; }
}

.ke-hit {
  cursor: pointer;
}
.ke-hit.is-active {
  fill: rgba(20, 92, 69, 0.06);
}
.ke-label {
  font-family: Outfit, sans-serif;
  font-size: 13px;
  font-weight: 560;
  fill: #17241c;
  letter-spacing: 0.02em;
}

.flow {
  stroke: #1f7a6b;
  stroke-width: 2;
  stroke-dasharray: 5 9;
  opacity: 0.72;
  animation: flow-dash 1.15s linear infinite;
}
.flow-strong {
  stroke: #145c45;
  stroke-width: 2.4;
  opacity: 0.9;
  animation-duration: 0.9s;
}
@keyframes flow-dash {
  to { stroke-dashoffset: -42; }
}

.node {
  cursor: pointer;
  outline: none;
}
.node-halo {
  fill: rgba(20, 92, 69, 0.08);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.node.is-active .node-halo,
.node:hover .node-halo,
.node:focus-visible .node-halo {
  opacity: 1;
}
.node-disc {
  fill: var(--white);
  stroke: var(--forest);
  stroke-width: 1.5;
}
.node-box {
  fill: rgba(251, 250, 246, 0.92);
  stroke: #9aaf9f;
  stroke-width: 1.4;
}
.node-solid {
  fill: var(--ink);
  stroke: #0f1813;
  stroke-width: 1;
}
.node-label {
  fill: var(--forest);
  font-family: Outfit, sans-serif;
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.node-icon {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
}
.node-icon-ring {
  fill: none;
  stroke: var(--forest);
  stroke-width: 1.5;
}
.node-icon-on-dark {
  fill: none;
  stroke: #d8e7df;
  stroke-width: 2;
  stroke-linecap: round;
}
.node.is-active .node-box,
.node:hover .node-box {
  stroke: var(--forest);
  stroke-width: 2;
}
.node.is-active .node-disc,
.node:hover .node-disc {
  stroke-width: 2.2;
}
.node.is-active .node-solid,
.node:hover .node-solid {
  fill: #0f1813;
}
.node.is-active .node-label {
  fill: var(--ink);
}

@media (max-width: 860px) {
  .ribbon {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand keela"
      "nav nav";
  }
  .ribbon-brand { grid-area: brand; }
  .ribbon-keela { grid-area: keela; }
  .ribbon-nav {
    grid-area: nav;
    justify-self: start;
    flex-wrap: wrap;
    gap: 14px;
  }
  .audience,
  .steps {
    grid-template-columns: 1fr;
  }
  .system-stage {
    grid-template-columns: 1fr;
  }
  .system-explain {
    position: static;
  }
  .foot {
    flex-direction: column;
  }
}
