@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend_variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b1326;
  --bg-2: #0f172d;
  --card: #171f33;
  --card-2: #1d2740;
  --border: #2d3449;
  --text: #dae2fd;
  --subtext: #c9c4e6;
  --muted: #958da1;
  --accent: #d2bbff;
  --accent-2: #6bd8cb;
  --gold: #d9bf74;
  --danger: #ffb4ab;
  --success: #bfcfff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
}

[data-site-theme="teal"] {
  --accent: #6bd8cb;
  --accent-2: #7bd0ff;
  --gold: #d2c37d;
  --bg: #081824;
  --bg-2: #0e2230;
}

[data-site-theme="graphite"] {
  --accent: #f3f4f2;
  --accent-2: #aaccee;
  --gold: #cacaca;
  --bg: #111;
  --bg-2: #181818;
  --card: #232323;
  --card-2: #2b2b2b;
  --border: #3d3d3d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(210, 187, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 216, 203, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto;
  color: var(--text);
  font-family: "Lexend", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 19, 38, 0.08), var(--bg) 82%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 5px);
  z-index: -1;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  padding: 14px 0;
  backdrop-filter: blur(18px);
}

.brand-mark,
.header-cta,
.primary-action,
.secondary-action,
.control-button {
  min-height: 44px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 18px;
}

.brand-glyph {
  display: grid;
  place-items: center;
  width: 54px;
  height: 42px;
  border: 1px solid rgba(210, 187, 255, 0.34);
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.brand-glyph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.72);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--subtext);
  font-size: 14px;
}

.nav-links a,
.header-cta {
  border-radius: var(--radius);
  padding: 12px 14px;
}

.nav-links a:hover,
.header-cta:hover,
.secondary-action:hover {
  background: rgba(210, 187, 255, 0.12);
}

.header-cta {
  border: 1px solid rgba(210, 187, 255, 0.28);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(460px, 1.14fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  min-height: min(880px, calc(100svh - 72px));
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.hero-copy {
  min-width: 0;
  max-width: 560px;
}

.eyebrow,
.micro-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(58px, 9vw, 118px);
  line-height: 0.92;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--subtext);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-weight: 900;
}

.primary-action {
  border: 1px solid color-mix(in srgb, var(--accent) 72%, white 8%);
  background: var(--accent);
  color: #24133f;
}

.primary-action.compact {
  white-space: nowrap;
}

.secondary-action {
  border: 1px solid var(--border);
  background: rgba(23, 31, 51, 0.72);
  color: var(--text);
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.signal-row span {
  border: 1px solid rgba(107, 216, 203, 0.24);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: rgba(107, 216, 203, 0.08);
  color: var(--subtext);
  font-size: 12px;
  font-weight: 750;
}

.demo-stage {
  display: grid;
  grid-template-columns: minmax(310px, 430px) minmax(220px, 300px);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.hero-shell > *,
.demo-stage > * {
  min-width: 0;
}

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 720px;
  border: 1px solid rgba(218, 226, 253, 0.16);
  border-radius: 32px;
  padding: 14px;
  background: #050b16;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(210, 187, 255, 0.14);
  border-radius: 24px;
  pointer-events: none;
}

.phone-status {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 18px;
  color: var(--subtext);
  font-size: 12px;
  font-weight: 850;
}

.status-dots,
.status-dots::before,
.status-dots::after {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.status-dots {
  position: relative;
}

.status-dots::before,
.status-dots::after {
  content: "";
  position: absolute;
  top: 0;
}

.status-dots::before {
  right: 10px;
}

.status-dots::after {
  right: 20px;
}

.phone-screen {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 660px;
  border-radius: 22px;
  padding: 22px 18px 18px;
  background:
    linear-gradient(180deg, rgba(23, 31, 51, 0.86), rgba(11, 19, 38, 0.96)),
    var(--bg);
  overflow: hidden;
}

.screen-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 104px;
}

.screen-top > div {
  min-width: 0;
}

.screen-top h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.screen-fox {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.34));
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 260ms ease;
}

