/* ─────────────────────────────────────────────────────────────────
   Emma Brand Guide — Nightfall chrome + Daylight inset register
   ───────────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap");
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");

/* ──────────────────────────────────────────────────────────── */
/* Theme comes from tokens.css (light + mostly-black dark) — the brand guide
   no longer redefines the semantic surface stack, so it flips with the app
   theme like every other surface. Blue stays an accent (fg-brand, glows on
   illustrations), never an ambient navy wash. */

/* Daylight — used inside inset preview frames, overriding back to light */
[data-register="daylight"] {
  --bg-canvas: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-surface-2: #FAFAFB;
  --bg-muted: #F7F7F8;
  --bg-inverse: #000000;

  --fg-default: #000000;
  --fg-secondary: #4E4E56;
  --fg-muted: #767781;
  --fg-disabled: #B9BAC0;
  --fg-brand: var(--blue-700);

  --border-default: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.18);
  --border-subtle: rgba(0, 0, 0, 0.05);

  --action-primary-bg: #000000;
  --action-primary-fg: #FFFFFF;
  --action-primary-bg-hover: #1A1A1E;

  --action-secondary-bg: #FFFFFF;
  --action-secondary-fg: #000000;
  --action-secondary-border: rgba(0, 0, 0, 0.12);

  color: var(--fg-default);
  background: var(--bg-canvas);
}

/* ──────────────────────────────────────────────────────────── */
/* Base */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-canvas);
  color: var(--fg-default);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ──────────────────────────────────────────────────────────── */
/* Cosmic atmosphere background — fixed, behind everything */

/* Ambient atmosphere. Theme-aware: light gets nothing (clean canvas); dark is
   mostly black with one restrained blue accent — no navy/purple/teal wash. */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-canvas);
}
[data-theme="dark"] .cosmos {
  background:
    radial-gradient(70vmax 55vmax at 88% 4%, rgba(47, 55, 255, 0.08), transparent 60%),
    var(--bg-canvas);
}
[data-theme="dark"] .cosmos::after {
  /* very subtle particle dust grid — dark only */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.5) 0.5px, transparent 0.5px),
    radial-gradient(circle, rgba(255,255,255,0.3) 0.5px, transparent 0.5px);
  background-size: 240px 240px, 380px 380px;
  background-position: 0 0, 120px 60px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 0%, transparent 80%);
}

/* ──────────────────────────────────────────────────────────── */
/* App shell */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 296px 1fr;
  min-height: 100vh;
}

/* ──────────────────────────────────────────────────────────── */
/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border-default);
  background: rgba(5, 8, 24, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.brand .lockup {
  flex: 1;
  display: flex;
  align-items: center;
  height: 28px;
  overflow: hidden;
}
.brand .lockup img {
  height: 28px;
  width: auto;
  display: block;
}
.brand .ver {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--border-default);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Search */
.search-wrap {
  padding: 14px 18px 6px;
  position: relative;
}
.search-wrap .material-icons {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--fg-muted);
  pointer-events: none;
}
.search {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 10px 8px 32px;
  color: var(--fg-default);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.search::placeholder { color: var(--fg-muted); }
.search:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(86, 106, 255, 0.18); }
.search-wrap .kbd {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  border: 1px solid var(--border-default);
  border-radius: 3px;
  padding: 1px 5px;
  pointer-events: none;
}

/* Register toggle pill */
.register-toggle {
  margin: 14px 18px 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 3px;
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.register-toggle button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 7px 10px;
  color: var(--fg-muted);
  cursor: pointer;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 160ms ease;
}
.register-toggle button .material-icons { font-size: 13px; }
.register-toggle button.active {
  color: #000;
  background: #FFFFFF;
}
.register-toggle button.active[data-r="nightfall"] {
  color: #FFFFFF;
  background: #000000;
}
.register-toggle button:not(.active):hover { color: var(--fg-default); }

.register-hint {
  margin: 6px 22px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* Nav */
.nav {
  padding: 8px 12px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nav-section {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  padding: 18px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--fg-secondary);
  line-height: 1.35;
  cursor: pointer;
  position: relative;
}
.nav-item .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  min-width: 18px;
}
.nav-item .label { flex: 1; }
.nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--fg-default);
}
.nav-item.active {
  background: rgba(255,255,255,0.06);
  color: var(--fg-default);
  font-weight: 500;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--blue-400);
  border-radius: 2px;
}

