/* /css/pages/home.css */

/* =========================
   Homepage Type/Spacing Scale
   Keep these values in mind as we standardize the rest of the site
========================= */

:root {
  --fs-home-hero-title: clamp(2.8rem, 5vw, 5rem);
  --fs-home-banner-title: clamp(2.2rem, 4vw, 4rem);
  --fs-home-banner-subtitle: clamp(1.02rem, 1.45vw, 1.3rem);
  --fs-home-section-title: clamp(2.25rem, 4.5vw, 4rem);
  --fs-home-card-title: clamp(1.65rem, 3vw, 2.5rem);
  --fs-home-body-lg: clamp(1.05rem, 1.6vw, 1.25rem);
  --fs-home-body: 1rem;
  --fs-home-small: 0.82rem;

  --home-section-gap: clamp(2.75rem, 5vw, 4.5rem);
  --home-card-padding: clamp(1.2rem, 2.2vw, 1.75rem);
}

/* =========================
   Announcement Strip
   Same banner pattern we can reuse on Winner/Gallery
========================= */

.announcement-strip {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.35rem 1rem;
  background: linear-gradient(90deg, #7454c7, #8b5fd8);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.announcement-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.announcement-strip a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.announcement-strip a:hover,
.announcement-strip a:focus-visible {
  color: var(--color-accent-soft);
}

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

.hero-section {
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(1rem, 2vw, 1.5rem);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.95fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: rgba(7, 31, 64, 0.72);
  box-shadow: var(--shadow-heavy);
}

.hero-media {
  min-height: 560px;
  position: relative;
  background:
    radial-gradient(circle at 50% 10%, rgba(242, 178, 74, 0.12), transparent 28%),
    linear-gradient(180deg, #0b2046 0%, #07162f 100%);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 72%, rgba(3, 23, 47, 0.24)),
    radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.18));
}

.hero-image-frame {
  width: 100%;
  height: 100%;
  min-height: 560px;
  max-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image-frame img,
#homepage-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 680px;
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 46%),
    #07162f;
}

.hero-fallback {
  min-height: 560px;
  margin: 0;
  padding: 2rem;
  display: grid;
  place-items: center;
  color: var(--color-text-soft);
  text-align: center;
  font-size: var(--fs-home-body);
  line-height: 1.55;
}

