/* ─── nqant.com — style.css ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --void:       #1a1035;
  --ink:        #251848;
  --deep-sky:   #2a1a4e;
  --violet:     #3d2070;
  --cloud:      #ff2d9d;
  --hotpink:    #ff2d9d;
  --moon:       #ff9d6b;
  --moongold:   #ffd080;
  --crest:      #f0e6f0;
  --foam:       #c4b8e8;
  --ocean:      #4dd0ff;
  --mid-purple: #a090d8;
  --dim:        #6858a8;

  --regime:      #8b5cf6;
  --regime-dim:  rgba(139,92,246,0.06);
  --regime-mid:  rgba(139,92,246,0.18);
  --regime-comp: #ff2d9d;

  --mono: 'IBM Plex Mono', monospace;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--crest);
  font-family: var(--mono);
}

/* ─── PAINTING ───────────────────────────────────────────────────────── */

#painting {
  position: fixed;
  inset: 0;
  background-image: url('ukiyo.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}
#painting::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,5,32,0.30) 0%,
    rgba(10,5,32,0.18) 35%,
    rgba(10,5,32,0.22) 68%,
    rgba(10,5,32,0.75) 88%,
    rgba(10,5,32,0.88) 100%
  );
  pointer-events: none;
}

/* SVG overlay removed — painting is fixed */

/* ─── PERSISTENT CHROME ──────────────────────────────────────────────── */

.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,6,40,0.7) 0%, transparent 100%);
}

.hdr-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.hdr-time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mid-purple);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* ─── WORDMARK ───────────────────────────────────────────────────────── */

#wordmark-wrap { pointer-events: all; }

.wordmark {
  position: relative;
  display: inline-block;
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 700;
}
.wordmark .face-nqant { display: inline-block; transition: opacity 0.25s ease; }
.wordmark .face-quant {
  position: absolute; top: 0; left: 0; white-space: nowrap;
  opacity: 0; color: var(--regime);
  transition: opacity 0.25s ease, color 2.5s ease;
  pointer-events: none;
}
.wordmark:hover .face-nqant { opacity: 0; }
.wordmark:hover .face-quant  { opacity: 1; }
.wordmark .n-flip { color: var(--regime); transition: color 2.5s ease; font-weight: 700; }
.wordmark .q      { color: var(--regime); transition: color 2.5s ease; font-weight: 700; }
.wordmark .a      { color: var(--moon); font-weight: 400; }
.wordmark .n2     { color: var(--moon); font-weight: 400; }
.wordmark .t      { color: var(--moon); font-weight: 400; }
.wordmark--sm { font-size: 18px; letter-spacing: 0.04em; }
.wordmark--lg { font-size: clamp(64px, 8vw, 100px); line-height: 1; letter-spacing: -0.03em; }

/* ─── REGIME DOT ─────────────────────────────────────────────────────── */

.regime-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--regime);
  box-shadow: 0 0 10px var(--regime), 0 0 4px var(--regime);
  transition: background 2.5s ease, box-shadow 2.5s ease;
  display: inline-block;
  flex-shrink: 0;
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 10px var(--regime); }
  50%      { opacity: 0.7; box-shadow: 0 0 18px var(--regime), 0 0 6px var(--regime); }
}

/* ─── ENTER LINK (persistent, bottom-right) ──────────────────────────── */

#enter-link {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 300;
  pointer-events: all;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--regime);
  transition: color 2.5s ease, opacity 0.2s ease;
  opacity: 0.65;
  background: rgba(10, 6, 28, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 5px 8px;
  border-radius: 2px;
}
#enter-link::after { content: ' →'; opacity: 0.6; }
#enter-link:hover  { opacity: 1; }

/* ─── VIEW STAGE ─────────────────────────────────────────────────────── */

#view-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.view {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, filter 0.15s ease;
  filter: blur(0px);
}

.view.active {
  opacity: 1;
  pointer-events: all;
}

.view.blur-out {
  opacity: 0;
  filter: blur(10px);
}

.view.blur-in {
  opacity: 0;
  filter: blur(10px);
}

/* ─── SHARED UTILITIES ───────────────────────────────────────────────── */

.hairline {
  display: block;
  height: 1px;
  background: var(--regime);
  opacity: 0.8;
  box-shadow: 0 0 8px var(--regime), 0 0 2px var(--regime);
  transition: background 2.5s ease, box-shadow 2.5s ease;
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid-purple);
  display: block;
}

/* text legibility over painting */
.clock-time,
.regime-name,
.phase-now-name {
  text-shadow: 0 0 40px rgba(0,0,0,0.9), 0 2px 8px rgba(0,0,0,0.8);
}
.discipline-line,
.day-detail,
.day-alpha,
.week-col-name,
.week-col-trap,
.vix-size,
.axiom-rule,
.quote-text {
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* ─── VIEW 1 · S1 — CLOCK + DISCIPLINE ──────────────────────────────── */

.s1-inner {
  width: 100%;
  padding: 0 12vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.clock-time {
  font-family: var(--mono);
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 500;
  color: var(--crest);
  letter-spacing: -0.02em;
  line-height: 1;
}
.clock-sub {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--mid-purple);
}
.clock-session {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--regime);
  transition: color 2.5s ease;
}

