/* ==========================================================================
   Home Page (Option B · media mosaic) — La Habra Historical Museum
   Source of truth: Design/home-option-b-media-mosaic.html. Nav + footer
   live in site-chrome.css (shared with every other page); this file is
   the hero/mosaic/cards/events sections unique to Home. Scoped under
   .home-page so it can't collide with tokens.css/base.css's own globals.
   Enqueued only on template-home.php.
   ========================================================================== */

.home-page {
  --display: var(--font-display);
  --heritage: var(--font-heritage);
  --text: var(--font-text);
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

.home-page ::selection { background: var(--sage); color: var(--cream); }
.home-page section { position: relative; }

/* ---------- placeholder photo utility ---------- */
.home-page .ph-photo { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--sage-tint), var(--harbor-tint)); display: flex; align-items: center; justify-content: center; }
.home-page .ph-photo::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(30, 36, 32, .05) 0 10px, transparent 10px 20px); }
.home-page .ph-photo span { position: relative; z-index: 1; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--deep-sage); text-align: center; padding: 0 16px; max-width: 85%; }
.home-page .ph-r1 { border-radius: 40px 12px 12px 12px; }
.home-page .ph-r2 { border-radius: 12px 40px 12px 12px; }
.home-page .ph-r3 { border-radius: 12px 12px 12px 40px; }
.home-page .ph-r4 { border-radius: 12px 12px 40px 12px; }

/* ---------- floating blobs ---------- */
.home-page .blob { position: absolute; filter: blur(20px); opacity: .16; pointer-events: none; border-radius: 50% 40% 60% 50%/60% 50% 40% 50%; }
.home-page .blob.b1 { width: 360px; height: 360px; background: var(--meadow); top: -100px; left: -80px; animation: home-blobdrift 58s ease-in-out infinite alternate; }
.home-page .blob.b2 { width: 280px; height: 280px; background: var(--harbor); bottom: -90px; right: -60px; animation: home-blobdrift 44s ease-in-out infinite alternate-reverse; }
@keyframes home-blobdrift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(34px, -22px) scale(1.08); } 100% { transform: translate(-22px, 16px) scale(.95); } }

/* ---------- gentle float (mosaic / event tiles) ---------- */
.home-page .floaty { animation: home-floatbob 6.5s ease-in-out infinite; }
.home-page .floaty:nth-child(2) { animation-delay: .3s; }
.home-page .floaty:nth-child(3) { animation-delay: .9s; }
.home-page .floaty:nth-child(4) { animation-delay: 1.4s; }
.home-page .floaty:nth-child(5) { animation-delay: .6s; }
@keyframes home-floatbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- wave dividers ---------- */
.home-page .wave { display: block; width: 100%; height: 44px; margin-bottom: -2px; }

