/* ═══════════════════════════════════════════════════════
   Your Personal Backyard Birds Field Guide
   style.css — Main stylesheet
   ═══════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&display=swap');

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --cream:        #F9F5EF;
  --cream-dark:   #F0E9DF;
  --forest:       #2C3B2D;
  --forest-mid:   #4A5E4B;
  --forest-light: #6B8B6D;
  --sage:         #7A9E7E;
  --sage-light:   #B8D4BA;
  --terra:        #B5633A;
  --terra-light:  #D4845E;
  --warm-gray:    #9B9186;
  --rule:         #D8CFC4;

  --font-serif:   'Lora', 'Georgia', serif;
  --font-body:    'Source Serif 4', 'Georgia', serif;

  --max-width:    1100px;
  --gutter:       clamp(1.2rem, 4vw, 2.5rem);
}

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

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

body {
  background: var(--cream);
  color: var(--forest);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: var(--terra); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--forest);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  color: var(--forest-mid);
  line-height: 1.8;
  font-style: italic;
}

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

.section { padding: 4rem 0; }
.section--sm { padding: 2.5rem 0; }
.section--lg { padding: 6rem 0; }

/* ── Site Header / Nav ─────────────────────────────────── */
.site-header {
  background: var(--forest);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #1a2b1b;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--sage-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.site-logo:hover { text-decoration: none; }

.site-nav {
  display: flex;
  gap: 0.2rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--sage-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--cream);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all 0.25s;
}

/* ── Hero / Spotlight ──────────────────────────────────── */
.spotlight {
  position: relative;
  height: clamp(420px, 60vh, 680px);
  overflow: hidden;
  background: var(--forest);
}

.spotlight-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.spotlight-slide.active { opacity: 1; }

.spotlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.85);
}

.spotlight-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  background: linear-gradient(to top, rgba(30,45,30,0.88) 0%, transparent 100%);
}

.spotlight-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
}

.spotlight-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.spotlight-line {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.8);
  font-style: italic;
  max-width: 520px;
}

.spotlight-dots {
  position: absolute;
  bottom: 1rem;
  right: var(--gutter);
  display: flex;
  gap: 0.5rem;
}
.spotlight-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.spotlight-dot.active { background: var(--terra); }

/* ── Section Headers ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.section-header h2 { flex-shrink: 0; }
.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
  font-family: var(--font-body);
  margin-bottom: 0.5rem;
}

/* ── Bird Cards (Species Index) ────────────────────────── */
.bird-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.bird-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--rule);
}
.bird-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(44,59,45,0.12);
  text-decoration: none;
}

.bird-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center 25%;
  background: var(--cream-dark);
}

.bird-card__img-placeholder {
  width: 100%;
  height: 160px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm-gray);
  font-size: 2rem;
}

.bird-card__body {
  padding: 1rem 1.1rem 1.2rem;
}

.bird-card__name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 0.25rem;
}

.bird-card__tag {
  font-size: 0.8rem;
  color: var(--warm-gray);
  margin-bottom: 0.5rem;
}

.bird-card__hook {
  font-size: 0.875rem;
  color: var(--forest-mid);
  line-height: 1.5;
  font-style: italic;
}

/* ── Bird Profile Page ─────────────────────────────────── */
.profile-hero {
  position: relative;
  height: clamp(300px, 45vh, 520px);
  background: var(--forest);
  overflow: hidden;
}
.profile-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.85);
}
.profile-hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem var(--gutter) 2.5rem;
  background: linear-gradient(to top, rgba(30,45,30,0.9) 0%, transparent 100%);
}
.profile-hero-caption h1 {
  color: #fff;
  margin-bottom: 0.3rem;
}
.profile-hero-caption .lead {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  margin: 0;
}

.profile-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding: 3rem 0;
  align-items: start;
}

.profile-main section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.profile-main section:last-child {
  border-bottom: none;
}
.profile-main h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--terra);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.profile-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h3 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.quick-fact {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}
.quick-fact:last-child { margin-bottom: 0; }
.quick-fact__label {
  color: var(--warm-gray);
  flex-shrink: 0;
  width: 80px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.1rem;
}
.quick-fact__value { color: var(--forest); font-weight: 400; }