.screen-fox.is-jumping {
  transform: translateY(-12px) rotate(-3deg) scale(1.05);
}

.metric-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(210, 187, 255, 0.22);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(210, 187, 255, 0.09);
}

.metric-value {
  min-width: 78px;
  color: var(--accent);
  font-size: 52px;
  line-height: 0.95;
  font-weight: 950;
  text-align: center;
}

.metric-panel strong {
  display: block;
  font-size: 18px;
}

.metric-panel span:last-child {
  display: block;
  margin-top: 4px;
  color: var(--subtext);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.demo-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0;
  transition: opacity 180ms ease, transform 180ms ease;
  min-width: 0;
}

.demo-content.is-swapping {
  opacity: 0;
  transform: translateY(8px);
}

.app-card,
.mini-card {
  border: 1px solid rgba(218, 226, 253, 0.12);
  border-radius: var(--radius);
  background: rgba(23, 31, 51, 0.84);
  min-width: 0;
}

.app-card {
  padding: 14px;
}

.app-card h3,
.mini-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.app-card p,
.mini-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 12px;
  line-height: 1.5;
}

.progress-line {
  height: 9px;
  border-radius: 999px;
  margin-top: 12px;
  background: rgba(218, 226, 253, 0.1);
  overflow: hidden;
}

.progress-line span {
  display: block;
  width: var(--value, 70%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 300ms ease;
}

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

.mini-card {
  padding: 12px;
}

.lift-row,
.signal-meter {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  color: var(--subtext);
  font-size: 12px;
}

.lift-row strong,
.signal-meter strong {
  color: var(--text);
}

.set-button,
.range-row input {
  width: 100%;
}

.set-button {
  border: 1px solid rgba(210, 187, 255, 0.3);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--accent);
  color: #24133f;
  font-weight: 950;
  cursor: pointer;
}

.set-button:active,
.control-button:active,
.phone-nav button:active {
  transform: translateY(1px);
}

.range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

input[type="range"] {
  accent-color: var(--accent);
}

.body-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.body-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 236px;
  margin: 0;
  padding: 10px 6px 8px;
  border: 1px solid rgba(218, 226, 253, 0.1);
  border-radius: var(--radius);
  background: rgba(11, 19, 38, 0.48);
  position: relative;
  overflow: hidden;
}

.body-figure::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 28px;
  left: 50%;
  width: 1px;
  background: rgba(210, 187, 255, 0.16);
}

.body-figure img {
  width: 100%;
  height: 202px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 1;
}

.body-figure figcaption {
  color: var(--subtext);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.ledger-preview {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.ledger-preview img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.phone-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border: 1px solid rgba(218, 226, 253, 0.12);
  border-radius: var(--radius);
  padding: 6px;
  background: rgba(5, 11, 22, 0.82);
  min-width: 0;
}

.phone-nav button {
  border: 0;
  border-radius: 6px;
  padding: 10px 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  min-width: 0;
}

.phone-nav button.is-active {
  background: rgba(210, 187, 255, 0.16);
  color: var(--accent);
}

.demo-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(218, 226, 253, 0.12);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(23, 31, 51, 0.62);
  box-shadow: var(--shadow);
}

.demo-controls h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.demo-controls p:not(.eyebrow) {
  color: var(--subtext);
  line-height: 1.55;
}

.control-grid {
  display: grid;
  gap: 10px;
}