/* ---------- hero (cream, centered, no photo) ---------- */
.home-page .hero { position: relative; min-height: 80vh; min-height: min(760px, 90svh); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 64px 24px clamp(150px, 16vw, 210px); background: linear-gradient(180deg, #F8F5EA, #F1ECDD 55%, #EDE7D4); }
.home-page .hero-inner { position: relative; z-index: 2; max-width: 760px; display: flex; flex-direction: column; align-items: center; }
.home-page .badge-plate { background: #F7F3E8; border-radius: 999px 999px 24px 24px; padding: 22px 26px 16px; box-shadow: 0 20px 48px -28px rgba(30, 36, 32, .4); margin-bottom: 22px; }
/* Client feedback, staging review: homepage hero logo read as too small
   at the approved comp's original 66px — sized up for more presence.
   Round 2 (Jul 20): still read as too small on mobile, sized up again. */
.home-page .badge-plate img { width: 160px; height: auto; }
.home-page .eyebrow { font-family: var(--heritage); font-style: italic; font-size: clamp(17px, 1.8vw, 20px); color: var(--harbor); margin-bottom: 12px; }
.home-page h1 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 5.4vw, 58px); line-height: 1.06; letter-spacing: -.02em; margin-bottom: 16px; }
.home-page h1 em { font-family: var(--heritage); font-style: italic; font-weight: 400; color: var(--sage); letter-spacing: 0; }
.home-page .free-pill { display: inline-block; background: var(--meadow); color: var(--ink); font-weight: 700; font-size: 13.5px; letter-spacing: .04em; padding: 8px 16px; border-radius: 999px; margin-bottom: 22px; }
.home-page .opening-ribbon { display: inline-block; background: var(--harbor); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .03em; padding: 7px 16px; border-radius: 999px; margin-bottom: 18px; }
.home-page .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.home-page .pill { display: inline-block; font-family: var(--text); font-weight: 700; font-size: 15.5px; padding: 13px 26px; border-radius: 999px; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease; }
.home-page .pill.p { background: var(--deep-sage); color: var(--cream); box-shadow: 0 14px 28px -14px rgba(79, 107, 61, .6); }
.home-page .pill.p:hover { background: #3F5730; transform: translateY(-2px); }
.home-page .pill.ghost.on-cream { color: var(--ink); border: 2px solid rgba(30, 36, 32, .22); background: transparent; }
.home-page .pill.ghost.on-cream:hover { border-color: var(--harbor); color: var(--harbor); transform: translateY(-2px); }
.home-page .hero .hills { position: absolute; left: 0; right: 0; bottom: -2px; z-index: 3; pointer-events: none; height: clamp(120px, 15vw, 190px); }
.home-page .hero .hills svg { position: absolute; left: -3%; bottom: 0; width: 106%; height: 100%; }
.home-page .hill-back { animation: home-drift 26s ease-in-out infinite alternate; }
.home-page .hill-mid { animation: home-drift 20s ease-in-out infinite alternate-reverse; }
@keyframes home-drift { from { transform: translateX(-1.4%); } to { transform: translateX(1.4%); } }
.home-page .burst { position: absolute; top: 50%; left: 50%; width: min(150vw, 1250px); height: min(150vw, 1250px); transform: translate(-50%, -56%); opacity: .55; pointer-events: none; z-index: 1; }
.home-page .burst svg { width: 100%; height: 100%; animation: home-turn 140s linear infinite; transform-origin: center; }
@keyframes home-turn { to { transform: rotate(360deg); } }

/* ---------- section shared ---------- */
.home-page .pad { padding: clamp(56px, 7.5vw, 100px) clamp(22px, 6vw, 72px); }
.home-page .bg-cream { background: var(--cream); }
.home-page .bg-tint { background: var(--sage-tint); }
.home-page .bg-deep { background: var(--deep-sage); color: var(--cream); }
.home-page .label { font-family: var(--text); font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; display: block; color: var(--deep-sage); }
.home-page h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 46px); line-height: 1.08; letter-spacing: -.015em; margin-bottom: 16px; }
.home-page h2 em { font-family: var(--heritage); font-style: italic; font-weight: 400; }
.home-page .section-inner { max-width: 1150px; margin: 0 auto; }
.home-page .copy { font-size: 17.5px; line-height: 1.7; color: #3E4740; margin-bottom: 6px; }

/* ---------- mosaic wall ---------- */
.home-page .mosaic { display: grid; grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 16px; margin-top: 28px; }
.home-page .mosaic a { display: block; text-decoration: none; color: inherit; }
.home-page .mosaic .tile-video { grid-row: 1/3; position: relative; }
.home-page .mosaic .ph-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; position: relative; z-index: 1; }
.home-page .mosaic .ph-photo .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 14px 10px; background: linear-gradient(180deg, transparent, rgba(30, 36, 32, .72) 60%); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-align: left; }
.home-page .mosaic .tile-video .cap { font-size: 13.5px; padding: 26px 16px 12px; }
.home-page .mosaic .ph-photo { height: 100%; }
@media (max-width: 760px) { .home-page .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 180px); } .home-page .mosaic .tile-video { grid-column: 1/3; grid-row: auto; height: 260px; } }