.sidebar-foot {
  border-top: 1px solid var(--border-subtle);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  letter-spacing: 0.04em;
}
.sidebar-foot a { color: var(--fg-secondary); text-decoration: none; }
.sidebar-foot a:hover { color: var(--fg-default); }
.sidebar-foot .row { display: flex; justify-content: space-between; }

/* ──────────────────────────────────────────────────────────── */
/* Main */
.main {
  min-width: 0;
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: rgba(5, 8, 24, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.crumbs .sep { opacity: 0.5; }
.crumbs .here { color: var(--fg-default); }
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.topbar-tools .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-300);
  box-shadow: 0 0 8px var(--green-300);
}

/* page container */
.page {
  display: none;
  padding: 0;
  position: relative;
}
.page.is-active { display: block; }
.page-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 48px 120px;
}

/* ──────────────────────────────────────────────────────────── */
/* Typography */
.t-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.t-eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--blue-400);
}

.t-display {
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.t-display-l {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.t-h1 {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.024em;
  font-weight: 600;
  margin: 0 0 16px;
  text-wrap: balance;
}
.t-h2 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.014em;
  font-weight: 600;
  margin: 0 0 12px;
}
.t-h3 {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  font-weight: 600;
  margin: 0 0 8px;
}
.t-lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--fg-secondary);
  margin: 0 0 24px;
  max-width: 64ch;
  text-wrap: pretty;
}
.t-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-secondary);
  max-width: 64ch;
  text-wrap: pretty;
}
.t-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}

/* ──────────────────────────────────────────────────────────── */
/* Buttons */
.btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn .material-icons { font-size: 18px; }
.btn-primary {
  background: var(--action-primary-bg);
  color: var(--action-primary-fg);
}
.btn-primary:hover { background: var(--action-primary-bg-hover); }
.btn-secondary {
  background: var(--action-secondary-bg);
  color: var(--action-secondary-fg);
  border: 1px solid var(--action-secondary-border);
}
.btn-secondary:hover { border-color: var(--fg-default); }
.btn-ghost {
  background: transparent;
  color: var(--fg-secondary);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--fg-default); }

/* ──────────────────────────────────────────────────────────── */
/* Hero — page top */

.hero {
  position: relative;
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--border-subtle);
}
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
}
.hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.hero-meta .num {
  font-size: 11px;
  color: var(--blue-300);
  border: 1px solid var(--blue-300);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.hero-meta .sep {
  width: 24px; height: 1px;
  background: var(--border-strong);
}
.hero-tag {
  align-self: end;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  text-align: right;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* Section block */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.section:last-child { border-bottom: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 40px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
}

/* mono label above previews */
.preview-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.preview-label .slash { color: var(--blue-300); }

/* ──────────────────────────────────────────────────────────── */
/* Nightfall card surface */
.card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.card-soft {
  background:
    radial-gradient(ellipse at top right, rgba(47,55,255,0.10), transparent 60%),
    rgba(255,255,255,0.02);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
}

/* ──────────────────────────────────────────────────────────── */
/* Daylight inset frame — used to embed product-register previews */

.daylight-frame {
  background: #FFFFFF;
  color: #000;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.nightfall-frame {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(47,55,255,0.16), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(132,82,255,0.12), transparent 60%),
    linear-gradient(180deg, #000000, #050818);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}

/* ──────────────────────────────────────────────────────────── */
/* Home grid */
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1024px) {
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .section-grid { grid-template-columns: 1fr; }
}

.section-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 24px 24px 28px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 220ms ease, background 220ms ease;
}
.section-card:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}
.section-card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.section-card .row .num { color: var(--blue-300); }
.section-card .name {
  font-size: 22px;
  letter-spacing: -0.014em;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.2;
}
.section-card .essence {
  font-size: 13.5px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin: 0;
}
.section-card .arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: var(--fg-muted);
  font-size: 18px;
  transition: transform 220ms ease, color 220ms ease;
}
.section-card:hover .arrow {
  transform: translateX(4px);
  color: var(--fg-default);
}

/* Principles strip */
.principles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (max-width: 900px) {
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.principle {
  padding: 18px 16px 20px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.principle:last-child { border-right: 0; }
.principle .n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue-300);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.principle .p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.principle .p em {
  font-style: normal;
  color: var(--fg-muted);
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  margin-top: 4px;
}

/* Side-by-side register preview row */
.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 820px) {
  .dual { grid-template-columns: 1fr; }
}
.dual > div { min-width: 0; }

