/* ============================================================
   Mental Clarity Checklist — Premium Wellness Redesign
   Aesthetic: Calm/Notion-inspired, warm cream + sage green
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Nunito+Sans:ital,opsz,wght@0,6..12,300;0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap');

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Palette */
  --cream:       #FAF8F4;
  --cream-deep:  #F2EDE4;
  --sage:        #7A9E7E;
  --sage-light:  #A8C5AC;
  --sage-muted:  #EBF2EC;
  --slate:       #6B7F8C;
  --slate-light: #EDF1F4;
  --charcoal:    #2C3338;
  --charcoal-mid:#4A545C;
  --warm-white:  #FFFDF9;
  --border:      #E4DDD1;
  --shadow-sm:   0 2px 8px rgba(44,51,56,.07);
  --shadow-md:   0 6px 24px rgba(44,51,56,.10);
  --shadow-lg:   0 16px 48px rgba(44,51,56,.13);

  /* Typography */
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-sans:   'Nunito Sans', system-ui, sans-serif;

  /* Spacing */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Transition */
  --ease: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }
button { font-family: var(--font-sans); cursor: pointer; }
a { color: var(--sage); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--charcoal); }

/* ─── Base ───────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  background: var(--cream);
  color: var(--charcoal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography Scale ───────────────────────────────────── */
h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  color: var(--warm-white);
  font-weight: 400;
}
h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25;
  color: var(--charcoal);
  font-weight: 400;
  margin-bottom: 1rem;
}
h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--charcoal);
  font-weight: 400;
  margin-bottom: .6rem;
}
h4 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: .4rem;
}
p { color: var(--charcoal-mid); line-height: 1.75; }
strong { color: var(--charcoal); font-weight: 700; }

/* ─── Site Header / Nav ──────────────────────────────────── */
.site-header {
  background: linear-gradient(145deg, #3D5A42 0%, #5A7D60 50%, #6B8F6F 100%);
  padding: 64px 24px 80px;
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero-content p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 12px auto 0;
}
.toggle-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease);
  z-index: 2;
}
.toggle-btn:hover { background: rgba(255,255,255,0.25); }

/* ─── Nav ────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 2px;
  background: rgba(0,0,0,0.18);
  padding: 10px 24px;
  position: relative;
  z-index: 1;
}
.site-nav a {
  color: rgba(255,255,255,0.82);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 6px;
  transition: all var(--ease);
}
.site-nav a:hover {
  color: white;
  background: rgba(255,255,255,0.12);
}

/* ─── Main Tool Cards Container ─────────────────────────── */
.main-container {
  max-width: 860px;
  margin: -40px auto 0;
  padding: 0 20px 40px;
  position: relative;
  z-index: 10;
}

/* ─── Floating Tool Cards (Glassmorphism) ────────────────── */
.tool-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r-xl);
  padding: 28px 32px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md), 0 1px 0 rgba(255,255,255,0.8) inset;
  transition: box-shadow var(--ease), transform var(--ease);
}
.tool-card:hover {
  box-shadow: var(--shadow-lg), 0 1px 0 rgba(255,255,255,0.8) inset;
  transform: translateY(-2px);
}
.tool-card h2 {
  font-size: 1.15rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-card h2 .card-icon {
  font-size: 1.2rem;
}

/* ─── Quote ─────────────────────────────────────────────── */
.quote-section {
  text-align: center;
  padding: 8px 0 4px;
}
.quote-section blockquote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--slate);
  line-height: 1.5;
  position: relative;
}

/* ─── Stats / Progress ───────────────────────────────────── */
.stats-section {
  margin-bottom: 6px;
}
.stats-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 8px;
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--cream-deep);
  border-radius: 100px;
  overflow: hidden;
}
#progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sage-light), var(--sage));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Checklist ──────────────────────────────────────────── */
.checklist-section { }
.add-task {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
#newTask {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
}
#newTask:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122,158,126,0.15);
}
#newTask::placeholder { color: var(--slate); opacity: 0.6; }
#addTaskBtn {
  padding: 11px 20px;
  background: var(--sage);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
