:root {
  --paper: #f5f1e9;
  --paper-2: #ece6db;
  --ink: #071923;
  --ink-2: #0c2a35;
  --muted: #60727a;
  --line: rgba(7, 25, 35, .16);
  --teal: #078b84;
  --teal-dark: #006d68;
  --mint: #68e6c4;
  --coral: #ff705f;
  --white: #fffdf8;
  --radius: 24px;
  --shadow: 0 28px 80px rgba(1, 25, 34, .13);
  --ease: cubic-bezier(.2,.75,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Aptos, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.skip-link {
  position: fixed; left: 16px; top: 16px; z-index: 9999;
  transform: translateY(-160%); padding: 10px 14px; border-radius: 10px;
  background: var(--ink); color: white; text-decoration: none;
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

.scroll-progress { position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 3px; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--mint), var(--coral)); }

.chapter-rail {
  position: fixed; z-index: 50; left: clamp(24px, 3vw, 54px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px;
}
.chapter-link {
  border: 0; background: transparent; color: #6a7b82; display: grid; grid-template-columns: 30px 1fr;
  align-items: center; gap: 8px; text-align: left; padding: 7px 0; cursor: pointer;
}
.chapter-link span { font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.chapter-link b { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; opacity: 0; transform: translateX(-8px); transition: .3s var(--ease); }
.chapter-link::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #9cacb1; margin-left: -14px; transition: .3s; }
.chapter-link.is-active { color: var(--teal-dark); }
.chapter-link.is-active::before { background: var(--teal); box-shadow: 0 0 0 6px rgba(7,139,132,.12); }
.chapter-link:hover b, .chapter-link.is-active b { opacity: 1; transform: none; }

.chapter { position: relative; }
.eyebrow { margin: 0 0 18px; color: var(--teal-dark); font-weight: 800; font-size: 12px; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow-light { color: var(--mint); }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 750; transition: .25s var(--ease);
}
.button-primary { background: var(--ink); color: white; border: 1px solid var(--ink); box-shadow: 0 12px 30px rgba(7,25,35,.18); }
.button-primary:hover { transform: translateY(-2px); background: var(--teal-dark); border-color: var(--teal-dark); }
.button-quiet { border: 1px solid rgba(7,25,35,.28); background: rgba(255,255,255,.45); }
.button-quiet:hover { transform: translateY(-2px); border-color: var(--teal); color: var(--teal-dark); }

.hero {
  min-height: 100svh; overflow: hidden; padding: clamp(90px, 10vh, 130px) max(72px, calc((100vw - 1280px)/2)) 90px;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr); align-items: center; gap: 40px;
  isolation: isolate;
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -3; opacity: .32;
  background-image: linear-gradient(rgba(7,25,35,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(7,25,35,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, black, transparent 88%);
}
.hero::after { content: ""; position: absolute; z-index: -2; width: 720px; height: 720px; border-radius: 50%; right: -180px; top: 5%; background: radial-gradient(circle, rgba(104,230,196,.18), transparent 68%); filter: blur(10px); }
.hero-network { position: absolute; z-index: -1; width: min(64vw, 900px); right: -70px; top: 50%; transform: translateY(-50%); overflow: visible; }
.net-ring { fill: none; stroke: rgba(7,139,132,.22); stroke-width: 1.2; stroke-dasharray: 4 8; transform-origin: 450px 450px; }
.ring-a { animation: spin 28s linear infinite; }
.ring-b { animation: spinReverse 36s linear infinite; }
.net-path { fill: none; stroke: url(#heroLine); stroke-width: 2; }
.orbit-dot circle { fill: var(--teal); }
.dot-a { offset-path: path("M85 540 C230 360 310 670 450 450 S690 265 825 420"); animation: travel 8s linear infinite; }
.dot-b { offset-path: path("M150 235 C320 430 390 185 565 320 S710 600 840 520"); animation: travel 11s linear infinite -3s; }
.dot-c { offset-path: path("M120 700 C260 520 410 790 550 570 S680 395 820 680"); animation: travel 10s linear infinite -6s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes travel { to { offset-distance: 100%; } }

.hero-copy { position: relative; z-index: 3; max-width: 760px; }
.hero h1 { margin: 0; display: grid; grid-auto-flow: row; row-gap: .02em; font-size: clamp(66px, 8.1vw, 126px); line-height: .94; letter-spacing: -.075em; font-weight: 820; }
.hero h1 span { display: block; }
.hero h2 { margin: 34px 0 16px; max-width: 760px; font-size: clamp(30px, 3vw, 50px); line-height: 1.05; letter-spacing: -.045em; }
.hero-lead { margin: 0; max-width: 720px; color: #536970; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.62; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-visual { position: relative; height: min(77vh, 760px); align-self: end; display: flex; justify-content: center; align-items: end; }
.hero-visual img { position: relative; z-index: 3; width: min(100%, 620px); max-height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 24px 42px rgba(3,31,39,.18)); }
.portrait-halo { position: absolute; width: 72%; aspect-ratio: 1; border-radius: 50%; left: 50%; top: 43%; transform: translate(-50%,-50%); background: radial-gradient(circle at 50% 50%, rgba(104,230,196,.35), rgba(7,139,132,.08) 55%, transparent 70%); }
.hero-badge { position: absolute; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 999px; background: rgba(255,253,248,.88); border: 1px solid rgba(7,25,35,.16); box-shadow: 0 10px 35px rgba(7,25,35,.11); backdrop-filter: blur(10px); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.hero-badge span { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(7,139,132,.12); }
.badge-data { left: 2%; top: 28%; }
.badge-logic { right: -4%; top: 48%; }
.badge-ops { left: 8%; bottom: 17%; }
.hero-proof { position: absolute; left: max(72px, calc((100vw - 1280px)/2)); bottom: 34px; display: flex; align-items: center; gap: 14px; color: #526970; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.hero-proof i { width: 30px; height: 1px; background: rgba(7,25,35,.25); }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); text-decoration: none; text-transform: uppercase; letter-spacing: .18em; font-size: 9px; font-weight: 800; color: #657980; display: grid; gap: 8px; justify-items: center; }
.scroll-cue i { width: 1px; height: 42px; background: linear-gradient(var(--teal), transparent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: scaleY(.45); transform-origin: top; opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }

.logic { background: var(--ink); color: white; }
.logic-scroll { height: 380vh; }
.logic-stage { position: sticky; top: 0; min-height: 100svh; padding: 8vh max(72px, calc((100vw - 1280px)/2)); display: grid; grid-template-rows: auto 1fr; gap: clamp(28px, 5vh, 64px); overflow: hidden; }
.logic-stage::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: radial-gradient(circle at 1px 1px, rgba(104,230,196,.35) 1px, transparent 0); background-size: 34px 34px; mask-image: radial-gradient(circle at 60% 50%, black, transparent 72%); }
.logic-heading { position: relative; z-index: 2; max-width: 920px; }
.section-heading h2 { margin: 0; font-size: clamp(44px, 5.6vw, 88px); line-height: .98; letter-spacing: -.055em; }
.section-heading > p:last-child { margin: 18px 0 0; max-width: 720px; color: #9eb1b8; font-size: clamp(17px, 1.45vw, 21px); }
.logic-display { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(260px, .38fr) minmax(0, 1fr); gap: 38px; align-items: center; }
.logic-detail { align-self: center; min-height: 350px; padding: 34px; border: 1px solid rgba(104,230,196,.2); border-radius: var(--radius); background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.logic-count { color: var(--mint); font-weight: 800; font-size: 12px; letter-spacing: .15em; }
.logic-detail h3 { margin: 28px 0 12px; font-size: clamp(30px, 3vw, 48px); line-height: 1; letter-spacing: -.04em; }
.logic-detail > p { margin: 0; color: #a9bbc1; font-size: 17px; }
.logic-rule-list { margin-top: 30px; display: grid; gap: 10px; }
.logic-rule-list span { display: flex; align-items: center; gap: 10px; color: #d8e4e6; font-size: 13px; }
.logic-rule-list span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(104,230,196,.1); }
.pipeline-wrap { position: relative; min-width: 0; }
.pipeline-line { position: absolute; left: 0; right: 0; top: 4px; width: 100%; height: 90px; overflow: visible; }
.pipeline-track, .pipeline-progress { fill: none; stroke-width: 4; stroke-linecap: round; }
.pipeline-track { stroke: rgba(255,255,255,.11); }
.pipeline-progress { stroke: url(#none); stroke: var(--mint); stroke-dasharray: 1110; stroke-dashoffset: 1110; filter: drop-shadow(0 0 8px rgba(104,230,196,.7)); }
.pipeline-signal { fill: var(--coral); filter: drop-shadow(0 0 10px rgba(255,112,95,.9)); }
.pipeline-nodes { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; padding-top: 55px; }
.pipeline-node { min-height: 150px; padding: 20px 18px; border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(255,255,255,.035); opacity: .42; transform: translateY(16px); transition: .55s var(--ease); }
.pipeline-node b { color: var(--mint); font-size: 11px; letter-spacing: .12em; }
.pipeline-node h4 { margin: 18px 0 8px; font-size: 17px; line-height: 1.15; }
.pipeline-node p { margin: 0; color: #8fa2a9; font-size: 12px; }
.pipeline-node.is-past, .pipeline-node.is-active { opacity: 1; transform: none; }
.pipeline-node.is-active { border-color: rgba(104,230,196,.65); background: linear-gradient(145deg, rgba(104,230,196,.14), rgba(255,255,255,.04)); box-shadow: 0 16px 40px rgba(0,0,0,.22); }

.system { padding: 120px max(72px, calc((100vw - 1280px)/2)) 0; background: var(--paper); }
.system-intro { max-width: 1000px; margin-bottom: 70px; }
.system-intro h2 { margin: 0; max-width: 1050px; font-size: clamp(48px, 6vw, 96px); line-height: .95; letter-spacing: -.06em; }
.system-intro > p:last-child { max-width: 800px; margin: 22px 0 0; color: #5c7077; font-size: clamp(18px, 1.5vw, 22px); }
.system-scroll { height: 430vh; }
.system-stage { position: sticky; top: 0; min-height: 100svh; padding: 5vh 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; align-items: center; overflow: hidden; }
.system-caption { align-self: start; padding-top: 7vh; }
.system-caption > span { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.system-caption h3 { margin: 22px 0 14px; font-size: clamp(28px, 2.6vw, 42px); line-height: 1.04; letter-spacing: -.035em; }
.system-caption p { margin: 0; color: #60737a; font-size: 15px; }
.architecture-board { position: relative; width: 100%; min-height: 82vh; padding: 26px; border-radius: 30px; background: rgba(255,255,255,.58); border: 1px solid rgba(7,25,35,.12); box-shadow: var(--shadow); backdrop-filter: blur(14px); display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 16px; }
.architecture-board::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: linear-gradient(rgba(7,25,35,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(7,25,35,.035) 1px, transparent 1px); background-size: 30px 30px; pointer-events: none; }
.architecture-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.arch-row { position: relative; z-index: 2; display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: center; opacity: .18; transform: translateY(18px); transition: .65s var(--ease); }
.arch-row.is-visible { opacity: 1; transform: none; }
.arch-label { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; font-weight: 850; color: #587078; }
.arch-items { display: flex; gap: 10px; flex-wrap: wrap; }
.arch-pill, .channel-pill { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid rgba(7,25,35,.14); border-radius: 999px; background: rgba(255,255,255,.75); font-size: 12px; font-weight: 760; box-shadow: 0 6px 18px rgba(7,25,35,.05); }
.arch-control { align-items: stretch; }
.control-engine { display: grid; grid-template-columns: minmax(230px,.5fr) 1fr; gap: 18px; padding: 18px; border-radius: 22px; background: var(--ink); color: white; box-shadow: 0 20px 55px rgba(7,25,35,.22); }
.engine-core { display: grid; align-content: center; gap: 7px; padding: 20px; border-radius: 16px; background: radial-gradient(circle at 50% 0, rgba(104,230,196,.24), rgba(255,255,255,.04) 65%); border: 1px solid rgba(104,230,196,.2); }
.engine-core span { color: var(--mint); text-transform: uppercase; font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.engine-core strong { font-size: 17px; line-height: 1.25; }
.engine-rules { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; align-content: center; }
.engine-rules span { padding: 11px 10px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); color: #c7d5d9; text-align: center; font-size: 11px; }
.programs-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.program-card { min-height: 104px; padding: 15px; border-radius: 17px; border: 1px solid rgba(7,25,35,.14); background: white; box-shadow: 0 10px 25px rgba(7,25,35,.06); }
.program-card small { color: var(--teal); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.program-card h4 { margin: 9px 0 4px; font-size: 14px; }
.program-card p { margin: 0; color: #6b7d83; font-size: 10px; }
.channel-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.channel-pill { min-height: 38px; border-radius: 12px; padding: 7px 10px; }
.feedback-loop { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-radius: 16px; background: rgba(7,139,132,.08); border: 1px dashed rgba(7,139,132,.3); opacity: .15; transition: .6s var(--ease); }
.feedback-loop.is-visible { opacity: 1; }
.feedback-loop span { padding: 5px 9px; background: rgba(255,255,255,.75); border-radius: 999px; font-size: 10px; font-weight: 750; }
.feedback-loop b { margin-left: auto; color: var(--teal-dark); font-size: 10px; }
.dependency-legend { position: absolute; z-index: 5; left: 0; right: auto; top: 58%; bottom: auto; width: 280px; display: grid; grid-template-columns: 1fr; gap: 7px 14px; padding: 12px 14px; border-radius: 14px; background: rgba(245,241,233,.92); border: 1px solid rgba(7,25,35,.12); box-shadow: 0 12px 35px rgba(7,25,35,.1); opacity: 0; transform: translateY(10px); transition: .5s var(--ease); }
.system-stage[data-system-step="3"] .dependency-legend { opacity: 1; transform: none; }
.dependency-legend span { display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 700; color: #50676f; }
.legend-line { display: inline-block; width: 24px; height: 2px; background: var(--teal); }
.legend-line.dotted { background: repeating-linear-gradient(90deg,var(--coral) 0 4px,transparent 4px 7px); }
.legend-line.arrow { position: relative; }
.legend-line.arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 5px solid var(--teal); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255,112,95,.15); }

.operations { min-height: 100svh; padding: 120px max(72px, calc((100vw - 1280px)/2)); background: radial-gradient(circle at 50% 40%, #123542, var(--ink) 60%); color: white; overflow: hidden; }
.operations::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(104,230,196,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(104,230,196,.08) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle at center, black, transparent 75%); }
.operations-inner { position: relative; z-index: 2; }
.operations-heading { max-width: 980px; }
.operations-heading > p:last-child { max-width: 820px; }
.operations-orbit { position: relative; width: min(1040px, 100%); min-height: 700px; margin: 65px auto 0; }
.operations-core { position: absolute; z-index: 4; left: 50%; top: 50%; width: 250px; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 35% 30%, rgba(104,230,196,.34), rgba(7,25,35,.72) 60%); border: 1px solid rgba(104,230,196,.5); box-shadow: 0 0 0 25px rgba(104,230,196,.04), 0 0 90px rgba(104,230,196,.18); }
.operations-core::before, .operations-core::after { content: ""; position: absolute; inset: -26px; border: 1px dashed rgba(104,230,196,.24); border-radius: 50%; animation: spin 22s linear infinite; }
.operations-core::after { inset: -54px; animation-direction: reverse; animation-duration: 30s; }
.operations-core span { color: var(--mint); text-transform: uppercase; letter-spacing: .15em; font-size: 10px; font-weight: 850; }
.operations-core strong { margin-top: 8px; font-size: 24px; }
.operations-core em { color: #9fb5bb; font-size: 12px; font-style: normal; }
.orbit-lines i { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(104,230,196,.12); border-radius: 50%; transform: translate(-50%,-50%); }
.orbit-lines i:nth-child(1) { width: 560px; height: 560px; }
.orbit-lines i:nth-child(2) { width: 760px; height: 520px; }
.orbit-lines i:nth-child(3) { width: 900px; height: 390px; border-style: dashed; }
.ops-card { position: absolute; width: min(330px, 30vw); padding: 24px; border-radius: 22px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); box-shadow: 0 20px 55px rgba(0,0,0,.16); }
.ops-card > span { color: var(--mint); font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.ops-card h3 { margin: 14px 0 9px; font-size: 21px; line-height: 1.1; }
.ops-card p { margin: 0; color: #9fb1b7; font-size: 13px; }
.ops-a { left: 0; top: 70px; }
.ops-b { right: 0; top: 90px; }
.ops-c { left: 3%; bottom: 70px; }
.ops-d { right: 3%; bottom: 45px; }
.operations-statement { max-width: 880px; margin: 0 auto; padding: 26px 30px; display: grid; grid-template-columns: 56px 1fr; gap: 24px; align-items: center; border-top: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
.operations-statement svg { width: 56px; stroke: var(--mint); fill: none; stroke-width: 2; }
.operations-statement circle { fill: var(--ink); }
.operations-statement p { margin: 0; color: #d5e1e4; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; }

.contact { min-height: 86svh; padding: 130px max(72px, calc((100vw - 1280px)/2)) 34px; display: grid; place-items: center; overflow: hidden; }
.contact-inner { position: relative; z-index: 2; max-width: 1040px; text-align: center; }
.contact h2 { margin: 0; font-size: clamp(52px, 7vw, 112px); line-height: .94; letter-spacing: -.065em; }
.contact-inner > p:nth-of-type(2) { max-width: 760px; margin: 28px auto 0; color: #60737a; font-size: clamp(18px, 1.7vw, 23px); }
.contact-actions { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.contact-orbit { position: absolute; width: 900px; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%,-50%); opacity: .24; }
.contact-orbit i { position: absolute; inset: 0; border: 1px solid var(--teal); border-radius: 50%; }
.contact-orbit i:nth-child(2) { inset: 14%; border-style: dashed; animation: spin 30s linear infinite; }
.contact-orbit i:nth-child(3) { inset: 30%; border-color: var(--coral); animation: spinReverse 24s linear infinite; }
.contact footer { position: absolute; left: max(72px, calc((100vw - 1280px)/2)); right: max(72px, calc((100vw - 1280px)/2)); bottom: 24px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 18px; color: #667980; font-size: 12px; }
.contact footer a { text-decoration: none; }
.contact footer a:hover { color: var(--teal-dark); }

.motion-ready .reveal-up:not(.is-revealed),
.motion-ready .reveal-scale:not(.is-revealed),
.motion-ready .reveal-card:not(.is-revealed) { opacity: 0; }
.motion-ready .reveal-up:not(.is-revealed) { transform: translateY(28px); }
.motion-ready .reveal-scale:not(.is-revealed) { transform: scale(.96); }
.motion-ready .reveal-card:not(.is-revealed) { transform: translateY(26px) scale(.98); }
.is-revealed { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.noscript { position: fixed; z-index: 9999; left: 12px; right: 12px; bottom: 12px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 12px; text-align: center; }



/* Dedicated navigation gutter on medium and wide desktop screens. */
@media (min-width: 1500px) and (max-width: 1799px) {
  .hero { padding-left: 240px; }
  .hero-proof { left: 240px; }
  .logic-stage,
  .system,
  .operations,
  .contact { padding-left: 240px; }
  .contact footer { left: 240px; }
}

/* The chapter rail is hidden when there is not enough room for a clean gutter. */
@media (max-width: 1499px) {
  .chapter-rail { display: none; }
}

@media (max-width: 1120px) {
  .chapter-rail { display: none; }
  .hero { padding-left: 42px; padding-right: 42px; grid-template-columns: minmax(0,1fr) minmax(330px,.75fr); }
  .hero-proof { left: 42px; }
  .logic-stage, .system, .operations, .contact { padding-left: 42px; padding-right: 42px; }
  .system-stage { grid-template-columns: 240px minmax(0,1fr); }
  .architecture-board { padding: 20px; }
  .arch-row { grid-template-columns: 105px 1fr; }
  .programs-grid { grid-template-columns: repeat(2,1fr); }
  .channel-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 800px) {
  :root { --radius: 20px; }
  .scroll-progress { height: 4px; }
  .hero { min-height: auto; padding: 78px 20px 44px; grid-template-columns: 1fr; gap: 18px; }
  .hero-grid-bg { background-size: 32px 32px; }
  .hero-network { width: 160vw; right: -90vw; top: 58%; opacity: .65; }
  .hero-copy { order: 1; }
  .hero h1 { display: grid; gap: .08em; font-size: clamp(68px, 21vw, 96px); line-height: .90; letter-spacing: -.07em; padding-top: 4px; }
  .hero h1 span:last-child { padding-top: 0; }
  .hero h2 { margin-top: 30px; font-size: clamp(31px, 9vw, 46px); }
  .hero-lead { font-size: 17px; line-height: 1.55; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .button { padding: 0 13px; min-height: 46px; font-size: 12px; }
  .hero-visual { order: 2; height: 420px; margin: 8px -20px 0; overflow: hidden; }
  .hero-visual img { width: 390px; max-width: 94%; }
  .portrait-halo { width: 85%; }
  .badge-data { left: 7%; top: 22%; }
  .badge-logic { right: 4%; top: 43%; }
  .badge-ops { left: 8%; bottom: 15%; }
  .hero-proof { display: none; }
  .hero-proof i { display: none; }
  .scroll-cue { display: none; }

  .logic-scroll { height: auto; }
  .logic-stage { position: relative; min-height: auto; padding: 86px 20px; gap: 42px; overflow: visible; }
  .section-heading h2 { font-size: clamp(44px, 12vw, 64px); }
  .logic-display { grid-template-columns: 1fr; gap: 20px; }
  .logic-detail { min-height: 0; padding: 24px; }
  .logic-count, .logic-detail, .pipeline-line { display: none; }
  .pipeline-nodes { grid-template-columns: 1fr; padding: 0; gap: 12px; }
  .pipeline-node { opacity: 1; transform: none; min-height: 0; display: grid; grid-template-columns: 44px 1fr; column-gap: 10px; padding: 17px 18px; }
  .pipeline-node b { grid-row: 1 / span 2; align-self: center; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(104,230,196,.1); }
  .pipeline-node h4 { margin: 0 0 4px; font-size: 16px; }
  .pipeline-node p { font-size: 12px; }
  .pipeline-node.is-active { border-color: rgba(104,230,196,.28); box-shadow: none; }

  .system { padding: 88px 20px 0; }
  .system-intro { margin-bottom: 48px; }
  .system-intro h2 { font-size: clamp(48px, 13vw, 70px); }
  .system-scroll { height: auto; }
  .system-stage { position: relative; min-height: auto; padding: 0 0 84px; display: block; overflow: visible; }
  .system-caption { display: none; }
  .architecture-board { min-height: 0; padding: 18px; gap: 18px; border-radius: 22px; }
  .architecture-lines { display: none; }
  .arch-row { opacity: 1; transform: none; display: block; }
  .arch-label { margin-bottom: 10px; color: var(--teal-dark); }
  .arch-items { gap: 8px; }
  .arch-pill { flex: 1 1 calc(50% - 8px); min-width: 120px; }
  .control-engine { grid-template-columns: 1fr; padding: 14px; }
  .engine-core { padding: 18px; }
  .engine-rules { grid-template-columns: repeat(2,1fr); }
  .programs-grid { grid-template-columns: 1fr 1fr; }
  .program-card { min-height: 108px; }
  .channel-grid { grid-template-columns: 1fr 1fr; }
  .feedback-loop { opacity: 1; }
  .feedback-loop b { width: 100%; margin: 4px 0 0; }
  .dependency-legend { position: static; width: auto; opacity: 1; transform: none; margin-top: 14px; grid-template-columns: 1fr; }

  .operations { padding: 88px 20px; }
  .operations-heading > p:last-child { font-size: 17px; }
  .operations-orbit { min-height: auto; margin-top: 44px; display: grid; gap: 12px; }
  .operations-core { position: relative; left: auto; top: auto; transform: none; width: 220px; margin: 0 auto 26px; }
  .orbit-lines { display: none; }
  .ops-card { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: 100%; padding: 20px; }
  .operations-statement { margin-top: 34px; padding: 22px 0; grid-template-columns: 42px 1fr; gap: 16px; }
  .operations-statement svg { width: 42px; }
  .operations-statement p { font-size: 17px; }

  .contact { min-height: 90svh; padding: 100px 20px 92px; }
  .contact h2 { font-size: clamp(50px, 14vw, 76px); }
  .contact-inner > p:nth-of-type(2) { font-size: 17px; }
  .contact-actions { display: grid; }
  .contact-orbit { width: 150vw; }
  .contact footer { left: 20px; right: 20px; bottom: 20px; display: grid; justify-items: center; text-align: center; gap: 5px; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 64px; }
  .hero h2 { font-size: 30px; }
  .hero-actions { grid-template-columns: 1fr; }
  .hero-visual { height: 380px; }
  .arch-pill { flex-basis: 100%; }
  .programs-grid, .channel-grid { grid-template-columns: 1fr; }
  .engine-rules { grid-template-columns: 1fr; }
}

@media (orientation: landscape) and (max-height: 620px) and (max-width: 950px) {
  .hero { grid-template-columns: 1.1fr .9fr; padding-top: 54px; min-height: 100svh; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; height: 82svh; }
  .hero h1 { display: grid; gap: .04em; font-size: 58px; line-height: .92; }
  .hero h2 { font-size: 28px; margin-top: 18px; }
  .hero-lead { font-size: 14px; }
  .hero-proof { display: none; }
  .logic-stage { padding-top: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-up, .reveal-scale, .reveal-card { opacity: 1 !important; transform: none !important; }
  .logic-scroll, .system-scroll { height: auto !important; }
  .logic-stage, .system-stage { position: relative !important; min-height: auto !important; }
  .logic-detail { display: none; }
  .pipeline-line { display: none; }
  .pipeline-nodes { padding-top: 0; }
  .pipeline-node, .arch-row, .feedback-loop, .dependency-legend { opacity: 1 !important; transform: none !important; }
}

/* Motion and mobile layout refinement 2026-06-13 */
body { width: 100%; max-width: 100%; overflow-x: hidden; }
.architecture-board { transform-origin: 50% 50%; will-change: transform; }
.arch-svg-base,
.arch-svg-flow {
  fill: none;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.arch-svg-base {
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.arch-svg-flow {
  stroke-linecap: round;
  stroke-dasharray: .035 .12;
  opacity: 0;
  animation: architectureFlow 2.15s linear infinite;
}
@keyframes architectureFlow { to { stroke-dashoffset: -.31; } }
.arch-row,
.feedback-loop,
.control-engine,
.program-card,
.channel-pill,
.arch-pill { will-change: opacity, transform, filter; }
.mobile-flow-meter { display: none; }
.system-stage.is-in-view .control-engine {
  box-shadow: 0 24px 70px rgba(7,25,35,.25), 0 0 0 1px rgba(104,230,196,.08);
}

@media (max-width: 800px) {
  .logic-stage,
  .system-stage,
  .operations-inner,
  .contact-inner { width: 100%; max-width: 100%; }

  .pipeline-node {
    transform-origin: 50% 50%;
    transition: opacity .18s linear, border-color .22s ease, background-color .22s ease, box-shadow .22s ease;
  }
  .pipeline-node.is-mobile-active {
    border-color: rgba(104,230,196,.7);
    background: linear-gradient(145deg, rgba(104,230,196,.13), rgba(255,255,255,.055));
    box-shadow: 0 16px 34px rgba(0,0,0,.2);
  }
  .pipeline-node.is-mobile-active b {
    background: rgba(104,230,196,.2);
    box-shadow: 0 0 0 7px rgba(104,230,196,.07);
  }

  .architecture-board {
    position: relative;
    padding: 22px 16px 22px 38px;
    overflow: hidden;
  }
  .architecture-board::before { opacity: .7; }
  .mobile-flow-meter {
    display: block;
    position: absolute;
    z-index: 4;
    left: 17px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    border-radius: 999px;
    background: rgba(7,139,132,.13);
    pointer-events: none;
  }
  .mobile-flow-meter span {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to bottom, var(--teal), var(--mint), var(--coral));
    transform: scaleY(var(--mobile-system-progress, 0));
    transform-origin: top;
    box-shadow: 0 0 12px rgba(7,139,132,.35);
  }
  .mobile-flow-meter i {
    position: absolute;
    left: 50%;
    top: calc(var(--mobile-system-progress, 0) * 100%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 5px rgba(255,112,95,.12), 0 0 16px rgba(255,112,95,.55);
    transform: translate(-50%, -50%);
  }
  .arch-row,
  .feedback-loop {
    transform-origin: 50% 50%;
    transition: opacity .18s linear, filter .2s ease;
  }
  .arch-row.is-mobile-active .arch-label {
    color: var(--teal-dark);
  }
  .arch-row.is-mobile-active .arch-pill,
  .arch-row.is-mobile-active .channel-pill,
  .arch-row.is-mobile-active .program-card,
  .arch-row.is-mobile-active .control-engine {
    border-color: rgba(7,139,132,.42);
    box-shadow: 0 14px 30px rgba(7,25,35,.1);
  }
  .arch-row.is-mobile-active .control-engine {
    box-shadow: 0 20px 42px rgba(7,25,35,.25), 0 0 0 1px rgba(104,230,196,.12);
  }
  .feedback-loop.is-mobile-active {
    border-color: rgba(7,139,132,.5);
    background: rgba(7,139,132,.12);
  }
  .ops-card {
    transform-origin: 50% 50%;
    transition: opacity .18s linear, border-color .22s ease, box-shadow .22s ease;
  }
  .ops-card.is-mobile-active {
    border-color: rgba(104,230,196,.52);
    box-shadow: 0 18px 38px rgba(0,0,0,.22);
  }

  .contact {
    min-height: auto;
    display: block;
    padding: 96px 20px calc(28px + env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .contact-inner {
    margin: 0 auto;
    text-align: center;
  }
  .contact h2 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(34px, 10.6vw, 46px);
    line-height: 1.01;
    letter-spacing: -.047em;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-wrap: balance;
  }
  .contact-inner > p:nth-of-type(2) {
    max-width: 34rem;
    margin-top: 22px;
    line-height: 1.55;
  }
  .contact-actions {
    width: min(100%, 420px);
    margin: 30px auto 0;
  }
  .contact-actions .button { width: 100%; }
  .contact-orbit {
    width: min(148vw, 650px);
    top: 42%;
  }
  .contact footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 520px;
    margin: 70px auto 0;
    padding: 22px 0 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 390px) {
  .contact h2 { font-size: clamp(32px, 10.2vw, 40px); }
  .architecture-board { padding-left: 34px; }
  .mobile-flow-meter { left: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .arch-svg-flow { display: none !important; animation: none !important; }
  .mobile-flow-meter { display: none !important; }
  .architecture-board,
  .pipeline-node,
  .arch-row,
  .feedback-loop,
  .ops-card { transform: none !important; opacity: 1 !important; filter: none !important; }
}

.architecture-board.measure-layout .arch-row,
.architecture-board.measure-layout .feedback-loop { transform: none !important; }
.arch-row.is-flow-active .arch-label { color: var(--teal-dark); }
.arch-row.is-flow-active .arch-pill,
.arch-row.is-flow-active .channel-pill,
.arch-row.is-flow-active .program-card {
  border-color: rgba(7,139,132,.32);
  box-shadow: 0 12px 28px rgba(7,25,35,.09);
}
.arch-row.is-flow-active .control-engine {
  box-shadow: 0 26px 72px rgba(7,25,35,.28), 0 0 0 1px rgba(104,230,196,.14);
}


/* Responsive final pass 2026-06-13
   Portrait, footer and viewport stability across phones, tablets and desktop. */
.portrait-picture {
  position: relative;
  z-index: 3;
  display: block;
  width: min(100%, 620px);
  margin: 0 auto;
}
.portrait-picture img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: 50% 0%;
}

@media (max-width: 800px) {
  html, body { max-width: 100%; overflow-x: hidden; }

  .hero {
    min-height: auto;
    padding-top: calc(74px + env(safe-area-inset-top));
    padding-bottom: 46px;
    overflow: hidden;
  }

  .hero-copy,
  .hero-visual,
  .portrait-picture { min-width: 0; max-width: 100%; }

  .hero-visual {
    order: 2;
    width: calc(100% + 40px);
    height: auto;
    min-height: 0;
    margin: 24px -20px 0;
    padding: 30px 20px 0;
    overflow: visible;
    align-items: flex-start;
    justify-content: center;
  }

  .portrait-picture {
    width: min(100%, 430px);
    padding-top: 0;
  }

  .hero-visual img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center top;
    filter: drop-shadow(0 22px 38px rgba(3,31,39,.16));
  }

  .portrait-halo {
    width: min(86vw, 390px);
    top: 44%;
  }

  .badge-data { left: max(12px, 4vw); top: 27%; }
  .badge-logic { right: max(12px, 4vw); top: 51%; }
  .badge-ops { left: max(16px, 5vw); bottom: 15%; }

  .contact {
    min-height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 96px 20px calc(34px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .contact-inner {
    width: min(100%, 680px);
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    text-align: center;
  }

  .contact h2,
  .contact-inner > p,
  .contact-actions {
    margin-left: auto;
    margin-right: auto;
  }

  .contact h2 {
    max-width: 12.5ch;
    font-size: clamp(34px, 10.5vw, 48px);
    line-height: 1.02;
    letter-spacing: -.048em;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    text-wrap: balance;
  }

  .contact-inner > p:nth-of-type(2) {
    max-width: 34rem;
    margin-top: 22px;
    font-size: clamp(16px, 4.4vw, 18px);
    line-height: 1.55;
    text-wrap: pretty;
  }

  .contact-actions {
    width: min(100%, 420px);
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-actions .button { width: 100%; }

  .contact footer {
    position: relative;
    inset: auto;
    width: min(100%, 560px);
    max-width: 100%;
    margin: 68px auto 0;
    padding: 22px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--line);
    color: #667980;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .contact footer > * {
    display: block;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .contact footer a {
    max-width: 100%;
    padding: 2px 8px;
  }
}

@media (max-width: 430px) {
  .hero-actions { grid-template-columns: 1fr; }
  .hero-visual {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .portrait-picture { width: min(100%, 400px); }
  .hero-badge { font-size: 10px; padding: 8px 11px; }
  .contact { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 360px) {
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: clamp(58px, 19vw, 68px); }
  .hero h2 { font-size: 29px; }
  .hero-visual {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
  }
  .hero-badge { font-size: 9px; letter-spacing: .06em; }
  .contact h2 { font-size: clamp(31px, 10.1vw, 38px); }
}

@media (min-width: 801px) {
  .hero-visual { overflow: visible; }
}

@media (orientation: landscape) and (max-height: 620px) and (max-width: 950px) {
  .portrait-picture { width: min(100%, 430px); }
  .hero-visual { padding-top: 12px; }
}


.mobile-line-break { display: none; }
@media (max-width: 800px) {
  .mobile-line-break { display: block; }
  .contact h2 {
    max-width: 100%;
    font-size: clamp(32px, 9vw, 44px);
    line-height: 1.04;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
}
@media (max-width: 360px) {
  .contact h2 { font-size: clamp(30px, 9.2vw, 35px); }
}

/* ========================================================================
   RESPONSIVE CONTACT AND FOOTER SAFETY PATCH V3
   Keeps the closing section in normal document flow on every viewport.
   ======================================================================== */
.contact {
  box-sizing: border-box;
  min-height: 100svh;
  width: 100%;
  padding-top: clamp(76px, 10vh, 124px);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: clip;
}

.contact-inner {
  width: min(100%, 1120px);
  max-width: 1120px;
  margin: auto auto 0;
  padding: clamp(18px, 3.2vh, 38px) 0;
  flex: 0 0 auto;
}

.contact h2 {
  max-width: 13.5ch;
  margin-inline: auto;
  font-size: clamp(48px, min(6.55vw, 10.5vh), 104px);
  line-height: .94;
  text-wrap: balance;
}

.contact-inner > p:nth-of-type(2) {
  margin-top: clamp(18px, 2.8vh, 30px);
}

.contact-actions {
  margin-top: clamp(24px, 3.8vh, 36px);
}

.contact footer {
  position: relative;
  inset: auto;
  width: min(100%, 1280px);
  margin: clamp(48px, 7vh, 88px) auto 0;
  padding: 18px 0 0;
  flex: 0 0 auto;
  align-self: center;
}

/* Short desktop and laptop screens need less vertical scale, not overlap. */
@media (min-width: 801px) and (max-height: 900px) {
  .contact {
    padding-top: clamp(56px, 7vh, 82px);
    padding-bottom: 18px;
  }
  .contact-inner {
    padding-top: 10px;
    padding-bottom: 8px;
  }
  .contact h2 {
    max-width: 14.5ch;
    font-size: clamp(44px, min(5.8vw, 9.6vh), 78px);
    line-height: .96;
  }
  .contact-inner > p:nth-of-type(2) {
    max-width: 720px;
    margin-top: 16px;
    font-size: clamp(16px, 1.35vw, 20px);
    line-height: 1.45;
  }
  .contact-actions {
    margin-top: 22px;
  }
  .contact footer {
    margin-top: clamp(34px, 5vh, 52px);
  }
}

@media (min-width: 801px) and (max-height: 700px) {
  .contact {
    padding-top: 44px;
  }
  .contact h2 {
    font-size: clamp(40px, min(5vw, 8.5vh), 62px);
  }
  .contact-inner > p:nth-of-type(2) {
    margin-top: 12px;
  }
  .contact-actions {
    margin-top: 16px;
  }
  .contact footer {
    margin-top: 28px;
  }
}

@media (max-width: 800px) {
  .contact {
    min-height: 100svh;
    padding: 88px 20px max(30px, env(safe-area-inset-bottom));
  }
  .contact-inner {
    width: min(100%, 680px);
    max-width: 100%;
    margin: auto auto 0;
    padding: 0;
  }
  .contact h2 {
    max-width: 100%;
    font-size: clamp(32px, 9vw, 44px);
    line-height: 1.04;
  }
  .contact footer {
    width: min(100%, 560px);
    max-width: 100%;
    margin: clamp(54px, 8vh, 76px) auto 0;
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
}

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

/* Contact layout V4: two explicit rows prevent every footer collision. */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr) auto;
  justify-items: center;
  align-items: center;
}
.contact-inner {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  margin: 0;
}
.contact footer {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  margin-top: clamp(44px, 6vh, 76px);
}
@media (min-width: 801px) and (max-height: 900px) {
  .contact footer { margin-top: clamp(30px, 4.5vh, 46px); }
}
@media (min-width: 801px) and (max-height: 700px) {
  .contact footer { margin-top: 24px; }
}
@media (max-width: 800px) {
  .contact {
    grid-template-rows: minmax(min-content, 1fr) auto;
  }
  .contact-inner { margin: 0; }
  .contact footer { margin-top: clamp(50px, 7vh, 72px); }
}

/* Contact and footer V5: footer is a separate document row and cannot collide. */
.contact {
  min-height: 86svh;
  display: grid;
  place-items: center;
  padding-top: clamp(76px, 10vh, 124px);
  padding-bottom: clamp(76px, 10vh, 124px);
}
.contact-inner {
  width: min(100%, 1120px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
}
.site-footer {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 18px max(72px, calc((100vw - 1280px) / 2)) max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  color: #667980;
  font-size: 12px;
}
.site-footer > :nth-child(2) { text-align: center; }
.site-footer a {
  justify-self: end;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-footer a:hover { color: var(--teal-dark); }

@media (min-width: 801px) and (max-height: 900px) {
  .contact {
    min-height: 82svh;
    padding-top: clamp(54px, 7vh, 78px);
    padding-bottom: clamp(54px, 7vh, 78px);
  }
}

@media (min-width: 801px) and (max-height: 700px) {
  .contact {
    min-height: auto;
    padding-top: 54px;
    padding-bottom: 54px;
  }
}

@media (max-width: 800px) {
  .contact {
    min-height: auto;
    padding: 88px 20px 82px;
  }
  .site-footer {
    padding: 24px 20px max(30px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
  .site-footer > *,
  .site-footer a {
    width: 100%;
    margin: 0 auto;
    justify-self: auto;
    text-align: center;
  }
}

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

/* Final spacing guard between CTA block and standalone footer. */
.site-footer { margin-top: clamp(48px, 6vh, 76px); }
@media (max-width: 800px) {
  .site-footer { margin-top: 44px; }
}

/* ========================================================================
   MOBILE ARCHITECTURE HOTFIX V5
   Fixes centering of the architecture board and strengthens the visual lines
   / legend on phones.
   ======================================================================== */
@media (max-width: 800px) {
  .system-stage {
    padding-bottom: 72px;
  }

  .architecture-board {
    width: min(100%, 680px);
    max-width: 680px;
    margin-inline: auto;
    justify-self: center;
    padding: 20px 18px 22px;
    gap: 18px;
    overflow: hidden;
  }

  .mobile-flow-meter {
    display: block;
    position: absolute;
    z-index: 4;
    left: 10px;
    top: 22px;
    bottom: 22px;
    width: 3px;
    border-radius: 999px;
    background: rgba(7,139,132,.16);
    pointer-events: none;
  }

  .mobile-flow-meter span {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to bottom, var(--teal), var(--mint), var(--coral));
    transform: scaleY(var(--mobile-system-progress, 0));
    transform-origin: top;
    box-shadow: 0 0 14px rgba(7,139,132,.35);
  }

  .mobile-flow-meter i {
    position: absolute;
    left: 50%;
    top: calc(var(--mobile-system-progress, 0) * 100%);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 5px rgba(255,112,95,.12), 0 0 16px rgba(255,112,95,.45);
    transform: translate(-50%, -50%);
  }

  .arch-row,
  .feedback-loop {
    width: 100%;
  }

  .arch-items {
    justify-content: center;
  }

  .arch-pill,
  .channel-pill {
    justify-self: center;
  }

  .control-engine {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }

  .programs-grid,
  .channel-grid {
    width: 100%;
    justify-items: stretch;
  }

  .feedback-loop {
    justify-content: center;
  }

  .feedback-loop b {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .dependency-legend {
    width: min(100%, 680px);
    max-width: 680px;
    margin: 18px auto 0;
    padding: 14px 16px;
    border-color: rgba(7,25,35,.16);
    box-shadow: 0 12px 28px rgba(7,25,35,.08);
  }

  .dependency-legend span {
    gap: 10px;
    font-size: 12px;
    line-height: 1.35;
    color: #42575f;
  }

  .legend-line {
    width: 38px;
    min-width: 38px;
    height: 3px;
    background: #248b84;
    border-radius: 999px;
  }

  .legend-line.dotted {
    height: 0;
    background: none;
    border-top: 3px dashed #e08274;
    border-radius: 0;
  }

  .legend-line.arrow {
    height: 3px;
    background: #248b84;
  }

  .legend-line.arrow::after {
    right: -2px;
    top: -4px;
    border-left: 7px solid #248b84;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
  }

  .legend-dot {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 5px rgba(255,112,95,.14);
  }
}

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

  .mobile-flow-meter {
    left: 9px;
  }
}


/* ========================================================================
   QA HOTFIX V6
   Prevents text collisions in the logic panel and makes the architecture
   legend correspond exactly to visible connections on desktop and mobile.
   ======================================================================== */
.logic-display,
.logic-detail,
.pipeline-wrap,
.pipeline-nodes,
.pipeline-node {
  min-width: 0;
}

.logic-detail {
  overflow: hidden;
}

.logic-detail h3 {
  max-width: 100%;
  font-size: clamp(27px, 2.05vw, 36px);
  line-height: 1.05;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.pipeline-wrap {
  overflow: hidden;
}

.arch-svg-base[data-type="dotted"],
.arch-svg-flow[data-type="dotted"] {
  stroke-dasharray: .035 .027;
}

.arch-svg-base[data-type="feedback"] {
  stroke-dasharray: .018 .025;
}

.mobile-connector {
  display: none;
}

@media (max-width: 800px) {
  .architecture-board {
    width: min(calc(100vw - 40px), 680px);
    max-width: 680px;
    margin-inline: auto;
    padding: 22px 18px;
    gap: 0;
    overflow: hidden;
  }

  /* The old side meter made the layout look off-centre. Semantic connectors
     now run through the exact centre of the architecture instead. */
  .mobile-flow-meter {
    display: none !important;
  }

  .arch-row,
  .feedback-loop {
    width: 100%;
    margin-inline: auto;
  }

  .arch-row {
    padding-block: 0;
  }

  .arch-label {
    text-align: left;
  }

  .arch-items,
  .feedback-loop {
    justify-content: center;
  }

  .control-engine,
  .programs-grid,
  .channel-grid {
    width: 100%;
    margin-inline: auto;
  }

  .mobile-connector {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 46px;
    margin: 0 auto;
    pointer-events: none;
  }

  .mobile-connector i {
    position: relative;
    display: block;
    width: 3px;
    height: 34px;
    border-radius: 999px;
  }

  .mobile-connector-data i {
    background: var(--teal);
    box-shadow: 0 0 12px rgba(7,139,132,.28);
  }

  .mobile-connector-rule i {
    width: 0;
    border-left: 3px dashed var(--coral);
    border-radius: 0;
  }

  .mobile-connector-action i {
    background: var(--teal);
  }

  .mobile-connector-action i::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    border-top: 8px solid var(--teal);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
  }

  .mobile-connector-feedback i {
    background: linear-gradient(to bottom, var(--coral), rgba(255,112,95,.25));
  }

  .mobile-connector-feedback i::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 5px rgba(255,112,95,.13);
    transform: translate(-50%, 50%);
  }

  .dependency-legend {
    width: min(calc(100vw - 40px), 680px);
    max-width: 680px;
    margin: 18px auto 0;
    padding: 16px 18px;
  }

  .dependency-legend span {
    font-size: 12px;
    line-height: 1.35;
  }

  .legend-line {
    width: 40px;
    min-width: 40px;
    height: 3px;
  }

  .legend-line.dotted {
    height: 0;
    background: none;
    border-top: 3px dashed var(--coral);
  }

  .legend-line.arrow::after {
    right: -2px;
    top: -4px;
    border-left-width: 7px;
    border-top-width: 5px;
    border-bottom-width: 5px;
  }

  .feedback-loop b {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .architecture-board,
  .dependency-legend {
    width: calc(100vw - 36px);
  }

  .logic-detail h3 {
    font-size: 30px;
  }
}

/* ========================================================================
   DESKTOP ARCHITECTURE CLARITY V7
   Clean layer buses replace crossing spider lines. Every legend item now has
   one unmistakable visual counterpart.
   ======================================================================== */
.arch-svg-halo,
.arch-svg-junction {
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.arch-svg-halo {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.arch-svg-base,
.arch-svg-flow {
  stroke-linejoin: round;
}

.arch-svg-base[data-type="rule"],
.arch-svg-flow[data-type="rule"] {
  stroke-dasharray: .035 .027;
}

.arch-svg-base[data-type="feedback"],
.arch-svg-flow[data-type="feedback"] {
  stroke-dasharray: .025 .026;
}

.arch-svg-junction {
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(7,139,132,.22));
}

@media (min-width: 801px) {
  .architecture-lines {
    z-index: 2;
    overflow: visible;
  }

  .arch-row,
  .feedback-loop {
    z-index: 3;
  }

  .architecture-board {
    isolation: isolate;
  }

  .dependency-legend {
    width: 292px;
    padding: 15px 16px;
    gap: 10px;
  }

  .dependency-legend span {
    font-size: 10px;
    line-height: 1.35;
  }

  .legend-line {
    width: 34px;
    min-width: 34px;
    height: 3px;
  }
}


/* V9 architecture refinement */
@media (min-width: 801px) {
  .architecture-lines { z-index: 1; overflow: visible; }
  .arch-row, .feedback-loop { position: relative; z-index: 2; }
  .arch-svg-halo { opacity: .9; }
  .arch-svg-flow { opacity: .78; }
  .arch-svg-base[data-type="feedback"],
  .arch-svg-flow[data-type="feedback"] { opacity: .62; }
}


/* ========================================================================
   DESKTOP ARCHITECTURE REFINEMENT V10
   Much calmer connector system: centred buses, no large loop around content.
   ======================================================================== */
@media (min-width: 801px) {
  .architecture-board {
    isolation: isolate;
  }

  .architecture-lines {
    z-index: 1;
    overflow: visible;
  }

  .arch-row,
  .feedback-loop {
    position: relative;
    z-index: 2;
  }

  .arch-svg-halo {
    opacity: .42;
  }

  .arch-svg-base {
    opacity: .88;
  }

  .arch-svg-flow {
    opacity: .38;
  }

  .arch-svg-base[data-type="shared"],
  .arch-svg-flow[data-type="shared"] {
    opacity: .54;
  }

  .arch-svg-base[data-type="rule"],
  .arch-svg-flow[data-type="rule"] {
    opacity: .62;
  }

  .arch-svg-base[data-type="action"],
  .arch-svg-flow[data-type="action"] {
    opacity: .60;
  }

  .arch-svg-base[data-type="feedback"],
  .arch-svg-flow[data-type="feedback"] {
    opacity: .42;
  }

  .arch-svg-junction {
    filter: drop-shadow(0 0 4px rgba(7, 139, 132, .16));
  }
}


/* ========================================================================
   ARCHITECTURE STACK V11
   Calm, layered system map with animated connectors instead of crossing lines.
   ======================================================================== */
.architecture-stack {
  display: grid;
  grid-template-rows: auto 52px auto 58px auto 58px auto 52px auto;
  gap: 0;
  min-height: 0;
  padding: 28px 30px 26px;
  overflow: hidden;
}

.architecture-stack .architecture-lines {
  display: none !important;
}

.architecture-stack .arch-row {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.architecture-stack .arch-data,
.architecture-stack .arch-control,
.architecture-stack .arch-programs,
.architecture-stack .arch-touchpoints,
.architecture-stack .feedback-loop {
  position: relative;
  z-index: 3;
}

.architecture-stack .arch-data {
  padding-bottom: 2px;
}

.architecture-stack .control-engine {
  box-shadow: 0 22px 58px rgba(7, 25, 35, .17);
}

.architecture-stack .programs-grid {
  gap: 12px;
}

.architecture-stack .program-card {
  min-height: 108px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}

.architecture-stack .channel-grid {
  gap: 10px;
}

.architecture-stack .channel-pill {
  min-height: 42px;
}

.stack-connector {
  --connector-progress: 0;
  position: relative;
  z-index: 2;
  margin-left: 148px;
  min-width: 0;
  overflow: visible;
  opacity: .52;
  transition: opacity .3s ease;
}

.stack-connector::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 999px;
  background: rgba(7, 139, 132, .14);
  transform: translateX(-50%);
}

.stack-connector::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: calc(var(--connector-progress) * 100%);
  border-radius: 999px;
  background: linear-gradient(to bottom, #078b84, #68e6c4);
  box-shadow: 0 0 14px rgba(7, 139, 132, .24);
  transform: translateX(-50%);
}

.stack-connector.connector-rules::after,
.stack-connector.connector-feedback::after {
  background: linear-gradient(to bottom, #ff9a8e, #ff705f);
  box-shadow: 0 0 14px rgba(255, 112, 95, .18);
}

.stack-connector i {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(var(--connector-progress) * 100%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #078b84;
  border: 2px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 5px rgba(7, 139, 132, .09), 0 0 16px rgba(7, 139, 132, .22);
  transform: translate(-50%, -50%);
  opacity: calc(.15 + var(--connector-progress));
}

.stack-connector.connector-rules i,
.stack-connector.connector-feedback i {
  background: #ff705f;
  box-shadow: 0 0 0 5px rgba(255, 112, 95, .08), 0 0 16px rgba(255, 112, 95, .18);
}

.stack-connector span {
  position: absolute;
  z-index: 3;
  left: calc(50% + 20px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 220px;
  padding: 6px 10px;
  border: 1px solid rgba(7, 25, 35, .09);
  border-radius: 999px;
  background: rgba(255, 253, 248, .9);
  color: #5d7077;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 780;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: calc(.35 + var(--connector-progress));
  box-shadow: 0 8px 20px rgba(7, 25, 35, .05);
}

.stack-connector.is-active,
.stack-connector.is-complete {
  opacity: 1;
}

.architecture-stack .feedback-loop {
  margin-top: 0;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(7,139,132,.075), rgba(104,230,196,.10));
  border-color: rgba(7,139,132,.25);
}

.architecture-stack .feedback-loop b {
  font-size: 10px;
}

.architecture-stack .is-flow-active .arch-pill,
.architecture-stack .is-flow-active .program-card,
.architecture-stack .is-flow-active .channel-pill,
.architecture-stack .is-flow-active .control-engine,
.architecture-stack .feedback-loop.is-flow-active {
  border-color: rgba(7, 139, 132, .38);
  box-shadow: 0 16px 34px rgba(7, 25, 35, .09);
}

.architecture-summary {
  width: min(100%, 920px);
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #65777e;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .02em;
}

.architecture-summary i {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, rgba(7,139,132,.25), rgba(7,139,132,.75));
}

@media (max-width: 1100px) and (min-width: 801px) {
  .architecture-stack {
    padding: 24px 22px;
  }
  .architecture-stack .arch-row {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 14px;
  }
  .stack-connector {
    margin-left: 119px;
  }
  .stack-connector span {
    max-width: 170px;
    white-space: normal;
  }
}

@media (max-width: 800px) {
  .architecture-stack {
    width: min(100%, 680px);
    margin-inline: auto;
    grid-template-rows: auto 46px auto 52px auto 52px auto 46px auto;
    padding: 20px 18px 22px;
    gap: 0;
  }

  .architecture-stack .arch-row {
    display: block;
    width: 100%;
  }

  .architecture-stack .arch-label {
    margin-bottom: 12px;
  }

  .stack-connector {
    margin-left: 0;
    width: 100%;
  }

  .stack-connector span {
    left: calc(50% + 16px);
    max-width: min(44vw, 175px);
    white-space: normal;
    font-size: 8px;
  }

  .architecture-stack .programs-grid,
  .architecture-stack .channel-grid {
    width: 100%;
  }

  .architecture-summary {
    width: min(100%, 680px);
    flex-wrap: wrap;
    row-gap: 7px;
    padding: 0 10px;
    font-size: 9px;
  }

  .architecture-summary i {
    width: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stack-connector {
    --connector-progress: 1 !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ========================================================================
   PREMIUM SYSTEM ARCHITECTURE V12
   Clear hierarchy, elegant fan-out lines and smooth scroll-driven motion.
   ======================================================================== */
.system-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.system-proof-list {
  margin-top: 34px;
  display: grid;
  gap: 20px;
}

.system-proof-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.system-proof-list strong {
  display: block;
  color: var(--teal-dark);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.system-proof-list article:nth-child(2) strong { color: #db7469; }

.system-proof-list span {
  display: block;
  margin-top: 5px;
  color: #667a81;
  font-size: 12px;
  line-height: 1.45;
}

.proof-orb {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(7, 139, 132, .2);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 10px 26px rgba(7, 25, 35, .08);
}

.proof-orb::before,
.proof-orb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.proof-orb::before {
  width: 15px;
  height: 15px;
  border: 2px solid var(--teal);
  border-radius: 4px;
}

.proof-orb::after {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 -9px 0 -1px var(--teal), 8px 5px 0 -1px var(--teal), -8px 5px 0 -1px var(--teal);
}

.proof-orb-rule { border-color: rgba(255, 112, 95, .22); }
.proof-orb-rule::before { border-color: var(--coral); border-radius: 50%; }
.proof-orb-rule::after { background: var(--coral); box-shadow: 0 -9px 0 -1px var(--coral), 8px 5px 0 -1px var(--coral), -8px 5px 0 -1px var(--coral); }
.proof-orb-result::before { border-radius: 50%; }

.premium-architecture {
  position: relative;
  min-height: 0;
  width: 100%;
  padding: 26px 28px 24px;
  display: grid;
  gap: 34px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(7,25,35,.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,25,35,.034) 1px, transparent 1px),
    rgba(255,255,255,.72);
  background-size: 30px 30px;
  border: 1px solid rgba(7,25,35,.12);
  border-radius: 30px;
  box-shadow: 0 34px 90px rgba(7,25,35,.12);
  backdrop-filter: blur(14px);
  transform-origin: 50% 50%;
  will-change: transform;
}

.premium-architecture::after {
  content: "";
  position: absolute;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 58% 22%, rgba(104,230,196,.12), transparent 24%),
    radial-gradient(circle at 56% 56%, rgba(255,112,95,.08), transparent 28%),
    radial-gradient(circle at 55% 82%, rgba(104,230,196,.10), transparent 24%);
}

.architecture-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.flow-layer {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
  opacity: .18;
  transform: translateY(18px) scale(.992);
  filter: saturate(.8);
  transition: opacity .55s var(--ease), transform .55s var(--ease), filter .55s var(--ease);
}

.flow-layer.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.layer-label {
  color: #587078;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
  line-height: 1.25;
  text-transform: uppercase;
}

.flow-panel {
  position: relative;
  min-width: 0;
}

.data-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(7,25,35,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 12px 32px rgba(7,25,35,.055);
}

.data-node,
.touchpoint {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(7,25,35,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  box-shadow: 0 7px 18px rgba(7,25,35,.055);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
}

.data-node svg,
.touchpoint svg,
.program-card svg,
.engine-rules svg,
.result-metrics svg,
.results-panel strong svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.data-node svg,
.touchpoint svg { color: var(--teal); }

.control-panel {
  display: grid;
  grid-template-columns: minmax(230px, .48fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: 23px;
  color: white;
  background: linear-gradient(135deg, #061c27, #0a2733 58%, #071923);
  border: 1px solid rgba(104,230,196,.16);
  box-shadow: 0 24px 56px rgba(7,25,35,.24);
  overflow: hidden;
}

.control-panel::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 170px;
  height: 100%;
  opacity: .34;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(104,230,196,.35) 1px, transparent 1.5px);
  background-size: 12px 12px;
  mask-image: linear-gradient(90deg, transparent, black);
}

.control-panel .engine-core {
  position: relative;
  z-index: 2;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(104,230,196,.24);
  border-radius: 17px;
  background: radial-gradient(circle at 35% 0, rgba(104,230,196,.20), rgba(255,255,255,.025) 68%);
}

.control-panel .engine-core span {
  color: var(--mint);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.control-panel .engine-core strong {
  max-width: 250px;
  font-size: clamp(18px, 1.4vw, 23px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.control-panel .engine-rules {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-content: center;
}

.control-panel .engine-rules span {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: #cbd9dc;
  font-size: 10px;
  text-align: center;
}

.control-panel .engine-rules svg { width: 15px; height: 15px; color: var(--mint); }
.control-panel .engine-rules span:nth-child(-n+3) svg { color: #ff9a8e; }

.programs-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.program-card {
  position: relative;
  min-height: 86px;
  padding: 15px 16px 13px;
  border: 1px solid rgba(7,25,35,.12);
  border-radius: 17px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(7,25,35,.07);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}

.program-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -34px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,112,95,.08), transparent 68%);
}

.program-card svg {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 21px;
  height: 21px;
  color: #ef7e72;
}

.program-card small {
  color: var(--teal);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .13em;
}

.program-card h4 {
  margin: 12px 0 4px;
  font-size: 14px;
  line-height: 1.05;
}

.program-card p {
  margin: 0;
  color: #718289;
  font-size: 9px;
  line-height: 1.35;
}

.touchpoints-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.touchpoint {
  min-height: 39px;
  border-radius: 11px;
  border-color: rgba(7,139,132,.34);
  box-shadow: 0 7px 17px rgba(7,25,35,.035);
}

.results-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 15px;
  border: 1px dashed rgba(7,139,132,.30);
  border-radius: 17px;
  background: linear-gradient(90deg, rgba(7,139,132,.065), rgba(104,230,196,.10));
}

.result-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.result-metrics span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #263b44;
  font-size: 9px;
  font-weight: 730;
}

.result-metrics svg { width: 14px; height: 14px; color: #48636d; }

.results-panel strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

.results-panel strong svg {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  color: var(--teal);
  background: rgba(255,255,255,.82);
  box-shadow: 0 7px 17px rgba(7,25,35,.06);
}

.flow-layer.is-system-active .data-node,
.flow-layer.is-system-active .program-card,
.flow-layer.is-system-active .touchpoint,
.flow-layer.is-system-active .control-panel,
.flow-layer.is-system-active .results-panel {
  border-color: rgba(7,139,132,.42);
  box-shadow: 0 18px 38px rgba(7,25,35,.10);
}

.flow-layer.is-system-active .program-card {
  transform: translateY(-3px);
}

.flow-path-base,
.flow-path-stream {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-path-base {
  stroke-width: 1.55;
  opacity: .34;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.flow-path-stream {
  stroke-width: 2.1;
  opacity: 0;
  stroke-dasharray: .055 .13;
  animation: premiumFlow 2.4s linear infinite;
  filter: drop-shadow(0 0 5px currentColor);
}

.flow-path-base[data-flow="data"],
.flow-path-stream[data-flow="data"],
.flow-path-base[data-flow="touch"],
.flow-path-stream[data-flow="touch"],
.flow-path-base[data-flow="return"],
.flow-path-stream[data-flow="return"] { stroke: #0a9d94; color: #68e6c4; }

.flow-path-base[data-flow="program"],
.flow-path-stream[data-flow="program"],
.flow-path-base[data-flow="feedback"],
.flow-path-stream[data-flow="feedback"] { stroke: #ff8a7e; color: #ffb0a7; }

.flow-hub {
  opacity: 0;
  stroke: rgba(255,255,255,.96);
  stroke-width: 2;
  filter: drop-shadow(0 0 7px rgba(7,139,132,.34));
}

.flow-hub[data-flow="data"],
.flow-hub[data-flow="touch"],
.flow-hub[data-flow="return"] { fill: #0a9d94; }
.flow-hub[data-flow="program"],
.flow-hub[data-flow="feedback"] { fill: #ff8a7e; }

@keyframes premiumFlow { to { stroke-dashoffset: -.185; } }

@media (min-width: 801px) and (max-height: 840px) {
  .system-stage { padding-top: 2vh; padding-bottom: 2vh; }
  .premium-architecture { gap: 24px; padding-top: 20px; padding-bottom: 20px; }
  .data-panel { padding-top: 9px; padding-bottom: 9px; }
  .control-panel { padding: 13px; }
  .control-panel .engine-core { min-height: 94px; padding: 14px 16px; }
  .control-panel .engine-rules span { min-height: 38px; }
  .program-card { min-height: 76px; padding-top: 12px; padding-bottom: 10px; }
  .program-card h4 { margin-top: 9px; }
  .touchpoint { min-height: 35px; }
  .results-panel { padding-top: 10px; padding-bottom: 10px; }
  .system-proof-list { margin-top: 24px; gap: 14px; }
}

@media (max-width: 1180px) and (min-width: 801px) {
  .system-stage { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; }
  .premium-architecture { padding: 22px 20px; gap: 28px; }
  .flow-layer { grid-template-columns: 100px minmax(0,1fr); gap: 13px; }
  .data-panel { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .control-panel { grid-template-columns: minmax(200px,.46fr) minmax(0,1fr); }
  .program-card { min-height: 82px; }
  .results-panel { grid-template-columns: 1fr; }
  .results-panel strong { justify-content: flex-end; }
  .system-proof-list { display: none; }
}

@media (max-width: 800px) {
  .system-proof-list { display: none; }

  .premium-architecture {
    width: min(100%, 680px);
    margin-inline: auto;
    padding: 22px 18px 24px;
    gap: 52px;
    overflow: hidden;
    border-radius: 24px;
  }

  .premium-architecture .architecture-lines { display: none; }

  .flow-layer {
    display: block;
    width: 100%;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .flow-layer:not(:last-of-type)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    width: 2px;
    height: 34px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(to bottom, #0a9d94, #68e6c4);
    box-shadow: 0 0 12px rgba(7,139,132,.26);
    animation: mobileConnectorGlow 2s ease-in-out infinite;
  }

  .control-layer::after,
  .touchpoints-layer::after {
    background: linear-gradient(to bottom, #ff9b8f, #ff705f) !important;
    box-shadow: 0 0 12px rgba(255,112,95,.22) !important;
  }

  .flow-layer:not(:last-of-type)::before {
    content: "";
    position: absolute;
    z-index: 3;
    left: 50%;
    top: calc(100% + 39px);
    width: 9px;
    height: 9px;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: #0a9d94;
    border: 2px solid rgba(255,255,255,.95);
    box-shadow: 0 0 0 5px rgba(7,139,132,.08), 0 0 15px rgba(7,139,132,.28);
  }

  .control-layer::before,
  .touchpoints-layer::before {
    background: #ff705f !important;
    box-shadow: 0 0 0 5px rgba(255,112,95,.08), 0 0 15px rgba(255,112,95,.24) !important;
  }

  .layer-label {
    margin-bottom: 12px;
    text-align: center;
    color: var(--teal-dark);
    font-size: 10px;
  }

  .data-panel {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
    padding: 14px;
  }

  .data-node { min-height: 44px; }

  .control-panel {
    display: block;
    padding: 18px;
    border-radius: 22px;
  }

  .control-panel .engine-core {
    min-height: 0;
    padding: 22px;
  }

  .control-panel .engine-core strong {
    font-size: clamp(24px, 7.4vw, 33px);
    max-width: 13ch;
  }

  .control-panel .engine-rules {
    margin-top: 16px;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .control-panel .engine-rules span {
    min-height: 54px;
    font-size: 11px;
  }

  .programs-panel {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
  }

  .program-card {
    min-height: 124px;
    padding: 17px;
  }

  .program-card h4 { font-size: 15px; margin-top: 24px; }
  .program-card p { font-size: 10px; }
  .program-card svg { width: 23px; height: 23px; }

  .touchpoints-panel {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
  }

  .touchpoint {
    min-height: 48px;
    border-radius: 12px;
    font-size: 11px;
  }

  .results-panel {
    display: block;
    padding: 16px;
  }

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

  .result-metrics span {
    min-height: 42px;
    border-radius: 12px;
  }

  .results-panel strong {
    margin-top: 14px;
    justify-content: center;
    white-space: normal;
    text-align: center;
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  .premium-architecture { padding-left: 14px; padding-right: 14px; }
  .data-panel { grid-template-columns: 1fr 1fr; padding: 11px; }
  .data-node { padding-left: 7px; padding-right: 7px; font-size: 10px; }
  .control-panel .engine-rules { grid-template-columns: 1fr; }
  .programs-panel { grid-template-columns: 1fr 1fr; }
  .program-card { min-height: 116px; padding: 14px; }
  .program-card h4 { font-size: 14px; }
  .touchpoint { font-size: 10px; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
}

@keyframes mobileConnectorGlow {
  0%,100% { opacity: .42; transform: translateX(-50%) scaleY(.72); transform-origin: top; }
  50% { opacity: 1; transform: translateX(-50%) scaleY(1); transform-origin: top; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-path-stream,
  .flow-layer:not(:last-of-type)::after { animation: none !important; }
  .flow-layer { opacity: 1 !important; transform: none !important; filter: none !important; }
}

@media (min-width: 801px) and (max-height: 790px) {
  .system-stage { padding-top: 1vh; padding-bottom: 1vh; }
  .premium-architecture { gap: 17px; padding: 15px 18px; }
  .data-panel { padding: 7px 10px; }
  .data-node { padding-top: 6px; padding-bottom: 6px; font-size: 10px; }
  .control-panel { padding: 10px 12px; border-radius: 19px; }
  .control-panel .engine-core { min-height: 76px; padding: 11px 14px; }
  .control-panel .engine-core strong { font-size: 17px; }
  .control-panel .engine-rules { gap: 6px; }
  .control-panel .engine-rules span { min-height: 32px; padding: 5px 7px; font-size: 9px; }
  .programs-panel { gap: 7px; }
  .program-card { min-height: 64px; padding: 9px 11px 8px; border-radius: 13px; }
  .program-card svg { width: 17px; height: 17px; top: 9px; right: 9px; }
  .program-card h4 { margin-top: 7px; font-size: 12px; }
  .program-card p { font-size: 8px; }
  .touchpoints-panel { gap: 6px; }
  .touchpoint { min-height: 29px; padding: 5px 7px; font-size: 9px; }
  .touchpoint svg { width: 14px; height: 14px; }
  .results-panel { padding: 7px 10px; }
  .result-metrics { gap: 5px; }
  .result-metrics span { padding: 4px 5px; font-size: 8px; }
  .results-panel strong { font-size: 8px; }
  .system-caption { padding-top: 2vh; }
  .system-caption h3 { font-size: clamp(25px, 2.3vw, 34px); }
  .system-caption p { font-size: 13px; }
  .system-proof-list { display: none; }
}


/* ========================================================================
   PREMIUM SYSTEM V13
   A clean animated central spine replaces crossing lines and the outer loop.
   ======================================================================== */
@media (min-width: 801px) {
  .premium-architecture {
    gap: clamp(30px, 4.2vh, 46px);
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .premium-architecture .flow-layer {
    position: relative;
    z-index: 3;
  }

  .premium-architecture .architecture-lines {
    z-index: 2;
    overflow: hidden;
  }

  .flow-path-halo,
  .flow-path-base,
  .flow-path-stream {
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .flow-path-halo {
    opacity: .88;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }

  .flow-path-base {
    opacity: .72;
  }

  .flow-path-stream {
    opacity: 0;
    stroke-dasharray: .045 .13;
    animation: premiumFlow 2.15s linear infinite;
  }

  .flow-hub {
    animation: premiumHubPulse 2.3s ease-in-out infinite;
  }

  .programs-panel,
  .touchpoints-panel {
    position: relative;
    z-index: 4;
  }

  .programs-panel::before,
  .touchpoints-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: -15px;
    width: 140px;
    height: 30px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(104,230,196,.16), transparent 70%);
    pointer-events: none;
  }

  .programs-panel::before {
    background: radial-gradient(ellipse at center, rgba(255,112,95,.14), transparent 70%);
  }
}

@keyframes premiumHubPulse {
  0%,100% { filter: drop-shadow(0 0 5px rgba(7,139,132,.30)); }
  50% { filter: drop-shadow(0 0 13px rgba(104,230,196,.76)); }
}

@media (min-width: 801px) and (max-height: 840px) {
  .premium-architecture { gap: 24px; padding-top: 18px; padding-bottom: 18px; }
}

/* Keep the navigation fully visible and away from the content. */
@media (min-width: 1181px) {
  .chapter-rail { left: clamp(42px, 4vw, 72px); min-width: 112px; }
}

/* ========================================================================
   PREMIUM SYSTEM V14
   One cinematic signal rail. No crossing paths, no decorative line clutter.
   ======================================================================== */
.premium-architecture {
  --system-label-col: 126px;
  --system-layer-gap: 18px;
  --system-row-gap: 36px;
  --system-panel-offset: 72px;
  gap: var(--system-row-gap);
  overflow: clip;
  background-position: 0 0, 0 0, 0 0;
  animation: premiumGridDrift 28s linear infinite;
}

.premium-architecture .architecture-lines {
  display: none !important;
}

.system-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.system-atmosphere i {
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(52px);
  opacity: .16;
  will-change: transform;
}

.system-atmosphere i:nth-child(1) {
  left: 45%;
  top: -12%;
  background: rgba(104,230,196,.56);
  animation: systemAuraA 11s ease-in-out infinite alternate;
}

.system-atmosphere i:nth-child(2) {
  right: -12%;
  top: 35%;
  background: rgba(255,112,95,.38);
  animation: systemAuraB 14s ease-in-out infinite alternate;
}

.system-atmosphere i:nth-child(3) {
  left: 35%;
  bottom: -18%;
  background: rgba(7,139,132,.40);
  animation: systemAuraC 13s ease-in-out infinite alternate;
}

.flow-layer {
  --system-panel-start: calc(var(--system-label-col) + var(--system-layer-gap));
  grid-template-columns: var(--system-label-col) minmax(0, 1fr);
  gap: var(--system-layer-gap);
  isolation: isolate;
}

.system-connector {
  --connector-fill: 0;
  --connector-opacity: .18;
  position: absolute;
  z-index: 8;
  left: calc(50% + var(--system-panel-offset));
  top: calc(100% + 5px);
  width: 22px;
  height: calc(var(--system-row-gap) - 10px);
  transform: translateX(-50%);
  pointer-events: none;
  opacity: var(--connector-opacity);
}

.system-connector::before,
.system-connector span {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  border-radius: 999px;
  transform: translateX(-50%);
}

.system-connector::before {
  background: rgba(7,25,35,.10);
  box-shadow: 0 0 0 1px rgba(255,255,255,.52);
}

.system-connector span {
  transform: translateX(-50%) scaleY(var(--connector-fill));
  transform-origin: top;
  transition: transform .12s linear;
}

.system-connector i {
  position: absolute;
  left: 50%;
  top: calc(var(--connector-fill) * 100%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.96);
  transition: top .12s linear, opacity .2s ease;
}

.connector-data span,
.connector-programs span {
  background: linear-gradient(to bottom, #078b84, #68e6c4);
  box-shadow: 0 0 12px rgba(104,230,196,.66);
}

.connector-data i,
.connector-programs i {
  background: #0a9d94;
  box-shadow: 0 0 0 6px rgba(104,230,196,.10), 0 0 18px rgba(104,230,196,.78);
}

.connector-control span,
.connector-touchpoints span {
  background: linear-gradient(to bottom, #ff8a7e, #ffb0a7);
  box-shadow: 0 0 12px rgba(255,112,95,.48);
}

.connector-control i,
.connector-touchpoints i {
  background: #ff786d;
  box-shadow: 0 0 0 6px rgba(255,112,95,.10), 0 0 18px rgba(255,112,95,.62);
}

.system-connector.is-flowing i {
  animation: systemSignalPulse 1.05s ease-in-out infinite;
}

.system-connector.is-complete i {
  animation: systemSignalSettle 2.1s ease-in-out infinite;
}

.flow-panel {
  z-index: 3;
  transform-origin: 50% 50%;
}

.flow-layer.is-system-active .flow-panel {
  transform: translateY(-2px) scale(1.005);
}

.flow-layer.is-system-active .data-panel,
.flow-layer.is-system-active .programs-panel,
.flow-layer.is-system-active .touchpoints-panel,
.flow-layer.is-system-active .results-panel {
  filter: saturate(1.06);
}

.flow-layer.is-system-active .data-node,
.flow-layer.is-system-active .touchpoint,
.flow-layer.is-system-active .program-card {
  border-color: rgba(7,139,132,.44);
  box-shadow: 0 14px 34px rgba(7,25,35,.10), 0 0 0 1px rgba(104,230,196,.05);
}

.flow-layer.is-system-active .program-card:nth-child(2),
.flow-layer.is-system-active .touchpoint:nth-child(2),
.flow-layer.is-system-active .data-node:nth-child(2) { transition-delay: 35ms; }
.flow-layer.is-system-active .program-card:nth-child(3),
.flow-layer.is-system-active .touchpoint:nth-child(3),
.flow-layer.is-system-active .data-node:nth-child(3) { transition-delay: 70ms; }
.flow-layer.is-system-active .program-card:nth-child(4),
.flow-layer.is-system-active .touchpoint:nth-child(4),
.flow-layer.is-system-active .data-node:nth-child(4) { transition-delay: 105ms; }
.flow-layer.is-system-active .program-card:nth-child(5),
.flow-layer.is-system-active .touchpoint:nth-child(5),
.flow-layer.is-system-active .data-node:nth-child(5) { transition-delay: 140ms; }
.flow-layer.is-system-active .program-card:nth-child(6),
.flow-layer.is-system-active .touchpoint:nth-child(6),
.flow-layer.is-system-active .data-node:nth-child(6) { transition-delay: 175ms; }

.flow-layer.is-system-active .control-panel {
  border-color: rgba(104,230,196,.32);
  box-shadow: 0 28px 70px rgba(7,25,35,.28), 0 0 44px rgba(104,230,196,.08);
}

.flow-layer.is-system-active .engine-rules span {
  background: rgba(255,255,255,.085);
  border-color: rgba(104,230,196,.15);
}

.flow-layer.is-system-active .results-panel {
  box-shadow: 0 18px 42px rgba(7,25,35,.10), inset 0 0 34px rgba(104,230,196,.07);
}

.data-panel,
.control-panel,
.programs-panel,
.touchpoints-panel,
.results-panel {
  transition: transform .42s var(--ease), box-shadow .42s var(--ease), border-color .42s var(--ease), filter .42s var(--ease);
}

.programs-panel::before,
.touchpoints-panel::before {
  display: none !important;
}

@keyframes premiumGridDrift {
  to { background-position: 30px 30px, 30px 30px, 0 0; }
}

@keyframes systemAuraA {
  to { transform: translate(18%, 20%) scale(1.12); opacity: .23; }
}

@keyframes systemAuraB {
  to { transform: translate(-20%, -8%) scale(.92); opacity: .22; }
}

@keyframes systemAuraC {
  to { transform: translate(12%, -18%) scale(1.08); opacity: .20; }
}

@keyframes systemSignalPulse {
  0%,100% { transform: translate(-50%,-50%) scale(.84); filter: brightness(.92); }
  50% { transform: translate(-50%,-50%) scale(1.2); filter: brightness(1.25); }
}

@keyframes systemSignalSettle {
  0%,100% { transform: translate(-50%,-50%) scale(.92); }
  50% { transform: translate(-50%,-50%) scale(1.08); }
}

@media (max-width: 1180px) and (min-width: 801px) {
  .premium-architecture {
    --system-label-col: 100px;
    --system-layer-gap: 13px;
    --system-row-gap: 30px;
    --system-panel-offset: 56.5px;
  }
}

@media (max-width: 800px) {
  .premium-architecture {
    --system-label-col: 0px;
    --system-layer-gap: 0px;
    --system-row-gap: 54px;
    --system-panel-offset: 0px;
    gap: var(--system-row-gap);
    animation-duration: 38s;
  }

  .flow-layer {
    display: block;
  }

  .flow-layer:not(:last-of-type)::before,
  .flow-layer:not(:last-of-type)::after {
    content: none !important;
    display: none !important;
  }

  .system-connector {
    left: 50%;
    top: calc(100% + 6px);
    height: calc(var(--system-row-gap) - 12px);
  }

  .system-atmosphere i {
    width: 62%;
    filter: blur(44px);
    opacity: .13;
  }

  .flow-layer.is-system-active .flow-panel {
    transform: translateY(-2px) scale(1.002);
  }

  .control-panel .engine-rules {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 340px) {
  .control-panel .engine-rules {
    grid-template-columns: 1fr;
  }

  .programs-panel,
  .touchpoints-panel {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-architecture,
  .system-atmosphere i,
  .system-connector i {
    animation: none !important;
  }

  .system-connector {
    --connector-fill: 1 !important;
    --connector-opacity: 1 !important;
  }
}


/* ========================================================================
   PLATFORMBEWIRTSCHAFTUNG RESPONSIVE FIX V15
   Keeps the mobile orbit in its own visual zone and prevents overlap with
   the first content card. Text remains readable from 320px upward.
   ======================================================================== */
@media (max-width: 800px) {
  .operations {
    overflow: hidden;
  }

  .operations-heading {
    max-width: 100%;
  }

  .operations-heading h2 {
    max-width: 100%;
    text-wrap: balance;
  }

  .operations-heading > p:last-child {
    max-width: 38rem;
  }

  .operations-orbit {
    width: 100%;
    min-height: 0;
    margin-top: 46px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    overflow: visible;
  }

  .operations-core {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: clamp(190px, 55vw, 230px);
    margin: 48px auto 86px;
    flex: none;
    isolation: isolate;
  }

  .operations-core::before {
    inset: -24px;
  }

  .operations-core::after {
    inset: -48px;
  }

  .operations-core strong {
    font-size: clamp(22px, 6.6vw, 30px);
    line-height: 1.08;
  }

  .operations-core em {
    margin-top: 8px;
    font-size: clamp(12px, 3.8vw, 15px);
  }

  .ops-card {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
    padding: 22px;
  }

  .ops-card h3 {
    font-size: clamp(20px, 5.7vw, 26px);
    overflow-wrap: anywhere;
  }

  .ops-card p {
    font-size: 14px;
    line-height: 1.55;
  }
}

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

  .operations-orbit {
    margin-top: 36px;
  }

  .operations-core {
    width: clamp(184px, 54vw, 214px);
    margin-top: 42px;
    margin-bottom: 82px;
  }

  .operations-core::before {
    inset: -21px;
  }

  .operations-core::after {
    inset: -42px;
  }
}

@media (max-width: 350px) {
  .operations-core {
    width: 182px;
    margin-bottom: 74px;
  }

  .operations-core::after {
    inset: -36px;
  }
}

/* ========================================================================
   FINAL RESPONSIVE LANDSCAPE PASS V16
   Small phones in landscape use a compact, static flow instead of desktop
   sticky scenes. This avoids overlaps and keeps all content readable.
   ======================================================================== */
@media (orientation: landscape) and (max-height: 620px) and (max-width: 980px) {
  html { scroll-padding-top: 0; }
  body { overflow-x: hidden; }
  .chapter-rail, .hero-proof, .scroll-cue { display: none !important; }

  .hero {
    min-height: max(100svh, 380px);
    padding: 30px 38px 28px;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
    gap: 28px;
    align-items: center;
    overflow: hidden;
  }
  .hero-copy { order: 1; align-self: center; }
  .hero-visual {
    order: 2;
    height: min(90svh, 430px);
    min-height: 320px;
    margin: 0;
    align-self: center;
    overflow: visible;
  }
  .hero h1 {
    display: grid;
    gap: .02em;
    padding: 0;
    font-size: clamp(48px, 15vh, 66px);
    line-height: .91;
  }
  .hero h2 {
    margin: 15px 0 10px;
    font-size: clamp(24px, 7.2vh, 31px);
    line-height: 1.04;
  }
  .hero-lead { font-size: 13px; line-height: 1.45; }
  .hero-actions { margin-top: 17px; }
  .button { min-height: 42px; padding-inline: 17px; font-size: 12px; }
  .hero-badge { padding: 7px 10px; font-size: 9px; }
  .badge-data { left: 1%; top: 36%; }
  .badge-logic { right: 0; top: 57%; }
  .badge-ops { left: 7%; bottom: 13%; }

  .logic-scroll, .system-scroll { height: auto !important; }
  .logic-stage, .system-stage {
    position: relative !important;
    top: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .logic-stage {
    padding: 64px 38px 72px !important;
    gap: 28px !important;
  }
  .logic-heading { max-width: 780px; }
  .section-heading h2 { font-size: clamp(38px, 7.5vw, 56px); }
  .section-heading > p:last-child { margin-top: 12px; font-size: 15px; }
  .logic-display { grid-template-columns: 1fr !important; gap: 20px; }
  .logic-detail, .pipeline-line { display: none !important; }
  .pipeline-wrap { width: 100%; }
  .pipeline-nodes {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 !important;
  }
  .pipeline-node {
    display: block !important;
    min-height: 116px !important;
    padding: 14px !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .pipeline-node b {
    display: block !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    box-shadow: none !important;
    font-size: 10px !important;
  }
  .pipeline-node h4 { margin: 10px 0 5px !important; font-size: 14px !important; line-height: 1.12; }
  .pipeline-node p { font-size: 11px !important; line-height: 1.35; }

  .system { padding: 66px 38px 0 !important; }
  .system-intro { margin-bottom: 34px; }
  .system-intro h2 { font-size: clamp(40px, 7.5vw, 56px); }
  .system-intro > p:last-child { margin-top: 14px; max-width: 760px; font-size: 15px; }
  .system-stage { display: block !important; padding: 0 0 70px !important; }
  .system-caption { display: none !important; }
  .premium-architecture {
    --system-label-col: 88px;
    --system-layer-gap: 12px;
    --system-row-gap: 25px;
    --system-panel-offset: 50px;
    width: min(100%, 900px) !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 18px 16px !important;
    gap: var(--system-row-gap) !important;
    transform: none !important;
    overflow: hidden !important;
  }
  .flow-layer {
    display: grid !important;
    grid-template-columns: var(--system-label-col) minmax(0, 1fr) !important;
    gap: var(--system-layer-gap) !important;
    width: 100%;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .layer-label { font-size: 8px; }
  .data-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 9px; }
  .data-node { min-height: 35px; padding: 6px 8px; font-size: 9px; }
  .data-node svg { width: 14px; height: 14px; }
  .control-panel { grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr); padding: 11px; gap: 10px; }
  .control-panel .engine-core { min-height: 78px; padding: 12px 14px; }
  .control-panel .engine-core strong { font-size: 17px; }
  .control-panel .engine-rules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .control-panel .engine-rules span { min-height: 32px; padding: 5px 6px; font-size: 8px; }
  .programs-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .program-card { min-height: 72px; padding: 10px 11px 8px; }
  .program-card svg { width: 17px; height: 17px; top: 9px; right: 9px; }
  .program-card h4 { margin-top: 9px; font-size: 12px; }
  .program-card p { font-size: 8px; }
  .touchpoints-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .touchpoint { min-height: 32px; padding: 5px 6px; font-size: 8px; }
  .touchpoint svg { width: 13px; height: 13px; }
  .results-panel { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
  .result-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .result-metrics span { padding: 4px; font-size: 7px; }
  .result-metrics svg { width: 11px; height: 11px; }
  .results-panel strong { font-size: 8px; }
  .results-panel strong svg { width: 18px; height: 18px; }

  .operations {
    min-height: auto !important;
    padding: 66px 38px 72px !important;
    overflow: hidden !important;
  }
  .operations-heading h2 { max-width: 820px; font-size: clamp(40px, 7.5vw, 56px); }
  .operations-heading > p:last-child { max-width: 760px; font-size: 15px; }
  .operations-orbit {
    position: relative;
    width: 100%;
    min-height: 0 !important;
    margin: 34px auto 0;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
  }
  .orbit-lines { display: none !important; }
  .operations-core {
    position: relative !important;
    inset: auto !important;
    grid-column: 1 / -1;
    width: 180px;
    margin: 24px auto 54px !important;
    transform: none !important;
  }
  .operations-core::before { inset: -20px; }
  .operations-core::after { inset: -38px; }
  .operations-core strong { font-size: 22px; }
  .operations-core em { font-size: 12px; }
  .ops-card {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 17px !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ops-card h3 { margin: 9px 0 6px; font-size: 18px; }
  .ops-card p { font-size: 12px; line-height: 1.45; }
  .operations-statement { margin-top: 28px; padding: 18px 0; }
  .operations-statement p { font-size: 15px; }

  .contact {
    min-height: auto !important;
    padding: 70px 38px 58px !important;
    overflow: hidden;
  }
  .contact-inner { width: min(100%, 820px); max-width: 820px; }
  .contact h2 {
    max-width: 13ch;
    font-size: clamp(40px, 7.5vw, 58px);
    line-height: .98;
  }
  .contact-inner > p:nth-of-type(2) { margin-top: 17px; font-size: 15px; }
  .contact-actions { margin-top: 24px; }
  .contact-orbit { width: min(74vw, 580px); opacity: .17; }
  .site-footer {
    margin-top: 0 !important;
    padding: 18px 38px max(18px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    font-size: 11px;
  }
}

@media (orientation: landscape) and (max-height: 430px) and (max-width: 700px) {
  .hero { padding-inline: 24px; grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr); gap: 18px; }
  .hero h1 { font-size: 47px; }
  .hero h2 { font-size: 23px; }
  .hero-lead { font-size: 12px; }
  .logic-stage, .system, .operations, .contact { padding-left: 24px !important; padding-right: 24px !important; }
  .pipeline-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .premium-architecture { --system-label-col: 72px; --system-panel-offset: 42px; }
  .flow-layer { grid-template-columns: 72px minmax(0, 1fr) !important; }
  .data-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-panel { grid-template-columns: 1fr; }
  .programs-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .touchpoints-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-panel { grid-template-columns: 1fr; }
  .results-panel strong { justify-content: flex-end; white-space: normal; }
  .site-footer { padding-left: 24px; padding-right: 24px; }
}

/* Skip link remains invisible unless reached intentionally by keyboard. */
.skip-link {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

/* Progressive enhancement fallback: full content remains readable without JS. */
html:not(.motion-ready) .pipeline-node,
html:not(.motion-ready) .flow-layer {
  opacity: 1;
  transform: none;
  filter: none;
}


/* ========================================================================
   FINAL MOBILE POLISH V17
   Removes the portrait gap, prevents logic-card clipping in Safari/Chrome,
   and keeps the platform core readable without changing the proven layout.
   ======================================================================== */
@media (max-width: 800px) {
  /* The portrait is the visual end of the hero on phones. No paper-coloured
     spacer remains between the image and the dark logic section. */
  .hero {
    padding-bottom: 0 !important;
  }

  .hero-visual {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    align-self: end;
    align-items: flex-end;
    line-height: 0;
  }

  .portrait-picture {
    align-self: end;
    margin-bottom: 0 !important;
    line-height: 0;
  }

  .portrait-picture img,
  .hero-visual img {
    display: block;
    vertical-align: bottom;
    margin-bottom: 0 !important;
  }

  /* Mobile motion translates cards by a few pixels. The previous hidden
     wrapper clipped the top and bottom borders of the first/last item. */
  .logic,
  .logic-stage,
  .logic-display,
  .pipeline-wrap,
  .pipeline-nodes {
    overflow: visible !important;
  }

  .logic-stage {
    padding-top: 92px !important;
    padding-bottom: 104px !important;
  }

  .pipeline-wrap {
    padding-block: 8px 24px;
  }

  .pipeline-nodes {
    padding-block: 6px 18px !important;
  }

  .pipeline-node {
    margin-inline: 1px;
    box-sizing: border-box;
  }

  .operations-core strong {
    max-width: 9.5ch;
    margin-inline: auto;
    line-height: 1.02;
    text-wrap: balance;
  }
}

@media (max-width: 430px) {
  .logic-stage {
    padding-top: 86px !important;
    padding-bottom: 96px !important;
  }

  .pipeline-wrap {
    padding-bottom: 20px;
  }
}

@media (orientation: landscape) and (max-height: 620px) and (max-width: 980px) {
  .hero {
    padding-bottom: 0 !important;
  }

  .hero-visual,
  .portrait-picture,
  .portrait-picture img {
    margin-bottom: 0 !important;
  }

  .logic-stage,
  .logic-display,
  .pipeline-wrap,
  .pipeline-nodes {
    overflow: visible !important;
  }

  .pipeline-wrap {
    padding-block: 6px 18px;
  }
}

/* The desktop flow can also translate cards by a few pixels while scrolling.
   Keep the card outlines visible at every animation state. */
.pipeline-wrap,
.pipeline-nodes {
  overflow: visible !important;
}

@media (orientation: landscape) and (max-height: 620px) and (max-width: 980px) {
  /* Align the portrait exactly with the following section in short landscape
     viewports, where subpixel scaling otherwise leaves a hairline gap. */
  .hero-visual { top: 5px; }
}
