/* ════════════════════════════════════════════════════════════
   STRIDE — Phone UI (mirrors prototype daily-briefing-flow.html)
   ════════════════════════════════════════════════════════════ */

.device {
  width: var(--device-w);
  height: var(--device-h);
  background: #0a0c14;
  border-radius: var(--r-device);
  padding: 12px;
  position: relative;
  box-shadow: var(--shadow-phone);
  transform-origin: center;
  will-change: transform;
  isolation: isolate;
}

.device::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--r-device) + 1px);
  padding: 1px;
  background: linear-gradient(160deg, #2a2f44 0%, #0a0c14 40%, #1a1f30 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.device-screen {
  width: 100%;
  height: 100%;
  background: var(--warm-white);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* ────── Status bar + dynamic island ────── */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 0;
  z-index: 10;
  color: var(--white);
  pointer-events: none;
  font-family: -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
}
/* The brand-as-status: STRIDE wordmark on the left where 9:41 would go.
   Keeps the dark header band compact instead of stacking a second brand line. */
.status-bar .sb-brand {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--coral-light);
}
/* (b-header's own padding-top accounts for the status bar — no special rule needed) */
.status-bar .island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 20px;
}
.status-bar .icons {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* ────── Screen content frame ────── */
.screen {
  position: absolute;
  inset: 0;
  /* No top padding — each screen's header fills the area BEHIND the status
     bar so the dynamic-island backdrop matches the header band color (navy
     for briefing/community, cream for exercise). */
  padding-bottom: 83px;
  overflow: hidden;            /* No internal scroll — it's a mockup, not a real device */
  background: var(--warm-white);
  pointer-events: none;        /* Prevent users from interacting with the mock content */
}
.screen::-webkit-scrollbar { display: none; }

/* ────── Briefing: ink-navy header (compact, just greeting + day) ────── */
.b-header {
  background: var(--ink);
  /* 54px to clear the status bar, +8px breathing room before the greeting */
  padding: 62px 20px 16px;
  color: var(--white);
}
.b-greeting {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.b-day {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

/* ────── Tendon card ────── */
.tendon-card {
  margin: 14px 16px 0;
  border-radius: 16px;
  background: var(--ink-grad);
  padding: 18px;
}
.tendon-label {
  font-size: 11px;
  color: var(--coral-light);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.tendon-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tendon-ring {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}
.tendon-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.tendon-ring .ring-track {
  stroke: rgba(255, 255, 255, 0.10);
}
.tendon-ring .ring-fill {
  stroke: var(--coral);
  stroke-linecap: round;
  transition: stroke-dasharray 1.6s var(--ease-out);
  filter: drop-shadow(0 0 0px rgba(224, 122, 95, 0.0));
  animation: ring-breathe 5s ease-in-out infinite;
}
@keyframes ring-breathe {
  0%, 100% { filter: drop-shadow(0 0 0px rgba(224, 122, 95, 0.25)); }
  50%      { filter: drop-shadow(0 0 10px rgba(224, 122, 95, 0.55)); }
}
.tendon-ring .ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
}
.tendon-text h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.tendon-text p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 5px;
  line-height: 1.4;
}

/* ────── Companion nudge ────── */
.comp-card {
  margin: 12px 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--white);
  border: 2px solid var(--coral);
  box-shadow: 0 8px 24px rgba(224, 122, 95, 0.18);
}
.comp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.comp-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.18);
  animation: comp-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes comp-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.18); }
  50%      { box-shadow: 0 0 0 9px rgba(224, 122, 95, 0.04); }
}
.comp-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--coral-dark);
}
.comp-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 12px;
}
.comp-btns { display: flex; gap: 8px; }
.comp-yes {
  background: var(--coral);
  color: var(--white);
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}
.comp-no {
  background: transparent;
  color: var(--slate);
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--ink-15);
}