#addTaskBtn:hover {
  background: #6a8e6e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122,158,126,0.35);
}
#addTaskBtn:active { transform: translateY(0); }

.checklist { list-style: none; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  transition: all var(--ease);
}
.checklist li:hover {
  border-color: var(--sage-light);
  background: var(--sage-muted);
}
.checklist li input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sage);
  flex-shrink: 0;
  cursor: pointer;
}
.checklist li label {
  flex: 1;
  font-size: 0.9rem;
  color: var(--charcoal-mid);
  cursor: pointer;
  transition: color var(--ease);
}
.checklist li input:checked + label {
  text-decoration: line-through;
  color: var(--slate);
  opacity: 0.6;
}
.delete-btn {
  background: none;
  border: none;
  color: var(--slate);
  opacity: 0.4;
  font-size: 0.85rem;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--ease);
}
.delete-btn:hover { opacity: 1; color: #c0392b; }

.checklist-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.checklist-buttons button {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--border);
  background: var(--warm-white);
  color: var(--charcoal-mid);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--ease);
}
.checklist-buttons button:hover {
  border-color: var(--sage);
  color: var(--sage);
  background: var(--sage-muted);
}

/* ─── Timer ──────────────────────────────────────────────── */
.timer-section { text-align: center; }
#timerDisplay {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 8px 0 20px;
}
.timer-buttons { display: flex; justify-content: center; gap: 10px; }
.timer-buttons button {
  padding: 10px 24px;
  border: 1.5px solid var(--border);
  background: var(--warm-white);
  color: var(--charcoal-mid);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--ease);
}
.timer-buttons button:hover {
  background: var(--sage);
  border-color: var(--sage);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122,158,126,0.3);
}

/* ─── Journal ────────────────────────────────────────────── */
.journal-section { }
.journal-section textarea {
  width: 100%;
  min-height: 130px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.journal-section textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122,158,126,0.15);
}
.journal-section textarea::placeholder { color: var(--slate); opacity: 0.55; }

/* ─── Editorial Content Section ─────────────────────────── */
.editorial-section {
  max-width: 860px;
  margin: 40px auto;
  padding: 0 20px;
}
.editorial-section .section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage);
  margin-bottom: 8px;
}
.editorial-section h2 {
  margin-bottom: 12px;
}
.editorial-section p {
  margin-bottom: 1.1rem;
  font-size: 1rem;
}
.editorial-section ul, .editorial-section ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}
.editorial-section li {
  color: var(--charcoal-mid);
  margin-bottom: 0.45rem;
  line-height: 1.7;
}
.editorial-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.editorial-blockquote {
  border-left: 3px solid var(--sage);
  margin: 28px 0;
  padding: 16px 24px;
  background: var(--sage-muted);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.editorial-blockquote p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.55;
}
.editorial-blockquote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
  margin-top: 8px;
  font-style: normal;
}

/* three-col feature grid */
.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 24px 0;
}
.feature-item {
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 22px;
  transition: box-shadow var(--ease), transform var(--ease);
}
.feature-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-item .fi-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--charcoal);
}
.feature-item p { font-size: 0.88rem; }