.hero-panel {
  min-height: 560px;
  padding: clamp(1.75rem, 3vw, 2.8rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at top right, rgba(242, 178, 74, 0.13), transparent 32%),
    linear-gradient(180deg, #2f61bf 0%, #17498e 48%, #123a78 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* Kept harmless in case older markup still appears somewhere, but homepage no longer uses it. */
.hero-eyebrow {
  display: none;
}

.hero-panel .hero-title {
  max-width: 9ch;
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: var(--fs-home-hero-title);
  line-height: 0.9;
  color: #f6d16f;
  text-transform: none;
  text-decoration: none;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.hero-description {
  max-width: 40ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero-actions .btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   Brand Banner / How It Works Bridge
========================= */

.brand-banner {
  padding: 0;
}

.brand-banner-box {
  background:
    radial-gradient(circle at top center, rgba(242, 178, 74, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(15, 80, 131, 0.98), rgba(11, 69, 122, 0.98));
  padding: clamp(1.35rem, 2.5vw, 2rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  border-top: none;
}

.brand-banner-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-home-banner-title);
  line-height: 0.95;
  color: #f6f0e6;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.brand-banner-subtitle {
  max-width: 860px;
  margin: 0.65rem auto 0;
  font-family: var(--font-body, var(--font-sans));
  font-size: var(--fs-home-banner-subtitle);
  font-weight: 600;
  line-height: 1.55;
  color: rgba(246, 240, 230, 0.9);
}

/* =========================
   Concept Spotlight
========================= */

.concept-spotlight {
  padding-top: var(--home-section-gap);
}

.concept-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(1.25rem, 2vw, 1.75rem);
  align-items: stretch;
}

.concept-card {
  padding: 1rem;
  background: rgba(7, 31, 64, 0.72);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.concept-image-frame {
  width: 100%;
  min-height: 480px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.concept-image-frame img {
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
}

/* Lower homepage feature image: safe to lazy load and constrain visually */
#homepage-secondary-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
  object-position: center;
}

.concept-shell .cta-panel {
  min-height: 100%;
  justify-content: center;
  padding: var(--home-card-padding);
}

.concept-shell .cta-panel h2 {
  margin-bottom: 0.85rem;
}

.concept-shell .cta-panel p {
  max-width: 58ch;
}

/* =========================
   Homepage Sections
========================= */

.homepage-section-spacious {
  padding: var(--home-section-gap) 0;
}

.page-section {
  padding-top: var(--home-section-gap);
}

.page-section:last-of-type {
  padding-bottom: var(--home-section-gap);
}

.homepage-feature-card {
  background:
    linear-gradient(180deg, rgba(18, 75, 137, 0.88), rgba(9, 37, 77, 0.96));
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.section-card-shell {
  text-align: center;
}

.section-heading {
  margin-bottom: 0.85rem;
}

.section-subheading {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.continue-grid .story-card {
  max-width: 980px;
  width: 100%;
  margin-inline: auto;
}

.continue-grid .story-card-media {
  min-height: 320px;
}

.story-grid-custom {
  align-items: stretch;
}

.story-grid-custom .story-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.story-grid-custom .story-card h3 {
  margin-bottom: 0.1rem;
}

.story-grid-custom .story-card p {
  margin-block: 0.15rem;
  line-height: 1.55;
}

.story-grid-custom .story-card-actions {
  margin-top: auto;
  padding-top: 0.85rem;
}

.story-grid-custom .story-card-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   Homepage CTA Cards
========================= */

.mid-cta-grid {
  align-items: stretch;
}

.mid-cta-grid .mid-cta-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  padding: var(--home-card-padding);
}

.mid-cta-card h2 {
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.mid-cta-card p {
  max-width: 62ch;
  margin: 0;
  line-height: 1.55;
}

.mid-cta-card .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   Homepage Card Image Fill
   Makes card images fill their visual frames
========================= */

.continue-grid .story-card-media,
.story-grid-custom .story-card-media {
  height: 340px;
  min-height: 340px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
}

.continue-grid .story-card-media img,
.story-grid-custom .story-card-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
}

.continue-grid .story-card-media {
  height: 360px;
  min-height: 360px;
}

.continue-grid .story-card-media img {
  object-fit: cover;
  object-position: center;
}

/* =========================
   Split Continue Reading Cards
========================= */

.continue-reading-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.continue-reading-column {
  min-width: 0;
}

.continue-reading-column-title {
  margin: 0 0 0.85rem;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1;
}

.continue-reading-card {
  height: 100%;
}

.continue-reading-card-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

/* =========================
   Responsive Homepage
========================= */

@media (max-width: 1100px) {
  .hero-shell,
  .concept-shell {
    grid-template-columns: 1fr;
  }

  .hero-media,
  .hero-image-frame,
  .hero-fallback,
  .hero-panel {
    min-height: auto;
  }

  .hero-image-frame {
    min-height: 420px;
    max-height: 560px;
  }

  .hero-image-frame img,
  #homepage-hero-image {
    max-height: 560px;
  }

  .hero-panel {
    padding: 2rem;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero-panel .hero-title {
    max-width: 12ch;
  }

  .concept-image-frame {
    min-height: 380px;
  }
}

@media (max-width: 720px) {
  :root {
    --home-section-gap: 2.6rem;
    --home-card-padding: 1rem;
  }

  .announcement-strip {
    min-height: 30px;
    padding: 0.32rem 0.85rem;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .hero-section {
    padding-top: 1.35rem;
  }

  .hero-image-frame {
    min-height: 320px;
    max-height: 420px;
  }

  .hero-image-frame img,
  #homepage-hero-image {
    max-height: 420px;
  }

  .hero-panel {
    padding: 1.35rem 1.1rem 1.5rem;
  }

  .hero-panel .hero-title {
    max-width: 11ch;
    font-size: clamp(2.35rem, 13vw, 3.4rem);
    line-height: 0.95;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1.25rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .brand-banner-box {
    padding: 1.25rem 0.9rem 1.1rem;
  }

  .brand-banner-subtitle {
    max-width: 42ch;
    font-size: 0.98rem;
  }

  .concept-card {
    padding: 0.85rem;
  }

  .concept-image-frame {
    min-height: 280px;
  }

  .concept-shell .cta-panel {
    padding: 1rem;
  }

  .continue-reading-split-grid {
    grid-template-columns: 1fr;
  }

  .continue-reading-column-title {
    text-align: left;
  }

  .continue-grid .story-card-media,
  .story-grid-custom .story-card-media {
    height: 260px;
    min-height: 260px;
  }

  .story-grid-custom .story-card-actions .btn,
  .mid-cta-card .btn {
    width: 100%;
  }
}