/* ────── Plan section ────── */
.plan-section { margin: 16px 16px 0; }
.plan-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plan-pill {
  font-size: 10px;
  font-weight: 700;
  background: var(--coral-bg);
  color: var(--coral-dark);
  padding: 3px 8px;
  border-radius: var(--r-full);
}
.plan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 6px;
  border: 1px solid var(--ink-08);
  background: var(--white);
}
.plan-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.6px solid var(--ink-15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plan-item.done .plan-check {
  background: var(--green);
  border-color: var(--green);
}
.plan-item.done .plan-check::after {
  content: "✓";
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.plan-item.done .plan-name { text-decoration: line-through; color: var(--slate); }
.plan-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}
.plan-meta {
  font-size: 11px;
  color: var(--slate);
}

/* ────── Community pulse ────── */
.community-pulse {
  margin: 14px 16px 16px;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.pulse-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.avatar-stack { display: flex; }
.avatar-dot {
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cream);
  margin-left: -6px;
}
.avatar-dot:first-child { margin-left: 0; }
.pulse-count {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.pulse-trending {
  font-size: 11px;
  color: var(--slate);
  line-height: 1.4;
  margin-bottom: 6px;
}
.pulse-trending strong { color: var(--ink); font-weight: 600; }

/* ────── Tab bar (bottom) ────── */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 83px;
  background: var(--white);
  border-top: 1px solid var(--ink-08);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 10px 4px 34px;
  z-index: 5;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.tab-icon {
  width: 24px;
  height: 24px;
  color: var(--slate-light);
}
.tab-icon svg { width: 100%; height: 100%; fill: currentColor; }
.tab-label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 600;
  color: var(--slate-light);
  letter-spacing: 0.2px;
}
.tab-item.active .tab-icon { color: var(--coral); }
.tab-item.active .tab-label { color: var(--coral); font-weight: 700; }

/* ════════════════════════════════════════════════════════════
   EXERCISE SCREEN (used in scroll walkthrough)
   ════════════════════════════════════════════════════════════ */

.ex-header {
  background: var(--warm-white);
  padding: 70px 20px 12px;     /* 54px status-bar + 16px breathing room */
}
.ex-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--coral-dark);
}
.ex-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 4px;
  letter-spacing: -0.4px;
}
.ex-sub {
  font-size: 13px;
  color: var(--slate);
  margin-top: 4px;
}
.ex-card {
  margin: 12px 16px;
  padding: 18px;
  background: var(--cream);
  border-radius: 16px;
  border: 1px solid var(--border);
}
.ex-illust {
  width: 100%;
  height: 140px;
  background: var(--ink-grad);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 48px;
  color: var(--coral-light);
}
.ex-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 14px;
  letter-spacing: -0.2px;
}
.ex-reps {
  font-size: 12px;
  color: var(--slate);
  margin-top: 4px;
}
.ex-cue {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--coral-bg-subtle);
  border-left: 3px solid var(--coral);
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
}
.ex-cue strong { color: var(--coral-dark); }

/* ════════════════════════════════════════════════════════════
   COMMUNITY SCREEN (used in scroll walkthrough)
   ════════════════════════════════════════════════════════════ */

.cm-header {
  padding: 70px 20px 8px;      /* 54px status-bar + 16px breathing room */
  background: var(--ink);
  color: var(--white);
}
.cm-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--coral-light);
}
.cm-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.3px;
}
.cm-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3px;
}
.cm-thread {
  margin: 12px 16px;
  padding: 14px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--ink-08);
}
.cm-thread-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cm-thread-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-thread-name {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.cm-thread-meta {
  font-size: 10px;
  color: var(--slate-light);
}
.cm-thread-q {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 4px;
}
.cm-thread-preview {
  font-size: 12px;
  color: var(--slate);
  line-height: 1.4;
}
.cm-thread-foot {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--slate);
}

/* ────── Responsive phone scale ──────
   The 390×844 device is a fixed pixel size. On narrow viewports we scale the
   stack (an inner element that doesn't have its own rotate transform) so the
   active-state device transforms and the wrapper's rotate transform keep
   working independently.
*/
.demo-phone-stack,
.journey-phone-stack {
  transform-origin: center top;
}
@media (max-width: 980px) {
  .demo-phone-stack,
  .journey-phone-stack {
    transform: scale(0.72);
    margin-bottom: calc(var(--device-h) * -0.28);
  }
  /* Concept 1 hero phone-wrap has its own rotate transform — scale via the
     wrap directly and drop the rotate on mobile so the two don't fight. */
  .hero-phone-wrap {
    transform: scale(0.72) !important;
    transform-origin: center top;
    margin-bottom: calc(var(--device-h) * -0.28);
  }
  .intro-phone-wrap {
    transform: scale(0.72) !important;
    transform-origin: center top;
    margin-bottom: calc(var(--device-h) * -0.28);
  }
}
@media (max-width: 640px) {
  .demo-phone-stack,
  .journey-phone-stack {
    transform: scale(0.58);
    margin-bottom: calc(var(--device-h) * -0.42);
  }
  .hero-phone-wrap,
  .intro-phone-wrap {
    transform: scale(0.58) !important;
    margin-bottom: calc(var(--device-h) * -0.42);
  }
}
@media (max-width: 400px) {
  .demo-phone-stack,
  .journey-phone-stack {
    transform: scale(0.50);
    margin-bottom: calc(var(--device-h) * -0.50);
  }
  .hero-phone-wrap,
  .intro-phone-wrap {
    transform: scale(0.50) !important;
    margin-bottom: calc(var(--device-h) * -0.50);
  }
}
