/* =========================================================
   Home.css
   The Flying Birds — Homepage SEO / archive landing polish
   ========================================================= */

:root {
  --tfb-bg: #f4efe6;
  --tfb-bg-soft: #fbf8f2;
  --tfb-ink: #111111;
  --tfb-muted: #61584d;
  --tfb-border: rgba(17, 17, 17, 0.10);
  --tfb-gold: #c8a24a;
  --tfb-gold-soft: #f2dc9f;
  --tfb-card: #ffffff;
  --tfb-shadow: 0 24px 60px rgba(17, 17, 17, 0.13);
  --tfb-shadow-soft: 0 16px 38px rgba(17, 17, 17, 0.09);
  --tfb-display: "Playfair Display", Georgia, serif;
  --tfb-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.home-page {
  background:
    radial-gradient(circle at top left, rgba(200, 162, 74, 0.20), transparent 34rem),
    linear-gradient(180deg, #fbf8f2 0%, var(--tfb-bg) 52%, #eee4d5 100%);
  color: var(--tfb-ink);
  font-family: var(--tfb-body);
}

.home-page a {
  color: inherit;
}

.home-page img {
  max-width: 100%;
}

/* =========================================================
   Hero
   ========================================================= */

.home-hero {
  position: relative;
  min-height: clamp(520px, 62vh, 720px);
  display: flex;
  align-items: flex-end;
  padding: clamp(5.25rem, 8vw, 7.75rem) 0 clamp(3rem, 6vw, 5rem);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  filter: saturate(0.92) contrast(1.05);
  z-index: -3;
}

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero::before {
  background:
    radial-gradient(circle at 18% 20%, rgba(200, 162, 74, 0.46), transparent 28rem),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.12), transparent 20rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.56) 45%, rgba(0, 0, 0, 0.76) 100%);
  z-index: -2;
}

.home-hero::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.88)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 92px);
  mix-blend-mode: normal;
  z-index: -1;
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1040px;
}

