/* ============================================================
   Hearth & Hound Cottage — Cottagecore Stylesheet v2
   By Elspeth "Elsie" Macrae
   A warm, layered design evoking stone cottages, wool
   blankets, steaming tea, and dogs sleeping by the fire.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,800;1,500&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
  --color-bg:         #fef9f0;
  --color-surface:    #fffdf7;
  --color-text:       #3b2a1a;
  --color-text-muted: #7a6a58;
  --color-accent:     #c67b4b;
  --color-accent-hov: #a85d32;
  --color-border:     #d9cdb3;
  --color-tag-bg:     #f2e8d5;
  --color-green:      #4a6741;
  --color-green-dark: #364d2f;
  --color-cream-dark: #f5ead5;

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Lora', 'Georgia', serif;
  --font-meta:    'Lora', 'Georgia', serif;

  --max-width: 1080px;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-card: 0 2px 16px rgba(59, 42, 26, 0.06);
  --shadow-hover: 0 6px 24px rgba(59, 42, 26, 0.10);
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  background-image:
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d9cdb3' fill-opacity='0.18'%3E%3Cpath d='M0 0h80v80H0V0zm40 4a36 36 0 1 0 0 72 36 36 0 0 0 0-72z'/%3E%3C/g%3E%3C/svg%3E");
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Subtle linen texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%233b2a1a' fill-opacity='0.015'%3E%3Cpath d='M5 0h1L0 6v-1L5 0zM6 5v1H5L6 5z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--color-accent-hov);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--color-text);
  font-weight: 700;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--color-green-dark);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.logo:hover {
  color: var(--color-accent);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2.2rem;
}
.main-nav a {
  font-family: var(--font-meta);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
  padding-bottom: 3px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s;
}
.main-nav a:hover {
  color: var(--color-accent);
}
.main-nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
}

/* ---------- Hero Image ---------- */
.hero-image {
  margin: 0 calc(-50vw + 50%);
  width: 100vw;
  position: relative;
}

.hero-image-placeholder {
  width: 100%;
  min-height: 55vh;
  max-height: 75vh;
  background: linear-gradient(135deg, #f5ead5 0%, #e8d8bc 30%, #dcc9a8 60%, #f0e0c8 100%);
  border-bottom: 4px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-image-placeholder::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(198, 123, 75, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(74, 103, 65, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 253, 247, 0.6) 0%, transparent 70%);
  pointer-events: none;
}

.hero-image-placeholder .img-id {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: var(--font-meta);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 1px;
  background: rgba(255, 253, 247, 0.85);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  z-index: 2;
}

.hero-image-inner {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.hero-image-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.hero-image-label {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-green-dark);
  margin-bottom: 1rem;
}

.hero-image-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-style: italic;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 5rem 0 3.5rem;
  position: relative;
}
.hero::before {
  content: '❦';
  display: block;
  font-size: 1.8rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  opacity: 0.7;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
  color: var(--color-green-dark);
  line-height: 1.15;
}
.hero p {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 580px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.6;
}

/* ---------- Section Titles ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 2rem;
  padding-bottom: 0.6rem;
  display: inline-block;
  position: relative;
  color: var(--color-green-dark);
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--color-accent), var(--color-green));
  border-radius: 2px;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ---------- Page Headers ---------- */
.page-header {
  padding: 4rem 0 2.5rem;
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  color: var(--color-green-dark);
}
.page-header p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  font-style: italic;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-meta);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.8rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.btn-primary {
  background: var(--color-green);
  color: #fff;
  border: 2px solid var(--color-green);
  box-shadow: 0 2px 8px rgba(74, 103, 65, 0.2);
}
.btn-primary:hover {
  background: var(--color-green-dark);
  border-color: var(--color-green-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 103, 65, 0.3);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-green);
  border: 2px solid var(--color-green);
}
.btn-outline:hover {
  background: var(--color-green);
  color: #fff;
}

