:root {
  --paper: #eef3f5;
  --paper-bright: #f9fbfc;
  --ink: #101827;
  --muted: #586675;
  --line: #cbd6db;
  --signal: #4656ff;
  --signal-soft: #a9b1ff;
  --context: #00a79d;
  --confidence: #f2ad18;
  --font-display: "Syne", "Arial Black", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-data: "IBM Plex Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  color-scheme: light;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 22%, rgba(70, 86, 255, 0.11), transparent 27rem),
    radial-gradient(circle at 14% 86%, rgba(0, 167, 157, 0.08), transparent 24rem),
    var(--paper);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.52;
  background-image:
    linear-gradient(rgba(16, 24, 39, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 39, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

::selection {
  color: white;
  background: var(--signal);
}

.page-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
}

.site-header,
.site-footer,
main {
  width: min(100% - 48px, 1440px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 106px;
  border-bottom: 1px solid rgba(16, 24, 39, 0.14);
}

.header-actions {
  display: flex;
  gap: 22px;
  align-items: center;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 7px;
  border-radius: 3px;
}

.brand-mark {
  width: 45px;
  height: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.055em;
}

.build-status {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 0.73rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.build-status strong {
  color: var(--ink);
  font-weight: 500;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--context);
  box-shadow: 0 0 0 5px rgba(0, 167, 157, 0.12);
}

.status-separator {
  color: #98a4ad;
}

.gate-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 24, 39, 0.28);
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-data);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.gate-button:hover {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.gate-button:active {
  transform: translateY(1px);
}

.gate-button:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 4px;
}

.gate-button--header {
  min-width: 94px;
  min-height: 39px;
  padding: 9px 14px;
}

.gate-button--primary {
  min-width: 156px;
  min-height: 52px;
  margin-top: 32px;
  padding: 13px 22px;
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.gate-button--primary:hover {
  border-color: var(--signal);
  background: var(--signal);
}

.lock-mark {
  position: relative;
  width: 9px;
  height: 8px;
  border: 1.5px solid currentColor;
}

.lock-mark::before {
  position: absolute;
  bottom: 5px;
  left: 1px;
  width: 4px;
  height: 5px;
  content: "";
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

main {
  display: grid;
  align-items: center;
  padding-block: clamp(52px, 7vw, 104px);
}

.access-gate {
  display: flex;
  width: min(100%, 690px);
  min-height: min(620px, 65svh);
  margin-inline: auto;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  outline: none;
}

.gate-emblem {
  position: relative;
  display: grid;
  width: 106px;
  height: 106px;
  margin-bottom: 35px;
  place-items: center;
  border: 1px solid rgba(70, 86, 255, 0.28);
  border-radius: 50%;
}

.gate-emblem::before,
.gate-emblem::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(70, 86, 255, 0.13);
  border-radius: 50%;
}

.gate-emblem::before {
  inset: -19px;
}

.gate-emblem::after {
  inset: -38px;
  border-color: rgba(0, 167, 157, 0.1);
}

.gate-emblem img {
  width: 58px;
  height: auto;
}

.gate-eyebrow {
  margin-bottom: 21px;
}

h1.gate-title {
  max-width: 670px;
  margin: 0;
  font-size: clamp(3.2rem, 6vw, 6.35rem);
  line-height: 0.96;
  text-wrap: balance;
}

.gate-copy {
  max-width: 490px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
}

.gate-footnote {
  margin: 18px 0 0;
  color: #7d8995;
  font-family: var(--font-data);
  font-size: 0.59rem;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.private-content {
  width: 100%;
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(470px, 0.96fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}

.hero-copy {
  max-width: 770px;
}

.eyebrow,
.panel-label,
.context-chrome,
.timeline-header,
.timeline-labels,
.event-time,
.event-score {
  font-family: var(--font-data);
}

.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 26px;
  color: var(--signal);
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--context);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.15rem, 5.6vw, 6.8rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.93;
}

h1 span,
h1 strong {
  display: block;
}

h1 span {
  color: var(--ink);
}

h1 strong {
  margin-top: 0.13em;
  color: var(--signal);
  font-weight: inherit;
}

.intro {
  max-width: 660px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.75;
}

.context-path {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 36px;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 0.69rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.context-path svg {
  width: 30px;
  overflow: visible;
}

.context-path path {
  fill: none;
  stroke: var(--context);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.context-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  color: #f4f7fb;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px 34px 4px 34px;
  box-shadow:
    0 34px 70px rgba(35, 47, 75, 0.22),
    0 5px 16px rgba(35, 47, 75, 0.12);
}

.context-card::before {
  position: absolute;
  z-index: -1;
  top: -205px;
  left: -210px;
  width: 440px;
  height: 440px;
  content: "";
  border: 1px solid rgba(70, 86, 255, 0.25);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(70, 86, 255, 0.075),
    0 0 0 68px rgba(70, 86, 255, 0.05),
    0 0 0 102px rgba(70, 86, 255, 0.03);
}

.context-card::after {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  content: "";
  border-right: 2px solid var(--context);
  border-bottom: 2px solid var(--context);
}

.context-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 22px;
  color: #9eacbb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.63rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.context-state {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #dbe3ea;
}

.context-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--context);
  box-shadow: 0 0 10px rgba(0, 167, 157, 0.8);
}