/* Footer */
.page-footer {
  margin-top: 80px;
  padding: 28px 0 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
  gap: 16px;
}
.page-footer .links {
  display: flex;
  gap: 18px;
}
.page-footer .links a:hover { color: var(--fg-default); }

/* Orbital hero animation */
.orbit-hero {
  position: relative;
  width: 100%;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px 0 16px;
}
.orbit-hero svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.orbit-ring {
  fill: none;
  stroke: rgba(255,255,255,0.16);
  stroke-width: 1;
  transform-origin: center;
  transform-box: fill-box;
}
.orbit-ring.b { stroke: rgba(133, 160, 255, 0.32); }
.orbit-ring.p { stroke: rgba(195, 179, 255, 0.22); }
.orbit-ring.t { stroke: rgba(105, 253, 248, 0.18); }
.orbit-spin-slow { animation: spin 90s linear infinite; }
.orbit-spin-med  { animation: spin 60s linear infinite reverse; }
.orbit-spin-fast { animation: spin 40s linear infinite; }
@keyframes spin {
  to { transform: rotate(360deg); }
}
.orbit-core {
  width: 96px; height: 96px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 32px rgba(86, 106, 255, 0.55));
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit-core img, .orbit-core svg { width: 100%; height: 100%; display: block; }
.orbit-glow {
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,55,255,0.18) 0%, transparent 60%);
  filter: blur(20px);
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-spin-slow, .orbit-spin-med, .orbit-spin-fast { animation: none; }
}

/* Reduce on mobile-ish */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; max-height: none; }
  .topbar, .page-inner { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 56px 0 32px; }
  .orbit-hero { height: 320px; }
}

/* ════════════════════════════════════════════════════════════ */
/* PAGE — TWO REGISTERS                                          */
/* ════════════════════════════════════════════════════════════ */

/* Section transition between Nightfall body → Daylight inset zone */
.register-transition {
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.10) 100%);
  position: relative;
}
.register-transition::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.18), transparent 70%);
}

/* Big register-feature panel — the full-bleed showcase used on the Registers page */
.register-feature {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  padding: 56px 56px 64px;
  margin: 0;
}
.register-feature.daylight {
  background: #FFFFFF;
  color: #000;
  border: 1px solid rgba(0,0,0,0.08);
}
.register-feature.nightfall {
  background:
    radial-gradient(ellipse 60% 80% at 90% 10%, rgba(47,55,255,0.18), transparent 60%),
    radial-gradient(ellipse 50% 70% at 8% 90%, rgba(132,82,255,0.14), transparent 60%),
    linear-gradient(180deg, #000000, #050818 70%, #0A0F2E);
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.08);
}
.register-feature.nightfall::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.55) 0.5px, transparent 0.5px),
    radial-gradient(circle, rgba(255,255,255,0.32) 0.5px, transparent 0.5px);
  background-size: 220px 220px, 360px 360px;
  background-position: 30px 30px, 160px 90px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black, transparent 80%);
}
.register-feature > * { position: relative; z-index: 1; }

.register-feature .preview-label {
  margin-bottom: 28px;
}
.register-feature.daylight .preview-label { color: rgba(0,0,0,0.55); }
.register-feature.daylight .preview-label .slash { color: var(--blue-700); }
.register-feature.nightfall .preview-label { color: rgba(255,255,255,0.55); }
.register-feature.nightfall .preview-label .slash { color: var(--blue-300); }

.register-feature .title {
  font-size: clamp(36px, 4vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-weight: 600;
  margin: 0 0 8px;
  text-wrap: balance;
}
.register-feature .desc {
  font-size: 17px;
  line-height: 1.55;
  max-width: 60ch;
  margin: 18px 0 28px;
}
.register-feature.daylight .desc { color: #434349; }
.register-feature.nightfall .desc { color: rgba(255,255,255,0.78); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.chip-row .chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid;
}
.register-feature.daylight .chip {
  border-color: rgba(0,0,0,0.12);
  color: #4E4E56;
  background: #FAFAFB;
}
.register-feature.nightfall .chip {
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.04);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; gap: 32px; }
  .register-feature { padding: 32px 24px 40px; }
}

