/* ===== STRETCH PAGE ===== */

.str-main { padding: 2rem 0 5rem; }

/* ---- Options ---- */
.str-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  max-width: 620px;
  margin: 0 auto 2rem;
}

.str-opt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.str-opt-card:hover {
  border-color: rgba(139,124,248,0.4);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}

.str-opt-time  { font-family: var(--font-serif); font-size: 2rem; color: var(--accent); }
.str-opt-label { font-family: var(--font-serif); font-size: 0.95rem; }
.str-opt-count { font-size: 0.75rem; color: var(--muted); }

.str-note {
  max-width: 440px;
  margin: 0 auto;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
}

/* ---- Session ---- */
.str-session {
  position: fixed;
  inset: 0;
  background: #04040d;
  display: flex;
  flex-direction: column;
}

.str-progress {
  height: 3px;
  background: rgba(255,255,255,0.06);
}

.str-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 1s linear;
}

.str-session-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem;
  text-align: center;
}

.str-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 480px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.str-stretch-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
}

.str-stretch-body {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  max-width: 440px;
  line-height: 1.7;
}

/* ---- Breathing ring ---- */
.str-ring-wrap {
  position: relative;
  width: 150px;
  height: 150px;
}

.str-ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.str-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 6;
}

.str-ring-fill {
  fill: none;
  stroke: var(--accent2);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 364.4;
  stroke-dashoffset: 364.4;
  transition: stroke-dashoffset 0.1s linear;
}

.str-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--accent2);
}

.str-controls {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Complete ---- */
.str-complete {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.strc-inner { text-align: center; padding: 2rem; }
.strc-icon  { font-size: 3rem; display: block; margin-bottom: 1rem; }
.strc-inner h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 0.8rem; }
.strc-inner p  { color: var(--muted); margin-bottom: 2rem; }
.strc-actions  { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Routine category picker ---- */
.str-routine-pick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 620px;
  margin: 0 auto 1.5rem;
}

.str-routine-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.str-routine-btn:hover { border-color: rgba(139,124,248,0.4); }
.str-routine-btn.active {
  border-color: var(--accent);
  background: rgba(139,124,248,0.08);
  box-shadow: var(--glow);
}

.str-routine-icon { font-size: 1.6rem; line-height: 1; }
.str-routine-name { font-family: var(--font-serif); font-size: 1rem; color: var(--text); }
.str-routine-desc { font-size: 0.72rem; color: var(--muted); line-height: 1.4; }

/* ---- Animated visual guide ---- */
.str-illus {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.str-fig { width: 100%; height: 100%; }

.fig-stroke {
  fill: none;
  stroke: var(--accent2);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.str-fig circle.fig-stroke { fill: rgba(92,232,212,0.08); }

/* Looping illustrative animations (4s, gentle) */
.fig-anim-neck     { transform-origin: 60px 44px; animation: figNeck 5s ease-in-out infinite; }
.fig-anim-shoulder { animation: figShoulder 4s ease-in-out infinite; }
.fig-anim-chest    { animation: figChest 5s ease-in-out infinite; }
.fig-anim-sidebend { transform-origin: 60px 82px; animation: figSideBend 6s ease-in-out infinite; }
.fig-anim-twist    { animation: figTwist 5s ease-in-out infinite; }
.fig-anim-fold     { animation: figFold 6s ease-in-out infinite; }
.fig-anim-wrist    { transform-origin: center; animation: figSpin 4s linear infinite; }
.fig-anim-ankle    { transform-origin: 60px 82px; animation: figAnkle 4s ease-in-out infinite; }
.fig-anim-hips     { animation: figHips 5s ease-in-out infinite; }
.fig-anim-breathe  { animation: figBreathe 5s ease-in-out infinite; }

@keyframes figNeck     { 0%,100%{transform:rotate(-14deg);} 50%{transform:rotate(14deg);} }
@keyframes figShoulder { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-6px);} }
@keyframes figChest    { 0%,100%{stroke-width:4;opacity:0.6;} 50%{stroke-width:5;opacity:1;} }
@keyframes figSideBend { 0%,100%{transform:rotate(0deg);} 50%{transform:rotate(-16deg);} }
@keyframes figTwist    { 0%,100%{transform:rotate(-14deg);} 50%{transform:rotate(14deg);} }
@keyframes figFold     { 0%,100%{transform:rotate(0deg);} 50%{transform:rotate(28deg);} }
@keyframes figSpin     { from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
@keyframes figAnkle    { 0%,100%{transform:rotate(-10deg);} 50%{transform:rotate(10deg);} }
@keyframes figHips     { 0%,100%{transform:rotate(-8deg);} 50%{transform:rotate(8deg);} }
@keyframes figBreathe  { 0%,100%{transform:scale(0.8);opacity:0.5;} 50%{transform:scale(1.15);opacity:1;} }

@media (prefers-reduced-motion: reduce) {
  .fig-anim-neck, .fig-anim-shoulder, .fig-anim-chest, .fig-anim-sidebend,
  .fig-anim-twist, .fig-anim-fold, .fig-anim-wrist, .fig-anim-ankle,
  .fig-anim-hips, .fig-anim-breathe { animation: none; }
}

@media (max-width: 600px) {
  .str-options { grid-template-columns: 1fr; max-width: 280px; }
  .str-routine-pick { grid-template-columns: 1fr; max-width: 320px; }
}