.home-hero-kicker,
.home-section-kicker,
.home-side-kicker {
  margin: 0 0 0.75rem;
  color: var(--tfb-gold-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.home-hero-title {
  max-width: 980px;
  margin: 0 0 1.1rem;
  font-family: var(--tfb-display);
  font-size: clamp(2.55rem, 7vw, 5.85rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.home-hero-subtitle {
  max-width: 760px;
  margin: 0 0 1.65rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.72;
}

.home-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.65rem;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.82rem 1.22rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.home-btn:hover,
.home-btn:focus {
  transform: translateY(-2px);
  text-decoration: none;
  outline: none;
}

.home-btn-primary {
  background: var(--tfb-gold);
  color: #111;
  border-color: var(--tfb-gold);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.home-btn-primary:hover,
.home-btn-primary:focus {
  background: #f1cd72;
  border-color: #f1cd72;
  color: #000;
}

.home-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
}

.home-btn-secondary:hover,
.home-btn-secondary:focus,
.home-btn-ghost:hover,
.home-btn-ghost:focus {
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  border-color: rgba(255, 255, 255, 0.96);
}

.home-btn-ghost {
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.home-btn-dark {
  background: #111;
  color: #fff;
  border-color: #111;
}

.home-btn-dark:hover,
.home-btn-dark:focus {
  background: #2b2b2b;
  color: #fff;
  border-color: #2b2b2b;
}

.home-btn-outline {
  background: transparent;
  color: #111;
  border-color: rgba(17, 17, 17, 0.22);
}

.home-btn-outline:hover,
.home-btn-outline:focus {
  background: #111;
  color: #fff;
  border-color: #111;
}

.home-stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.home-stat {
  min-width: 112px;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.home-stat strong,
.home-stat span {
  display: block;
}

.home-stat strong {
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
}

.home-stat span {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* =========================================================
   Main layout / cards
   ========================================================= */

.home-main {
  position: relative;
}

.home-section {
  margin-bottom: clamp(2.6rem, 5vw, 4.25rem);
}

.home-lead-grid {
  margin-top: -5rem;
  position: relative;
  z-index: 2;
}

.home-card,
.home-side-card,
.home-tile-inner {
  border: 1px solid var(--tfb-border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--tfb-shadow-soft);
  overflow: hidden;
}

.home-card {
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tfb-shadow);
}

.home-featured-card {
  background: #fff;
}

.home-featured-img,
.home-news-img {
  display: block;
  width: 100%;
  object-fit: cover;
  background: #ded5c8;
}

.home-featured-img {
  aspect-ratio: 16 / 8.6;
}

.home-news-img {
  aspect-ratio: 16 / 9;
}

.home-placeholder {
  background:
    linear-gradient(135deg, rgba(200, 162, 74, 0.18), rgba(17, 17, 17, 0.08)),
    #e4dccf;
}

.home-card-body {
  padding: clamp(1.15rem, 2.4vw, 1.75rem);
}

.home-featured-card h2 {
  margin: 0 0 0.75rem;
  font-family: var(--tfb-display);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.home-card p {
  color: var(--tfb-muted);
  line-height: 1.7;
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.85rem;
  color: #817466;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-meta span {
  color: #111;
}

/* =========================================================
   Rail
   ========================================================= */

.home-rail {
  display: grid;
  gap: 1rem;
  height: 100%;
}

.home-side-card {
  padding: 1.35rem;
}

.home-side-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.home-side-card p {
  margin: 0 0 1rem;
  color: var(--tfb-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.home-side-card .home-side-kicker {
  color: #8b6d28;
}

.home-side-card-dark {
  background:
    radial-gradient(circle at top right, rgba(200, 162, 74, 0.24), transparent 16rem),
    #111;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.home-side-card-dark .home-side-kicker {
  color: var(--tfb-gold-soft);
}

.home-side-card-dark p,
.home-side-card-dark .this-week-links a {
  color: rgba(255, 255, 255, 0.78);
}

.home-subscribe-form {
  display: grid;
  gap: 0.75rem;
}

.home-subscribe-form .form-control {
  min-height: 46px;
  border-radius: 999px;
  border-color: rgba(17, 17, 17, 0.16);
  padding: 0.7rem 1rem;
  box-shadow: none;
}

.home-subscribe-form .form-control:focus {
  border-color: var(--tfb-gold);
  box-shadow: 0 0 0 0.18rem rgba(200, 162, 74, 0.18);
}

.home-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.this-week-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.this-week-links li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.this-week-links a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, color 0.15s ease;
}

.this-week-links a::after {
  content: "→";
  opacity: 0.7;
}

.this-week-links a:hover,
.this-week-links a:focus {
  color: #fff;
  transform: translateX(4px);
}

/* =========================================================
   Section heads / news grid
   ========================================================= */

.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.home-section-kicker {
  color: #8b6d28;
}

.home-section-head h2 {
  margin: 0;
  font-family: var(--tfb-display);
  font-size: clamp(1.75rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.home-view-link {
  color: #111;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
  border-bottom: 2px solid var(--tfb-gold);
}

.home-view-link:hover,
.home-view-link:focus {
  color: #8b6d28;
}

.home-news-card h3 {
  display: -webkit-box;
  min-height: 2.65em;
  margin: 0 0 0.65rem;
  overflow: hidden;
  color: #111;
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.02em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-news-card p {
  display: -webkit-box;
  min-height: 4.95em;
  margin: 0 0 1rem;
  overflow: hidden;
  color: var(--tfb-muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.home-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #111;
  font-weight: 900;
  text-decoration: none;
}

.home-card-link::after {
  content: "→";
  color: #8b6d28;
  transition: transform 0.15s ease;
}

.home-card-link:hover::after,
.home-card-link:focus::after {
  transform: translateX(3px);
}

/* =========================================================
   Archive tiles
   ========================================================= */

.home-tile {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.home-tile-inner {
  position: relative;
  height: 100%;
  min-height: 245px;
  padding: 1.4rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.88)),
    radial-gradient(circle at top right, rgba(200, 162, 74, 0.18), transparent 14rem);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.home-tile:hover .home-tile-inner,
.home-tile:focus .home-tile-inner {
  transform: translateY(-4px);
  border-color: rgba(200, 162, 74, 0.55);
  box-shadow: var(--tfb-shadow);
}

.home-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: #111;
  color: var(--tfb-gold-soft);
  font-size: 1.1rem;
  font-weight: 900;
}

.home-tile-title {
  margin-bottom: 0.6rem;
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.home-tile-sub {
  color: var(--tfb-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.home-tile-sub strong {
  color: #111;
  font-weight: 900;
}

.home-tile-date,
.home-tile-note {
  margin-top: 0.85rem;
  color: #7b6b5b;
  font-size: 0.82rem;
  font-weight: 750;
}

.home-tile-date span {
  display: inline-block;
  margin-left: 0.35rem;
}

.home-tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.05rem;
  color: #111;
  font-size: 0.85rem;
  font-weight: 950;
}

.home-tile-cta::after {
  content: "→";
  color: #8b6d28;
}

/* =========================================================
   Bootstrap / legacy compatibility
   ========================================================= */

.home-page .card {
  border: 1px solid var(--tfb-border);
  border-radius: 24px;
  box-shadow: var(--tfb-shadow-soft);
}

.home-page .btn {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 992px) {
  .home-lead-grid {
    margin-top: -3rem;
  }

  .home-hero {
    min-height: 560px;
  }

  .home-featured-img {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 768px) {
  .home-hero {
    min-height: 520px;
    padding: 5.75rem 0 3.5rem;
  }

  .home-hero-title {
    font-size: clamp(2.25rem, 12vw, 3.85rem);
  }

  .home-hero-ctas,
  .home-action-row {
    grid-template-columns: 1fr;
  }

  .home-hero-ctas {
    display: grid;
  }

  .home-btn {
    width: 100%;
  }

  .home-stat-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-card-body,
  .home-side-card,
  .home-tile-inner {
    padding: 1.15rem;
  }
}

@media (max-width: 520px) {
  .home-main {
    padding-top: 2.35rem !important;
  }

  .home-lead-grid {
    margin-top: -2.4rem;
  }

  .home-stat-strip {
    grid-template-columns: 1fr;
  }

  .home-hero-subtitle {
    font-size: 0.98rem;
  }

  .home-news-card h3,
  .home-news-card p {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-card,
  .home-tile-inner,
  .home-btn,
  .this-week-links a,
  .home-card-link::after {
    transition: none;
  }

  .home-card:hover,
  .home-tile:hover .home-tile-inner,
  .home-btn:hover,
  .this-week-links a:hover {
    transform: none;
  }
}