.feature-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.register-feature.daylight .feature-sub { color: #767781; }
.register-feature.nightfall .feature-sub { color: rgba(255,255,255,0.5); }

.feature-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  font-size: 14px;
  line-height: 1.65;
}
.feature-list li {
  padding: 8px 0;
  border-bottom: 1px solid;
}
.register-feature.daylight .feature-list li { border-bottom-color: rgba(0,0,0,0.06); color: #434349; }
.register-feature.nightfall .feature-list li { border-bottom-color: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
.feature-list li:last-child { border-bottom: 0; }

/* ─── Embedded example: Daylight Vital Signs dashboard preview */
.demo-vitals {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-xl);
  padding: 24px;
  background: #FAFAFB;
}
.demo-vitals .head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 18px;
}
.demo-vitals .head h4 {
  font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.005em; color: #000;
}
.demo-vitals .head .ts {
  font-family: var(--font-mono); font-size: 11px; color: #767781;
  letter-spacing: 0.04em;
}
.demo-vitals .row {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px;
}
.demo-vitals .metric {
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
}
.demo-vitals .metric .label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #767781;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.demo-vitals .metric .label .material-icons { font-size: 12px; color: #767781; }
.demo-vitals .metric .v {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #000;
  line-height: 1.1;
}
.demo-vitals .metric .trend {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #767781;
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.demo-vitals .metric .trend .up { color: var(--green-700); }
.demo-vitals .metric .trend .down { color: var(--red-700); }
.demo-vitals .ribbon {
  margin-top: 16px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.demo-vitals .ribbon .txt {
  font-size: 13px;
  color: #434349;
}
.demo-vitals .ribbon .txt b { color: #000; font-weight: 500; }
.demo-vitals .ribbon .btn-mini {
  background: #000;
  color: #FFF;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.demo-vitals .ribbon .btn-mini .material-icons { font-size: 14px; }

/* ─── Embedded example: Nightfall marketing hero */
.demo-marketing {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 56px 40px 64px;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(47,55,255,0.40), transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(132,82,255,0.30), transparent 60%),
    linear-gradient(180deg, #050818, #000000);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  isolation: isolate;
}
.demo-marketing::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.6) 0.5px, transparent 0.5px),
    radial-gradient(circle, rgba(255,255,255,0.35) 0.5px, transparent 0.5px);
  background-size: 180px 180px, 280px 280px;
  background-position: 20px 30px, 100px 70px;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 80% 80% at 70% 30%, black, transparent 80%);
  z-index: 0;
}
.demo-marketing > * { position: relative; z-index: 1; }
.demo-marketing .ey {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}
.demo-marketing h4 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.04;
  margin: 0 0 16px;
  color: #FFFFFF;
}
.demo-marketing p {
  font-size: 15px;
  color: rgba(255,255,255,0.74);
  max-width: 40ch;
  margin: 0 0 28px;
}
.demo-marketing .row {
  display: flex; gap: 10px;
}
.demo-marketing .btn-w {
  background: #FFF; color: #000; border: 0;
  border-radius: 4px; font: inherit; font-weight: 500;
  font-size: 13px; padding: 11px 18px;
  display: inline-flex; align-items: center; gap: 8px;
}
.demo-marketing .btn-w .material-icons { font-size: 16px; }
.demo-marketing .btn-out {
  background: transparent; color: #FFF;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 4px; font: inherit; font-weight: 500;
  font-size: 13px; padding: 11px 18px;
}
.demo-marketing .orb {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 360px; height: 360px;
  z-index: 0;
}
.demo-marketing .orb svg { width: 100%; height: 100%; overflow: visible; }