.btn-outline.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Placeholder Image (article body) ---------- */
.placeholder-image {
  background: #f5ead5 !important;
  border: 2px dashed #c4b896 !important;
  padding: 3rem 2rem !important;
  text-align: center !important;
  margin: 2.5rem 0 !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  color: var(--color-text-muted) !important;
  position: relative;
}
.placeholder-image .img-id {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---------- Article Grid (cards) ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-card);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.article-card-link {
  color: inherit;
  display: block;
}
.article-card-link:hover {
  color: inherit;
}

.article-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-cream-dark);
}
.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

.article-card-content {
  padding: 1.35rem;
}

.article-card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.article-category {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent);
}

.article-date {
  font-family: var(--font-meta);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--color-text);
}

.article-card-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

/* ---------- Article List ---------- */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 3rem 0;
  font-family: var(--font-meta);
}

.page-info {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------- Single Article ---------- */
.single-article {
  max-width: 720px;
  margin: 0 auto;
}

.article-header {
  padding: 3rem 0 2rem;
}

.article-hero-image {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.article-author {
  font-family: var(--font-meta);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--color-green-dark);
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--color-tag-bg);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  color: var(--color-text-muted);
  letter-spacing: 0.3px;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.85;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 2.5rem 0 0.75rem;
  color: var(--color-green-dark);
}
.article-body h2::before {
  content: '❧ ';
  font-size: 1.2rem;
  color: var(--color-accent);
  opacity: 0.7;
}
.article-body p {
  margin-bottom: 1.3rem;
}
.article-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.5rem;
  float: left;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.1rem;
  color: var(--color-accent);
  font-weight: 700;
}

.related-articles {
  max-width: 720px;
  margin: 3rem auto 0;
}

/* ---------- About Page ---------- */
.about-content {
  max-width: 750px;
  margin: 0 auto;
}

.about-intro {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 3.5rem;
}

.about-image-placeholder {
  flex-shrink: 0;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: var(--color-cream-dark);
  border: 4px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-card);
}
.about-image-placeholder .img-id {
  position: absolute;
  bottom: 0.5rem;
  right: 0.7rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.4px;
}
.about-image-placeholder span {
  font-size: 2.8rem;
  margin-bottom: 0.3rem;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--color-green-dark);
}
.about-text p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.about-mission {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.mission-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.mission-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.mission-box h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--color-green-dark);
}
.mission-box p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-surface);
  border-top: 3px solid var(--color-border);
  text-align: center;
  padding: 2.5rem 0;
  margin-top: 5rem;
}
.site-footer::before {
  content: '❦';
  display: block;
  font-size: 1.4rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  opacity: 0.6;
}
.site-footer p {
  font-family: var(--font-meta);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.site-footer p.tagline {
  font-style: italic;
  margin-bottom: 1.2rem;
  color: var(--color-accent);
}

.footer-nav {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
}
.footer-nav a {
  font-family: var(--font-meta);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
.footer-nav a:hover {
  color: var(--color-accent);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 0;
  font-style: italic;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero-image-placeholder {
    min-height: 40vh;
    max-height: 55vh;
  }
  .hero-image-inner {
    padding: 2rem 1.5rem;
  }
  .hero-image-desc {
    font-size: 0.82rem;
  }
  .hero h1 { font-size: 2.2rem; }
  .hero::before { font-size: 1.4rem; }

  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 253, 247, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem;
  }
  .main-nav li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .main-nav li:last-child { border-bottom: none; }

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

  .about-intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .about-image-placeholder { width: 160px; height: 160px; }

  .article-header h1 { font-size: 1.8rem; }
  .article-meta { gap: 0.75rem; }
  .article-body p:first-of-type::first-letter { font-size: 2.8rem; }
}

@media (max-width: 480px) {
  .hero { padding: 3rem 0 2rem; }
  .hero h1 { font-size: 1.7rem; }
  .page-header { padding: 2rem 0 1.5rem; }
  .page-header h1 { font-size: 1.7rem; }
}