.discipline-block {
  max-width: 280px;
  padding-top: 12px;
}
.discipline-lines {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.discipline-line {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--crest);
  opacity: 0.9;
  transition: opacity 0.4s ease;
}
.discipline-line--regime {
  color: var(--regime);
  opacity: 1;
  transition: color 2.5s ease;
}
/* discipline states */
.discipline-line.dimmed   { opacity: 0.3; }
.discipline-line.stressed { color: #ff0040; opacity: 1; }

/* ─── VIEW 2 · S2 — REGIME + MODEL + DAY PROFILE ────────────────────── */

.s2-inner {
  width: 100%;
  padding: 0 12vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.regime-block { max-width: 400px; }
.regime-name {
  font-family: var(--mono);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  color: var(--regime);
  text-shadow: 0 0 30px var(--regime), 0 0 80px var(--regime-dim);
  line-height: 1.1;
  transition: color 2.5s ease, text-shadow 2.5s ease;
  margin-bottom: 20px;
}

.models-row {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.model-cap {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 7px 13px;
  border: 1px solid var(--dim);
  color: var(--dim);
  transition: all 0.4s ease;
}
.model-cap--sharp {
  border-color: var(--regime);
  color: var(--regime);
  box-shadow: 0 0 8px var(--regime-dim);
  transition: border-color 2.5s ease, color 2.5s ease;
}
.model-cap--active-json {
  border-color: var(--regime);
  color: var(--crest);
  background: var(--regime-mid);
  transition: all 2.5s ease;
}

.bias-indicator {
  font-family: var(--mono);
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 500;
  margin-top: 8px;
  transition: color 0.4s ease;
}

.conviction-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--regime);
  border-radius: 2px;
  color: var(--regime);
  transition: border-color 2.5s ease, color 2.5s ease;
}

.day-block {
  max-width: 340px;
  padding-top: 8px;
}
.day-name {
  font-family: var(--mono);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 500;
  color: var(--crest);
  margin-bottom: 20px;
  line-height: 1.2;
}
.day-detail {
  font-size: 14px;
  color: var(--foam);
  line-height: 1.85;
  margin-bottom: 12px;
  max-width: 340px;
}
.day-alpha {
  font-size: 14px;
  color: var(--crest);
  opacity: 0.9;
  line-height: 1.85;
  max-width: 340px;
}

/* ─── VIEW 3 · S3 — DAILY RHYTHM ────────────────────────────────────── */

.s3-inner {
  width: 100%;
  padding: 60px 12vw 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-height: 100vh;
  overflow: hidden;
}

.timeline-bar {
  display: flex;
  width: 100%;
  height: 3px;
  margin: 20px 0 12px;
  overflow: hidden;
}
.timeline-seg { height: 100%; background: var(--dim); opacity: 0.3; transition: background 0.4s, opacity 0.4s; }
.timeline-seg--past    { opacity: 0.2; }
.timeline-seg--current { background: var(--regime); opacity: 1; transition: background 2.5s ease; }
.timeline-seg--future  { opacity: 0.15; }

.timeline-labels {
  display: flex;
  width: 100%;
  position: relative;
  height: 28px;
}
.timeline-label {
  position: absolute;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--mid-purple);
  transform: translateX(-50%);
  white-space: nowrap;
}
.timeline-label--current { color: var(--regime); transition: color 2.5s ease; }

.phase-now { margin-top: 16px; }
.phase-now-name {
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 500;
  color: var(--regime);
  letter-spacing: 0.05em;
  transition: color 2.5s ease;
}
.phase-now-action {
  margin-top: 10px;
  font-size: 14px;
  color: var(--foam);
  max-width: 520px;
  line-height: 1.85;
}

.week-cols {
  display: flex;
  gap: 2px;
  margin-top: 16px;
}
.week-col {
  flex: 1;
  padding: 14px 12px;
  border-top: 1px solid var(--dim);
  opacity: 0.3;
  transition: opacity 0.4s;
}
.week-col--today {
  opacity: 1;
  border-top-color: var(--regime);
  transition: border-color 2.5s ease;
}
.week-col-day  { font-size: 10px; letter-spacing: 0.2em; color: var(--mid-purple); margin-bottom: 8px; }
.week-col-name { font-size: 12px; color: var(--crest); margin-bottom: 6px; line-height: 1.4; font-weight: 500; }
.week-col-trap { font-size: 11px; color: var(--foam); line-height: 1.6; }
.week-col--today .week-col-day  { color: var(--regime); transition: color 2.5s ease; }

