/* =========================================================
   Homepage v3 (Oct 2026). Loaded after home-hero.css.
   In the spirit of churchofjesuschrist.org: a simple hero, then
   calm full-width sections (white, then soft gray, then white)
   with big centered headings, lots of space, and picture tiles.
   The page scrolls on every screen size.
   ========================================================= */

/* Undo the old "one navy screen" layout */
body.home.home-v3 { display: block; min-height: 0; background: #ffffff; color: #172536; }
body.home-v3 .hx-foot { margin-top: 0; }

/* ---------- Hero: the world map stays still while the page scrolls over it ---------- */
.hero-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: #24528F;
}
body.home-v3 .hero-bg .hero-map {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  right: auto; top: 0; transform: none;
  object-fit: cover; object-position: center;
  opacity: .22; filter: brightness(1.7) saturate(.6);
}
body.home-v3 header.hero-v3 {
  position: relative; z-index: 1; background: transparent;
  display: flex; align-items: center; justify-content: center;
  min-height: min(48vh, 440px); padding: 0 !important;
}
body.home-v3 .home-main { position: relative; z-index: 1; }
.hero-v3-inner {
  position: relative; width: min(1180px, calc(100% - 48px)); margin: 0 auto;
  padding: 56px 0 60px; text-align: center;
}
body.home-v3 header.hero-v3 h1.hero-title { font-size: clamp(44px, 5.5vw, 72px) !important; }
body.home-v3 header.hero-v3 .hero-line {
  margin: 16px auto 0 !important; max-width: 46rem; text-align: center; text-wrap: balance;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
}
body.home-v3 header.hero-v3 .surprise-row { margin-top: 30px; }

