/* ═══════════════════════════════════════════════════════════════
   TrustGym walkthrough phone mockup — auto-rotating
   Shared between trustgym.html and products.html hero
   Prefix: .tw-*   (TrustGym Walkthrough)
   ═══════════════════════════════════════════════════════════════ */

.tw-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, sans-serif;
}

.tw-phone {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 735;
  border-radius: 54px;
  background: #111;
  padding: 10px;
  box-shadow:
    0 30px 80px rgba(26,26,36,0.22),
    0 0 0 1px rgba(26,26,36,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}
.tw-phone::before {
  content: ''; position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 28px; border-radius: 18px;
  background: #050507; z-index: 5;
}
.tw-inner {
  position: relative; width: 100%; height: 100%;
  border-radius: 44px; overflow: hidden;
  background: #F8F6F1;
}

.tw-statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 54px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 36px 0;
  font-family: 'Inter', system-ui, sans-serif; font-size: 13px; font-weight: 600;
  color: #1A1A24; z-index: 4; pointer-events: none;
}
.tw-statusbar-right { display: flex; gap: 5px; align-items: center; }
.tw-statusbar-right svg { width: 15px; height: 10px; }

/* ─── scene container ─────────────────────────────────── */
.tw-scene {
  position: absolute; inset: 0;
  padding: 54px 0 0;
  opacity: 0; pointer-events: none;
  transition: opacity 520ms cubic-bezier(0.16,1,0.3,1),
              transform 720ms cubic-bezier(0.16,1,0.3,1);
  transform: translateY(14px);
  overflow: hidden;
  background: #F8F6F1;
  display: flex; flex-direction: column;
}
.tw-scene.active { opacity: 1; pointer-events: auto; transform: translateY(0); }

.tw-body {
  flex: 1; overflow: hidden;
  padding: 12px 20px 80px;
}

.tw-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px 4px;
  flex-shrink: 0;
}
.tw-nav-btn {
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0.5px solid #E2DDD6;
  color: #5C5850; font-size: 16px; line-height: 1;
}
.tw-nav-dots { display: flex; gap: 5px; }
.tw-nav-dots span {
  width: 6px; height: 6px; border-radius: 99px;
  background: rgba(26,26,36,0.14);
  transition: all 400ms cubic-bezier(0.16,1,0.3,1);
}
.tw-nav-dots span.on { width: 22px; background: var(--tw-accent); }
.tw-nav-dots span.past { background: rgba(var(--tw-accent-rgb),0.45); }

