:root {
  --bg: #061014;
  --bg-2: #0a171c;
  --panel: rgba(11, 22, 27, 0.82);
  --panel-solid: #0c181d;
  --line: rgba(235, 248, 246, 0.105);
  --line-strong: rgba(var(--accent-rgb), 0.42);
  --text: #f1f6f3;
  --muted: #a5b4b1;
  --muted-2: #758683;
  --accent: #55d6be;
  --accent-2: #c9fff1;
  --accent-rgb: 85, 214, 190;
  --secondary-rgb: 84, 123, 180;
  --success: #67ed9b;
  --button-text: #021412;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --header-height: 76px;
  color-scheme: dark;
}

html[data-theme="amber"] {
  --bg: #070b10;
  --bg-2: #0a1017;
  --panel: rgba(14, 20, 28, 0.8);
  --panel-solid: #0e151d;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4efe6;
  --muted: #aaa49a;
  --muted-2: #777f89;
  --accent: #d7a446;
  --accent-2: #f4d889;
  --accent-rgb: 215, 164, 70;
  --secondary-rgb: 88, 128, 154;
  --success: #52e38e;
  --button-text: #181107;
}

html[data-theme="forest"] {
  --bg: #06100c;
  --bg-2: #0b1610;
  --panel: rgba(12, 22, 17, 0.82);
  --panel-solid: #0e1b14;
  --line: rgba(228, 242, 232, 0.1);
  --text: #f1f5ec;
  --muted: #a7b3a8;
  --muted-2: #768778;
  --accent: #9bd66f;
  --accent-2: #ddffc9;
  --accent-rgb: 155, 214, 111;
  --secondary-rgb: 167, 112, 63;
  --success: #9bd66f;
  --button-text: #071307;
}

html[data-theme="light"] {
  --bg: #f1eee6;
  --bg-2: #e7e1d7;
  --panel: rgba(255, 253, 247, 0.74);
  --panel-solid: #fffdf7;
  --line: rgba(24, 31, 35, 0.11);
  --text: #151b1e;
  --muted: #66706d;
  --muted-2: #828b88;
  --accent: #0c6d78;
  --accent-2: #1e8f9d;
  --accent-rgb: 12, 109, 120;
  --secondary-rgb: 174, 112, 45;
  --success: #148c4b;
  --button-text: #f7fbfa;
  --shadow: 0 30px 80px rgba(38, 31, 21, 0.15);
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--accent-rgb), 0.15), transparent 26rem),
    radial-gradient(circle at 78% 8%, rgba(var(--secondary-rgb), 0.18), transparent 24rem),
    linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 86%, black) 48%, var(--bg-2) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.055) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent 76%);
}

html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(18, 24, 27, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 24, 27, 0.052) 1px, transparent 1px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0.06), transparent 21%, transparent 71%, rgba(var(--accent-rgb),0.08));
  mix-blend-mode: soft-light;
}

html[data-theme="light"] body::after { opacity: 0.45; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.page-shell {
  width: min(100%, 1560px);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(20px, 5vw, 72px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
  transition: background 200ms ease, border-color 200ms ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-color: rgba(var(--accent-rgb), 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: max-content;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 9px;
  color: var(--accent-2);
  font: 700 14px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-shadow: inset 0 0 18px rgba(var(--accent-rgb), 0.12), 0 0 22px rgba(var(--accent-rgb), 0.1);
}

.brand-name {
  font-weight: 760;
  letter-spacing: 0.01em;
  font-size: 17px;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  color: var(--muted);
  font-size: 15px;
}

.main-nav a { transition: color 160ms ease; }
.main-nav a:hover,
.main-nav a:focus-visible { color: var(--text); }

.header-action {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), 0.08);
  font-size: 14px;
  font-weight: 650;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

html[data-theme="light"] .header-action {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
}

.header-action:hover,
.header-action:focus-visible {
  transform: translateY(-1px);
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.6);
}

.header-tools {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.theme-menu {
  position: relative;
}

.theme-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,255,255,0.035);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

html[data-theme="light"] .theme-trigger {
  background: rgba(255,255,255,0.54);
}

.theme-trigger:hover,
.theme-trigger:focus-visible,
.theme-menu.is-open .theme-trigger {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1px);
}

.theme-trigger-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12), 0 0 20px rgba(var(--accent-rgb), 0.45);
}