.vix-states {
  display: flex;
  gap: 2px;
  margin-top: 16px;
}
.vix-state {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--dim);
  opacity: 0.3;
}
.vix-state--active {
  opacity: 1;
  border-color: var(--regime);
  transition: border-color 2.5s ease;
}
.vix-label  { font-size: 10px; letter-spacing: 0.2em; color: var(--mid-purple); margin-bottom: 6px; }
.vix-size   { font-size: clamp(28px, 3.5vw, 44px); font-weight: 500; color: var(--crest); line-height: 1; }
.vix-range  { margin-top: 6px; font-size: 11px; color: var(--foam); }
.vix-state--active .vix-label { color: var(--regime); transition: color 2.5s ease; }

.axiom-rule {
  font-family: var(--mono);
  font-style: italic;
  font-size: clamp(14px, 1.8vw, 22px);
  color: var(--moon);
  line-height: 1.8;
  margin-top: 14px;
  font-weight: 300;
  max-width: 640px;
}
.axiom-name {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--regime);
  transition: color 2.5s ease;
}

/* event warning — inserted into s3 when event != CLEAR */
.event-warning {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--moongold);
  border-radius: 2px;
  margin-top: 16px;
}
.event-warning.hot { border-color: #ff0040; }
.event-warning-label { font-size: 10px; letter-spacing: 0.2em; color: var(--mid-purple); text-transform: uppercase; }
.event-warning-text  { font-size: 13px; color: var(--moongold); font-weight: 500; }
.event-warning.hot .event-warning-text { color: #ff0040; }

/* ─── VIEW 4 · S4 — LEVELS TAPE ─────────────────────────────────────── */

.s4-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bloomberg-style scrolling tape — lifted from nqant.html */
.tape-wrap {
  width: 100%;
  background: rgba(26,16,53,0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--regime);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 -4px 40px var(--regime-dim);
  transition: border-color 2.5s ease, box-shadow 2.5s ease;
}
.tape-content {
  padding: 10px 0 2px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--foam);
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
}
.tape-track {
  display: inline-block;
  animation: tape-scroll 32s linear infinite;
}
@keyframes tape-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.tape-price {
  color: var(--crest);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(232,220,200,0.3);
}
.tape-cursor {
  animation: cursor-blink 1s step-end infinite;
  color: var(--regime);
  transition: color 2.5s ease;
}
@keyframes cursor-blink { 0%,100%{opacity:1} 50%{opacity:0} }
.tape-label {
  padding: 2px 32px 10px;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--dim);
}

/* ─── VIEW 5 · S5 — QUOTE ────────────────────────────────────────────── */

.quote-wrap {
  padding: 0 18vw;
  width: 100%;
}
.quote-text {
  font-family: var(--mono);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 30px);
  color: var(--moon);
  line-height: 1.8;
}
.quote-attr {
  margin-top: 24px;
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--mid-purple);
}
.quote-shuffle {
  display: inline-block;
  margin-top: 20px;
  font-size: 12px;
  color: var(--mid-purple);
  cursor: pointer;
  background: none;
  border: none;
  letter-spacing: 0.15em;
  transition: color 0.3s;
  float: right;
  font-family: var(--mono);
  pointer-events: all;
}
.quote-shuffle:hover { color: var(--crest); }

/* ─── VIEW 6 · S6 — ENTER ────────────────────────────────────────────── */

.enter-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-decoration: none;
  pointer-events: all;
}
.enter-block:hover .wordmark--lg .n-flip,
.enter-block:hover .wordmark--lg .q {
  text-shadow: 0 0 30px var(--regime), 0 0 60px var(--regime);
}
.enter-hairline { width: 80px; }
.enter-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--regime);
  transition: color 2.5s ease;
  text-transform: lowercase;
}
.footer {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 80px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.footer-text {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--mid-purple);
}

/* ─── VIEW INDICATOR ─────────────────────────────────────────────────── */

#view-indicator {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  pointer-events: none;
}
#view-pos {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--dim);
  opacity: 0.7;
}

/* ─── VIEW BACKDROPS — views 2–6 get dark semi-opaque layer ─────────── */
/* v1 (clock) stays raw against the painting — its large type reads fine */
/* v2–v6 have dense text that needs separation from the busy painting */

#v2 .s2-inner,
#v3 .s3-inner {
  background: rgba(10, 5, 30, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 2px;
  padding: 40px 5vw;
}

#v5 .quote-wrap {
  background: rgba(10, 5, 30, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 2px;
  padding: 40px 5vw;
  max-width: 860px;
  margin: 0 auto;
}

/* v4 tape already has its own background */
/* v6 enter is centered with high-contrast text — no backdrop needed */

/* ─── FADE-IN ON LOAD ────────────────────────────────────────────────── */

.hdr         { animation: ui-appear 1.2s ease forwards; opacity: 0; }
#enter-link  { animation: ui-appear 1.4s ease forwards; opacity: 0; }
#view-indicator { animation: ui-appear 1.4s ease forwards; opacity: 0; }
/* #view-stage fades in via JS after first view is set */
#view-stage  { opacity: 0; transition: opacity 0.8s ease; }

@keyframes ui-appear {
  0%   { opacity: 0; }
  40%  { opacity: 0; }
  100% { opacity: 1; }
}