.book-teaser {
  background: var(--cream-dark);
  border-left: 3px solid var(--terra);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem 1.4rem;
}
.book-teaser__eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terra);
  margin-bottom: 0.5rem;
}
.book-teaser p {
  font-size: 0.9rem;
  color: var(--forest-mid);
  font-style: italic;
  line-height: 1.65;
}

.similar-birds { list-style: none; }
.similar-birds li { margin-bottom: 0.4rem; }
.similar-birds a {
  font-size: 0.9rem;
  color: var(--forest-mid);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.similar-birds a::before {
  content: '→';
  color: var(--sage);
  font-size: 0.85rem;
}
.similar-birds a:hover { color: var(--terra); text-decoration: none; }

/* ── Feeder Badge ──────────────────────────────────────── */
.feeder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--sage-light);
  color: var(--forest);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

/* ── Home Editorial Teasers ────────────────────────────── */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.teaser-card {
  border-top: 2px solid var(--terra);
  padding-top: 1.25rem;
}
.teaser-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.teaser-card p {
  font-size: 0.95rem;
  color: var(--forest-mid);
  margin-bottom: 1rem;
}
.teaser-card a.btn {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terra);
  font-family: var(--font-body);
  text-decoration: none;
  border-bottom: 1px solid var(--terra);
  padding-bottom: 1px;
}
.teaser-card a.btn:hover { color: var(--forest); border-color: var(--forest); text-decoration: none; }

/* ── Seasonal Grid ─────────────────────────────────────── */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.season-card {
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.season-card__header {
  padding: 1rem 1.25rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cream);
}
.season-card__header--spring  { background: #5a8a5e; }
.season-card__header--summer  { background: #8a7a3a; }
.season-card__header--fall    { background: #8a4e2a; }
.season-card__header--winter  { background: #3a5a6e; }

.season-card__body { padding: 1rem 1.25rem; }
.season-card__body p { font-size: 0.9rem; color: var(--forest-mid); margin-bottom: 0.5rem; }

.season-bird-list {
  list-style: none;
  font-size: 0.875rem;
}
.season-bird-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--forest);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.season-bird-list li:last-child { border-bottom: none; }
.season-bird-list .badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: var(--cream-dark);
  color: var(--warm-gray);
}

/* ── Feeder Guide ──────────────────────────────────────── */
.feeder-section {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
}
.feeder-section:last-child { border-bottom: none; }

.feeder-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.feeder-type-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.25rem 1.4rem;
}
.feeder-type-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--terra);
}
.feeder-type-card p { font-size: 0.9rem; color: var(--forest-mid); }
.feeder-type-card ul {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
  font-size: 0.875rem;
  color: var(--forest-mid);
}
.feeder-type-card ul li { margin-bottom: 0.25rem; }

/* ── About Page ────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}
.about-aside {
  position: sticky;
  top: 80px;
}
.about-aside img {
  border-radius: 4px;
  width: 100%;
  border: 1px solid var(--rule);
}
.about-quote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--terra);
  background: var(--cream-dark);
}
.about-quote p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--forest);
  line-height: 1.7;
  margin: 0;
}
.chapter-list {
  list-style: none;
  columns: 2;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.chapter-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
  color: var(--forest-mid);
}

/* ── Page Hero (inner pages) ───────────────────────────── */
.page-hero {
  background: var(--forest);
  padding: 3.5rem 0 3rem;
  border-bottom: 3px solid #1a2b1b;
}
.page-hero h1 { color: var(--cream); margin-bottom: 0.5rem; }
.page-hero .lead { color: rgba(249,245,239,0.7); margin: 0; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--forest);
  color: rgba(249,245,239,0.6);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.85rem;
}
.site-footer a { color: var(--sage-light); }
.site-footer a:hover { color: var(--cream); text-decoration: none; }

/* ── Utility ───────────────────────────────────────────── */
.text-terra { color: var(--terra); }
.text-sage  { color: var(--sage); }
.text-muted { color: var(--warm-gray); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { display: none; flex-direction: column; gap: 0; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.6rem 0; border-radius: 0; width: 100%; }
  .site-header .container { flex-wrap: wrap; }
  .nav-toggle { display: flex; }

  .profile-body { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }

  .about-layout { grid-template-columns: 1fr; }
  .about-aside { position: static; }

  .chapter-list { columns: 1; }
}

@media (max-width: 500px) {
  .bird-grid { grid-template-columns: repeat(2, 1fr); }
  .bird-card__img, .bird-card__img-placeholder { height: 120px; }
}
