:root {
  --bg: #FDFBF7;
  --bg-alt: #F5F0E8;
  --fg: #1A1A1A;
  --fg-muted: #5C5C5C;
  --accent: #E07A5F;
  --accent-warm: #F2CC8F;
  --sage: #81B29A;
  --border: #E8E0D5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-badge {
  font-family: 'Syne', system-ui, sans-serif;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(129, 178, 154, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(224, 122, 95, 0.1) 0%, transparent 50%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--fg);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--fg-muted);
  max-width: 540px;
  margin: 0 auto 3rem;
}

.hero-cta {
  display: inline-block;
  margin-bottom: 3rem;
  padding: 0.85rem 2.25rem;
  background: var(--accent);
  color: white;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.hero-cta:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage), var(--accent));
  opacity: 0.6;
  animation: breathe 4s ease-in-out infinite;
}

.circle.delay {
  animation-delay: 1s;
  width: 60px;
  height: 60px;
  opacity: 0.4;
}

.circle.delay-2 {
  animation-delay: 2s;
  width: 40px;
  height: 40px;
  opacity: 0.2;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Features */
.features {
  background: var(--bg-alt);
  padding: 6rem 2rem;
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature {
  padding: 2rem;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-alt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.feature h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* How It Works */
.howitworks {
  padding: 6rem 2rem;
  text-align: center;
}

.howitworks-inner {
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.step p {
  max-width: 140px;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--border);
}

@media (max-width: 640px) {
  .step-connector {
    width: 2px;
    height: 30px;
  }
  .steps {
    flex-direction: column;
  }
}

.howitworks-note {
  font-size: 1.25rem;
  color: var(--fg-muted);
  font-style: italic;
}

/* Closing */
.closing {
  background: var(--fg);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
}

.closing-inner {
  max-width: 700px;
  margin: 0 auto;
}

.closing-statement {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.closing-statement strong {
  color: var(--accent-warm);
}

.closing-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
}

/* Footer */
footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.5rem;
  }
  .features {
    padding: 4rem 1.5rem;
  }
  .howitworks {
    padding: 4rem 1.5rem;
  }
  .closing {
    padding: 4rem 1.5rem;
  }
}

/* =====================================================
   SESSION LIBRARY
   ===================================================== */

.lib-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.lib-nav-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}

.lib-nav-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.lib-nav-back:hover {
  color: var(--accent);
}

.lib-hero {
  text-align: center;
  padding: 4rem 2rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.lib-hero-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.lib-hero-sub {
  color: var(--fg-muted);
  font-size: 1.1rem;
}

/* Category filter chips */
.lib-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 2rem 2.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Session cards grid */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.session-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 2rem;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.session-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.09);
}

.session-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: white;
}

/* Category-specific icon bg colors */
.session-card--morning .session-card__icon { background: linear-gradient(135deg, #F2CC8F, #E07A5F); }
.session-card--confidence .session-card__icon { background: linear-gradient(135deg, #E07A5F, #C45C44); }
.session-card--sleep .session-card__icon { background: linear-gradient(135deg, #81B29A, #4A8A6A); }
.session-card--breathing .session-card__icon { background: linear-gradient(135deg, #7BA7BC, #3D7A9A); }

.session-card__body {
  flex: 1;
}

.session-card__category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.session-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.session-card__desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.session-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.session-card__duration {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-weight: 500;
}

.session-card__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.lib-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--fg-muted);
}

.lib-empty-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.lib-footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* =====================================================
   SESSION PLAYER
   ===================================================== */

.player-hero {
  background: var(--bg-alt);
  padding: 3rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.player-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.player-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.player-desc {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

.player-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
  font-weight: 500;
}

.player-duration {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Breathing visualizer */
.player-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0 1.5rem;
  position: relative;
}

.breath-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--sage);
  opacity: 0.4;
  animation: breathPulse 8s ease-in-out infinite;
}

.breath-ring.delay-1 {
  width: 160px;
  height: 160px;
  opacity: 0.25;
  animation-delay: 1s;
}

.breath-ring.delay-2 {
  width: 200px;
  height: 200px;
  opacity: 0.12;
  animation-delay: 2s;
}

@keyframes breathPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.breath-label {
  position: relative;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--sage);
  z-index: 1;
  margin-top: 120px;
  letter-spacing: 0.04em;
}

/* Steps list */
.player-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.player-step {
  padding: 1.5rem;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.player-step.active {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(224, 122, 95, 0.12);
}

.player-step.done {
  opacity: 0.5;
}

.player-step__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.player-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.player-step.active .player-step__num {
  background: var(--accent);
  color: white;
}

.player-step__tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

.player-step__title {
  font-size: 1.05rem;
  font-weight: 700;
}

.player-step__dur {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.player-step__instruction {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-left: 3rem;
}

/* Step timer */
.player-step__timer {
  margin-top: 1rem;
  margin-left: 3rem;
}

.timer-bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.timer-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s linear;
}

.timer-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* Player controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.btn-start {
  padding: 0.85rem 2.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-start:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.btn-next {
  padding: 0.75rem 1.75rem;
  background: var(--fg);
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-next:hover { opacity: 0.85; }

.btn-prev {
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--fg-muted);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-prev:hover { border-color: var(--fg-muted); }

/* Session complete */
.player-done {
  text-align: center;
  padding: 3rem 2rem;
}

.done-icon {
  width: 72px;
  height: 72px;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.done-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.done-sub {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

/* =====================================================
   RESPONSIVE — sessions
   ===================================================== */

@media (max-width: 640px) {
  .lib-grid {
    grid-template-columns: 1fr;
    padding: 0 1.25rem 3rem;
  }
  .lib-hero { padding: 2.5rem 1.25rem 1.5rem; }
  .lib-filters { padding: 1rem 1.25rem 2rem; }
  .player-container { padding: 1.5rem 1.25rem 3rem; }
  .player-step__instruction { margin-left: 0; }
  .player-step__timer { margin-left: 0; }
  .player-hero { padding: 2rem 1.25rem; }
}