/* featherScroll — home.css  */

#feather-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

/* ── Home page ── */
.home-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}
.home-header {
  padding: 2rem 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.home-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  object-fit: cover;
}
.home-brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #f5f0e8;
  letter-spacing: 0.03em;
}
.home-brand-name span {
  color: #e8c97a;
}
.home-username {
  font-size: 0.78rem;
  font-weight: 500;
  color: #a8c5b0;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 99px;
  padding: 4px 12px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}
.home-username.show {
  opacity: 1;
  visibility: visible;
}

/* ── Hero ── */
.home-hero {
  text-align: center;
  padding: 1.75rem 1.5rem 1.25rem;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.home-hero-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 1rem;
  display: block;
}
.home-hero-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 700;
  color: #f5f0e8;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}
.home-hero-title em {
  color: #e8c97a;
  font-style: italic;
}
.home-hero-sub {
  font-size: 0.9rem;
  color: #a8c5b0;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.home-date {
  font-size: 0.72rem;
  color: rgb(255 233 0 / 60%);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Welcome card ── */
.home-welcome-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.home-welcome-card.show {
  opacity: 1;
  transform: translateY(0);
}
.home-welcome-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  animation: featherWiggle 3s ease-in-out infinite;
}
.home-welcome-text {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  color: #c8d8c2;
  font-weight: 300;
  line-height: 1.5;
  text-align: left;
}
.home-welcome-text span {
  color: #e8c97a;
  font-weight: 700;
}
@keyframes featherWiggle {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}

/* ── Recent stories feed ── */
.home-feed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
  padding: 0.5rem 1.5rem 2rem;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.home-feed-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.15rem;
}
.home-feed-heading h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f5f0e8;
  letter-spacing: 0.01em;
}
.home-feed-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(245, 240, 232, 0.12);
}

/* Featured card */
.home-feed-featured {
  display: block;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 260px;
  background-size: cover;
  background-position: center;
  background-color: #10241a;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.home-feed-featured:active {
  transform: scale(0.98);
}
.home-feed-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.15) 100%
  );
}
.home-feed-featured-body {
  position: relative;
  z-index: 1;
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 260px;
  justify-content: flex-end;
}
.home-feed-tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0d0d0d;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
}
.home-feed-featured-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 5.5vw, 1.9rem);
  font-weight: 700;
  color: #f5f0e8;
  line-height: 1.18;
}
.home-feed-featured-teaser {
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.75);
  line-height: 1.5;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.home-feed-featured-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #e8c97a;
}

/* List cards */
.home-feed-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.home-feed-item {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.35s ease-out,
    transform 0.35s ease-out,
    background 0.15s;
}

.home-feed-item.in-view {
  opacity: 1;
  transform: translateY(0);
}
.home-feed-item:active {
  transform: scale(0.97);
}
.home-feed-item-img {
  width: 100%;
  aspect-ratio: 1.3 / 1;
  object-fit: cover;
  flex-shrink: 0;
}
.home-feed-item-img-empty {
  width: 100%;
  aspect-ratio: 1.3 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.home-feed-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.75rem 0.85rem;
}
.home-feed-item-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.home-feed-item-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: #f5f0e8;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.home-feed-item-date {
  font-size: 0.68rem;
  color: rgba(245, 240, 232, 0.4);
}

.home-feed-empty {
  color: rgba(245, 240, 232, 0.5);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 0;
}
/* ── Footer ── */
.home-footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid rgba(245, 240, 232, 0.06);
}
.home-footer p {
  font-size: 0.7rem;
  color: #7a9b87;
  font-weight: 300;
}
.home-footer a {
  color: #7a9b87;
  text-decoration: none;
  margin: 0 0.5rem;
}
.home-footer a:hover {
  color: #a8c5b0;
}

/* ===== DESKTOP NAV (shown instead of hamburger from 900px up) ===== */
.home-desktop-nav {
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.home-desktop-nav a {
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(245, 240, 232, 0.6);
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.home-desktop-nav a:hover {
  color: #f5f0e8;
  background: rgba(255, 255, 255, 0.06);
}

/* ===== HAMBURGER MENU ===== */
.menu-toggle {
  position: relative;
  z-index: 110;
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.menu-toggle:hover {
  background: rgba(201, 168, 76, 0.2);
}

.menu-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #e8c97a;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.menu-toggle.active .menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -280px;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #0f2318 0%, #1a3a2a 100%);
  border-left: 1px solid rgba(201, 168, 76, 0.2);
  z-index: 105;
  display: flex;
  flex-direction: column;
  padding: 5rem 1.5rem 2rem;
  gap: 0.25rem;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav a {
  font-family: "DM Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(245, 240, 232, 0.7);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.mobile-nav a:hover {
  color: #f5f0e8;
  background: rgba(201, 168, 76, 0.1);
}

/* Overlay when menu is open */
.mobile-nav.open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
  left: auto;
  width: 100vw;
}

/* Remove username styles since we removed the element */
.home-username {
  display: none !important;
}

.ds-badge-hidden {
  display: none;
}
/* ══════════════════════════════════════
   Desktop layout (news-site style grid)
   ══════════════════════════════════════ */
@media (min-width: 900px) {
  .home-header,
  .home-hero {
    max-width: 1100px;
  }

  .home-desktop-nav {
    display: flex;
  }

  .menu-toggle,
  .mobile-nav {
    display: none;
  }

  .home-hero {
    max-width: 700px;
  }

  .home-hero-title {
    font-size: 3.2rem;
  }
}

/* Wild Tales — coral/red accent */

/* Did You Know? — blue accent */

/* On This Day — teal accent */
/* ── Blog layout: main column + far-right sidebar ── */
.home-feed-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.home-feed-sidebar {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.home-sidebar-heading {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f5f0e8;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(245, 240, 232, 0.12);
}
.home-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.home-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 0.55rem;
  transition:
    transform 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.home-sidebar-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.12);
}
.home-sidebar-item-img {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.home-sidebar-item-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.home-sidebar-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.home-sidebar-item-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.home-sidebar-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f5f0e8;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.home-sidebar-item-date {
  font-size: 0.68rem;
  color: #a8c5b0;
}

@media (max-width: 900px) {
  .home-feed {
    grid-template-columns: 1fr;
  }
  .home-feed-sidebar {
    position: static;
  }
}

/* Delivery-only changes: the featured image is now an eager responsive image. */
.home-feed-featured-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* Stories remain readable if scripts or animation observers fail. */
.home-feed-item {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .home-feed-item,
  .home-welcome-card {
    transition: none;
  }
}