.theme-trigger-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.theme-tray {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 284px;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 0%, rgba(var(--accent-rgb), 0.18), transparent 13rem),
    color-mix(in srgb, var(--panel-solid) 94%, transparent);
  box-shadow: 0 28px 86px rgba(0,0,0,0.42);
  backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-7px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease, transform 180ms ease;
}

html[data-theme="light"] .theme-tray {
  background:
    radial-gradient(circle at 85% 0%, rgba(var(--accent-rgb), 0.13), transparent 13rem),
    rgba(255,255,255,0.94);
  box-shadow: 0 26px 70px rgba(38,31,21,0.17);
}

.theme-menu.is-open .theme-tray {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.theme-tray::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 28px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(var(--accent-rgb), 0.22);
  border-top: 1px solid rgba(var(--accent-rgb), 0.22);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  transform: rotate(45deg);
}

html[data-theme="light"] .theme-tray::before { background: rgba(255,255,255,0.94); }

.theme-tray-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.theme-tray-head span {
  color: var(--muted);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.theme-tray-head strong {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 760;
}

html[data-theme="light"] .theme-tray-head strong { color: var(--accent); }

.theme-option {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-option:hover,
.theme-option:focus-visible {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.18);
}

.theme-option.is-active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.32);
}

.theme-option span:not(.palette-dot) {
  display: grid;
  gap: 3px;
}

.theme-option strong {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 720;
}

.theme-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.theme-option .palette-dot {
  width: 24px;
  height: 24px;
  cursor: default;
  pointer-events: none;
}

.theme-option.is-active .palette-dot {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

html[data-theme="light"] .nav-toggle { background: rgba(0,0,0,0.025); }

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
  transition: transform 180ms ease;
}

.nav-open .nav-toggle span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }

.section-frame { padding-inline: clamp(20px, 5vw, 72px); }

.hero {
  min-height: calc(100vh - var(--header-height));
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-top: clamp(44px, 8vh, 84px);
  padding-bottom: clamp(54px, 9vh, 104px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 999px;
  transform: rotate(-8deg);
}

.orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.95);
}

.orbit-a { width: 920px; height: 230px; left: -130px; top: 18%; }
.orbit-a::after { top: 38px; right: 22%; }
.orbit-b { width: 780px; height: 180px; right: -180px; bottom: 17%; opacity: 0.8; }
.orbit-b::after { bottom: 28px; left: 24%; }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.6;
}

.glow-a {
  width: 320px;
  height: 320px;
  background: rgba(var(--accent-rgb), 0.16);
  left: 2%;
  top: 28%;
}

.glow-b {
  width: 460px;
  height: 460px;
  background: rgba(var(--secondary-rgb), 0.18);
  right: 8%;
  top: 14%;
}

.grid-fade {
  position: absolute;
  inset: 14% 4% auto auto;
  width: 36vw;
  height: 36vw;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.09);
  opacity: 0.7;
}

.eyebrow,
.section-label {
  margin: 0 0 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html[data-theme="light"] .eyebrow,
html[data-theme="light"] .section-label { color: var(--accent); }

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--accent);
}

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

h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(58px, 8.2vw, 116px);
  line-height: 0.94;
  letter-spacing: -0.07em;
  font-weight: 630;
}

h1 span { color: var(--accent); font-weight: 560; }

.hero-lead {
  max-width: 700px;
  margin-bottom: 44px;
  color: color-mix(in srgb, var(--text) 76%, var(--muted));
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.58;
  letter-spacing: -0.018em;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.button {
  position: relative;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 720;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}

.button::after {
  content: "›";
  font-size: 20px;
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--button-text);
  box-shadow: 0 16px 38px rgba(var(--accent-rgb), 0.2);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

html[data-theme="light"] .button-secondary { background: rgba(255,255,255,0.45); }

.button:hover,
.button:focus-visible { transform: translateY(-2px); }
.button-primary:hover,
.button-primary:focus-visible { box-shadow: 0 20px 50px rgba(var(--accent-rgb), 0.28); }
.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.08);
}

.hero-visual { position: relative; min-height: 560px; perspective: 1200px; }

.visual-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-solid) 86%, white 8%), color-mix(in srgb, var(--bg) 90%, black 10%));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

html[data-theme="light"] .visual-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.48));
}

.main-card {
  position: absolute;
  inset: 50px 0 42px 0;
  border-radius: var(--radius-xl);
  padding: clamp(24px, 3.4vw, 42px);
  overflow: hidden;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 220ms ease;
}

