/* ============================================
   Better Shape — Style System
   Strength, mobility, and habits that stick
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --slate: #1E293B;
  --lime: #A3E635;
  --lime-dark: #84CC16;
  --gray: #94A3B8;
  --gray-light: #CBD5E1;
  --off-white: #F8FAFC;
  --charcoal: #0F172A;
  --white: #FFFFFF;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1200px;
  --content-width: 760px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--charcoal);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--slate);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.2rem; }

a {
  color: var(--slate);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--lime-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin-bottom: 1.2rem; padding-left: 1.5rem; }

li { margin-bottom: 0.5rem; }

strong { font-weight: 600; color: var(--charcoal); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

section { padding: var(--space-lg) 0; }

.section-tight { padding: var(--space-md) 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--slate);
  letter-spacing: -0.02em;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.nav-brand span { color: var(--slate); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--slate);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-menu a:hover {
  color: var(--lime-dark);
  background: rgba(163, 230, 53, 0.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--lime);
  color: var(--charcoal);
}

.btn-primary:hover {
  background: var(--lime-dark);
  color: var(--charcoal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--slate);
  border: 2px solid var(--slate);
}

.btn-secondary:hover {
  background: var(--slate);
  color: var(--off-white);
}

.btn-ghost {
  background: transparent;
  color: var(--slate);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover { color: var(--lime-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--off-white);
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 50%, rgba(15, 23, 42, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: var(--space-xl) 0;
}

.hero h1 {
  color: var(--off-white);
  margin-bottom: 1.2rem;
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--gray-light);
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(163, 230, 53, 0.15);
  border: 1px solid rgba(163, 230, 53, 0.3);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--lime);
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Section Headers ---------- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-md);
}

.section-header .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--lime-dark);
  margin-bottom: 0.75rem;
}

.section-header h2 { margin-bottom: 0.6rem; }

.section-header p {
  color: var(--gray);
  max-width: 580px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section-header.left {
  text-align: left;
}

.section-header.left p { margin: 0; }

/* ---------- Featured Guide ---------- */
.featured-guide {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.featured-guide-img {
  position: relative;
  min-height: 360px;
  overflow: hidden;
}

.featured-guide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-guide-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-guide .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime-dark);
  margin-bottom: 0.75rem;
}

.featured-guide h3 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.featured-guide p {
  color: var(--gray);
  margin-bottom: 1.2rem;
}

/* ---------- Category Cards ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.category-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--slate);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(163, 230, 53, 0.3);
  color: var(--slate);
}

.category-card .cat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(163, 230, 53, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.category-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: var(--gray);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.category-card .cat-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--lime-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---------- Habit Tracker Widget ---------- */
.habit-tracker {
  background: var(--charcoal);
  color: var(--off-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow: hidden;
  position: relative;
}

.habit-tracker::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.habit-tracker .eyebrow {
  color: var(--lime);
}

.habit-tracker h2 { color: var(--off-white); }

.habit-tracker p { color: var(--gray-light); }

.habit-tracker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: center;
  position: relative;
  z-index: 1;
}

.habit-widget {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.habit-widget h4 {
  color: var(--off-white);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.habit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.habit-row:last-child { border-bottom: none; }

.habit-row .habit-name {
  font-size: 0.92rem;
  color: var(--gray-light);
}

.habit-dots {
  display: flex;
  gap: 4px;
}

.habit-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition);
}

.habit-dot.filled {
  background: var(--lime);
  border-color: var(--lime);
}

.habit-dot:hover {
  border-color: var(--lime);
}

.streak-counter {
  text-align: center;
  padding: var(--space-sm);
}

.streak-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--lime);
  line-height: 1;
}

.streak-label {
  font-size: 0.85rem;
  color: var(--gray-light);
  margin-top: 0.3rem;
}

/* ---------- Article Cards ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--slate);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--slate);
}

.article-card-img {
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card-img img {
  transform: scale(1.05);
}

.article-card-body {
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-card .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime-dark);
  margin-bottom: 0.5rem;
}

.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.article-card p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  flex-grow: 1;
}

.article-card .meta {
  font-size: 0.82rem;
  color: var(--gray);
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

/* ---------- Article Page ---------- */
.article-hero {
  background: var(--charcoal);
  color: var(--off-white);
  padding: var(--space-lg) 0 var(--space-md);
}

.article-hero .container { max-width: var(--content-width); }

.article-hero .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime);
  margin-bottom: 0.8rem;
}

.article-hero h1 {
  color: var(--off-white);
  margin-bottom: 0.8rem;
}

