/* ================================================================
   forgd.fit — signature experiences (2026-07-13)
   The things that make this page unmistakably Forgd:
     1. Goal Path       — pick a goal, the page personalizes downstream
     2. Connected loop  — Training/Nutrition/Recovery/Progress + goal
     3. Adaptation Lab  — explicit BEFORE → AFTER as the plan adapts
   Same-origin only (CSP-safe). Reuses the design tokens + cinematic layer.
   ================================================================ */

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

/* ================================================================
   1 · GOAL PATH
   ================================================================ */
.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; }

/* persistent "Your Forgd path: X" indicator */
.goalpath__path {
  margin: 22px auto 0; font-size: 15px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.goalpath__path b { color: var(--accent); font-weight: 700; }
.goalpath__hint { color: var(--ink-dim); font-size: 13.5px; }

/* the personalized read-out card */
.goalcard {
  max-width: 760px; 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; }
.is-swapping .goalcard__v [data-goal-field],
.is-swapping [data-goal-field] { opacity: 0.2; }
@media (max-width: 560px) { .goalcard { grid-template-columns: 1fr; } }

/* goal-driven callout that appears inside Training / Nutrition / Progress */
.goal-note {
  display: inline-flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  margin-top: 18px; padding: 9px 15px; border-radius: 12px;
  background: rgba(0,106,255,0.07); border: 1px solid rgba(0,106,255,0.16);
  font-size: 14.5px; color: var(--ink); line-height: 1.4;
}
.goal-note__k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); flex-shrink: 0; }
.goal-note [data-goal-field] { font-weight: 600; transition: opacity .3s ease; }
.goal-note--dark { background: rgba(110,168,255,0.10); border-color: rgba(110,168,255,0.22); color: var(--ink-inv); }
.goal-note--dark .goal-note__k { color: #6ea8ff; }
.goal-note--center { margin-left: auto; margin-right: auto; }

/* ================================================================
   2 · CONNECTED LOOP — concrete + legible (no abstract diagram)
   ================================================================ */
.loop { max-width: 940px; margin: 40px auto 0; text-align: center; }
.loop__core {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 13px 30px; border-radius: 16px; margin-bottom: 10px;
  background: var(--grad-brand, linear-gradient(135deg,#006AFF,#6D3BFF));
  box-shadow: 0 16px 40px -18px rgba(0,106,255,0.7);
}
.loop__core span { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #cfe0ff; }
.loop__core b { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.loop__stem { display: none; }

.loop__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.loop__pillar {
  appearance: none; cursor: pointer; text-align: left; font-family: var(--sans);
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 16px; border-radius: 18px;
  background: #10121a; border: 1px solid var(--line-strong); color: #fff;
  transition: transform .35s var(--cine-ease, ease), border-color .35s ease, box-shadow .35s ease, background .35s ease;
}
.loop__pillar:hover { transform: translateY(-3px); }
.loop__ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(0,106,255,0.16); color: #6ea8ff;
  transition: background .35s ease, color .35s ease, transform .35s ease;
}
.loop__ico svg { width: 20px; height: 20px; }
.loop__t { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.loop__c { font-size: 12.5px; color: var(--ink-inv-soft); line-height: 1.4; }
/* lit + active states */
.loop.lit .loop__pillar { border-color: var(--line-strong); }
.loop .loop__pillar.on {
  border-color: var(--accent); background: #121a2c;
  box-shadow: 0 0 0 1px rgba(0,106,255,0.4), 0 18px 44px -18px rgba(0,106,255,0.6);
}
.loop .loop__pillar.on .loop__ico { background: var(--accent); color: #fff; transform: scale(1.05); }

.loop__read { margin-top: 26px; }
.loop__bridge {
  max-width: 620px; margin: 0 auto; min-height: 3em;
  font-size: 16px; line-height: 1.5; color: var(--ink-inv-soft);
  transition: opacity .35s ease, transform .35s ease;
}
.loop__bridge b { color: #fff; font-weight: 600; }
.loop__bridge.out { opacity: 0; transform: translateY(6px); }
.loop__rail { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.loop__rail span { width: 26px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.16); transition: background .3s ease; }
.loop__rail span.on { background: var(--accent); }

@media (max-width: 720px) { .loop__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .loop__grid { grid-template-columns: 1fr; } }

/* ================================================================
   3 · ADAPTATION LAB — "Watch your system adapt." (before → after)
   ================================================================ */
.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: 980px; }

/* before → mid(event/arrow) → after */
.lab__ba {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch;
}
.lab__col { display: flex; flex-direction: column; }
.lab__coltag {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-inv-dim); margin-bottom: 10px; text-align: left;
}
.lab__coltag--after { color: #6ea8ff; }
.lab__panel {
  flex: 1; border-radius: 20px; background: #0f1117; border: 1px solid var(--line-strong);
  padding: 16px 16px 18px; box-shadow: 0 30px 70px -34px rgba(0,0,0,0.7); text-align: left;
}
.lab__panel--after { border-color: rgba(0,106,255,0.4); box-shadow: 0 30px 70px -30px rgba(0,106,255,0.35); }
.lab__ptitle { font-size: 12px; font-weight: 700; color: var(--ink-inv-dim); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }

/* the middle event chip + arrow */
.lab__mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #6ea8ff; }
.lab__event {
  font-size: 12px; font-weight: 700; text-align: center; max-width: 120px; line-height: 1.3;
  color: #f5b400; background: rgba(245,158,11,0.14); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 999px; padding: 7px 12px;
}
.lab__arrow svg { width: 40px; height: 24px; }

/* --- week strip --- */
.wkstrip { display: grid; gap: 7px; }
.wk {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px;
  background: #161923; border: 1px solid var(--line); font-size: 13.5px; color: #fff;
}
.wk__d { width: 34px; flex-shrink: 0; font-weight: 700; color: var(--ink-inv-dim); font-size: 12px; }
.wk__w { font-weight: 600; }
.wk__tag { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.wk__mark { margin-left: auto; font-weight: 700; }
.wk--done { opacity: 0.62; }
.wk--done .wk__mark { color: #39c26b; }
.wk--rest { opacity: 0.42; }
.wk--plan .wk__tag { background: rgba(0,106,255,0.18); color: #6ea8ff; }
.wk--missed { border-color: rgba(245,158,11,0.4); }
.wk--missed .wk__w { text-decoration: line-through; opacity: 0.7; }
.wk--missed .wk__tag { background: rgba(245,158,11,0.16); color: #f5b400; }
.wk--moved { border-color: rgba(0,106,255,0.45); background: #121a2c; }
.wk--moved .wk__tag { background: rgba(0,106,255,0.2); color: #6ea8ff; }

/* --- exercise swaps --- */
.swaplist { display: grid; gap: 8px; }
.swap {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 11px;
  background: #161923; border: 1px solid var(--line); font-size: 13px; color: #fff; flex-wrap: wrap;
}
.swap__a { color: var(--ink-inv-soft); }
.swap__a--plain { color: #fff; font-weight: 600; }
.swap--chg .swap__a { text-decoration: line-through; opacity: 0.55; }
.swap__arw { color: #6ea8ff; font-weight: 700; }
.swap__b { color: #fff; font-weight: 600; }
.swap--chg { border-color: rgba(0,106,255,0.3); }

/* --- recovery card --- */
.rec { display: flex; align-items: center; gap: 14px; padding: 4px 2px 8px; }
.rec__ring {
  --p: 70; --c: #39c26b; width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--c) calc(var(--p)*1%), rgba(255,255,255,0.10) 0);
  display: grid; place-items: center; position: relative;
}
.rec__ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0f1117; }
.rec__ring span { position: relative; font-weight: 700; font-size: 18px; }
.rec__meta { display: flex; flex-direction: column; gap: 3px; }
.rec__meta b { font-size: 15px; font-weight: 700; }
.rec__meta span { font-size: 12.5px; color: var(--ink-inv-soft); }
.rec__guide {
  margin-top: 10px; padding: 11px 13px; border-radius: 11px; font-size: 13px; font-weight: 600;
  background: #161923; border: 1px solid var(--line); color: #fff;
}

/* the "changed" pulse when the AFTER panel adapts */
.lab__ba.adapted .wk--chg,
.lab__ba.adapted .swap--chg,
.lab__ba.adapted .rec--chg { animation: labPulse 1.5s var(--cine-ease, ease) 1; }
.lab__ba.adapted .wk--chg:nth-of-type(2) { animation-delay: .18s; }
@keyframes labPulse {
  0% { transform: translateX(6px); opacity: 0; }
  45% { transform: none; opacity: 1; box-shadow: 0 0 0 3px rgba(0,106,255,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(0,106,255,0); }
}

/* the "what connected" read-out below the before/after */
.lab__read { max-width: 720px; margin: 30px auto 0; text-align: 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: 12px;
}
.lab__trigger .dot { width: 8px; height: 8px; border-radius: 50%; background: #f5b400; }
.lab__title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; color: #fff; margin: 0 0 18px; }
.lab__chain { display: grid; gap: 12px; text-align: left; max-width: 560px; margin: 0 auto; }
.labstep { display: flex; gap: 12px; align-items: flex-start; }
/* Hide-then-reveal ONLY when JS is present; with JS off the static default
   scenario (rendered in the HTML) stays fully readable. */
html.has-js .lab .labstep { opacity: 0; transform: translateX(-8px);
  transition: opacity .5s var(--cine-ease, ease), transform .5s var(--cine-ease, ease); }
html.has-js .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; max-width: 560px; margin-left: auto; margin-right: auto; }

/* mobile: before over after, event chip between */
@media (max-width: 720px) {
  .lab__ba { grid-template-columns: 1fr; gap: 12px; max-width: 420px; }
  .lab__mid { flex-direction: row; gap: 10px; }
  .lab__arrow svg { transform: rotate(90deg); }
}

/* ================================================================
   Nutrition fact strip (survives the merged nutrition section)
   ================================================================ */
.nutri-facts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px auto 0; max-width: 760px; }
.nutri-facts span {
  font-size: 13.5px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px; padding: 9px 16px;
}

/* ================================================================
   Social-proof component (P7) — styled + ready, used only when REAL
   approved proof exists (kept as an HTML comment in index.html until then).
   ================================================================ */
.proof { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 34px; align-items: stretch; }
.proof__card {
  margin: 0; padding: 26px 26px 22px; border-radius: 18px;
  background: #fff; border: 1px solid var(--line-light); box-shadow: var(--shadow-card);
}
.proof__card blockquote { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink); font-weight: 500; }
.proof__card figcaption { margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-dim); }
.proof__stat {
  display: flex; flex-direction: column; justify-content: center; gap: 6px; text-align: center;
  padding: 26px; border-radius: 18px; background: var(--grad-brand, linear-gradient(135deg,#006AFF,#6D3BFF)); color: #fff;
}
.proof__stat b { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.proof__stat span { font-size: 13.5px; font-weight: 600; color: #cfe0ff; }
@media (max-width: 640px) { .proof { grid-template-columns: 1fr; } }

/* ================================================================
   reduced motion
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .lab__ba.adapted .wk--chg, .lab__ba.adapted .swap--chg, .lab__ba.adapted .rec--chg { animation: none; }
  .lab .labstep { opacity: 1 !important; transform: none !important; transition: none; }
  .is-swapping [data-goal-field] { opacity: 1; }
  .loop__bridge.out { opacity: 1; transform: none; }
}