.main-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(circle at 18% 16%, rgba(var(--accent-rgb), 0.2), transparent 22rem),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), transparent 30%, transparent 70%, rgba(var(--secondary-rgb), 0.18));
  opacity: 0.72;
  pointer-events: none;
}

.main-card::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 26px;
  pointer-events: none;
}

html[data-theme="light"] .main-card::after { border-color: rgba(19,24,27,0.075); }

.card-topline,
.flow-map,
.signal-row { position: relative; z-index: 1; }

.card-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 18px color-mix(in srgb, var(--success) 80%, transparent);
}

.flow-map {
  margin-top: 58px;
  display: grid;
  gap: 18px;
}

.flow-node {
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.085);
  border-radius: 20px;
  background: rgba(4, 8, 12, 0.34);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

html[data-theme="light"] .flow-node {
  border-color: rgba(18,24,27,0.095);
  background: rgba(255,255,255,0.48);
}

.flow-node:hover { transform: translateX(4px); }

.flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -19px;
  width: 1px;
  height: 18px;
  background: linear-gradient(to bottom, rgba(var(--accent-rgb), 0.65), rgba(var(--accent-rgb), 0.1));
}

.flow-node span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  color: var(--accent-2);
  font: 760 13px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html[data-theme="light"] .flow-node span { color: var(--accent); }

.flow-node strong {
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 610;
  letter-spacing: -0.04em;
}

.flow-node.is-active {
  border-color: rgba(var(--accent-rgb), 0.46);
  background: rgba(var(--accent-rgb), 0.1);
}

.signal-row {
  position: absolute;
  right: 42px;
  bottom: 34px;
  display: flex;
  align-items: end;
  gap: 7px;
  height: 46px;
}

.signal-row i {
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.92));
  animation: pulse 2.6s ease-in-out infinite;
}

.signal-row i:nth-child(1) { height: 13px; animation-delay: 0s; }
.signal-row i:nth-child(2) { height: 27px; animation-delay: 0.1s; }
.signal-row i:nth-child(3) { height: 19px; animation-delay: 0.2s; }
.signal-row i:nth-child(4) { height: 41px; animation-delay: 0.3s; }
.signal-row i:nth-child(5) { height: 30px; animation-delay: 0.4s; }
.signal-row i:nth-child(6) { height: 20px; animation-delay: 0.5s; }
.signal-row i:nth-child(7) { height: 35px; animation-delay: 0.6s; }

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scaleY(0.82); }
  50% { opacity: 1; transform: scaleY(1); }
}

.mini-card {
  position: absolute;
  z-index: 2;
  min-width: 218px;
  padding: 18px 18px 20px;
  border-radius: 22px;
}

.mini-card-a { top: 0; right: 42px; }
.mini-card-b { left: -14px; bottom: 0; }

.mini-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-2);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mini-card strong {
  display: block;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.platform,
.modules,
.contact {
  padding-top: clamp(84px, 12vw, 150px);
  padding-bottom: clamp(84px, 12vw, 150px);
}

.platform { border-top: 1px solid var(--line); }

.platform-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: start;
}

.platform h2,
.modules h2,
.contact h2 {
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 610;
  margin-bottom: 0;
}

.platform-copy {
  display: grid;
  gap: 22px;
  padding-top: 4px;
}

.platform-copy p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 80%, var(--muted));
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.62;
  letter-spacing: -0.018em;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section-head h2 { max-width: 860px; }

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

.module-card {
  min-height: 246px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.022)),
    var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

html[data-theme="light"] .module-card { background: rgba(255,255,255,0.54); }

.module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.38);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.09), rgba(255,255,255,0.024)),
    var(--panel);
}

.module-card span {
  color: var(--accent-2);
  font: 760 13px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html[data-theme="light"] .module-card span { color: var(--accent); }

.module-card h3 {
  margin: auto 0 0;
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 630;
}

.contact { padding-top: 40px; }

.contact-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 76px);
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 80% 22%, rgba(var(--accent-rgb), 0.18), transparent 26rem),
    linear-gradient(135deg, color-mix(in srgb, var(--panel-solid) 92%, white 5%), color-mix(in srgb, var(--bg) 92%, black 8%));
  box-shadow: var(--shadow);
}

html[data-theme="light"] .contact-card {
  background:
    radial-gradient(circle at 80% 22%, rgba(var(--accent-rgb), 0.14), transparent 26rem),
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,255,255,0.48));
}

