/* ==========================================================================
   Reid's Baby Breakdown - Global Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=Instrument+Serif:ital@0;1&family=Libre+Caslon+Display&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Colors - Monochromatic */
  --bg-color: #ffffff;
  --text-color: #000000;
  --secondary-bg: #f7f7f7;
  --accent-color: #e0e0e0;
  --border-color: #e0e0e0;
  --muted-text: #666666;
  --light-text: #555555;

  /* Callout Colors */
  --callout-do: #e8f5e9;
  --callout-do-border: #4caf50;
  --callout-skip: #ffebee;
  --callout-skip-border: #f44336;
  --callout-controversial: #fff8e1;
  --callout-controversial-border: #ff9800;
  --callout-data: #e3f2fd;
  --callout-data-border: #2196f3;
  --callout-changed: #f3e5f5;
  --callout-changed-border: #9c27b0;

  /* Typography */
  --font-main: "Cormorant Garamond", serif;

  /* Spacing */
  --spacing-xs: 0.5rem;   /* 8px */
  --spacing-sm: 1rem;     /* 16px */
  --spacing-md: 2rem;     /* 32px */
  --spacing-lg: 4rem;     /* 64px */
  --spacing-xl: 6rem;     /* 96px */
  --spacing-section: 6rem;

  /* Layout */
  --container-width: 1200px;
  --content-width: 800px;
  --btn-radius: 50px;
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--text-color);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
.cormorant-garamond-regular {
  font-family: "Cormorant Garamond", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.instrument-serif-regular {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: normal;
}

.instrument-serif-regular-italic {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: italic;
}

.libre-caslon-display-regular {
  font-family: "Libre Caslon Display", serif;
  font-weight: 400;
  font-style: normal;
}

.source-serif-4-regular {
  font-family: "Source Serif 4", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 500;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
}

h4 {
  font-size: 1.25rem;
  font-weight: 500;
}

p {
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  max-width: 70ch;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--light-text);
}

small, .text-small {
  font-size: 0.9rem;
}

.text-muted {
  color: var(--muted-text);
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

blockquote {
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm) var(--spacing-md);
  border-left: 3px solid var(--text-color);
  font-style: italic;
  background: var(--accent-color);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. Layout & Container
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 4%;
}

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

.section {
  padding: var(--spacing-section) 0;
}

.section--alt {
  background-color: var(--secondary-bg);
}

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.nav {
  padding: var(--spacing-md) 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.nav__logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav__logo:hover {
  opacity: 1;
}

.nav__links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav__link {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.nav__link:hover {
  opacity: 0.6;
}

.nav__link--active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Mobile Navigation */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  margin: 6px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-color);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    gap: var(--spacing-sm);
  }

  .nav__links--open {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: var(--spacing-xl) 4%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.hero__title {
  max-width: 15ch;
  margin-bottom: var(--spacing-md);
}

.hero__subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--light-text);
  max-width: 600px;
  margin-bottom: var(--spacing-lg);
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--text-color);
  color: var(--bg-color);
  padding: 1rem 2.2rem;
  border-radius: var(--btn-radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: 0.3s ease;
  border: 1px solid var(--text-color);
  cursor: pointer;
}

.btn:hover {
  background: transparent;
  color: var(--text-color);
  opacity: 1;
}

.btn--outline {
  background: transparent;
  color: var(--text-color);
}

.btn--outline:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.btn--small {
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   8. Cards & Grid
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
}

.grid--2col {
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.card:hover {
  opacity: 1;
}

.card__image {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: var(--accent-color);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.card__title {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 var(--spacing-xs) 0;
  line-height: 1.2;
}

.card__excerpt {
  font-size: 1rem;
  color: var(--light-text);
  line-height: 1.5;
  margin: 0 0 var(--spacing-sm) 0;
}

.card__meta {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-top: auto;
}

.card__link {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Franchise Tiles */
.tile {
  padding: var(--spacing-lg);
  background: var(--secondary-bg);
  text-decoration: none;
  color: var(--text-color);
  transition: background 0.3s ease;
}

.tile:hover {
  background: var(--accent-color);
  opacity: 1;
}

.tile__title {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-sm);
}

.tile__description {
  color: var(--light-text);
  margin-bottom: var(--spacing-md);
}

/* --------------------------------------------------------------------------
   9. Section Headers
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-sm);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.section-header__title {
  margin: 0;
}

.section-header__link {
  font-size: 0.95rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   10. Article / Post Styles
   -------------------------------------------------------------------------- */
.article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--spacing-lg) 4%;
}

.article__header {
  margin-bottom: var(--spacing-lg);
}

.article__meta {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-bottom: var(--spacing-sm);
}

.article__title {
  margin-bottom: var(--spacing-md);
}

.article__lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--light-text);
}

.article__content h2 {
  margin-top: var(--spacing-lg);
}

.article__content h3 {
  margin-top: var(--spacing-md);
}

.article__content ul,
.article__content ol {
  margin: var(--spacing-md) 0;
  padding-left: var(--spacing-md);
}

.article__content li {
  margin-bottom: var(--spacing-xs);
  font-size: 1.125rem;
}

.article__content li::marker {
  color: var(--muted-text);
}

