/*
  Student: Christa Dor
  Date: April 19, 2026
  Description: Global stylesheet for all pages — Calming UI (cream, mint, peach, navy via CSS variables), typography, layout (Flexbox/Grid), home hero decorative blobs and badge pills, mood-check interactive cards, components, and responsive breakpoints for mobile, tablet, and desktop.
*/

:root {
  /* Calming UI — mockup palette (mint, peach, cream, navy) */
  --sage: #5e8b7e;
  --sand: #fad7bd;
  --sky: #e8f5ee;
  --mint-soft: #d1e8e2;
  --off-white: #f9f7f2;
  --text: #1a2b3c;
  --text-muted: #4a6767;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(26, 43, 60, 0.08);
  --shadow-hover: 0 16px 40px rgba(26, 43, 60, 0.14);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

a {
  color: var(--sage);
  text-decoration-thickness: 1px;
}

a:hover {
  color: #4a7a6c;
}

/* Page backgrounds */
.page-home {
  overflow-x: hidden;
  background: linear-gradient(
    165deg,
    var(--off-white) 0%,
    var(--sky) 48%,
    var(--sand) 125%
  );
}

.page-tools {
  background: linear-gradient(
    180deg,
    #fdf9f5 0%,
    var(--off-white) 55%,
    var(--mint-soft) 100%
  );
}

.page-breathing {
  background: radial-gradient(
    ellipse 120% 85% at 50% 0%,
    var(--mint-soft) 0%,
    var(--off-white) 58%
  );
}

.page-journal {
  background: linear-gradient(
    135deg,
    var(--sky) 0%,
    var(--off-white) 42%,
    #fce9d8 100%
  );
}

.page-about {
  background: linear-gradient(
    160deg,
    var(--off-white) 0%,
    var(--sky) 45%,
    var(--sand) 130%
  );
}

.page-mood {
  background: linear-gradient(
    145deg,
    var(--off-white) 0%,
    var(--mint-soft) 40%,
    var(--sand) 115%
  );
}

.mood-check-intro {
  margin-bottom: 1.75rem;
}

.mood-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.mood-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(94, 139, 126, 0.18);
  padding: 1.25rem;
  overflow: hidden;
}

.mood-card-heading {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.mood-card-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  border-radius: calc(var(--radius) - 4px);
}

.mood-card-toggle:focus-visible {
  outline: 3px solid var(--mint-soft);
  outline-offset: 3px;
}

.mood-card-visual {
  display: block;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
}

.mood-card-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 400 / 260;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
}

.mood-card-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage);
  letter-spacing: 0.02em;
}

.mood-card.is-selected .mood-card-visual,
.mood-card.is-selected .mood-card-hint {
  display: none;
}

.mood-card.is-selected .mood-card-toggle::after {
  content: "Tap to close";
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage);
}

.mood-card-detail {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(94, 139, 126, 0.15);
}

.mood-card-detail[hidden] {
  display: none;
}

.mood-card:not(.is-selected) .mood-card-detail {
  display: none;
}

.mood-card.is-selected .mood-card-detail {
  display: block;
}

.mood-card-detail p {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 0.98rem;
}

.mood-card-detail p:last-of-type {
  margin-bottom: 0;
}

.mood-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem !important;
  padding-top: 0.25rem;
}

