/* ====================================================================
   Homepage — brand hero, cinematic featured post, editorial ribbons
   ==================================================================== */

/* ---------- Brand hero (full-width photo + logo overlay + tagline) ----------
   HTML структура:
     <section class="brand-hero">
       <picture> <source> <img class="brand-hero-bg"> </picture>
       <div class="brand-hero-inner">
         <div class="brand-hero-logo"><picture><source><img></picture></div>
         <p class="brand-hero-tagline">…</p>
       </div>
     </section>
*/
.brand-hero {
  position: relative;
  width: 100%;
  min-height: clamp(420px, 60vh, 600px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-bg-soft);
  isolation: isolate;
}
/* picture — растягиваем на всю секцию */
.brand-hero > picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
}
/* img ВНУТРИ picture — тоже растягиваем */
.brand-hero > picture img.brand-hero-bg,
.brand-hero img.brand-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}
/* Тёплая вуаль поверх фото */
.brand-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(250, 248, 245, 0.4) 0%,
    rgba(250, 248, 245, 0.2) 45%,
    rgba(250, 248, 245, 0.6) 100%
  );
  z-index: 1;
  pointer-events: none;
}
.brand-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  max-width: 900px;
  width: 100%;
}
/* Лого-блок внутри brand-hero — не сбрасываем picture/img правила из .logo (они применяются к nav) */
.brand-hero-logo {
  display: block;
  width: 100%;
  text-align: center;
}
.brand-hero-logo picture {
  display: inline-block;
  line-height: 0;
}
.brand-hero-logo img {
  display: inline-block;
  width: 100%;
  max-width: 540px;
  height: auto;
  filter: drop-shadow(0 2px 16px rgba(250, 248, 245, 0.7));
}
@media (max-width: 720px) {
  .brand-hero-logo img { max-width: 340px; }
}
.brand-hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
  color: var(--color-text);
  margin: var(--space-xl) auto 0;
  max-width: 720px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-shadow: 0 1px 8px rgba(250, 248, 245, 0.75);
}

/* ---------- Hero (cinematic featured post, ниже brand-hero) ---------- */
.hero-featured {
  padding: var(--section-y) 0;
  background: var(--color-bg);
}

.featured-post {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.featured-image {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: var(--color-border);
  position: relative;
}
.featured-image picture,
.featured-image img {
  width: 100%;
  height: 100%;
}
.featured-image img {
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.featured-post:hover .featured-image img {
  transform: scale(1.02);
}

.featured-meta {
  max-width: 560px;
}
.featured-meta .eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-ink);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}
.featured-title a { color: var(--color-text); }
.featured-title a:hover { color: var(--color-accent-dark); }

.featured-excerpt {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
  font-style: italic;
  max-width: 500px;
}

.meta-row {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--color-text-subtle);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-xl);
  text-transform: uppercase;
}

.read-more {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1.5px solid var(--color-accent);
  padding-bottom: 4px;
  transition: color var(--duration-fast),
              border-color var(--duration-fast);
}
.read-more:hover {
  color: var(--color-accent);
  border-color: var(--color-accent-dark);
}

@media (max-width: 900px) {
  .hero-featured { padding: var(--section-y-sm) 0; }
  .featured-post {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .featured-title { font-size: clamp(30px, 8vw, 40px); }
}

/* ---------- Category ribbons ---------- */
.category-ribbon {
  padding: var(--section-y) 0;
  position: relative;
}
.category-ribbon.bg-soft {
  background: var(--color-bg-soft);
}

.ribbon-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  max-width: 620px;
  margin-inline: auto;
  padding-inline: var(--space-lg);
}
.ribbon-header h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ribbon-header h2 a {
  color: var(--color-text);
  border-bottom: 2px solid transparent;
  transition: border-color var(--duration-fast),
              color var(--duration-fast);
}
.ribbon-header h2 a:hover {
  color: var(--color-accent-dark);
  border-color: var(--color-accent);
}
.ribbon-sub {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  line-height: 1.4;
}
.ribbon-header::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
  margin: var(--space-lg) auto 0;
}

/* Editorial ribbon layout: lead card + 2 secondary cards */
.ribbon-grid-editorial {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-xl);
  align-items: stretch;
}
.ribbon-grid-editorial .post-card:first-child {
  /* Lead card — larger image, bigger title */
}
.ribbon-grid-editorial .post-card:first-child .post-card-image {
  aspect-ratio: 4 / 3;
}
.ribbon-grid-editorial .post-card:first-child .post-card-body {
  padding: var(--space-xl);
  gap: var(--space-md);
}
.ribbon-grid-editorial .post-card:first-child .post-card-title {
  font-size: var(--fs-xl);
}
.ribbon-grid-editorial .post-card:first-child .post-card-excerpt {
  font-size: var(--fs-base);
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ribbon-grid-editorial .ribbon-secondary {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-lg);
}
.ribbon-grid-editorial .ribbon-secondary .post-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  align-items: stretch;
}
.ribbon-grid-editorial .ribbon-secondary .post-card .post-card-image-link {
  height: 100%;
}
.ribbon-grid-editorial .ribbon-secondary .post-card .post-card-image {
  aspect-ratio: auto;
  height: 100%;
}
.ribbon-grid-editorial .ribbon-secondary .post-card .post-card-body {
  padding: var(--space-md) var(--space-lg);
  gap: var(--space-xs);
  justify-content: center;
}
.ribbon-grid-editorial .ribbon-secondary .post-card-title {
  font-size: var(--fs-md);
  line-height: 1.3;
}
.ribbon-grid-editorial .ribbon-secondary .post-card-excerpt {
  display: none;
}
.ribbon-grid-editorial .ribbon-secondary .tag {
  font-size: var(--fs-2xs);
  padding: 2px 10px;
}

@media (max-width: 900px) {
  .ribbon-grid-editorial {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .ribbon-grid-editorial .ribbon-secondary {
    grid-template-rows: none;
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .ribbon-grid-editorial .ribbon-secondary {
    grid-template-columns: 1fr;
  }
  .ribbon-grid-editorial .ribbon-secondary .post-card {
    grid-template-columns: 1fr;
  }
  .ribbon-grid-editorial .ribbon-secondary .post-card .post-card-image {
    aspect-ratio: 3 / 2;
  }
}

.ribbon-footer {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* Category-accent coloring on ribbon headers */
.category-ribbon[id="clean-living"] .ribbon-header h2 a { border-color: transparent; }
.category-ribbon[id="clean-living"] .ribbon-header::after { background: var(--color-cat-clean-living); opacity: 0.5; }
.category-ribbon[id="recipes"] .ribbon-header::after { background: var(--color-cat-recipes); opacity: 0.5; }
.category-ribbon[id="diy"] .ribbon-header::after { background: var(--color-cat-diy-essential-oils); opacity: 0.5; }
.category-ribbon[id="business"] .ribbon-header::after { background: var(--color-cat-business-blogging); opacity: 0.5; }

/* ---------- Intro strip (optional) ---------- */
.home-intro {
  padding: var(--space-xl) 0 0;
  text-align: center;
}
.home-intro .eyebrow {
  color: var(--color-text-subtle);
  font-weight: 500;
}
.home-intro p {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-style: italic;
  font-family: var(--font-display);
}

/* ---------- Newsletter on homepage gets extra warmth ---------- */
.home-page .newsletter-cta {
  background: var(--color-bg-soft);
  padding: var(--section-y-hero) 0;
}
