/* ============================================
   SOFT COZY LIVING — Global Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-cream: #F7F3EB;
  --text-primary: #2F2A26;
  --heading-brown: #A67C52;
  --accent-olive: #8A8F6A;
  --accent-olive-dark: #6E7353;
  --callout-beige: #E6D8C3;
  --text-secondary: #B8AFA6;
  --card-bg: #FFFDF9;
  --shadow-soft: 0 2px 16px rgba(166, 124, 82, 0.08);
  --shadow-hover: 0 6px 28px rgba(166, 124, 82, 0.13);
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1140px;
  --reading-width: 700px;
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Lora', 'Georgia', serif;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-cream);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--heading-brown);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1.25em;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(247, 243, 235, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(166, 124, 82, 0.1);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 1px 12px rgba(166, 124, 82, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--heading-brown);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: opacity var(--transition);
}

.logo:hover {
  opacity: 0.8;
  color: var(--heading-brown);
}

.logo span {
  font-weight: 400;
  font-style: italic;
  opacity: 0.7;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-menu a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--accent-olive);
  transition: width var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent-olive);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 34px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn-primary {
  background-color: var(--accent-olive);
  color: #FAF8F4;
}

.btn-primary:hover {
  background-color: var(--accent-olive-dark);
  color: #FAF8F4;
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(138, 143, 106, 0.25);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-olive);
  border: 1.5px solid var(--accent-olive);
}

.btn-outline:hover {
  background-color: var(--accent-olive);
  color: #FAF8F4;
  transform: translateY(-2px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--callout-beige), transparent);
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 24px;
  font-style: italic;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.hero-decoration::before,
.hero-decoration::after {
  content: '';
  width: 40px;
  height: 1px;
  background-color: var(--callout-beige);
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.section-title h2 {
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background-color: var(--callout-beige);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ============================================
   POST CARDS
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  padding-bottom: 20px;
}

.post-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.post-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--callout-beige);
}

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

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-category {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: rgba(247, 243, 235, 0.9);
  backdrop-filter: blur(6px);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-olive);
  font-weight: 500;
}

.post-card-body {
  padding: 24px 24px 28px;
}

.post-card-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.post-card-body h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.35;
}

.post-card-body h3 a {
  color: var(--heading-brown);
  text-decoration: none;
  transition: color var(--transition);
}

.post-card-body h3 a:hover {
  color: var(--accent-olive);
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.read-more {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-olive);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition), color var(--transition);
}

.read-more:hover {
  gap: 10px;
  color: var(--accent-olive-dark);
}

.read-more svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.read-more:hover svg {
  transform: translateX(2px);
}

/* Card image link wrapper */
.post-card-link {
  display: block;
}

/* Loading state */
.loading-state {
  grid-column: 1 / -1;
}

/* Post content images (from CMS) */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1.5em 0;
}

/* ============================================
   LATEST POSTS SECTION (HOME)
   ============================================ */
.latest-posts {
  padding: 60px 0 80px;
}

.section-cta {
  text-align: center;
  margin-top: 48px;
}

/* ============================================
   BLOG LISTING PAGE
   ============================================ */
.blog-listing {
  padding: 60px 0 80px;
}

.blog-listing .section-title {
  margin-bottom: 40px;
}

/* Category filters */
.category-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 22px;
  border: 1.5px solid var(--callout-beige);
  border-radius: 50px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--accent-olive);
  border-color: var(--accent-olive);
  color: #FAF8F4;
}

/* ============================================
   SINGLE POST PAGE
   ============================================ */
.post-header {
  text-align: center;
  padding: 60px 0 40px;
  max-width: var(--reading-width);
  margin: 0 auto;
}

.post-header .post-category {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-olive);
  margin-bottom: 16px;
  font-weight: 500;
}

.post-header h1 {
  margin-bottom: 16px;
  font-style: italic;
}

.post-header .post-meta {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.post-featured-image {
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--callout-beige);
}

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

.post-content {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.post-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.5em;
}

.post-content h2 {
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  font-size: 1.6rem;
}

.post-content h3 {
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.post-content li {
  margin-bottom: 0.5em;
  line-height: 1.8;
}

.post-content blockquote {
  border-left: 3px solid var(--callout-beige);
  margin: 2em 0;
  padding: 1em 1.5em;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Affiliate Callout Box */
.callout-box {
  background-color: var(--callout-beige);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin: 2.5em 0;
  position: relative;
}

.callout-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-olive), var(--heading-brown));
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0.4;
}

.callout-box h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--heading-brown);
}

.callout-box p {
  font-size: 0.95rem;
  margin-bottom: 0.8em;
  line-height: 1.75;
}

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

.callout-box ul {
  list-style: none;
  padding-left: 0;
}

.callout-box ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.callout-box ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-olive);
  opacity: 0.6;
}

.callout-disclosure {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
  border-top: 1px solid rgba(166, 124, 82, 0.15);
  padding-top: 14px;
  margin-top: 14px;
}

/* Post navigation */
.post-nav {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--callout-beige);
  padding-top: 32px;
}

.post-nav a {
  font-size: 0.9rem;
  color: var(--accent-olive);
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.about-hero h1 {
  font-style: italic;
  margin-bottom: 12px;
}

.about-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.about-content {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 3 / 2;
  background-color: var(--callout-beige);
}

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

.about-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.5em;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.about-value {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.about-value h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.about-value p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: auto;
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--callout-beige);
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--heading-brown);
  margin-bottom: 8px;
  font-weight: 600;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-style: italic;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(247, 243, 235, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 48px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-menu a {
    font-size: 1.2rem;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }

  .post-featured-image {
    margin-left: 16px;
    margin-right: 16px;
    border-radius: var(--radius-sm);
  }

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

/* Mobile */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

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

  .post-card-body {
    padding: 20px 20px 24px;
  }

  .callout-box {
    padding: 24px 20px;
  }

  .header-inner {
    height: 60px;
  }

  .logo {
    font-size: 1.25rem;
  }

  .category-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 16px;
    font-size: 0.8rem;
  }

  .post-nav {
    flex-direction: column;
    gap: 16px;
  }
}