.control-button {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(11, 19, 38, 0.72);
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.control-button:hover {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
}

.theme-switcher {
  display: flex;
  gap: 10px;
}

.theme-dot {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(218, 226, 253, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
}

.theme-dot[data-theme-choice="amethyst"] {
  background: #d2bbff;
}

.theme-dot[data-theme-choice="teal"] {
  background: #6bd8cb;
}

.theme-dot[data-theme-choice="graphite"] {
  background: #f3f4f2;
}

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

.section-band,
.widgets-band,
.kotlin-band,
.ledger-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-heading h2,
.ledger-copy h2,
.kotlin-band h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  font-weight: 950;
}

.section-heading p:not(.eyebrow),
.ledger-copy p,
.kotlin-band p {
  color: var(--subtext);
  font-size: 17px;
  line-height: 1.65;
}

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

.system-card {
  min-height: 260px;
  border: 1px solid rgba(218, 226, 253, 0.12);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(23, 31, 51, 0.72);
  transform: translateY(18px);
  opacity: 0;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 520ms ease;
}

.system-card.is-visible,
.fox-widget.is-visible,
.grade-showcase.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.card-number {
  color: var(--gold);
  font-weight: 950;
}

.system-card h3 {
  margin: 68px 0 12px;
  font-size: 26px;
}

.system-card p {
  color: var(--subtext);
  line-height: 1.6;
}

.ledger-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: 26px;
  align-items: center;
}

.ledger-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ledger-stats span {
  border: 1px solid rgba(210, 187, 255, 0.2);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(23, 31, 51, 0.76);
  color: var(--subtext);
}

.ledger-stats strong {
  display: block;
  color: var(--accent);
  font-size: 30px;
}

.grade-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 520ms ease;
}

.grade-showcase img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid rgba(218, 226, 253, 0.12);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(23, 31, 51, 0.78);
}

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

.fox-widget {
  position: relative;
  min-height: 350px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 22px;
  overflow: hidden;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 520ms ease;
}

.widget-hot {
  background: #9a2148;
}

.widget-calm {
  background: #176d76;
}

.widget-alert {
  background: #5d348d;
}

.widget-score {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 52px;
  line-height: 0.95;
  font-weight: 950;
  min-height: 58px;
}

.widget-score img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 42px;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.18));
}

.fox-widget p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.fox-widget > img {
  position: absolute;
  left: 50%;
  bottom: -28px;
  width: min(92%, 310px);
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 24px rgba(0, 0, 0, 0.24));
}

.kotlin-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(218, 226, 253, 0.12);
}

.kotlin-band div {
  max-width: 760px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 44px;
  border-top: 1px solid rgba(218, 226, 253, 0.12);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero-shell,
  .demo-stage,
  .ledger-band {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    padding-top: 22px;
  }

  .demo-stage {
    width: 100%;
    max-width: 520px;
  }

  .demo-controls {
    min-height: 300px;
  }

  .system-grid,
  .widget-grid {
    grid-template-columns: 1fr;
  }

  .system-card {
    min-height: 210px;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: min(1180px, calc(100% - 22px));
  }

  .hero-shell,
  .section-band,
  .widgets-band,
  .kotlin-band,
  .ledger-band,
  .site-footer {
    width: min(360px, calc(100vw - 22px));
    max-width: min(360px, calc(100vw - 22px));
  }

  .header-cta {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(54px, 22vw, 82px);
  }

  .hero-copy,
  .hero-lede,
  .signal-row {
    max-width: 100%;
  }

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

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .phone-shell {
    width: min(360px, calc(100vw - 22px));
    max-width: min(360px, calc(100vw - 22px));
    min-height: 590px;
    border-radius: 24px;
    padding: 10px;
  }

  .phone-screen {
    min-height: 544px;
    padding: 18px 14px 14px;
  }

  .screen-top h2 {
    font-size: 24px;
  }

  .screen-fox {
    position: absolute;
    top: 18px;
    right: 12px;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
  }

  .screen-top {
    position: relative;
    padding-right: 78px;
  }

  .metric-value {
    font-size: 44px;
    min-width: 54px;
  }

  .mini-grid,
  .body-map,
  .grade-showcase {
    grid-template-columns: 1fr;
  }

  .kotlin-band,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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