.contact-card::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -126px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  box-shadow: inset 0 0 80px rgba(var(--accent-rgb), 0.05);
}

.contact-card > * { position: relative; z-index: 1; }
.contact-card h2 { max-width: 680px; margin-bottom: 22px; }

.contact-card p:not(.section-label) {
  max-width: 640px;
  margin-bottom: 34px;
  color: color-mix(in srgb, var(--text) 80%, var(--muted));
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.58;
}

.contact-link {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  background: rgba(255,255,255,0.035);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

html[data-theme="light"] .contact-link { background: rgba(255,255,255,0.45); }

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.08);
}

.palette-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.26);
  cursor: pointer;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,0.13);
}

.palette-dot.is-active { outline: 2px solid var(--accent); outline-offset: 3px; }
.palette-dot[data-theme-button="marine"],
.theme-option[data-theme-button="marine"] .palette-dot { background: linear-gradient(135deg, #061014 0 48%, #55d6be 49%); }
.palette-dot[data-theme-button="amber"],
.theme-option[data-theme-button="amber"] .palette-dot { background: linear-gradient(135deg, #070b10 0 48%, #d7a446 49%); }
.palette-dot[data-theme-button="forest"],
.theme-option[data-theme-button="forest"] .palette-dot { background: linear-gradient(135deg, #06100c 0 48%, #9bd66f 49%); }
.palette-dot[data-theme-button="light"],
.theme-option[data-theme-button="light"] .palette-dot { background: linear-gradient(135deg, #f1eee6 0 48%, #0c6d78 49%); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 520px; max-width: 680px; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --header-height: 68px; }

  .site-header { grid-template-columns: 1fr auto auto; gap: 10px; }
  .header-tools { justify-self: end; }
  .theme-trigger-label { display: none; }
  .theme-trigger { width: 42px; padding: 0; justify-content: center; }
  .theme-tray { right: -52px; width: min(284px, calc(100vw - 32px)); }

  .main-nav,
  .header-action {
    position: fixed;
    left: 16px;
    right: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .main-nav {
    top: 80px;
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
    backdrop-filter: blur(20px);
    overflow: hidden;
  }

  html[data-theme="light"] .main-nav { background: rgba(255,255,255,0.96); }

  .main-nav a { padding: 18px; border-bottom: 1px solid var(--line); }
  .main-nav a:last-child { border-bottom: 0; }

  .header-action {
    top: 248px;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--button-text);
    border-color: transparent;
  }

  .nav-open .main-nav,
  .nav-open .header-action {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-toggle { display: block; justify-self: end; }
  .platform-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
}

@media (max-width: 640px) {
  .hero { padding-top: 42px; padding-bottom: 68px; }
  h1 { font-size: clamp(50px, 17vw, 72px); }

  .hero-lead,
  .platform-copy p,
  .contact-card p:not(.section-label) { font-size: 17px; }

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

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

  .main-card { inset: 44px 0 48px 0; padding: 22px; }

  .mini-card { min-width: 160px; }
  .mini-card-a { right: 0; }
  .mini-card-b { left: 0; }

  .flow-map { margin-top: 42px; }

  .flow-node { min-height: 68px; padding: 14px; }
  .flow-node span { width: 40px; height: 40px; }
  .flow-node strong { font-size: 22px; }
  .signal-row { display: none; }

  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 174px; }
}

@supports not (color: color-mix(in srgb, white, black)) {
  body { background: var(--bg); }
  .site-header { background: var(--bg); }
  .visual-card, .contact-card { background: var(--panel-solid); }
  .hero-lead, .platform-copy p, .contact-card p:not(.section-label), .contact-link { color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Final module list */
.section-note {
  max-width: 420px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: clamp(14px, 1.35vw, 16px);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.module-list {
  display: grid;
  gap: 12px;
}

.module-row {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(180px, 0.48fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 42px);
  align-items: center;
  min-height: 112px;
  padding: 22px 64px 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.048), rgba(255,255,255,0.018)),
    var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

html[data-theme="light"] .module-row {
  background: rgba(255,255,255,0.58);
}

.module-row::after {
  content: "›";
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-54%);
  color: var(--accent-2);
  font-size: 34px;
  line-height: 1;
  opacity: 0.95;
}

html[data-theme="light"] .module-row::after { color: var(--accent); }

.module-row:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.38);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.075), rgba(255,255,255,0.024)),
    var(--panel);
}

.module-number {
  color: var(--accent);
  font: 520 clamp(32px, 4vw, 46px)/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -0.08em;
}

.module-title {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 28px;
  border-left: 1px solid rgba(var(--accent-rgb), 0.28);
}

.module-title h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 690;
}

.module-title p,
.module-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.module-title p {
  font-size: clamp(14px, 1.4vw, 17px);
}

.module-description {
  color: color-mix(in srgb, var(--text) 68%, var(--muted));
  font-size: clamp(14px, 1.35vw, 17px);
}

@media (max-width: 1100px) {
  .module-row {
    grid-template-columns: 72px minmax(180px, 0.55fr) minmax(0, 1fr);
    padding-right: 52px;
  }
}

@media (max-width: 860px) {
  .module-row {
    grid-template-columns: 64px 1fr;
    align-items: start;
  }

  .module-description {
    grid-column: 2;
  }

  .section-note {
    margin-top: 18px;
  }
}

@media (max-width: 640px) {

  .module-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 46px 22px 22px;
  }

  .module-number,
  .module-description {
    grid-column: auto;
  }

  .module-title {
    min-height: auto;
    padding-left: 0;
    border-left: 0;
  }
}


/* Compact expanding theme picker */
.header-tools {
  gap: 14px;
}

.theme-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
}

.theme-trigger {
  position: relative;
  z-index: 3;
  width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-solid) 44%, transparent);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    border-radius 220ms ease;
}

