/* ================================================================
   forgd.fit — signature experiences (2026-07-12)
   The three things that make this page unmistakably Forgd:
     1. Goal Path      — "What are you working toward?" (personalizes examples)
     2. Connected Map  — Training <-> Nutrition <-> Recovery <-> Progress
     3. Adaptation Lab — "Watch your system adapt." (cause + effect)
   Same-origin only (CSP-safe). Reuses the design tokens + cinematic layer.
   ================================================================ */

/* ---------- shared section shell ---------- */
.sig { position: relative; }
.sig-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.sig-eyebrow--inv { color: #6ea8ff; }

/* ================================================================
   1 · GOAL PATH  — deterministic personalization
   ================================================================ */
.goalpath { text-align: center; }
.goalpath__chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px;
}
.goalchip {
  appearance: none; border: 1px solid var(--line-light-strong);
  background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 12px 20px; font-size: 15px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; min-height: 44px;
  transition: transform .18s var(--cine-ease, ease), border-color .18s ease,
              color .18s ease, box-shadow .18s ease, background .18s ease;
}
.goalchip:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.goalchip[aria-pressed="true"] {
  background: var(--grad-brand, linear-gradient(120deg,#006AFF,#6D3BFF));
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 26px -10px rgba(0,106,255,0.5);
}
.on-dark .goalchip { background: rgba(255,255,255,0.06); border-color: var(--line-strong); color: var(--ink-inv-soft); }
.on-dark .goalchip:hover { color: #fff; }

/* the personalized read-out card */
.goalcard {
  max-width: 720px; margin: 30px auto 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line-light-strong); border: 1px solid var(--line-light-strong);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card);
}
.goalcard__cell { background: #fff; padding: 16px 18px; text-align: left; }
.goalcard__k { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-dim); }
.goalcard__v { font-size: 15.5px; font-weight: 600; color: var(--ink); margin-top: 5px; line-height: 1.35; }
.goalcard__v [data-goal-field] { transition: opacity .3s ease; }
.goalcard.is-swapping .goalcard__v { opacity: 0.25; }
@media (max-width: 560px) { .goalcard { grid-template-columns: 1fr; } }

/* ================================================================
   2 · CONNECTED SYSTEM MAP
   ================================================================ */
.sysmap { position: relative; max-width: 920px; margin: 44px auto 0; }
.sysmap__stage { position: relative; aspect-ratio: 16 / 11; }
.sysmap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* connective lines animate their draw + brightness as the section reveals */
.sysmap__link {
  fill: none; stroke: rgba(120,150,255,0.22); stroke-width: 2;
  stroke-dasharray: 6 7; opacity: 0;
  transition: opacity .6s ease, stroke .6s ease;
}
.sysmap.lit .sysmap__link { opacity: 1; }
.sysmap.lit .sysmap__link.flow {
  stroke: url(#sysGrad); stroke-dasharray: 8 10;
  animation: sysFlow 1.4s linear infinite;
}
@keyframes sysFlow { to { stroke-dashoffset: -36; } }

.sysnode {
  position: absolute; transform: translate(-50%, -50%);
  width: clamp(96px, 15vw, 150px); text-align: center;
}
.sysnode__dot {
  width: clamp(58px, 9vw, 84px); height: clamp(58px, 9vw, 84px); margin: 0 auto 10px;
  border-radius: 22px; display: grid; place-items: center;
  background: #10121a; border: 1px solid var(--line-strong);
  box-shadow: 0 14px 34px -16px rgba(0,0,0,0.6);
  color: #fff; transition: transform .4s var(--cine-ease, ease), box-shadow .4s ease, border-color .4s ease;
}
.sysnode__dot svg { width: 46%; height: 46%; }
.sysmap.lit .sysnode__dot { transform: translateY(0) scale(1); }
.sysnode--active .sysnode__dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,106,255,0.16), 0 16px 40px -14px rgba(0,106,255,0.6);
}
.sysnode__label { font-size: clamp(12px, 1.6vw, 15px); font-weight: 700; color: #fff; letter-spacing: -0.01em; }
/* center goal node */
.sysnode--goal .sysnode__dot {
  background: var(--grad-brand, linear-gradient(135deg,#006AFF,#6D3BFF));
  border-color: transparent; width: clamp(72px, 11vw, 104px); height: clamp(72px, 11vw, 104px);
}
.sysnode--goal .sysnode__label { color: #cfe0ff; }

/* the flowing example caption under the map */
.sysmap__caption {
  margin: 26px auto 0; max-width: 560px; text-align: center;
  min-height: 3.2em;
}
.sysmap__caption b { color: #fff; font-weight: 600; }
.sysmap__caption p { color: var(--ink-inv-soft); font-size: 16px; line-height: 1.5; margin: 0;
  transition: opacity .4s ease, transform .4s ease; }
.sysmap__caption p.out { opacity: 0; transform: translateY(6px); }

/* progress rail of the connections */
.sysmap__rail { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.sysmap__rail span { width: 26px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.16); transition: background .3s ease; }
.sysmap__rail span.on { background: var(--accent); }

@media (max-width: 620px) {
  .sysmap__stage { aspect-ratio: 3 / 4; }
}

/* ================================================================
   3 · ADAPTATION LAB — "Watch your system adapt."
   ================================================================ */
.lab__tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.labtab {
  appearance: none; border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.05); color: var(--ink-inv-soft);
  border-radius: 999px; padding: 11px 18px; font-size: 14.5px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; min-height: 44px;
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}
.labtab:hover { transform: translateY(-2px); color: #fff; }
.labtab[aria-selected="true"] {
  background: var(--grad-brand, linear-gradient(120deg,#006AFF,#6D3BFF));
  color: #fff; border-color: transparent; box-shadow: 0 10px 26px -10px rgba(0,106,255,0.5);
}

.lab__stage {
  margin: 34px auto 0; max-width: 940px;
  display: grid; grid-template-columns: 320px 1fr; gap: 44px; align-items: center;
}
@media (max-width: 820px) { .lab__stage { grid-template-columns: 1fr; gap: 30px; max-width: 460px; } }

/* the phone that re-renders per scenario */
.lab__phone { justify-self: center; }
.lab__screen {
  width: 300px; border-radius: 34px; background: #0f1117; border: 1px solid var(--line-strong);
  padding: 16px 14px 18px; box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7);
  color: #fff; overflow: hidden;
}
.lab__statusbar { display:flex; justify-content:space-between; font-size:11px; color:var(--ink-inv-dim); padding: 2px 6px 12px; font-weight:600; }
.labrow {
  display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 14px;
  background: #161923; border: 1px solid var(--line);
  transition: opacity .45s var(--cine-ease, ease), transform .45s var(--cine-ease, ease), background .45s ease, border-color .45s ease;
}
.labrow + .labrow { margin-top: 9px; }
.labrow__ico { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display:grid; place-items:center; background: rgba(0,106,255,0.16); color:#6ea8ff; }
.labrow__ico svg { width: 18px; height: 18px; }
.labrow__t { display: block; font-size: 13.5px; font-weight: 600; }
.labrow__s { display: block; font-size: 12px; color: var(--ink-inv-soft); margin-top: 3px; line-height: 1.35; }
.labrow__tag { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag-miss { background: rgba(245,158,11,0.16); color: #f5b400; }
.tag-ok { background: rgba(57,194,107,0.16); color: #39c26b; }
.tag-new { background: rgba(0,106,255,0.18); color: #6ea8ff; }
/* the "changed" pulse when a scenario loads */
.labrow.changed { animation: labPulse 1.4s var(--cine-ease, ease) 1; }
@keyframes labPulse {
  0% { transform: translateY(6px); opacity: 0; }
  40% { transform: none; opacity: 1; box-shadow: 0 0 0 3px rgba(0,106,255,0.28); }
  100% { box-shadow: 0 0 0 0 rgba(0,106,255,0); }
}

/* the "what connected" read-out beside the phone */
.lab__read { align-self: center; }
.lab__trigger {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #f5b400; margin-bottom: 14px;
}
.lab__trigger .dot { width: 8px; height: 8px; border-radius: 50%; background: #f5b400; }
.lab__title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; color: #fff; margin: 0 0 18px; }
.lab__chain { display: grid; gap: 12px; }
.labstep { display: flex; gap: 12px; align-items: flex-start; opacity: 0; transform: translateX(-8px);
  transition: opacity .5s var(--cine-ease, ease), transform .5s var(--cine-ease, ease); }
.lab.playing .labstep { opacity: 1; transform: none; }
.lab.playing .labstep:nth-child(1) { transition-delay: .15s; }
.lab.playing .labstep:nth-child(2) { transition-delay: .40s; }
.lab.playing .labstep:nth-child(3) { transition-delay: .65s; }
.lab.playing .labstep:nth-child(4) { transition-delay: .90s; }
.labstep__n { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,106,255,0.16);
  color: #6ea8ff; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.labstep__t { font-size: 15px; color: var(--ink-inv-soft); line-height: 1.5; }
.labstep__t b { color: #fff; font-weight: 600; }
.lab__truth { margin-top: 20px; font-size: 12.5px; color: var(--ink-inv-dim); line-height: 1.5; }

/* reduced motion: no pulses/flows, states just appear */
@media (prefers-reduced-motion: reduce) {
  .sysmap.lit .sysmap__link.flow { animation: none; }
  .labrow.changed { animation: none; }
  .lab .labstep { opacity: 1 !important; transform: none !important; transition: none; }
  .goalcard.is-swapping .goalcard__v { opacity: 1; }
}