.article-hero .meta {
  display: flex;
  gap: 1.2rem;
  color: var(--gray-light);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.article-hero-img {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}

.article-hero-img img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.article-body {
  padding: var(--space-md) 0 var(--space-lg);
}

.article-body .content-narrow {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.article-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}

.article-body p { margin-bottom: 1.3rem; }

.article-body ul, .article-body ol {
  margin-bottom: 1.3rem;
  padding-left: 1.6rem;
}

.article-body li { margin-bottom: 0.6rem; }

.article-body blockquote {
  border-left: 4px solid var(--lime);
  padding: 0.8rem 1.5rem;
  margin: 1.8rem 0;
  background: rgba(163, 230, 53, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--slate);
}

.article-body .callout {
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: 2rem 0;
  border-left: 4px solid var(--lime);
}

.article-body .callout h4 {
  color: var(--slate);
  margin-bottom: 0.5rem;
}

.article-body .callout p:last-child { margin-bottom: 0; }

.article-body .key-takeaways {
  background: var(--charcoal);
  color: var(--off-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: 2rem 0;
}

.article-body .key-takeaways h3 {
  color: var(--lime);
  margin-top: 0;
  margin-bottom: 1rem;
}

.article-body .key-takeaways ul {
  list-style: none;
  padding-left: 0;
}

.article-body .key-takeaways li {
  padding-left: 1.8rem;
  position: relative;
  color: var(--gray-light);
}

.article-body .key-takeaways li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--lime);
  font-weight: 700;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.article-body th, .article-body td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.article-body th {
  background: var(--slate);
  color: var(--off-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
}

.article-body tbody tr:nth-child(even) {
  background: rgba(148, 163, 184, 0.05);
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.article-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--slate);
}

.article-nav .nav-label {
  display: block;
  font-size: 0.78rem;
  color: var(--gray);
  margin-bottom: 0.2rem;
}

/* ---------- Articles Index ---------- */
.page-hero {
  background: var(--charcoal);
  color: var(--off-white);
  padding: var(--space-lg) 0;
  text-align: center;
}

.page-hero h1 { color: var(--off-white); }
.page-hero p { color: var(--gray-light); max-width: 560px; margin: 0.5rem auto 0; }

.filter-bar {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--space-sm) 0;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: var(--white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--slate);
  color: var(--off-white);
  border-color: var(--slate);
}

/* ---------- Fundamentals Hub ---------- */
.fundamentals-hero {
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--slate) 100%);
  color: var(--off-white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.fundamentals-hero .eyebrow { color: var(--lime); }

.step-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  max-width: 800px;
  margin: 0 auto;
}

.step-item {
  display: flex;
  gap: var(--space-sm);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: all var(--transition);
}

.step-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.step-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.step-content p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- About Page ---------- */
.about-hero {
  background: var(--charcoal);
  color: var(--off-white);
  padding: var(--space-xl) 0;
}

.about-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-hero h1 { color: var(--off-white); }
.about-hero p { color: var(--gray-light); }

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.principle-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border-top: 4px solid var(--lime);
  box-shadow: var(--shadow-sm);
}

.principle-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.principle-card p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

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

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--off-white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.15);
}

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

.form-success {
  display: none;
  background: rgba(163, 230, 53, 0.1);
  border: 1px solid var(--lime);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
  color: var(--slate);
  font-size: 0.92rem;
}

.form-success.show { display: block; }

.contact-info {
  padding: var(--space-md);
}

.contact-info h3 { margin-bottom: 1rem; }

.contact-info p { color: var(--gray); margin-bottom: 1.5rem; }

.contact-info .info-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.contact-info .info-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(163, 230, 53, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.contact-info .info-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  margin-bottom: 0.1rem;
}

.contact-info .info-text span {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ---------- Legal / Text Pages ---------- */
.legal-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) 0;
}

.legal-content h1 { margin-bottom: 0.5rem; }

.legal-content .last-updated {
  color: var(--gray);
  font-size: 0.88rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.legal-content h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.legal-content p, .legal-content li { color: #334155; }

.legal-content ul { padding-left: 1.5rem; }

/* ---------- Sitemap ---------- */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.sitemap-section h3 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--lime);
}

.sitemap-section ul {
  list-style: none;
  padding: 0;
}

.sitemap-section li { margin-bottom: 0.5rem; }

.sitemap-section a {
  color: var(--gray);
  font-size: 0.95rem;
}

.sitemap-section a:hover { color: var(--lime-dark); }

/* ---------- 404 ---------- */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--charcoal);
  color: var(--off-white);
}

.error-page h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--lime);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.error-page h2 {
  color: var(--off-white);
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--gray-light);
  max-width: 480px;
  margin: 0 auto 2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--gray-light);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--off-white);
  margin-bottom: 0.8rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-tagline {
  color: var(--gray);
  font-size: 0.92rem;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--off-white);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: var(--gray-light);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--lime); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 0;
}

.footer-bottom .footer-legal {
  display: flex;
  gap: 1rem;
}

.footer-bottom .footer-legal a {
  color: var(--gray);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured-guide { grid-template-columns: 1fr; }
  .habit-tracker-grid { grid-template-columns: 1fr; }
  .about-hero .container { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sitemap-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-sm);
    gap: 0;
    box-shadow: var(--shadow-md);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }

  .nav-menu.open { display: flex; }

  .nav-menu a {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-toggle { display: flex; }

  .category-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; }
  .step-list { gap: 0.75rem; }

  .hero { min-height: 60vh; }
  .hero-content { padding: var(--space-lg) 0; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .article-nav { flex-direction: column; gap: 1rem; }
  .article-nav > div { text-align: left; }
}

@media (max-width: 480px) {
  .sitemap-grid { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-sm); }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in.delay-1 { animation-delay: 0.1s; }
.fade-in.delay-2 { animation-delay: 0.2s; }
.fade-in.delay-3 { animation-delay: 0.3s; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.bg-light { background: var(--off-white); }
.bg-white { background: var(--white); }