.context-visual {
  display: grid;
  grid-template-columns: 0.72fr 46px 1.28fr;
  gap: 10px;
  align-items: stretch;
  min-height: 310px;
  padding: 29px 22px 26px;
}

.ambient-input,
.event-feed {
  min-width: 0;
}

.ambient-input {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 8px;
}

.panel-label {
  margin: 0 0 19px;
  color: #8998a8;
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wave-field {
  display: flex;
  gap: 5px;
  align-items: center;
  height: 104px;
  padding-inline: 2px;
}

.wave-field span {
  width: 5px;
  height: var(--bar);
  max-height: 100%;
  min-height: 10px;
  border-radius: 4px;
  background: linear-gradient(to top, var(--signal), #8390ff);
  transform-origin: center;
  animation: breathe 2.8s ease-in-out infinite alternate;
}

.wave-field span:nth-child(2n) {
  animation-delay: -1.7s;
}

.wave-field span:nth-child(3n) {
  background: linear-gradient(to top, var(--context), #56d5cb);
  animation-delay: -0.8s;
}

.wave-field .bar-29 {
  --bar: 29%;
}

.wave-field .bar-34 {
  --bar: 34%;
}

.wave-field .bar-38 {
  --bar: 38%;
}

.wave-field .bar-46 {
  --bar: 46%;
}

.wave-field .bar-48 {
  --bar: 48%;
}

.wave-field .bar-55 {
  --bar: 55%;
}

.wave-field .bar-58 {
  --bar: 58%;
}

.wave-field .bar-61 {
  --bar: 61%;
}

.wave-field .bar-66 {
  --bar: 66%;
}

.wave-field .bar-72 {
  --bar: 72%;
}

.wave-field .bar-82 {
  --bar: 82%;
}

.wave-field .bar-92 {
  --bar: 92%;
}

.input-caption {
  margin: 18px 0 0;
  color: #cbd4dd;
  font-size: 0.72rem;
}

.signal-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.signal-bridge span {
  height: 1px;
  background: rgba(169, 177, 255, 0.6);
}

.signal-bridge i {
  width: 9px;
  height: 9px;
  border: 2px solid var(--context);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(0, 167, 157, 0.1);
}

.event-feed {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  opacity: 0.68;
  transition:
    opacity 320ms ease,
    background-color 320ms ease,
    border-color 320ms ease;
}

.event-row:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.event-row.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(127, 140, 255, 0.38);
}

.event-time,
.event-score {
  color: #aeb8c4;
  font-size: 0.58rem;
}

.event-score {
  color: var(--confidence);
}

.event-detail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.event-detail strong {
  overflow: hidden;
  color: #f4f7fb;
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-detail small {
  overflow: hidden;
  color: #8796a6;
  font-family: var(--font-data);
  font-size: 0.52rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-track {
  grid-column: 2 / 4;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.score-track i {
  display: block;
  width: var(--score);
  height: 100%;
  background: linear-gradient(90deg, var(--signal), var(--context));
  transform: scaleX(0.62);
  transform-origin: left;
  transition: transform 500ms ease;
}

.score-track .score-68 {
  --score: 68%;
}

.score-track .score-76 {
  --score: 76%;
}

.score-track .score-84 {
  --score: 84%;
}

.event-row.is-active .score-track i {
  transform: scaleX(1);
}

.window-timeline {
  padding: 19px 22px 23px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.11);
}

.timeline-header,
.timeline-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7f8e9f;
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-header output {
  color: var(--context);
  font: inherit;
}

.timeline-track {
  position: relative;
  height: 2px;
  margin: 14px 0 9px;
  background:
    linear-gradient(90deg, rgba(70, 86, 255, 0.65), rgba(0, 167, 157, 0.65)),
    rgba(255, 255, 255, 0.12);
}

.playhead {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 25px;
  background: #f8fbff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%);
}

.playhead::after {
  position: absolute;
  top: -3px;
  left: -2px;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: white;
}

.event-tick {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--signal-soft);
  transform: translate(-50%, -50%);
}

.tick-one {
  left: 28%;
}

.tick-two {
  left: 47%;
  background: var(--context);
}

.tick-three {
  left: 76%;
  background: var(--confidence);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 88px;
  color: var(--muted);
  border-top: 1px solid rgba(16, 24, 39, 0.14);
  font-family: var(--font-data);
  font-size: 0.65rem;
  letter-spacing: 0.035em;
}

.site-footer p {
  margin: 0;
}

@keyframes breathe {
  from {
    transform: scaleY(0.78);
    opacity: 0.7;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 870px;
  }

  .context-card {
    width: min(100%, 720px);
    justify-self: end;
  }

  h1 {
    font-size: clamp(3.7rem, 9.8vw, 6.9rem);
  }
}

@media (max-width: 700px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 30px, 1440px);
  }

  .site-header {
    min-height: 86px;
  }

  .build-status {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .gate-button--header {
    min-width: 80px;
    min-height: 36px;
    padding: 8px 11px;
  }

  main {
    padding-block: 48px 58px;
  }

  .hero {
    gap: 48px;
  }

  .access-gate {
    min-height: 580px;
  }

  .gate-emblem {
    width: 88px;
    height: 88px;
    margin-bottom: 31px;
  }

  .gate-emblem::before {
    inset: -15px;
  }

  .gate-emblem::after {
    inset: -30px;
  }

  .gate-emblem img {
    width: 49px;
  }

  h1.gate-title {
    font-size: clamp(2.85rem, 13vw, 4.4rem);
  }

  .eyebrow {
    margin-bottom: 21px;
  }

  h1 {
    font-size: clamp(2.85rem, 11.5vw, 4.4rem);
    line-height: 0.95;
  }

  .intro {
    margin-top: 25px;
    line-height: 1.65;
  }

  .context-path {
    flex-wrap: wrap;
    gap: 9px;
  }

  .context-path svg {
    width: 24px;
  }

  .context-card {
    border-radius: 3px 25px 3px 25px;
  }

  .context-visual {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 24px 18px;
  }

  .ambient-input {
    padding: 0 0 16px;
  }

  .wave-field {
    height: 78px;
    max-width: 250px;
  }

  .signal-bridge {
    display: flex;
    height: 34px;
    align-items: center;
  }

  .signal-bridge span {
    flex: 1;
  }

  .signal-bridge i {
    flex: 0 0 auto;
  }

  .event-feed .panel-label {
    margin-top: 10px;
  }

  .site-footer {
    min-height: 84px;
  }
}

@media (max-width: 600px) {
  .context-path {
    align-items: flex-start;
    flex-direction: column;
  }

  .context-path svg {
    display: none;
  }

  .context-path span {
    position: relative;
    padding-left: 17px;
  }

  .is-unlocked .context-path span::before {
    position: absolute;
    left: 0;
    color: var(--context);
    content: "→";
  }
}

@media (max-width: 460px) {
  .brand-mark {
    width: 39px;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .build-status {
    font-size: 0.61rem;
  }

  h1 {
    font-size: clamp(2.6rem, 11.5vw, 3.35rem);
  }

  .context-chrome,
  .window-timeline {
    padding-right: 17px;
    padding-left: 17px;
  }

  .event-row {
    gap: 7px 9px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .wave-field span {
    animation: none;
  }

  .event-row,
  .score-track i {
    transition: none;
  }
}