.mood-card-actions .btn {
  font-size: 0.9rem;
  padding: 0.65rem 1.15rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sage);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.back-link-block {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Header & nav */
.site-header {
  background: rgba(249, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(94, 139, 126, 0.22);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sage);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-primary a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-primary a:hover,
.nav-primary a:focus-visible {
  background: rgba(232, 245, 238, 0.85);
  border-color: rgba(94, 139, 126, 0.35);
}

.nav-primary a[aria-current="page"] {
  background: var(--sage);
  color: var(--white);
}

/* Main */
main {
  flex: 1;
  width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.section-lead {
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 0 2rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1rem 0 3rem;
}

/* Home hero: decorative blobs + mint panel (mockup) */
.hero--deco {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.hero--deco::before,
.hero--deco::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero--deco::before {
  width: min(420px, 90vw);
  height: min(420px, 90vw);
  background: rgba(250, 215, 189, 0.5);
  top: -4rem;
  right: -5rem;
}

.hero--deco::after {
  width: min(340px, 75vw);
  height: min(340px, 75vw);
  background: rgba(209, 232, 226, 0.65);
  bottom: 10%;
  left: -6rem;
}

.hero--deco > * {
  position: relative;
  z-index: 1;
}

.hero-badges {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid rgba(94, 139, 126, 0.35);
  color: var(--sage);
  box-shadow: 0 2px 8px rgba(26, 43, 60, 0.06);
}

.hero-copy--panel {
  padding: 1.75rem 1.5rem;
  background: var(--sky);
  border-radius: var(--radius);
  border: 1px solid rgba(94, 139, 126, 0.22);
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero-copy p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 36rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--mint-soft);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--sage);
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border-color: rgba(94, 139, 126, 0.4);
}

.btn-secondary:hover {
  background: rgba(232, 245, 238, 0.65);
}

.hero-visual {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(94, 139, 126, 0.12);
  background: var(--sand);
  padding: 0.65rem;
}

.hero-visual img,
.hero-visual video {
  display: block;
  border-radius: calc(var(--radius) + 2px);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Card grid */
.features {
  margin-top: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(94, 139, 126, 0.15);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}

/* Footer */
.site-footer {
  background: rgba(26, 43, 60, 0.06);
  border-top: 1px solid rgba(94, 139, 126, 0.2);
  margin-top: auto;
}

.footer-tip {
  background: linear-gradient(
    90deg,
    rgba(232, 245, 238, 0.75),
    rgba(250, 215, 189, 0.5)
  );
  padding: 0.85rem 1.25rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-block h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.footer-sitemap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-sitemap a {
  text-decoration: none;
  font-weight: 500;
}

.footer-contact a {
  font-weight: 600;
}

.footer-credit {
  margin: 0;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 0 1.25rem 1.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(26, 43, 60, 0.75);
  letter-spacing: 0.02em;
}

/* Tools page */
.tools-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.benefit-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(94, 139, 126, 0.15);
}

.benefit-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 520px;
}

.benefit-table th,
.benefit-table td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid rgba(94, 139, 126, 0.2);
}

.benefit-table th {
  background: rgba(94, 139, 126, 0.18);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.benefit-table tbody tr:hover {
  background: rgba(232, 245, 238, 0.2);
}

.benefit-table a {
  font-weight: 600;
}

.sidebar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(94, 139, 126, 0.15);
}

.sidebar h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.link-list a {
  font-weight: 500;
  text-decoration: none;
}

/* Breathing */
.breathing-panel {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.breathing-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin: 2rem 0;
}

.breath-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8f3, var(--sand));
  box-shadow: 0 12px 40px rgba(250, 215, 189, 0.7);
  animation: breathe 8s ease-in-out infinite;
  animation-play-state: paused;
}

.breath-circle.is-running {
  animation-play-state: running;
}

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

  50% {
    transform: scale(1.28);
  }
}

.breath-hint {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.breathing-instructions {
  text-align: left;
  max-width: 420px;
  margin: 2rem auto 0;
  background: var(--white);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.breathing-instructions ol {
  margin: 0;
  padding-left: 1.25rem;
}

.breathing-instructions li {
  margin-bottom: 0.5rem;
}

.breathing-instructions li:last-child {
  margin-bottom: 0;
}

.breathing-instructions--lead {
  margin: 0.5rem auto 1.5rem;
  max-width: 100%;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid rgba(94, 139, 126, 0.18);
  box-shadow: 0 4px 20px rgba(26, 43, 60, 0.06);
}

.breathing-instructions--lead h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(94, 139, 126, 0.12);
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  font-weight: 700;
  color: var(--sage);
  letter-spacing: -0.02em;
}

.breathing-instructions--lead ol {
  margin: 0;
  padding-left: 1.15rem;
}

.breathing-instructions--lead li {
  margin-bottom: 0.65rem;
  line-height: 1.55;
  color: var(--text);
}

.breathing-instructions--lead li:last-child {
  margin-bottom: 0;
}

.breathing-panel > .section-title {
  margin-bottom: 0.35rem;
}

.breathing-session-summary {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.audio-block {
  margin-top: 0;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.audio-block audio {
  width: 100%;
  max-width: 400px;
  margin: 0.75rem auto 0;
  display: block;
}

.sound-choice {
  margin: 0;
  padding: 0;
  border: none;
  text-align: left;
}

.sound-choice legend {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  padding: 0;
}

.sound-choice-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sound-choice label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}

.sound-choice input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.breath-audio {
  margin: 0;
}

/* Journal */
.journal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.journal-form-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(94, 139, 126, 0.15);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(94, 139, 126, 0.4);
  font-family: inherit;
  font-size: 1rem;
  background: var(--off-white);
}

.form-group textarea {
  min-height: 180px;
  resize: vertical;
}

.form-actions {
  margin-top: 1.5rem;
}

.journal-celebration {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(94, 139, 126, 0.22);
  max-width: 36rem;
}

.journal-celebration[hidden] {
  display: none !important;
}

.journal-celebration-title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--sage);
  letter-spacing: -0.02em;
}

.journal-celebration p {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: var(--text);
}

.journal-celebration p:last-of-type {
  margin-bottom: 0;
}

.journal-celebration-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.journal-form-shell[hidden] {
  display: none !important;
}

/* About */
.about-hero-img {
  max-width: 100%;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-hover);
}

.about-content {
  max-width: 640px;
}

.about-content h2.section-title {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  margin-top: 2.25rem;
}

.about-content ul {
  padding-left: 1.25rem;
}

.about-content li {
  margin-bottom: 0.35rem;
}

.prominent-home {
  margin: 2rem 0 1rem;
}

/* Tablet */
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mood-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2rem 0 4rem;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .tools-layout {
    grid-template-columns: 1fr 280px;
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .journal-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}
