html {
  scroll-behavior: smooth; /* makes anchor link jumps smooth */
}

:root {
  --cream: #fdf8f2;          /* main page background */
  --warm-tan: #f2ead8;       /* nav + footer background */
  --soft-brown: #c4a882;     /* borders and accents */
  --deep-brown: #7a5c3a;     /* headings, buttons */
  --sage: #8aad96;           /* green accent (checkmarks, reassure box) */
  --dusty-rose: #d4918a;     /* warning/doctor section accent */
  --muted-gold: #c9a84c;     /* reserved for future use */
  --text-dark: #3d2f1e;      /* primary body text */
  --text-mid: #6b5744;       /* secondary/description text */
  --text-light: #9c8672;     /* labels, placeholders, muted text */
}


   /* "*" selects every element. box-sizing: border-box makes
   padding and borders included in the element's total width
   instead of added on top of it. */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif; /* main font for all text */
  background-color: var(--cream);
  color: var(--text-dark);
  line-height: 1.7; /* space between lines of text */
}

/* NAVIGATION BAR
  position: sticky keeps it pinned to the top as you scroll.
  z-index: 100 makes sure it stays on top of other content. */
nav {
  background: var(--warm-tan);
  border-bottom: 1px solid var(--soft-brown);
  padding: 0 2rem;
  display: flex;                    /* lays tabs out in a row */
  align-items: center;              /* vertically centers items */
  justify-content: space-between;   /* pushes logo left, links right */
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--deep-brown);
  text-decoration: none; /* removes the underline from the link literally the best line of code ever */
}

.nav-links {
  display: flex;
  gap: 1.5rem;       /* space between each nav link */
  list-style: none;  /* removes bullet points from the <ul> 2nd best */
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s; /* smooth color change on hover */
}

.nav-links a:hover {
  color: var(--deep-brown);
}

/* HERO SECTION
  The large intro banner at the top of the page. */
.hero {
  background: linear-gradient(135deg, #fdf3e7 0%, #f5e6d0 60%, #ede0cc 100%);
  padding: 5rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid var(--warm-tan);
}

.hero-cloud {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block; /* makes the emoji sit on its own line */
}

.hero h1 {
  font-family: 'Lora', serif;
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--deep-brown);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--dusty-rose); /* makes the italic word a different color */
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-mid);
  max-width: 520px;      /* prevents text from stretching too wide */
  margin: 0 auto 2rem;   /* auto left/right centers the paragraph */
  font-weight: 300;
}

.hero-btn {
  display: inline-block;
  background: var(--deep-brown);
  color: var(--cream);
  padding: 0.75rem 2rem;
  border-radius: 999px; /* very large value = pill/capsule shape */
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.hero-btn:hover {
  background: var(--text-dark);
}

/* SECTION WRAPPER
  Each content section (what is fog, tips, etc.) uses this.
  max-width + margin: auto centers the content block on wide
  screens while still padding on small screens. */
section {
  padding: 4rem 2rem;
  max-width: 860px;
  margin: 0 auto; /* centers the section horizontally */
}

/* The + selector targets a section that immediately follows
   another section — adds a divider line between them */
section + section {
  border-top: 1px solid var(--warm-tan);
}

/* Small pill label above each section heading */
.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em; /* spreads out the letters slightly */
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--warm-tan);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 0.75rem;
}

h2 {
  font-family: 'Lora', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--deep-brown);
  margin-bottom: 1rem;
}

/* Subtitle paragraph that appears below section headings */
.section-intro {
  font-size: 1rem;
  color: var(--text-mid);
  margin-bottom: 2rem;
  max-width: 640px;
}

/* WHAT IS BRAIN FOG — Cards Grid
  repeat(auto-fit, minmax(200px, 1fr)) creates a responsive
  grid: as many columns as fit, each at least 200px wide. */
.fog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.fog-card {
  background: white;
  border: 1px solid #ede2d0;
  border-radius: 16px;
  padding: 1.25rem;
}

.fog-card .icon {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  display: block;
}

.fog-card h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.fog-card p {
  font-size: 0.85rem;
  color: var(--text-mid);
}

/* TIPS SECTION — Numbered List
  Each tip is a flex row: number circle on the left,
  text content on the right. */
.tips-list {
  display: flex;
  flex-direction: column; /* stacks items vertically */
  gap: 1rem;
}

.tip-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start; /* aligns items to the top of the row */
  background: white;
  border: 1px solid #ede2d0;
  border-radius: 14px;
  padding: 1rem 1.25rem;
}

/* The circular number badge on each tip */
.tip-num {
  flex-shrink: 0; /* prevents the circle from squishing */
  width: 30px;
  height: 30px;
  border-radius: 50%; /* makes it a circle */
  background: var(--warm-tan);
  color: var(--deep-brown);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tip-item h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.tip-item p {
  font-size: 0.85rem;
  color: var(--text-mid);
}

/* DAILY TRACKER
  The interactive check-in card with slider + checkboxes. */
.tracker-area {
  background: white;
  border: 1px solid #ede2d0;
  border-radius: 16px;
  padding: 1.5rem;
}

.tracker-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Group label above each checklist category (Basics, Mind, Body) */
.check-group {
  margin-bottom: 1.25rem;
}

.check-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.5rem;
}