/* ─── Side-by-side comparison row */
.compare {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.compare-head {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.compare-head > div { padding: 14px 20px; }
.compare-head > div:not(:first-child) { border-left: 1px solid var(--border-default); }
.compare-head .label-l { color: var(--fg-default); }
.compare-row {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  border-bottom: 1px solid var(--border-default);
}
.compare-row:last-child { border-bottom: 0; }
.compare-row > div { padding: 28px 24px; min-height: 140px; display: flex; align-items: center; }
.compare-row > div:not(:first-child) { border-left: 1px solid var(--border-default); }
.compare-row .row-label {
  font-size: 14px;
  color: var(--fg-secondary);
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}
.compare-row .row-label .l-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.compare-row .row-label .l-name {
  font-weight: 500;
  color: var(--fg-default);
}
.compare-cell {
  position: relative;
}
.compare-cell.daylight {
  background: #FFFFFF;
  color: #000;
}
.compare-cell.nightfall {
  background:
    radial-gradient(ellipse 80% 100% at 50% 100%, rgba(47,55,255,0.15), transparent 60%),
    #050818;
  color: #FFFFFF;
}
.compare-cell .inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
@media (max-width: 900px) {
  .compare-head, .compare-row { grid-template-columns: 1fr; }
  .compare-row > div, .compare-head > div { border-left: 0 !important; }
}

/* ─── Proportion bars */
.proportions {
  display: grid;
  gap: 26px;
}
.prop-row .label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.prop-row .label .n {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.prop-row .label .t {
  font-size: 15px;
  font-weight: 500;
}
.prop-bar {
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border-default);
}
.prop-bar .seg {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
}
.prop-bar .seg .pct { opacity: 0.7; margin-left: 6px; }

/* ─── Decision rule table */
.decision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) {
  .decision { grid-template-columns: 1fr; }
}
.decision-card {
  padding: 28px 28px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid;
}
.decision-card.daylight {
  background: #FFFFFF;
  color: #000;
  border-color: rgba(0,0,0,0.08);
}
.decision-card.nightfall {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(47,55,255,0.16), transparent 60%),
    #050818;
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.10);
}
.decision-card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.decision-card.daylight .tag { color: #767781; }
.decision-card.daylight .tag .s { color: var(--blue-700); }
.decision-card.nightfall .tag { color: rgba(255,255,255,0.55); }
.decision-card.nightfall .tag .s { color: var(--blue-300); }
.decision-card h4 {
  font-size: 24px;
  letter-spacing: -0.018em;
  font-weight: 600;
  margin: 0 0 12px;
}
.decision-card p {
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0;
}
.decision-card.daylight p { color: #434349; }
.decision-card.nightfall p { color: rgba(255,255,255,0.78); }

/* ─── Shared DNA cards */
.dna-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (max-width: 900px) {
  .dna-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .dna-grid { grid-template-columns: repeat(2, 1fr); }
}
.dna-card {
  padding: 18px 16px 22px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.dna-card:last-child { border-right: 0; }
.dna-card .ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--fg-default);
}
.dna-card .ico .material-icons { font-size: 15px; }
.dna-card .t {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.dna-card .s {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

/* ─── Shared: in-development banner used by scaffold pages */
.preview-banner {
  margin-top: 32px;
  padding: 22px 24px;
  border: 1px dashed rgba(133, 160, 255, 0.32);
  border-radius: var(--radius-xl);
  background: rgba(47,55,255,0.05);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
}
.preview-banner .tag {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-300);
  padding: 4px 9px;
  border: 1px solid rgba(133,160,255,0.32);
  border-radius: var(--radius-sm);
}
.preview-banner .what { color: var(--fg-default); }
.preview-banner .when { color: var(--fg-muted); }

/* Home pill on nav (#00) */
.nav-item.is-home {
  background: rgba(255,255,255,0.04);
  margin-bottom: 6px;
  color: var(--fg-default);
  font-weight: 500;
}
.nav-item.is-home .num { color: var(--blue-300); }
.nav-item.is-home.active { background: rgba(255,255,255,0.08); }

/* ─── Reveal-on-scroll utility (used by content pages for motion storytelling)
   Content is visible by default; the hidden start state only applies once
   brand-guide.js has armed its observer (html.reveal-armed). No-JS readers,
   crawlers and any script-timing failure always see the full content. */
[data-reveal] {
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
[data-reveal="scale"] { transform-origin: center; }
.reveal-armed [data-reveal]:not(.is-revealed) {
  opacity: 0;
  transform: translateY(18px);
}
.reveal-armed [data-reveal="fade"]:not(.is-revealed) { transform: none; }
.reveal-armed [data-reveal="scale"]:not(.is-revealed) { transform: scale(0.96); }
.reveal-armed [data-reveal="left"]:not(.is-revealed) { transform: translateX(-18px); }
.reveal-armed [data-reveal="right"]:not(.is-revealed) { transform: translateX(18px); }

[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }
[data-reveal-delay="6"] { transition-delay: 480ms; }
[data-reveal-delay="7"] { transition-delay: 560ms; }
[data-reveal-delay="8"] { transition-delay: 640ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