/* ─── Content Sections (About, FAQ, etc inline) ──────────── */
.content-section {
  max-width: 860px;
  margin: 32px auto;
  padding: 32px 36px;
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.content-section h2 { color: var(--charcoal); }
.content-section p { margin-bottom: 0.7rem; }

/* ─── About / author block on dedicated about page ─────── */
.about-hero {
  background: linear-gradient(145deg, #3D5A42, #5A7D60);
  padding: 64px 24px 48px;
  text-align: center;
  color: white;
}
.about-hero h1 { color: white; margin-bottom: 12px; }
.about-hero p { color: rgba(255,255,255,0.78); max-width: 540px; margin: 0 auto; }

.author-profile {
  max-width: 760px;
  margin: -40px auto 40px;
  padding: 0 20px;
}
.author-card {
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-md);
}
.author-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--sage-light), var(--sage));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 16px;
}
.author-name {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.author-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sage);
  margin-bottom: 16px;
}
.author-bio p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* ─── Blog / Article pages ───────────────────────────────── */
.article-hero {
  background: linear-gradient(145deg, #3D5A42, #5A7D60);
  padding: 64px 24px 48px;
  text-align: center;
}
.article-hero h1 { color: white; }
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.article-meta span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}
.article-author-chip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.article-body {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 20px;
}
.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}
.article-body h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
}
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.article-body li { margin-bottom: 0.4rem; color: var(--charcoal-mid); line-height: 1.7; }
.article-body blockquote {
  border-left: 3px solid var(--sage);
  padding: 14px 22px;
  background: var(--sage-muted);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 24px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--charcoal);
  line-height: 1.5;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* FAQ accordion style */
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  background: var(--warm-white);
  overflow: hidden;
  transition: box-shadow var(--ease);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--sage);
  transition: transform var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 20px 16px;
  font-size: 0.93rem;
  color: var(--charcoal-mid);
}

/* ─── Page-level wrapper for standalone pages ─────────────── */
.page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--charcoal);
  margin-bottom: 0.75rem;
  font-weight: 400;
}
.page-subtitle {
  color: var(--charcoal-mid);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 580px;
}

/* Generic card used across pages */
.card {
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ─── Pill/Badge ─────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  background: var(--sage-muted);
  border: 1px solid var(--sage-light);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}

/* ─── Inline list style ──────────────────────────────────── */
.styled-list { list-style: none; padding: 0; }
.styled-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--charcoal-mid);
  font-size: 0.93rem;
  display: flex;
  gap: 10px;
}
.styled-list li:last-child { border-bottom: none; }
.styled-list li::before {
  content: '→';
  color: var(--sage);
  flex-shrink: 0;
  font-weight: 600;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.65);
  padding: 40px 24px;
  margin-top: 60px;
}
.site-footer .footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer .footer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: white;
  margin-bottom: 6px;
}
.site-footer p { color: rgba(255,255,255,0.5); font-size: 0.85rem; }
.site-footer a {
  color: var(--sage-light);
  font-size: 0.85rem;
}
.site-footer a:hover { color: white; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.footer-popular {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.82rem;
}

/* ─── Dark mode (manual toggle) ──────────────────────────── */
body.dark-mode {
  --cream:       #1A1F24;
  --cream-deep:  #141820;
  --warm-white:  #212730;
  --border:      #2E3740;
  --charcoal:    #F0EDE8;
  --charcoal-mid:#C5BFB5;
  --slate:       #8A9BA8;
  --slate-light: #2A3440;
  --sage-muted:  #1E2A22;
  background: var(--cream);
  color: var(--charcoal);
}
body.dark-mode .tool-card {
  background: rgba(33,39,48,0.95);
  border-color: rgba(255,255,255,0.07);
}
body.dark-mode .site-footer { background: #0E1318; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header { padding: 48px 16px 60px; }
  .tool-card { padding: 22px 18px; }
  .timer-buttons button { padding: 10px 16px; }
  .content-section { padding: 22px 18px; }
  .author-card { padding: 26px 22px; }
  .article-body { padding: 0 16px; }
}

/* ─── Utility ────────────────────────────────────────────── */
.text-sage { color: var(--sage); }
.text-muted { color: var(--charcoal-mid); }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.mb-sm { margin-bottom: 12px; }
.mb-md { margin-bottom: 24px; }

/* keep old class names working for script.js */
.checklist-section, .timer-section, .journal-section, .quote-section, .stats-section {}