/* ─── Scene 0: Today ──────────────────────────────────── */
.tw-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; }
.tw-greet {
  font-family: 'DM Mono', monospace; font-size: 10.5px; font-weight: 600;
  color: #8C877E; letter-spacing: 0.13em; text-transform: uppercase;
  margin-bottom: 6px;
}
.tw-title {
  font-family: 'Lora', Georgia, serif; font-weight: 700; font-size: 26px;
  line-height: 1.08; color: #1A1A24; letter-spacing: -0.3px;
}
.tw-title em { font-style: italic; font-weight: 400; color: #1A1A24; }
.tw-streak {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 10px;
  padding: 5px 10px; background: #FBF0EC; border: 0.5px solid rgba(181,69,27,0.2);
  border-radius: 99px;
  font-family: 'DM Mono', monospace; font-size: 10px; color: #8C877E;
}
.tw-streak .flame { color: #B5451B; font-size: 11px; }
.tw-streak .n { color: #B5451B; font-weight: 700; font-size: 11px; }

.tw-logo { width: 48px; display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.tw-logo svg { width: 44px; height: 44px; display: block; }
.tw-logo .lbl { font-family: 'DM Mono', monospace; font-size: 8px; font-weight: 500; color: #8C877E; letter-spacing: 0.04em; }

.tw-wod { background: #fff; border: 0.5px solid #E2DDD6; border-radius: 20px; overflow: hidden; margin-bottom: 10px; }
.tw-wod-top { display: flex; align-items: center; gap: 6px; padding: 18px 18px 14px; }
.tw-wod-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--tw-accent, #0B7285); flex-shrink: 0; }
.tw-wod-eyebrow {
  font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700;
  color: var(--tw-accent, #0B7285); letter-spacing: 0.12em; text-transform: uppercase;
}
.tw-wod-done {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 99px; background: rgba(11,114,133,0.12);
  font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700;
  color: #0B7285; letter-spacing: 0.1em;
}
.tw-wod-done svg { width: 10px; height: 10px; }
.tw-wod-minimize {
  width: 24px; height: 24px; border-radius: 6px; background: #F0EDE6;
  display: flex; align-items: center; justify-content: center;
  color: #C8C3BB; font-size: 9px; line-height: 1; margin-left: 6px;
}
.tw-wod-title {
  font-family: 'Lora', Georgia, serif; font-weight: 700; font-size: 22px;
  color: #1A1A24; padding: 0 18px 10px; line-height: 1.2;
}
.tw-wod-prompt {
  font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 15px;
  color: #5C5850; padding: 0 18px 10px; line-height: 1.55;
}
.tw-wod-meta { font-family: 'DM Mono', monospace; font-size: 11px; color: #8C877E; padding: 0 18px 16px; }
.tw-wod-cta {
  display: flex; align-items: center; padding: 16px 22px;
  background: var(--tw-accent, #0B7285); color: #fff;
  font-weight: 600; font-size: 16px;
}
.tw-wod-cta.done { background: rgba(11,114,133,0.08); color: var(--tw-accent, #0B7285); font-size: 14px; padding: 12px 22px; }

.tw-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tw-tile { padding: 14px; border-radius: 16px; border: 0.5px solid; display: flex; flex-direction: column; gap: 8px; min-height: 130px; }
.tw-tile.done { background: #E8F6F8; border-color: rgba(11,114,133,0.2); }
.tw-tile.coach { background: #F3EEFF; border-color: rgba(109,40,217,0.2); }
.tw-tile .ic { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.tw-tile.done .ic { background: transparent; color: #0B7285; font-size: 19px; }
.tw-tile.coach .ic { background: #6D28D9; color: #fff; }
.tw-tile .tile-headline { font-size: 12px; font-weight: 600; color: #1A1A24; line-height: 1.4; }
.tw-tile.coach .tile-headline { color: #6D28D9; font-size: 11px; }
.tw-tile .tile-body { font-size: 11px; color: #5C5850; line-height: 1.45; flex: 1; }
.tw-tile .tile-foot { font-size: 9px; font-weight: 500; color: #8C877E; display: inline-flex; align-items: center; gap: 4px; }
.tw-tile.coach .tile-foot { color: rgba(109,40,217,0.85); font-weight: 600; font-size: 10px; }

/* ─── Workout flow (scenes 1–3) ───────────────────────── */
.tw-eyebrow { display: flex; align-items: center; gap: 7px; padding: 10px 2px 12px; }
.tw-eye-dot { width: 5px; height: 5px; border-radius: 99px; background: var(--tw-accent); flex-shrink: 0; }
.tw-eye-txt { font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700; color: var(--tw-accent); letter-spacing: 0.12em; text-transform: uppercase; }
.tw-eye-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 5px;
  font-family: 'DM Mono', monospace; font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--tw-accent); background: rgba(var(--tw-accent-rgb), 0.1);
}
.tw-eye-pill svg { width: 9px; height: 9px; }

.tw-flow-title {
  font-family: 'Lora', Georgia, serif; font-weight: 700; font-size: 22px;
  color: #1A1A24; line-height: 1.22; margin-bottom: 8px;
}
.tw-flow-title em { font-style: italic; font-weight: 400; }
.tw-flow-sub {
  font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 14px;
  color: #5C5850; line-height: 1.55; margin-bottom: 18px;
}

.tw-card { background: #fff; border: 0.5px solid #E2DDD6; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.tw-card-quote { font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 16px; color: #1A1A24; line-height: 1.6; padding: 18px; }
.tw-card-divider { height: 0.5px; background: #E2DDD6; }
.tw-card-note { padding: 14px 18px; }
.tw-card-note-lbl {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px;
  font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700;
  color: var(--tw-accent); letter-spacing: 0.12em; text-transform: uppercase;
}
.tw-card-note-lbl svg { width: 10px; height: 10px; }
.tw-card-note-body { font-size: 13px; color: #5C5850; line-height: 1.5; }

.tw-recap {
  background: rgba(255,255,255,0.7); border: 0.5px solid #E2DDD6;
  border-radius: 12px; padding: 11px 14px; margin-bottom: 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.tw-recap-meta { flex: 1; min-width: 0; }
.tw-recap-lbl { font-family: 'DM Mono', monospace; font-size: 9.5px; font-weight: 700; color: #8C877E; letter-spacing: 0.11em; margin-bottom: 3px; }
.tw-recap-lbl .nm { font-family: 'Lora', serif; font-style: italic; font-weight: 400; letter-spacing: 0; }
.tw-recap-txt {
  font-size: 12px; color: #5C5850; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tw-recap-chev { color: #C8C3BB; font-size: 10px; margin-top: 2px; }

.tw-write {
  background: #fff; border: 0.5px solid #E2DDD6; border-radius: 16px;
  padding: 18px; margin-bottom: 14px;
}
.tw-write-text {
  font-family: 'Lora', Georgia, serif; font-size: 15px;
  color: #1A1A24; line-height: 1.6; min-height: 64px;
}
.tw-write-text .caret {
  display: inline-block; width: 1.5px; height: 1em;
  background: var(--tw-accent); margin-left: 1px;
  vertical-align: baseline;
  animation: tw-blink 1s steps(2) infinite;
}
@keyframes tw-blink { 50% { opacity: 0; } }
.tw-write-foot {
  display: flex; justify-content: space-between; margin-top: 14px;
  font-family: 'DM Mono', monospace; font-size: 10px; color: #8C877E;
}

.tw-cta {
  display: flex; align-items: center; justify-content: center;
  background: var(--tw-accent); color: #fff;
  padding: 15px 18px; border-radius: 14px;
  font-weight: 600; font-size: 15px; gap: 8px;
}

/* ─── Scene 4: Coach ──────────────────────────────────── */
.tw-coach-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 14px; flex-shrink: 0; }
.tw-coach-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(109,40,217,0.08); border: 0.5px solid rgba(109,40,217,0.2);
  font-family: 'DM Mono', monospace; font-size: 9.5px; font-weight: 700;
  color: #6D28D9; letter-spacing: 0.12em;
}
.tw-coach-chip .d { width: 6px; height: 6px; border-radius: 99px; background: #6D28D9; }
.tw-bub { padding: 12px 14px; border-radius: 16px; margin-bottom: 10px; font-size: 13.5px; line-height: 1.5; max-width: 85%; }
.tw-bub-u { background: #1A1A24; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.tw-bub-c { background: #fff; color: #1A1A24; border: 0.5px solid #E2DDD6; border-bottom-left-radius: 4px; }
.tw-bub-c-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700;
  color: #6D28D9; letter-spacing: 0.12em;
}
.tw-bub-c-head .avi { width: 18px; height: 18px; border-radius: 5px; background: #6D28D9; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.tw-memory { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(109,40,217,0.06); border: 0.5px dashed rgba(109,40,217,0.3); opacity: 0; transform: translateY(6px); transition: all 400ms cubic-bezier(0.16,1,0.3,1); }
.tw-memory.on { opacity: 1; transform: translateY(0); }
.tw-memory-lbl { font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700; color: #6D28D9; letter-spacing: 0.12em; margin-bottom: 4px; display: inline-flex; align-items: center; gap: 4px; }
.tw-memory-body { font-family: 'Lora', serif; font-style: italic; font-size: 13px; color: #5C5850; line-height: 1.45; }

/* ─── Tabbar ──────────────────────────────────────────── */
.tw-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 60px;
  padding: 6px 8px 10px;
  display: flex; justify-content: space-around; align-items: flex-start;
  background: rgba(248,246,241,0.92);
  border-top: 0.5px solid #E2DDD6;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 5;
}
.tw-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; padding: 2px 0; }
.tw-tab svg { width: 20px; height: 20px; color: #C8C3BB; }
.tw-tab .lbl { font-size: 9.5px; font-weight: 500; color: #C8C3BB; }
.tw-tab.on svg { color: var(--tw-tab-accent, #0B7285); }
.tw-tab.on .lbl { color: var(--tw-tab-accent, #0B7285); font-weight: 700; }

/* ─── Footer chapter bar ──────────────────────────────── */
.tw-chapters {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-top: 20px;
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #8C877E;
}
.tw-chapters-rail { display: flex; gap: 6px; }
.tw-chapters-rail span {
  width: 20px; height: 3px; border-radius: 99px;
  background: #E2DDD6;
  transition: all 400ms cubic-bezier(0.16,1,0.3,1);
}
.tw-chapters-rail span.on { background: var(--tw-accent); width: 28px; }
.tw-chapters-rail span.past { background: rgba(var(--tw-accent-rgb), 0.45); }
.tw-chapters .label { color: var(--tw-accent); font-weight: 700; }

/* Mobile */
@media (max-width: 520px) {
  .tw-wrap { max-width: 300px; }
  .tw-phone { border-radius: 44px; }
  .tw-inner { border-radius: 34px; }
  .tw-phone::before { width: 92px; height: 24px; top: 14px; }
}