/* ---------- Sections ---------- */
html { scroll-behavior: smooth; }
.hs { padding: 76px 0; }
.hs-white { background: #ffffff; }
.hs-soft  { background: #F3F5F8; }
.hs-navy  { background: #1A3E6E; color: #ffffff; }
.hs-inner { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.hs-title {
  margin: 0; text-align: center; color: #1A3E6E;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
}
.hs-sub { margin: 12px auto 0; max-width: 36rem; text-align: center; font-size: 1.1rem; line-height: 1.5; color: #4A5868; }
.hs-more { margin: 30px 0 0; text-align: center; font-size: .98rem; color: #4A5868; }
.hs-more a { color: #1A3E6E; font-weight: 700; }

/* ---------- This week: Flip + Spot the trick + Weekly challenge ---------- */
.week-grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px; margin-top: 40px; align-items: stretch;
}
.week-flip { display: flex; background: none; color: inherit; }
.week-flip .hero-flipbox { flex: 1; display: flex; }
.hero-v2.week-flip .home-flip .weekly-flip {
  flex: 1; margin: 0 !important; padding: 24px 24px 22px !important; text-align: center;
  border: 0 !important; border-top: 6px solid #E59E12 !important; border-radius: 16px !important;
  box-shadow: 0 10px 28px rgba(16, 40, 74, .12) !important; color: #172536;
}
.week-flip .weekly-flip h3 { margin: 4px 0 0; font-size: 1.35rem; line-height: 1.25; color: #1A3E6E; text-wrap: balance; }
.week-flip .weekly-flip .spotlight-idea { margin: 0 auto 6px !important; font-size: .72rem; }
.week-flip .weekly-flip .daily-guess-label { margin: 14px 0 8px !important; font-size: .9rem; }
.week-flip .weekly-flip .daily-choices { justify-content: center; }
.week-flip .weekly-flip .daily-choices button { padding: 8px 14px !important; font-size: .92rem !important; }
.week-flip .weekly-flip .flip-answer p { font-size: .98rem; margin: 12px 0 0; }

.week-label {
  margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8F5E00;
}
.week-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 26px 20px 24px; border-radius: 16px; text-align: center; text-decoration: none;
  background: #ffffff; color: #172536; border: 1px solid #E1E6EC; border-top: 6px solid #1A3E6E;
  box-shadow: 0 10px 28px rgba(16, 40, 74, .08); transition: transform .15s, box-shadow .15s;
}
.week-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(16, 40, 74, .14); }
.week-card:focus-visible, .tile:focus-visible { outline: 3px solid #E59E12; outline-offset: 3px; }
.week-icon { width: 96px; height: auto; }
.week-card h3 { margin: 0; font-size: 1.2rem; line-height: 1.25; color: #1A3E6E; text-wrap: balance; }
.week-go {
  margin-top: 6px; padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: .92rem;
  color: #1A3E6E; border: 2px solid #1A3E6E;
}
.week-card:hover .week-go { background: #1A3E6E; color: #ffffff; }

/* ---------- Picture tiles (Start exploring, Newest exhibits) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 40px; }
.tile {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; text-decoration: none;
  background: #ffffff; color: #172536; box-shadow: 0 6px 22px rgba(16, 40, 74, .09);
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(16, 40, 74, .16); }
.tile-img { aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; background: #E2EEF5; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tile:hover .tile-img img { transform: scale(1.03); }
.tile-text { padding: 18px 20px 22px; }
.tile-text h3 { margin: 0; font-size: 1.22rem; line-height: 1.3; color: #1A3E6E; text-wrap: balance; }
.tile-text p { margin: 8px 0 0; font-size: .98rem; line-height: 1.5; color: #4A5868; }
.tile-text .tile-num { margin: 0 0 6px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; color: #8F5E00; }
.tile-go { display: inline-block; margin-top: 12px; font-weight: 800; color: #1A3E6E; }
.hs-white .tile { border: 1px solid #E1E6EC; }

/* Surprise me, centered in the hero */
.surprise-row { display: flex; justify-content: center; margin-top: 36px; }
.surprise-row .way-surprise { width: auto; min-width: min(460px, 100%); box-shadow: 0 10px 26px rgba(6, 20, 40, .35); }

/* ---------- Teaching? band ---------- */
.hs-navy { padding: 56px 0; }
.hs-band { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.hs-navy .hs-title { color: #ffffff; text-align: left; }
.hs-navy .hs-sub { color: rgba(255, 255, 255, .82); text-align: left; margin-left: 0; }
.hs-band-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Why Hanten? ---------- */
.hs-why { padding: 84px 0 90px; }
.why-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 56px; align-items: center; max-width: 980px; }
.why-mark {
  font-size: clamp(80px, 9vw, 128px); font-weight: 800; line-height: 1; color: #1A3E6E; letter-spacing: .02em;
  white-space: nowrap;
}
.why-copy .hs-title { text-align: left; }
.why-line { margin: 14px 0 18px !important; font-style: italic; font-size: 1.35rem; line-height: 1.35; color: #1A3E6E; }
.why-copy p { margin: 0 0 12px; font-size: 1.06rem; line-height: 1.6; color: #36434F; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .week-grid { grid-template-columns: 1fr 1fr; }
  .week-flip { grid-column: 1 / -1; }
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .tile-grid > :nth-child(3) { grid-column: auto; }
}
@media (max-width: 640px) {
  body.home-v3 header.hero-v3 { min-height: 0; }
  .hero-v3-inner { width: calc(100% - 32px); padding: 44px 0 46px; }
  body.home-v3 header.hero-v3 h1.hero-title { font-size: 48px !important; }
  .hs { padding: 52px 0; }
  .hs-inner { width: calc(100% - 32px); }
  .week-grid, .tile-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .tile-grid > :nth-child(3) { grid-column: auto; }
  .hs-navy .hs-title, .hs-navy .hs-sub { text-align: center; margin-left: auto; }
  .hs-band { justify-content: center; text-align: center; }
  .hs-band-actions { justify-content: center; }
  .why-grid { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .why-mark { font-size: 84px; }
  .why-copy .hs-title { text-align: center; }
  .surprise-row .way-surprise { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =========================================================
   Round 3 (Oct 2026): the whole page sits on the still world map.
   Sections have no background of their own, so the cards and words
   scroll over the map. Words are white; cards stay light.
   The hero is one short row (Look again on the left, Surprise me on
   the right) so "This week on Hanten" fits on the first screen.
   ========================================================= */
body.home.home-v3 { background: #24528F; color: #ffffff; }
.hs-white, .hs-soft, .hs-navy { background: transparent; }
.hs + .hs { border-top: 1px solid rgba(255, 255, 255, .14); }
.hs-title, .hs-navy .hs-title { color: #ffffff; }
.hs-sub, .hs-navy .hs-sub { color: rgba(255, 255, 255, .82); }
.hs-more { color: rgba(255, 255, 255, .7); }
.hs-more a { color: #F6C35E; }
.hs-white .tile { border: 0; }
.tile, .week-card { box-shadow: 0 14px 34px rgba(6, 20, 40, .35); }
.hero-v2.week-flip .home-flip .weekly-flip { box-shadow: 0 14px 34px rgba(6, 20, 40, .35) !important; }
.week-card { border: 0; }

/* Short hero row */
body.home-v3 header.hero-v3 { min-height: 0; }
.hero-v3-inner {
  width: min(1120px, calc(100% - 48px)); padding: 30px 0 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; text-align: left;
}
body.home-v3 header.hero-v3 h1.hero-title { font-size: clamp(44px, 5vw, 64px) !important; }
body.home-v3 header.hero-v3 .hero-line { margin: 8px 0 0 !important; text-align: left; max-width: 36rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
body.home-v3 header.hero-v3 .surprise-row { margin-top: 0; flex: none; }
body.home-v3 header.hero-v3 .surprise-row .way-surprise { min-width: 0; }

/* This week sits right under it */
#this-week { padding-top: 26px; }
#this-week + .hs { border-top: 0; }
#this-week .hs-title { font-size: clamp(1.6rem, 2.4vw, 2rem); }
#this-week .hs-sub { margin-top: 6px; font-size: 1rem; }
#this-week .week-grid { margin-top: 22px; }
.week-icon { width: 80px; }

/* Why Hanten: white words, smaller text */
.hs-why { padding: 64px 0 70px; }
.why-mark { color: #E59E12; font-size: clamp(64px, 7vw, 100px); }
.why-copy .hs-title { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: 14px; }
.why-copy p { font-size: .95rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.why-copy strong { color: #ffffff; }
.why-grid { max-width: 820px; gap: 44px; }

@media (max-width: 760px) {
  .hero-v3-inner { flex-direction: column; text-align: center; gap: 20px; padding-top: 30px; }
  body.home-v3 header.hero-v3 .hero-line { text-align: center; margin: 8px auto 0 !important; }
  body.home-v3 header.hero-v3 .surprise-row { width: 100%; }
}
@media (max-width: 640px) {
  .why-mark { font-size: 72px; }
}

/* October 2026 visual refinement — homepage only. */
/* A visibly lighter blue, while keeping white headlines readable. */
body.home.home-v3, body.home-v3 .hero-bg { background-color: #527EAD; }
/* Make the distinctive south-up geography clearer, not darker. */
body.home-v3 .hero-bg .hero-map { opacity: .31; filter: brightness(1.65) saturate(.65); }
/* Remove all hairline dividers between homepage sections. */
body.home-v3 .home-main .hs { border-top: 0 !important; border-bottom: 0 !important; }
/* Softer cards: preserve hover affordance without heavy dark halos. */
body.home-v3 .tile, body.home-v3 .week-card {
  box-shadow: 0 5px 18px rgba(9, 34, 68, .14);
  transition: transform .2s ease, box-shadow .2s ease;
}
body.home-v3 .tile:hover, body.home-v3 .week-card:hover {
  box-shadow: 0 10px 24px rgba(9, 34, 68, .21);
}
body.home-v3 .hero-v2.week-flip .home-flip .weekly-flip {
  box-shadow: 0 5px 18px rgba(9, 34, 68, .17) !important;
}
/* Make Surprise me the primary invitation in the opening row. */
body.home-v3 header.hero-v3 .surprise-row .way-surprise {
  min-height: 78px;
  padding: 15px 23px;
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(9, 34, 68, .24);
  outline-offset: 4px;
}
body.home-v3 header.hero-v3 .surprise-row .way-surprise:hover {
  box-shadow: 0 11px 28px rgba(9, 34, 68, .3);
}
body.home-v3 header.hero-v3 .surprise-row .way-surprise:focus-visible {
  outline: 3px solid #fff;
}
/* Consistent section rhythm, including the first and final sections. */
body.home-v3 .home-main .hs { padding-top: 68px; padding-bottom: 68px; }
body.home-v3 .home-main #this-week { padding-top: 34px; }
body.home-v3 .home-main .hs-navy { padding-top: 52px; padding-bottom: 52px; }
body.home-v3 .home-main .hs-why { padding-top: 72px; padding-bottom: 80px; }
@media (max-width: 760px) {
  body.home-v3 .home-main .hs { padding-top: 48px; padding-bottom: 48px; }
  body.home-v3 .home-main #this-week { padding-top: 26px; }
  body.home-v3 .home-main .hs-why { padding-bottom: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  body.home-v3 .tile, body.home-v3 .week-card { transition: none; }
}

/* October 2026: softer world-map canvas, with quieter geography.
   Override only the background and map; preserve all other refinements. */
body.home.home-v3, body.home-v3 .hero-bg { background-color: #6688AD; }
body.home-v3 .hero-bg .hero-map {
  opacity: .19;
  filter: brightness(1.8) saturate(.43);
}
/* Gentle contrast support for white copy on the lighter blue canvas. */
body.home-v3 header.hero-v3 .hero-words,
body.home-v3 .home-main .hs-title,
body.home-v3 .home-main .hs-sub {
  text-shadow: 0 1px 3px rgba(15, 41, 75, .35);
}

/* Balanced map: independently defined darker continents and quiet gridlines. */
body.home-v3 .hero-bg .hero-map { opacity: .72; filter: none; }

/* Mobile homepage refinements — desktop untouched. */
@media (max-width: 640px) {
  body.home-v3 .hero-bg .hero-map { opacity: .60; }
  body.home-v3 header.hero-v3 .surprise-row .way-surprise {
    min-height: 66px; padding: 10px 14px; border-radius: 12px;
  }
  body.home-v3 .home-main #this-week { padding-top: 12px; }
  body.home-v3 .home-main .hs-why { padding-top: 34px; padding-bottom: 40px; }
  body.home-v3 .why-grid { gap: 12px; }
  body.home-v3 .why-mark { font-size: clamp(62px, 16vw, 76px); }
  body.home-v3 .why-copy p { font-size: .96rem; line-height: 1.55; }
}

/* October 2026: tighter vertical rhythm on phones only. */
@media (max-width: 640px) {
  body.home-v3 .home-main .hs { padding-top: 28px; padding-bottom: 28px; }
  body.home-v3 .home-main #this-week { padding-top: 12px; padding-bottom: 24px; }
  body.home-v3 .home-main .hs-navy { padding-top: 30px; padding-bottom: 30px; }
  body.home-v3 .home-main .hs-why { padding-top: 34px; padding-bottom: 40px; }
  body.home-v3 .home-main .hs-more { margin-top: 18px; }
  body.home-v3 .home-main .tile-grid { margin-top: 22px; }
}

/* Weekly feature cards: equal columns, consistent surfaces, distinct accents. */
@media (min-width: 981px) {
  body.home-v3 #this-week .week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}
body.home-v3 #this-week .week-flip,
body.home-v3 #this-week .week-flip .hero-flipbox,
body.home-v3 #this-week .week-flip .home-flip { min-width: 0; width: 100%; }
body.home-v3 #this-week .week-card,
body.home-v3 #this-week .week-flip .weekly-flip {
  background: #E3EFF7 !important;
  color: #1A3E6E;
}
body.home-v3 #this-week .week-card { border-top: 6px solid #1A3E6E; }
body.home-v3 #this-week .week-card:last-child { border-top-color: #5489BB; }
body.home-v3 #this-week .week-flip .weekly-flip { border-top-color: #E59E12 !important; }
body.home-v3 #this-week .week-flip .daily-choices { flex-wrap: wrap; gap: 8px; }
body.home-v3 #this-week .week-flip .daily-choices button { max-width: 100%; white-space: normal; }

/* October 10: final desktop hero balance and visible Challenge accent. */
body.home-v3 #this-week .week-card:last-child { border-top: 7px solid #1769C2 !important; }
@media (min-width: 761px) {
  body.home-v3 header.hero-v3 .hero-words {
    flex: 1 1 0; min-width: 0; text-align: center;
    transform: translate(18px, 12px);
  }
  body.home-v3 header.hero-v3 .hero-line {
    margin: 18px auto 0 !important; text-align: center;
  }
}

/* October 10: protect italic hero subtitle descenders from clipping. */
body.home-v3 header.hero-v3 .hero-line {
  line-height: 1.4 !important;
  height: auto;
  max-height: none;
  overflow: visible;
  padding-bottom: 0.15em;
}

/* Oct 13: bring weekly features and recent links higher on desktop only.
   Preserve approved card dimensions, typography, colors, and mobile layout. */
@media (min-width: 981px) {
  body.home-v3 header.hero-v3 .hero-v3-inner {
    padding-top: 18px;
    padding-bottom: 0;
  }
  body.home-v3 .home-main #this-week {
    padding-top: 8px;
    padding-bottom: 20px;
  }
  body.home-v3 #this-week .week-grid { margin-top: 12px; }
  body.home-v3 #this-week .hs-more { margin-top: 12px; }
}

/* Oct 13: allow the complete subtitle to paint over the blue canvas.
   The older home-hero.css sets overflow:hidden on header.hero-v2,
   which clips the descenders when the compact hero is used. */
@media (min-width: 981px) {
  body.home-v3 header.hero-v3 {
    overflow: visible;
  }
}
/* Smaller heading for the pre-release Weekly Flip announcement */
#weekly-flip .flip-coming-soon {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}
/* Keep unreleased Weekly Flip answers hidden */
#weekly-flip [hidden] {
  display: none !important;
}
/* Weekly cards: steady hover feedback without positional movement. */
body.home-v3 #this-week .week-card,
body.home-v3 #this-week .week-card:hover,
body.home-v3 #this-week .week-card:focus-visible,
body.home-v3 #this-week .week-card:active{transform:none;transition:box-shadow .2s ease}
@media(prefers-reduced-motion:reduce){body.home-v3 #this-week .week-card{transition:none}}

/* Weekly Flip card matches the Trick and Challenge cards (Oct 30 2026). */
#weekly-flip { align-items: center; }
#weekly-flip .flip-icon { display: block; margin: 0 auto 6px; }
#weekly-flip > .week-label { margin: 0 0 4px !important; }
body #weekly-flip.weekly-flip > h3 { margin: 0 !important; font-size: 1.2rem !important; line-height: 1.25 !important; color: #1A3E6E; text-wrap: balance; }
#weekly-flip .daily-response { width: 100%; }


/* 5FORFREE offer link in the "Teaching?" band (Nov 2026). */
.hs-offer { margin: 16px 0 0; }
.hs-offer a { display: inline-block; padding: 10px 16px; border-radius: 10px; border-left: 5px solid #E59E12; background: #FFF4DF; color: #183746; font-size: 1rem; line-height: 1.4; text-decoration: none; }
.hs-offer a strong { font-weight: 900; }
.hs-offer a:hover { background: #ffffff; }