/* ---------- featured sections cards ---------- */
.home-page .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(16px, 2.4vw, 26px); max-width: 1150px; margin: 28px auto 0; }
/* min-width: 0 overrides the grid item's default min-width: auto — without
   it, a real photo's large intrinsic pixel size (not the CSS width: 100%
   on the img, which is a percentage and doesn't count as "definite" for
   grid track sizing) gets used as this card's minimum content size,
   ballooning its auto-fit track and collapsing the other three to 0. Never
   surfaced with the old placeholder <span> text, which has a tiny intrinsic
   width — only showed up once real <img> content replaced it. */
.home-page .card { background: var(--cream); border: 1px solid rgba(30, 36, 32, .08); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; min-width: 0; }
.home-page .card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -30px rgba(20, 26, 18, .4); }
.home-page .card:nth-child(1) { border-radius: 120px 26px 26px 26px; }
.home-page .card:nth-child(2) { border-radius: 26px 120px 26px 26px; }
.home-page .card:nth-child(3) { border-radius: 26px 26px 26px 120px; }
.home-page .card:nth-child(4) { border-radius: 26px 26px 120px 26px; }
@media (max-width: 560px) {
  .home-page .card:nth-child(1) { border-radius: 80px 22px 22px 22px; }
  .home-page .card:nth-child(2) { border-radius: 22px 80px 22px 22px; }
  .home-page .card:nth-child(3) { border-radius: 22px 22px 22px 80px; }
  .home-page .card:nth-child(4) { border-radius: 22px 22px 80px 22px; }
}
.home-page .card .ph-photo { height: 130px; }
.home-page .card .ph-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; position: relative; z-index: 1; }
/* Membership card uses the logo, not a photo — contain + padding + solid
   plate so the full mark stays visible instead of getting cropped like a
   photo would (cover-cropping a logo cuts off the windmill/wordmark). */
.home-page .card .ph-photo.logo-fill { background: var(--cream); padding: 18px; }
.home-page .card .ph-photo.logo-fill img { object-fit: contain; position: relative; z-index: 1; }
/* Membership card with a real (portrait) photo: blurred-backdrop treatment
   so the whole windmill shows without cropping, same as the Contact/exhibit
   heroes. Only this card uses it — the others stay edge-to-edge cover. */
