/*
 * ANTI-FØRMULA STUDIO
 * Signal Sprint™ — Scroll Journey
 * Section §03 — 14-day phase journey
 *
 * Signal Red palette — rebuilt from scratch.
 * Sticky scroll: vertical scroll → horizontal panel translation.
 *
 * KEY: overflow-x on html/body must be `clip`, not `hidden`.
 * `overflow: hidden` on root elements breaks position:sticky.
 */

/* ── COLOUR TOKENS (local to journey) ─────────────────────────── */
/*
  Founder phases:   bg #1A1614  accent: Signal Red  #C1272D
  Independent:      bg #0D1218  accent: Blueprint   #1B3F6B
  Default/intro:    bg #141214
*/

/* ── OUTER SCROLL SURFACE ─────────────────────────────────────── */
.ssj-outer {
  position: relative;
  /* 7 panels × 100vh = 700vh of vertical scroll surface */
  height: 700vh;
}

/* ── STICKY VIEWPORT ──────────────────────────────────────────── */
/* This is the element that sticks. It must NOT have an ancestor
   with overflow:hidden — use overflow:clip on html/body instead. */
.ssj-inner {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  z-index: 1;
}

/* ── ANIMATED BACKGROUND ──────────────────────────────────────── */
.ssj-bg {
  position: absolute;
  inset: 0;
  background: #141214;
  transition: background 0.9s ease;
  z-index: 0;
}

/* ── HEADER BAR ───────────────────────────────────────────────── */
.ssj-hd {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 52px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ssj-hd-title {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.3);
}

/* Progress bar */
.ssj-progress-wrap {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,.08);
  border-radius: 1px;
  overflow: hidden;
}
.ssj-progress-fill {
  height: 100%;
  width: 0;
  background: #C1272D;
  transition: width 0.05s linear, background 0.6s ease;
  transform-origin: left;
}

/* Day counter */
.ssj-hd-day {
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: #F5F4F0;
  min-width: 28px;
  text-align: center;
}

/* Phase label */
.ssj-hd-label {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
  min-width: 140px;
  text-align: right;
}

/* ── PANEL STRIP ──────────────────────────────────────────────── */
/* All panels in a horizontal row. JS translates this. */
.ssj-strip {
  position: absolute;
  top: 52px;
  left: 0;
  display: flex;
  height: calc(100vh - 52px - 40px);
  height: calc(100svh - 52px - 40px);
  will-change: transform;
}

/* ── INDIVIDUAL PANEL ─────────────────────────────────────────── */
.ssj-panel {
  flex-shrink: 0;
  width: 100vw;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0;
}

/* Mood top accent line */
.ssj-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: transparent;
  transition: background 0.6s ease;
}
.ssj-panel.founder::before     { background: #C1272D; }
.ssj-panel.independent::before { background: #1B3F6B; }
.ssj-panel.intro::before,
.ssj-panel.end::before          { background: transparent; }

/* Background phase number */
.ssj-bg-num {
  position: absolute;
  right: -0.05em;
  bottom: -0.1em;
  font-family: var(--f-serif);
  font-size: min(40vw, 380px);
  font-weight: 300;
  line-height: 1;
  color: rgba(255,255,255,.025);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ── PANEL CONTENT ────────────────────────────────────────────── */
/* Fades in when panel is active */
.ssj-pc {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding: 40px 80px 40px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.ssj-pc.visible {
  opacity: 1;
  transform: none;
}
.ssj-pc.past {
  opacity: 0;
  transform: translateY(-8px);
}

/* ── PHASE EYEBROW ────────────────────────────────────────────── */
.ssj-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 2px;
}
.ssj-eyebrow-pip {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mode badges */
.ssj-badge-founder {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  padding: 5px 10px;
  background: rgba(193,39,45,.08);
  border: 1px solid rgba(193,39,45,.2);
  color: rgba(255,255,255,.7);
  margin-bottom: 24px;
}
.ssj-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #C1272D;
  animation: ssj-pulse 2s ease-in-out infinite;
}
@keyframes ssj-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.65); }
}
.ssj-badge-af {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  padding: 5px 10px;
  background: rgba(27,63,107,.12);
  border: 1px solid rgba(27,63,107,.3);
  color: #5B8FC9;
  margin-bottom: 24px;
}