html[data-theme="light"] .theme-trigger {
  background: rgba(255,255,255,0.54);
}

.theme-trigger:hover,
.theme-trigger:focus-visible,
.theme-menu.is-open .theme-trigger {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1px);
}

.theme-trigger-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12), 0 0 20px rgba(var(--accent-rgb), 0.45);
  transition: background 420ms ease, box-shadow 420ms ease;
}

.theme-trigger-label,
.theme-tray,
.theme-tray-head,
.theme-option {
  display: none !important;
}

.theme-swatch-list {
  position: absolute;
  top: 0;
  right: 0;
  height: 42px;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  width: 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
  transition:
    width 260ms cubic-bezier(.2,.8,.2,1),
    padding 260ms cubic-bezier(.2,.8,.2,1),
    opacity 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.theme-menu.is-open .theme-swatch-list {
  width: 178px;
  padding: 0 52px 0 12px;
  opacity: 1;
  pointer-events: auto;
  border-color: rgba(var(--accent-rgb), 0.18);
  background: color-mix(in srgb, var(--panel-solid) 72%, transparent);
  box-shadow: 0 16px 50px rgba(0,0,0,0.24);
  backdrop-filter: blur(18px);
}

html[data-theme="light"] .theme-menu.is-open .theme-swatch-list {
  background: rgba(255,255,255,0.76);
  box-shadow: 0 18px 45px rgba(38,31,21,0.14);
}

.theme-swatch-list .palette-dot {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  opacity: 0;
  transform: translateX(18px) scale(0.78);
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(.2,.8,.2,1),
    outline-color 200ms ease;
}

.theme-menu.is-open .theme-swatch-list .palette-dot {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.theme-menu.is-open .theme-swatch-list .palette-dot:nth-child(1) { transition-delay: 40ms; }
.theme-menu.is-open .theme-swatch-list .palette-dot:nth-child(2) { transition-delay: 70ms; }
.theme-menu.is-open .theme-swatch-list .palette-dot:nth-child(3) { transition-delay: 100ms; }
.theme-menu.is-open .theme-swatch-list .palette-dot:nth-child(4) { transition-delay: 130ms; }

.palette-dot {
  appearance: none;
}

.palette-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.palette-dot.is-active {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .theme-trigger {
    width: 42px;
    padding: 0;
  }

  .theme-swatch-list {
    right: 0;
  }

  .theme-menu.is-open .theme-swatch-list {
    width: 172px;
    padding-right: 52px;
  }
}

:root,
body,
.site-header,
.visual-card,
.main-card,
.mini-card,
.module-row,
.contact-card,
.button-primary,
.button-secondary,
.header-action,
.contact-link,
.theme-trigger,
.palette-dot {
  transition-property: background, background-color, border-color, color, box-shadow, transform, opacity;
  transition-duration: 420ms, 420ms, 420ms, 420ms, 420ms, 180ms, 180ms;
  transition-timing-function: ease;
}