.home-page .card .ph-photo.hero-media { overflow: hidden; background: #20261e; }
.home-page .card .ph-photo.hero-media::before { display: none; }
.home-page .card .ph-photo.hero-media .hero-blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(20px) brightness(.62) saturate(1.1); transform: scale(1.2); z-index: 0; }
.home-page .card .ph-photo.hero-media .hero-main { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.home-page .card-body { padding: 18px 20px 22px; }
.home-page .card h3 { font-family: var(--display); font-weight: 700; font-size: 19px; margin-bottom: 6px; }
.home-page .card p { font-size: 15.5px; line-height: 1.55; color: #3E4740; margin-bottom: 12px; }
.home-page .card .pill { padding: 8px 16px; font-size: 13.5px; }
.home-page .cards .card:nth-child(3) .pill { margin-left: 56px; }

/* ---------- upcoming events ---------- */
.home-page .events { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.home-page .event-row { display: flex; gap: 16px; align-items: center; border: 1.5px solid rgba(30, 36, 32, .14); border-radius: 16px; padding: 12px; transition: border-color .2s, transform .2s; text-decoration: none; color: inherit; }
.home-page .event-row:hover { border-color: var(--sage); transform: translateY(-2px); }
.home-page .event-row .ph-photo { width: 80px; height: 60px; flex: none; border-radius: 10px; }
.home-page .event-row .ph-photo span { font-size: 8px; padding: 0 4px; }
.home-page .event-title { font-family: var(--display); font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.home-page .event-sub { font-size: 14px; color: #5a6a5a; }
.home-page .event-date { margin-left: auto; background: var(--meadow); color: var(--ink); font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

/* ---------- stay connected / social row ---------- */
.home-page .notify-wrap { max-width: 640px; margin: 0 auto; text-align: center; }
.home-page .bg-deep .eyebrow { color: #C9DDB4; }
.home-page .bg-deep .copy { color: #DCE8DC; }
.home-page .social-row { text-align: center; padding: 36px 16px 40px; }
.home-page .social-row .share { display: flex; gap: 14px; justify-content: center; margin-top: 16px; }
.home-page .social-row .share a { width: 44px; height: 44px; border-radius: 50%; background: var(--sage-tint); display: flex; align-items: center; justify-content: center; color: var(--deep-sage); transition: background .22s ease, color .22s ease, transform .22s ease; box-shadow: 0 8px 18px -12px rgba(30, 36, 32, .35); }
.home-page .social-row .share a:hover { background: var(--sage); color: var(--cream); transform: translateY(-3px); }
.home-page .social-row .share svg { width: 19px; height: 19px; }

@media (prefers-reduced-motion: reduce) {
  .home-page .hill-back, .home-page .hill-mid, .home-page .blob, .home-page .floaty, .home-page .burst svg { animation: none; }
}

/* ---------- mosaic lightbox (mirrors gallery-page.css's .gallery-page
   .lightbox rules; duplicated rather than shared since each page loads
   its own scoped stylesheet, not a common one) ---------- */
/* Targeted button reset, not `all: unset` — unset would out-specificity
   (extra type selector) .tile-video's own grid-row rule below it and
   silently break that tile's 2-row span. */
.home-page .mosaic button[data-idx] { border: 0; margin: 0; padding: 0; background: none; font: inherit; text-align: inherit; color: inherit; cursor: pointer; display: block; width: 100%; }
.home-page .lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 48px); }
.home-page .lightbox.is-open { display: flex; }
.home-page .lightbox-scrim { position: absolute; inset: 0; background: rgba(20, 26, 18, .88); opacity: 0; transition: opacity .3s ease; }
.home-page .lightbox.is-open .lightbox-scrim { opacity: 1; }
.home-page .lightbox-body { position: relative; z-index: 2; max-width: min(1000px, 92vw); max-height: 88vh; display: flex; flex-direction: column; background: var(--cream); border-radius: 6px; overflow: hidden; transform: scale(.94); opacity: 0; transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .32s ease; }
.home-page .lightbox.is-open .lightbox-body { transform: scale(1); opacity: 1; }
.home-page .lightbox-frame { position: relative; background: #0f130f; display: flex; align-items: center; justify-content: center; max-height: 66vh; }
.home-page .lightbox-frame img { max-width: 100%; max-height: 66vh; width: auto; height: auto; object-fit: contain; display: block; }
.home-page .lightbox-caption { padding: 18px 26px 22px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.home-page .lightbox-caption h3 { font-family: var(--display); font-weight: 700; font-size: 20px; margin: 0; }
.home-page .lightbox-caption p { font-size: 15px; color: #4a5650; line-height: 1.55; margin-top: 8px; }
.home-page .lightbox-close, .home-page .lightbox-nav { position: absolute; background: rgba(241, 236, 221, .94); border: none; border-radius: 999px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); transition: background .2s, transform .2s; }
.home-page .lightbox-close:hover, .home-page .lightbox-nav:hover { background: #fff; transform: scale(1.06); }
.home-page .lightbox-close { top: 14px; right: 14px; z-index: 3; }
.home-page .lightbox-nav { top: 50%; transform: translateY(-50%); z-index: 3; }
.home-page .lightbox-nav.prev { left: 14px; }
.home-page .lightbox-nav.next { right: 14px; }
.home-page .lightbox-nav svg, .home-page .lightbox-close svg { width: 20px; height: 20px; }
.home-page .lightbox-count { position: absolute; left: 14px; bottom: 14px; z-index: 3; background: rgba(30, 36, 32, .55); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; padding: 5px 12px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .home-page .lightbox-body, .home-page .lightbox-scrim { transition: none; } }
@media (max-width: 640px) { .home-page .lightbox-nav { width: 38px; height: 38px; } .home-page .lightbox-close { width: 38px; height: 38px; } }
