/* ============================================================
   Cognota — The LearnOps Loop
   Palette + type matched to the "product cycle" reference piece
   ============================================================ */

:root {
  --bg:          #0a1410;
  --bg-2:        #0d1915;
  --card:        #122019;
  --card-2:      #16261e;
  --border:      #23392f;
  --line:        #2c463a;
  --mint:        #8fd7b8;
  --mint-bright: #bfe8d4;
  --mint-dim:    #5fa886;
  --cream:       #f1e9d7;
  --text:        #cfdcd2;
  --muted:       #8ba699;
  --serif: "Playfair Display", Georgia, serif;
  --sans:  "Nunito Sans", -apple-system, "Segoe UI", sans-serif;
  --line-x: clamp(360px, 36vw, 500px);   /* timeline line x — leaves room for the wheel on its left */
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mint-dim);
}

/* ===================== Hero ===================== */

.hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12vh 24px 8vh;
  background-image: radial-gradient(rgba(143, 215, 184, 0.10) 1px, transparent 1.5px);
  background-size: 28px 28px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.18;
  color: var(--cream);
  margin: 22px 0 26px;
}

.hl {
  background: var(--mint-bright);
  color: var(--bg);
  padding: 0.02em 0.18em;
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 16.5px;
}

/* ===================== Circle → line stage ===================== */

/* The stage stays pinned (pinSpacing: false) while the timeline scrolls
   underneath it, so it must sit above the timeline and pass clicks through */
.stage-wrap {
  position: relative;
  z-index: 5;
  pointer-events: none;
}
html:not(.js) .stage-wrap { display: none; }

.stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.stage-eyebrow {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  text-align: center;
}

#stageSvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#pathMain {
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
}

/* JS positions everything; hidden until the entrance tween runs */
.stage .cycle-node,
.stage .hub,
.stage #stageSvg { opacity: 0; }

.cycle-node {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  max-width: 250px;
  padding: 12px 16px 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  will-change: transform;
}

.badge {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--mint);
  background: rgba(143, 215, 184, 0.12);
  border: 1px solid rgba(143, 215, 184, 0.45);
  transition: background 0.35s, color 0.35s, box-shadow 0.35s;
}

.node-text { display: flex; flex-direction: column; }

.node-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.25;
}

.node-blurb {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 175px;
}

.hub {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  max-width: 320px;
  padding: 20px 28px;
  text-align: center;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  will-change: transform;
}

.hub-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.3;
}

.hub-sub {
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-dim);
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mint-dim);
}

.chevron {
  display: block;
  width: 8px;
  height: 8px;
  margin: 8px auto 0;
  border-right: 2px solid var(--mint-dim);
  border-bottom: 2px solid var(--mint-dim);
  transform: rotate(45deg);
  animation: hint-bounce 1.6s ease-in-out infinite;
}

@keyframes hint-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50%      { transform: rotate(45deg) translate(4px, 4px); }
}

@media (prefers-reduced-motion: reduce) {
  .chevron { animation: none; }
  .scroll-hint { display: none; }
}

/* ===================== Mobile intro (replaces stage) ===================== */

.timeline-intro {
  text-align: center;
  padding: 10vh 24px 5vh;
}
.timeline-intro .hub-title { font-size: 26px; margin-top: 16px; }
.timeline-intro .hub-sub { max-width: 320px; margin-left: auto; margin-right: auto; }
.mobile-only { display: none; }

/* ===================== Timeline ===================== */

/* Big top padding gives the wheel scroll-room to dock before row 1 arrives */
.timeline {
  position: relative;
  z-index: 1;
  padding: 55vh 0 8vh;
}

body.static-motion .timeline { padding-top: 12vh; }

.t-container { width: 100%; }

.t-rail { position: relative; }

.t-line {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: var(--line-x);
  width: 2px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    180deg,
    var(--line) 0 5px,
    transparent 5px 13px
  );
}

.t-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--mint), var(--mint-dim));
  box-shadow: 0 0 12px rgba(143, 215, 184, 0.45);
  transform-origin: top;
  transform: scaleY(0);
}

html:not(.js) .t-progress,
body.static-motion .t-progress { transform: scaleY(1); }

.t-steps { list-style: none; }

.t-step {
  position: relative;
  padding: 8vh 0;
}

.t-marker {
  position: absolute;
  z-index: 1;
  top: calc(8vh + 3px);
  left: calc(var(--line-x) - 13px);
}

.t-content {
  margin-left: calc(var(--line-x) + 44px);
  margin-right: 24px;
  max-width: 700px;
}

.t-step.active .badge,
body.static-motion .t-step .badge {
  background: var(--mint);
  color: var(--bg);
  border-color: var(--mint);
  box-shadow: 0 0 16px rgba(143, 215, 184, 0.5);
}

/* Wheel mode (set by JS on animated desktop): a row's marker badge is the
   dispensed wheel badge, so it stays hidden until the wheel deposits it;
   the detail content reveals in the same moment. */
body.wheel-anim .t-marker .badge { visibility: hidden; }
body.wheel-anim .t-step.active .t-marker .badge { visibility: visible; }

body.wheel-anim .t-content {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.wheel-anim .t-step.active .t-content {
  opacity: 1;
  transform: none;
}

.t-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint-dim);
  margin-bottom: 10px;
}

.t-content h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 14px;
}

.t-desc {
  max-width: 540px;
  font-size: 16px;
  line-height: 1.68;
  color: var(--muted);
}

/* ---- Screenshot frame ---- */

.shot {
  margin-top: 28px;
  max-width: 640px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: #0f1b16;
  border-bottom: 1px solid var(--border);
}

.shot-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.shot-bar span {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.shot-body {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(rgba(143, 215, 184, 0.09) 1px, transparent 1.5px),
    linear-gradient(160deg, var(--card) 0%, var(--card-2) 100%);
  background-size: 22px 22px, cover;
}

.shot-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot-note {
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.shot-note code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  color: var(--mint);
  background: rgba(143, 215, 184, 0.08);
  border: 1px solid rgba(143, 215, 184, 0.2);
  border-radius: 5px;
  padding: 2px 7px;
}

/* ===================== Outro + footer ===================== */

.outro {
  text-align: center;
  padding: 16vh 24px;
}

.outro h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.3;
}

.outro p {
  margin-top: 18px;
  color: var(--muted);
}

.cta {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--mint-bright);
  color: var(--bg);
  font-weight: 800;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(143, 215, 184, 0.25);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 26px 24px 34px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===================== Mobile (<768px): no circle, stacked timeline ===================== */

@media (max-width: 767.98px) {
  :root { --line-x: 31px; }

  .stage-wrap { display: none; }
  .mobile-only { display: block; }

  .timeline { padding-top: 4vh; }

  .t-step { padding: 6vh 0; }

  .t-marker {
    top: calc(6vh + 3px);
    left: calc(var(--line-x) - 11px);
  }

  .t-content {
    margin-left: calc(var(--line-x) + 30px);
    margin-right: 20px;
  }

  .badge { width: 22px; height: 22px; font-size: 11px; }

  .t-content h3 { font-size: 1.5rem; }
  .t-desc { font-size: 15px; }
  .shot { max-width: 100%; }

  footer { flex-direction: column; gap: 6px; }
}