/* Each individual checklist row */
.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5efe5;
  cursor: pointer;       /* shows a hand cursor on hover */
  user-select: none;     /* prevents text from being highlighted on click */
}

.check-item:last-child {
  border-bottom: none; /* removes divider from the last item in group */
}

/* The square checkbox visual */
.check-box {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--soft-brown);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: transparent;
}

/* When the checkbox is checked (class toggled by JS) */
.check-box.done {
  background: var(--sage);
  border-color: var(--sage);
}

/* The checkmark inside the checkbox — created with CSS, no image needed thankfully */
.check-box.done::after {
  content: '✓';
  font-size: 12px;
  color: white;
}

.check-text {
  font-size: 0.9rem;
  color: var(--text-mid);
  transition: color 0.15s;
}

/* Styling for checked item text: grayed out and struck through */
.check-item.done .check-text {
  color: var(--text-light);
  text-decoration: line-through;
}

/* Fog level slider row layout */
.fog-level-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.fog-level-row label {
  font-size: 0.9rem;
  color: var(--text-mid);
  white-space: nowrap; /* keeps the label on one line */
}

.fog-level-row input[type="range"] {
  flex: 1; /* stretches to fill available space */
  accent-color: var(--soft-brown); /* colors the slider thumb/track */
}

.fog-level-row span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--deep-brown);
  min-width: 16px; /* prevents layout shift when number changes */
}

/* Labels shown under the slider ("Clear" and "Very foggy") */
.fog-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

/* Journal text area */
textarea {
  width: 100%;
  border: 1px solid #ede2d0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: var(--cream);
  resize: vertical;   /* lets the user resize it taller, but not wider */
  min-height: 80px;
  outline: none;      /* removes default browser focus ring (the highlight box) */
  transition: border-color 0.2s;
}

textarea:focus {
  border-color: var(--soft-brown); /* highlights the border when typing */
}

textarea::placeholder {
  color: var(--text-light);
}

/* Save button */
.save-btn {
  margin-top: 1rem;
  background: var(--deep-brown);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.save-btn:hover {
  background: var(--text-dark);
}

/* "Saved ✓" confirmation message — hidden by default, shown by JS */
#save-msg {
  font-size: 0.82rem;
  color: var(--sage);
  margin-left: 0.75rem;
  opacity: 0;            /* invisible by default */
  transition: opacity 0.3s; /* fades in/out smoothly */
}

/* RESOURCES SECTION — Link Cards Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.resource-card {
  background: white;
  border: 1px solid #ede2d0;
  border-radius: 14px;
  padding: 1.25rem;
  text-decoration: none; /* removes underline from the <a> link */
  display: block;
  transition: border-color 0.2s, transform 0.15s;
}

/* Subtle lift effect when you hover a resource card */
.resource-card:hover {
  border-color: var(--soft-brown);
  transform: translateY(-2px);
}

/* Colored pill label on each card (Article / Community / Tool) */
.resource-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.tag-article   { background: #e9f0e4; color: #4a7a5a; }
.tag-community { background: #f0e4eb; color: #9a4a6a; }
.tag-tool      { background: #e4ebf0; color: #3a6a9a; }

.resource-card h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.resource-card p {
  font-size: 0.82rem;
  color: var(--text-mid);
}

/* WHEN TO SEE A DOCTOR
  Two boxes: warning signs (rose-tinted) + reassurance (green) */
.doctor-box {
  background: #fff5f4;
  border: 1px solid #f0c5c0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.doctor-box h3 {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  color: var(--dusty-rose);
  margin-bottom: 0.5rem;
}

/* The list of warning signs */
.signal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.signal-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-mid);
}

/* Custom bullet dot using the CSS ::before pseudo-element */
.signal-list li::before {
  content: '•';
  color: var(--dusty-rose);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.reassure-box {
  background: #f3f8f4;
  border: 1px solid #b8d8c2;
  border-radius: 16px;
  padding: 1.5rem;
}

.reassure-box h3 {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  color: var(--sage);
  margin-bottom: 0.5rem;
}

.reassure-box p {
  font-size: 0.9rem;
  color: var(--text-mid);
}

/* FOOTER */
footer {
  background: var(--warm-tan);
  border-top: 1px solid var(--soft-brown);
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

/* RESPONSIVE — MOBILE STYLES for phone screens, unlike react native that handles it automatically.
  @media applies these rules ONLY when the screen is 600px
  wide or less (e.g., a phone). This hides the nav links
  and shrinks the heading text to fit smaller screens. */
@media (max-width: 600px) {
  .nav-links {
    display: none; /* hides the nav links on mobile */
  }

  .hero h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}