/* ── PHASE NUMBER, NAME, DAYS ─────────────────────────────────── */
.ssj-pnum {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.3);
  margin-bottom: 6px;
}
.ssj-pname {
  font-family: var(--f-serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.ssj-panel.founder     .ssj-pname { color: #F5F4F0; }
.ssj-panel.independent .ssj-pname { color: rgba(255,255,255,.85); }

.ssj-pdays {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.ssj-panel.founder     .ssj-pdays { color: rgba(193,39,45,.7); }
.ssj-panel.independent .ssj-pdays { color: rgba(27,63,107,.8); }

/* Phase description */
.ssj-desc {
  font-family: var(--f-sans);
  font-size: clamp(13px, 1.3vw, 15px);
  line-height: 1.75;
  max-width: 480px;
}
.ssj-panel.founder     .ssj-desc { color: rgba(255,255,255,.55); }
.ssj-panel.independent .ssj-desc { color: rgba(200,215,230,.5); }

/* ── PANEL OUTPUT STRIP ───────────────────────────────────────── */
.ssj-output {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ssj-output-label {
  font-family: var(--f-mono);
  font-size: 7px;
  letter-spacing: 1.5px;
  flex-shrink: 0;
  padding-top: 2px;
}
.ssj-panel.founder     .ssj-output-label { color: #C1272D; }
.ssj-panel.independent .ssj-output-label { color: #5B8FC9; }
.ssj-output-val {
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1.65;
  color: rgba(255,255,255,.4);
}

/* ── INTRO PANEL ──────────────────────────────────────────────── */
.ssj-intro-label {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.35);
  margin-bottom: 20px;
}
.ssj-intro-hl {
  font-family: var(--f-serif);
  font-size: clamp(32px, 5.5vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: #F5F4F0;
  margin-bottom: 24px;
}
.ssj-intro-sub {
  font-family: var(--f-sans);
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.75;
  color: rgba(255,255,255,.45);
  max-width: 480px;
  margin-bottom: 36px;
}
.ssj-scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.3);
}
.ssj-arrow-anim { display: flex; gap: 4px; }
.ssj-arrow-anim span {
  display: block;
  width: 8px; height: 1px;
  background: #C1272D;
  animation: ssj-arrow 1.4s ease-in-out infinite;
}
.ssj-arrow-anim span:nth-child(2) { animation-delay: 0.2s; }
.ssj-arrow-anim span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ssj-arrow {
  0%, 100% { opacity: 0.2; transform: scaleX(0.5); }
  50%       { opacity: 1; transform: scaleX(1.2); }
}

/* ── END PANEL ────────────────────────────────────────────────── */
.ssj-end-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.5);
  margin-bottom: 20px;
}
.ssj-end-hl {
  font-family: var(--f-serif);
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 300;
  line-height: 1.2;
  color: #F5F4F0;
  margin-bottom: 32px;
  letter-spacing: -.5px;
  max-width: 500px;
}
.ssj-end-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}
.ssj-end-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-sans);
  font-size: 14px;
  color: rgba(255,255,255,.55);
}
.ssj-end-stat::before {
  content: '→';
  color: #F5F4F0;
  font-size: 14px;
  flex-shrink: 0;
}
/* CTA — white on dark end panel */
.ssj-end-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #F5F4F0;
  color: #141214;
  padding: 14px 28px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.ssj-end-cta:hover { background: #E0DEDB; }

/* ── BOTTOM DAY RULER ─────────────────────────────────────────── */
.ssj-ruler {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: rgba(10,8,8,.85);
  border-top: 1px solid rgba(255,255,255,.05);
  z-index: 10;
}
.ssj-ruler-track {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0 32px;
}
.ssj-ruler-line {
  position: absolute;
  top: 50%; left: 32px; right: 32px;
  height: 1px;
  background: rgba(255,255,255,.08);
  transform: translateY(-50%);
}
.ssj-ruler-fill {
  position: absolute;
  top: 50%; left: 32px;
  height: 1px;
  width: 0;
  background: #C1272D;
  transform: translateY(-50%);
  transition: width 0.05s linear, background 0.6s ease;
}
/* Day tick marks */
.ssj-day-ticks {
  position: absolute;
  inset: 0;
  padding: 0 32px;
}
.ssj-dtick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.ssj-dtick-line {
  width: 1px;
  height: 6px;
  background: rgba(255,255,255,.15);
}
.ssj-dtick-label {
  font-family: var(--f-mono);
  font-size: 7px;
  letter-spacing: .5px;
  color: rgba(255,255,255,.2);
}
.ssj-dtick.on .ssj-dtick-line  { background: rgba(255,255,255,.6); }
.ssj-dtick.on .ssj-dtick-label { color: rgba(255,255,255,.6); }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ssj-hd { grid-template-columns: 1fr auto auto; padding: 0 20px; gap: 12px; }
  .ssj-hd-label { display: none; }
  .ssj-pc { padding: 28px 24px 20px; max-width: 100%; }
  .ssj-pname { font-size: clamp(28px, 8vw, 44px); }
  .ssj-intro-hl { font-size: clamp(28px, 8vw, 44px); }
  .ssj-bg-num { font-size: min(60vw, 320px); }
  .ssj-ruler-track { padding: 0 20px; }
  .ssj-ruler-line, .ssj-ruler-fill { left: 20px; right: 20px; }
  .ssj-day-ticks { padding: 0 20px; }
}
