/* ================================================================
   Comfort Zone Map -- styles.css
   Dark theme using hub.css design tokens
   ================================================================ */

/* ---- Shared section layout ---- */
.section-intro,
.section-mapping,
.section-week {
  min-height: 100vh;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ================================================================
   INTRO
   ================================================================ */
.intro-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 15vh 0 10vh;
  text-align: center;
}

.intro-badge {
  display: inline-block;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, #C27C5A);
  border: 1px solid var(--accent, #C27C5A);
  border-radius: 100px;
  padding: 0.35em 1em;
  margin-bottom: 2rem;
}

.intro-title {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary, #e6e8ec);
  margin: 0 0 0.3em;
  line-height: 1.05;
}

.intro-subtitle {
  font-family: var(--font-serif, "Libre Baskerville", Georgia, serif);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-secondary, #8b919a);
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.intro-hook {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 1rem;
  color: var(--text-muted, #565d68);
  line-height: 1.6;
  margin: 0 0 2.5rem;
}

.btn-start {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent, #C27C5A);
  border: none;
  border-radius: 8px;
  padding: 1em 2.5em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(194, 124, 90, 0.3);
  background: var(--accent-hover, #d4906e);
}

.btn-start:active {
  transform: translateY(0);
}

.intro-disclaimer {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.85rem;
  color: var(--text-muted, #565d68);
  margin-top: 1.5rem;
}

/* ================================================================
   MAPPING (Phase 1)
   ================================================================ */
.mapping-chrome {
  position: sticky;
  top: 50px;
  z-index: 10;
  background: var(--bg-deep, #07090d);
  padding: 1rem 0 0.5rem;
}

.progress-bar {
  width: 100%;
  max-width: 600px;
  height: 3px;
  background: var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 3px;
  margin: 0 auto;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent, #C27C5A);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.question-counter {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.8rem;
  color: var(--text-muted, #565d68);
  text-align: center;
  margin-top: 0.5rem;
}

.mapping-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 0 2rem;
}

.mapping-nav {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.btn-nav {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.85rem;
  color: var(--text-muted, #565d68);
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 6px;
  padding: 0.5em 1em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-nav:hover:not(:disabled) {
  color: var(--text-secondary, #8b919a);
  border-color: var(--border-hover, rgba(255, 255, 255, 0.12));
}

.btn-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

/* -- Activity Card -- */
.activity-card {
  opacity: 1;
}

.activity-card.fadeIn {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activity-label {
  display: inline-block;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #565d68);
  margin-bottom: 0.5rem;
}

.activity-text {
  font-family: var(--font-serif, "Libre Baskerville", Georgia, serif);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: var(--text-primary, #e6e8ec);
  line-height: 1.55;
  margin: 0 0 2.5rem;
}

/* -- Rating Options -- */
.rating-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rating-btn {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary, #8b919a);
  background: var(--bg-card, #131820);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 10px;
  padding: 1.1em 1.3em;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rating-btn:hover {
  color: var(--text-primary, #e6e8ec);
  background: var(--bg-card-hover, #1a2230);
  border-color: var(--border-hover, rgba(255, 255, 255, 0.12));
  transform: translateY(-1px);
}

.rating-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  transition: all 0.2s ease;
}

/* Comfortable -- green */
.rating-btn[data-rating="comfortable"] .rating-dot {
  border-color: #4ade80;
}

.rating-btn[data-rating="comfortable"].selected {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.4);
}

.rating-btn[data-rating="comfortable"].selected .rating-dot {
  background: #4ade80;
  border-color: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

/* Slightly Uncomfortable -- amber */
.rating-btn[data-rating="slight"] .rating-dot {
  border-color: #fbbf24;
}

.rating-btn[data-rating="slight"].selected {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.4);
}

.rating-btn[data-rating="slight"].selected .rating-dot {
  background: #fbbf24;
  border-color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

/* Would Never -- red */
.rating-btn[data-rating="never"] .rating-dot {
  border-color: #f87171;
}

.rating-btn[data-rating="never"].selected {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.4);
}

.rating-btn[data-rating="never"].selected .rating-dot {
  background: #f87171;
  border-color: #f87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
}

.rating-hint {
  font-size: 0.8rem;
  color: var(--text-muted, #565d68);
  margin-top: 0.1rem;
}

/* ================================================================
   PHASE TRANSITION
   ================================================================ */
@keyframes phaseIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phase-in {
  animation: phaseIn 0.6s ease;
}

/* ================================================================
   YOUR WEEK (Phase 2)
   ================================================================ */
.week-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 6rem 0 4rem;
}

.week-header {
  text-align: center;
  margin-bottom: 3rem;
}

.week-header h2 {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary, #e6e8ec);
  margin: 0 0 0.5rem;
}

.week-header p {
  font-family: var(--font-serif, "Libre Baskerville", Georgia, serif);
  font-size: 1rem;
  color: var(--text-secondary, #8b919a);
  line-height: 1.6;
}

/* -- Progress Overview -- */
.week-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.week-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card, #131820);
  border: 2px solid var(--border, rgba(255, 255, 255, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted, #565d68);
  cursor: pointer;
  transition: all 0.25s ease;
}

.week-dot:hover {
  border-color: var(--border-hover, rgba(255, 255, 255, 0.12));
  color: var(--text-secondary, #8b919a);
}

.week-dot.active {
  border-color: var(--accent, #C27C5A);
  color: var(--accent, #C27C5A);
  box-shadow: 0 0 12px rgba(194, 124, 90, 0.2);
}

.week-dot.completed {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

/* -- Day Cards -- */
.day-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.day-card {
  background: var(--bg-card, #131820);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.25s ease;
}

.day-card.expanded {
  border-color: var(--accent, #C27C5A);
  box-shadow: 0 0 20px rgba(194, 124, 90, 0.08);
}

.day-card.day-completed {
  border-color: rgba(74, 222, 128, 0.3);
}

.day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 1rem;
}

.day-label {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #C27C5A);
}

.day-card.day-completed .day-label {
  color: #4ade80;
}

.day-challenge-preview {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.95rem;
  color: var(--text-primary, #e6e8ec);
  flex: 1;
  line-height: 1.4;
}

.day-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border, rgba(255, 255, 255, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: all 0.2s ease;
}

.day-card.day-completed .day-check {
  background: rgba(74, 222, 128, 0.15);
  border-color: #4ade80;
  color: #4ade80;
}

/* -- Day Card Body (expanded) -- */
.day-card-body {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.06));
}

.day-card.expanded .day-card-body {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.day-challenge-full {
  font-family: var(--font-serif, "Libre Baskerville", Georgia, serif);
  font-size: 1.05rem;
  color: var(--text-primary, #e6e8ec);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.day-journal-label {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #565d68);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.day-journal {
  width: 100%;
  min-height: 100px;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.9rem;
  color: var(--text-primary, #e6e8ec);
  background: var(--bg-deep, #07090d);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 8px;
  padding: 0.75rem 1rem;
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.2s ease;
}

.day-journal:focus {
  outline: none;
  border-color: var(--accent, #C27C5A);
  box-shadow: 0 0 0 2px rgba(194, 124, 90, 0.1);
}

.day-journal::placeholder {
  color: var(--text-muted, #565d68);
}

.day-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-complete {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent, #C27C5A);
  border: none;
  border-radius: 8px;
  padding: 0.6em 1.5em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-complete:hover {
  background: var(--accent-hover, #d4906e);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(194, 124, 90, 0.3);
}

.btn-complete:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ================================================================
   WEEKLY SUMMARY
   ================================================================ */
.week-summary {
  margin-top: 3rem;
  background: var(--bg-card, #131820);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  animation: phaseIn 0.6s ease;
}

.week-summary h3 {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary, #e6e8ec);
  margin: 0 0 0.75rem;
}

.week-summary p {
  font-family: var(--font-serif, "Libre Baskerville", Georgia, serif);
  font-size: 0.95rem;
  color: var(--text-secondary, #8b919a);
  line-height: 1.7;
  margin: 0 0 0.75rem;
}

.summary-stat {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 2.5rem;
  font-weight: 900;
  color: #4ade80;
  display: block;
  margin: 0.5rem 0;
}

/* -- Zone Map Visualization -- */
.zone-map-section {
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.zone-map-section h3 {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #565d68);
  margin: 0 0 1.5rem;
  text-align: center;
}

.zone-map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.zone-item {
  background: var(--bg-card, #131820);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.8rem;
  color: var(--text-secondary, #8b919a);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.3;
}

.zone-item .zone-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.zone-item.zone-comfortable .zone-dot {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.zone-item.zone-slight .zone-dot {
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

.zone-item.zone-never .zone-dot {
  background: #f87171;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

/* -- CTA Section -- */
.cta-section {
  text-align: center;
  padding-top: 1rem;
  margin-top: 2.5rem;
  margin-bottom: 4rem;
}

.btn-retake,
.btn-share {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75em 1.5em;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 0.4rem 0.75rem;
}

.btn-share {
  color: #fff;
  background: var(--accent, #C27C5A);
  border: none;
}

.btn-share:hover {
  background: var(--accent-hover, #d4906e);
  transform: translateY(-1px);
}

.btn-retake {
  color: var(--text-muted, #565d68);
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
}

.btn-retake:hover {
  color: var(--text-secondary, #8b919a);
  border-color: var(--border-hover, rgba(255, 255, 255, 0.12));
}

/* Cross-links */
.cross-links {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.06));
}

.cross-links h3 {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #565d68);
  margin: 0 0 1rem;
}

.cross-links a {
  display: block;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.95rem;
  color: var(--text-secondary, #8b919a);
  text-decoration: none;
  padding: 0.6em 0;
  transition: color 0.2s;
}

.cross-links a:hover {
  color: var(--accent, #C27C5A);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 600px) {
  .intro-container {
    padding: 10vh 0 8vh;
  }

  .intro-title {
    font-size: 2.5rem;
  }

  .week-container {
    padding: 4rem 0 3rem;
  }

  .week-dot {
    width: 30px;
    height: 30px;
    font-size: 0.6rem;
  }

  .day-card {
    padding: 1.25rem;
  }

  .zone-map-grid {
    grid-template-columns: 1fr;
  }

  .week-header h2 {
    font-size: 1.8rem;
  }
}