/* --------------------------------------------------------------------------
   11. Callout Blocks
   -------------------------------------------------------------------------- */
.callout {
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  border-left: 4px solid;
}

.callout__title {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

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

.callout--do {
  background: var(--callout-do);
  border-color: var(--callout-do-border);
}

.callout--skip {
  background: var(--callout-skip);
  border-color: var(--callout-skip-border);
}

.callout--controversial {
  background: var(--callout-controversial);
  border-color: var(--callout-controversial-border);
}

.callout--data {
  background: var(--callout-data);
  border-color: var(--callout-data-border);
}

.callout--changed {
  background: var(--callout-changed);
  border-color: var(--callout-changed-border);
}

/* --------------------------------------------------------------------------
   12. Product Cards
   -------------------------------------------------------------------------- */
.product {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.product:last-child {
  border-bottom: none;
}

.product__image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background: var(--accent-color);
  overflow: hidden;
}

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

.product__content {
  flex: 1;
}

.product__name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-xs) 0;
}

.product__name a {
  text-decoration: none;
}

.product__name a:hover {
  text-decoration: underline;
}

.product__description {
  font-size: 1rem;
  color: var(--light-text);
  margin: 0 0 var(--spacing-sm) 0;
}

.product__meta {
  font-size: 0.875rem;
  color: var(--muted-text);
}

/* Numbered list items */
.product--numbered {
  counter-increment: product-counter;
}

.product--numbered::before {
  content: counter(product-counter);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--muted-text);
  min-width: 2rem;
}

.products-list {
  counter-reset: product-counter;
}

/* --------------------------------------------------------------------------
   13. Tables
   -------------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-md) 0;
}

th, td {
  padding: var(--spacing-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  background: var(--secondary-bg);
}

/* Schedule Tables */
.schedule {
  margin: var(--spacing-md) 0;
}

.schedule__title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.schedule__row {
  display: flex;
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--border-color);
}

.schedule__time {
  width: 100px;
  font-weight: 500;
  flex-shrink: 0;
}

.schedule__activity {
  flex: 1;
}

/* --------------------------------------------------------------------------
   14. Forms & Newsletter
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
}

.form-input {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-family: var(--font-main);
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--text-color);
}

.newsletter {
  background: var(--secondary-bg);
  padding: var(--spacing-lg);
  text-align: center;
}

.newsletter__title {
  margin-bottom: var(--spacing-sm);
}

.newsletter__form {
  display: flex;
  gap: var(--spacing-sm);
  max-width: 500px;
  margin: var(--spacing-md) auto 0;
}

.newsletter__input {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--btn-radius);
}

@media (max-width: 480px) {
  .newsletter__form {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: var(--spacing-lg) 4%;
  background: var(--text-color);
  color: var(--bg-color);
}

.footer__content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.footer__section h4 {
  color: var(--bg-color);
  margin-bottom: var(--spacing-sm);
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__links li {
  margin-bottom: var(--spacing-xs);
}

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer__links a:hover {
  color: var(--bg-color);
  opacity: 1;
}

.footer__bottom {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer__bottom p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin: 0;
  max-width: none;
}

/* --------------------------------------------------------------------------
   16. Utility Classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 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;
}

/* --------------------------------------------------------------------------
   17. Tags & Badges
   -------------------------------------------------------------------------- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-color);
}

.tag:hover {
  background: var(--border-color);
  opacity: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin: var(--spacing-sm) 0;
}

/* --------------------------------------------------------------------------
   18. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-bottom: var(--spacing-md);
}

.breadcrumb a {
  color: var(--muted-text);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text-color);
}

.breadcrumb__separator {
  margin: 0 0.5rem;
}

/* --------------------------------------------------------------------------
   19. Path Cards (Start Here)
   -------------------------------------------------------------------------- */
.path-card {
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-color);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.path-card:hover {
  border-color: var(--text-color);
  background: var(--accent-color);
  opacity: 1;
}

.path-card__label {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-bottom: var(--spacing-xs);
}

.path-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-xs) 0;
}

.path-card__description {
  font-size: 1rem;
  color: var(--light-text);
  margin: 0;
}

/* --------------------------------------------------------------------------
   20. Disclaimer Box
   -------------------------------------------------------------------------- */
.disclaimer {
  background: var(--accent-color);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  font-size: 0.95rem;
}

.disclaimer__title {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.disclaimer p {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-xs);
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   21. Related Posts
   -------------------------------------------------------------------------- */
.related {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

.related__title {
  margin-bottom: var(--spacing-md);
}

.related__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related__item {
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.related__item:last-child {
  border-bottom: none;
}

.related__link {
  text-decoration: none;
  font-weight: 500;
}

.related__link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   22. Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .nav,
  .footer,
  .newsletter,
  .btn {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .article {
    max-width: 100%;
    padding: 0;
  }

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

  .callout {
    border: 1px solid var(--border-color);
    background: none;
  }
}

/* --------------------------------------------------------------------------
   23. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --spacing-section: 4rem;
  }

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

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

  .hero {
    padding: var(--spacing-lg) 4%;
  }

  .product {
    flex-direction: column;
  }

  .product__image {
    width: 100%;
    height: 200px;
  }

  .footer__content {
    grid-template-columns: 1fr;
  }
}
