/* ============================================================
   Saintly homepage. Playful, colorful layer on top of styles.css.
   Every class is prefixed h- so other pages stay untouched.
   ============================================================ */

@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-700Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-600SemiBold.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-400Regular_Italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --h-ink: #1A1410;
  --h-navy: #1E2E48;
  --h-navy-deep: #141F33;
  --h-terracotta: #C66B3C;
  --h-terracotta-text: #9A4520; /* 4.9:1 or better on every light band */
  --h-gold: #D4A94C;
  --h-flame: #F08A2C;
  --h-rose: #F4DCD2;
  --h-sage: #DCE6D3;
  --h-green: #3F6B4A;
  --h-peach: #FCE3C8;
  --h-night: #241F3D;
  --h-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

html, body { overflow-x: clip; }
[class^="h-"] img, img[class^="h-"] { height: auto; }

.h-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; position: relative; }

.h-eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--h-terracotta-text);
  margin-bottom: 18px;
}
.h-hero h1, .h-head h2, .h-final h2 {
  font-family: var(--h-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.h-hero h1 em, .h-head h2 em, .h-final h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--h-terracotta);
  display: block;
}
.h-head h2 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 18px; }
.h-head p { font-size: 18px; line-height: 1.55; color: rgba(26,20,16,0.72); max-width: 560px; }
.h-center { text-align: center; }
.h-center p { margin: 0 auto; }

.h-phone {
  border-radius: 34px;
  padding: 7px;
  background: #1A1410;
  box-shadow: 0 30px 60px -20px rgba(26,20,16,0.45), 0 0 0 1px rgba(255,255,255,0.06) inset;
  overflow: hidden;
}
.h-phone img { width: 100%; height: auto; border-radius: 28px; }

.h-float { position: absolute; animation: h-bob 6s ease-in-out infinite; }
@keyframes h-bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(var(--r, 0deg)); } }

/* ---------- Hero ---------- */
.h-hero { position: relative; overflow: hidden; padding: 56px 0 96px; }
.h-hero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(240,138,44,0.28), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(212,169,76,0.22), transparent 70%),
    linear-gradient(180deg, #FBEFD9 0%, #F6EDDD 100%);
}
.h-hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
.h-hero h1 { font-size: clamp(52px, 7.4vw, 96px); margin-bottom: 24px; }
.h-lede { font-size: 19px; line-height: 1.55; color: rgba(26,20,16,0.75); max-width: 500px; margin-bottom: 32px; }
.h-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.h-cta-note { font-size: 13px; color: rgba(26,20,16,0.55); padding-left: 4px; }

.h-hero-stage { position: relative; height: 600px; }
.h-hero-stage .h-phone { position: absolute; width: 250px; }
.h-phone-main { left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; width: 268px !important; }
.h-phone-left { left: 2%; top: 80px; transform: rotate(-8deg); z-index: 2; }
.h-phone-right { right: 2%; top: 80px; transform: rotate(8deg); z-index: 2; }
.h-glowy-hero { width: 150px; left: -70px; bottom: -20px; z-index: 5; }
.h-chip {
  z-index: 6;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--h-ink);
  font-size: 14px; font-weight: 700;
  padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 12px 30px -10px rgba(26,20,16,0.35);
  white-space: nowrap;
}
.h-chip-streak { top: 30px; left: 0; animation-delay: -1s; }
.h-chip-xp { top: 250px; right: -6px; color: var(--h-terracotta-text); animation-delay: -3s; }
.h-chip-right { bottom: 70px; right: 20px; color: var(--h-green); animation-delay: -2s; }
.h-flame { width: 14px; height: 18px; background: var(--h-flame); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: 0 0 10px rgba(240,138,44,0.6); }
.h-check { width: 18px; height: 18px; border-radius: 50%; background: var(--h-green); position: relative; }
.h-check::after { content: ''; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.h-badge-hero { width: 84px; z-index: 6; filter: drop-shadow(0 10px 18px rgba(26,20,16,0.3)); }
.h-badge-a { top: 0; right: 16%; --r: 10deg; animation-delay: -4s; }
.h-badge-b { bottom: 160px; left: 22%; width: 64px; --r: -12deg; animation-delay: -2.5s; z-index: 1; }

/* ---------- Marquee ---------- */
.h-marquee { background: var(--h-navy); color: #F6EDDD; overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg); margin: -20px -10px 0; position: relative; z-index: 4; }
.h-marquee-track { display: flex; width: max-content; animation: h-scroll 40s linear infinite; }
.h-marquee-set { display: flex; align-items: center; gap: 22px; padding-right: 22px; }
.h-marquee span { font-family: var(--h-display); font-size: 26px; font-weight: 600; white-space: nowrap; }
.h-marquee img { width: 44px; height: 44px; }
@keyframes h-scroll { to { transform: translateX(-50%); } }

/* ---------- Inside ---------- */
.h-inside { padding: 120px 0 110px; overflow: hidden; }
.h-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 64px; align-items: end; }
.h-trio-card { margin: 0; position: relative; }
.h-trio-card .h-phone { max-width: 280px; margin: 0 auto; }
.h-trio-mid { transform: translateY(-36px); }
.h-trio-card figcaption { text-align: center; margin-top: 22px; }
.h-trio-card figcaption strong { display: block; font-family: var(--h-display); font-size: 26px; color: var(--h-terracotta); }
.h-trio-card figcaption span { display: block; font-size: 16px; color: rgba(26,20,16,0.75); margin-top: 4px; }
.h-trio-glowy { position: absolute; width: 104px; right: -34px; top: -80px; transform: rotate(10deg); }

/* ---------- Colored bands ---------- */
.h-band { padding: 110px 0; position: relative; overflow: hidden; }
.h-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.h-split-rev > :first-child { order: 2; }
.h-stats { margin-top: 40px; font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(26,20,16,0.78); text-align: center; }

/* Courses */
.h-courses { background: var(--h-navy); color: #F6EDDD; }
.h-courses .h-head p, .h-courses .h-stats { color: rgba(246,237,221,0.85); }
.h-courses .h-eyebrow, .h-courses .h-head h2 em { color: var(--h-gold); }
.h-shelf { display: flex; gap: 18px; overflow-x: auto; padding: 48px 24px 12px max(24px, calc((100vw - 1112px) / 2)); scroll-snap-type: x mandatory; scrollbar-width: none; }
.h-shelf::-webkit-scrollbar { display: none; }
.h-course { flex: 0 0 210px; height: 290px; border-radius: 20px; overflow: hidden; position: relative; scroll-snap-align: start; box-shadow: 0 18px 40px -16px rgba(0,0,0,0.6); transition: transform .3s var(--ease-out); }
.h-course:hover { transform: translateY(-6px) rotate(-1deg); }
.h-course img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h-course::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10,14,24,0.85)); }
.h-course strong { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; font-family: var(--h-display); font-size: 20px; line-height: 1.15; color: #fff; }
.h-level { position: absolute; top: 12px; left: 12px; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; padding: 5px 10px; border-radius: 999px; background: rgba(246,237,221,0.92); color: var(--h-navy); }

/* Bible */
.h-bible { background: linear-gradient(180deg, #FBEFD9, #F3DFB8); }
.h-pills { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.h-pills li { background: #fff; border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 16px -8px rgba(26,20,16,0.3); }
.h-pills li::before { content: '✦'; color: var(--h-gold); margin-right: 8px; }
.h-duo { position: relative; height: 560px; }
.h-duo .h-phone { position: absolute; width: 250px; }
.h-duo-back { left: 6%; top: 0; transform: rotate(-6deg); }
.h-duo-front { right: 6%; top: 50px; transform: rotate(5deg); }
.h-duo-glowy { width: 130px; left: -60px; bottom: -20px; z-index: 3; }

/* Saints */
.h-saints { background: var(--h-rose); }
.h-cards { display: flex; justify-content: center; gap: 0; margin-top: 56px; padding: 0 24px; }
.h-saint {
  flex: 0 0 168px; margin: 0 -1px;
  background: #FFF8EE; border-radius: 18px; padding: 8px 8px 14px;
  border: 2px solid var(--h-gold);
  box-shadow: 0 20px 40px -18px rgba(90,40,20,0.45);
  transition: transform .35s var(--ease-out);
}
.h-saint:nth-child(1) { transform: rotate(-9deg) translateY(36px); }
.h-saint:nth-child(2) { transform: rotate(-6deg) translateY(16px); }
.h-saint:nth-child(3) { transform: rotate(-3deg) translateY(4px); }
.h-saint:nth-child(4) { transform: translateY(-6px) scale(1.06); z-index: 2; }
.h-saint:nth-child(5) { transform: rotate(3deg) translateY(4px); }
.h-saint:nth-child(6) { transform: rotate(6deg) translateY(16px); }
.h-saint:nth-child(7) { transform: rotate(9deg) translateY(36px); }
.h-saint:hover { transform: translateY(-20px) rotate(0) scale(1.08); z-index: 3; }
.h-saint[aria-hidden] { display: none; } /* loop copies, only used by the mobile marquee */
.h-saint img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.h-saint div { padding: 10px 4px 0; text-align: center; }
.h-saint strong { display: block; font-family: var(--h-display); font-size: 16px; line-height: 1.2; }
.h-saint span { display: block; font-size: 12px; font-weight: 700; color: var(--h-terracotta-text); margin-top: 4px; letter-spacing: 0.5px; }
.h-saints .h-stats strong { font-family: var(--h-display); font-size: 28px; color: var(--h-terracotta-text); letter-spacing: 0; }
.h-saints .h-head h2 em { color: #A34B22; }
.h-saints .h-stats { margin-top: 64px; }

/* Streak */
.h-streak { background: var(--h-peach); }
.h-streak .h-head h2 em { color: #C2570F; }
.h-badges { display: grid; grid-template-columns: repeat(4, 72px); gap: 14px; margin-top: 32px; }
.h-badges img { width: 72px; height: 72px; transition: transform .3s var(--ease-out); }
.h-badges img:hover { transform: scale(1.12) rotate(-6deg); }
.h-streak-card {
  background: #fff; border-radius: 32px; padding: 40px 32px 32px; text-align: center; position: relative;
  box-shadow: 0 30px 60px -24px rgba(200,90,20,0.45); max-width: 420px; margin: 60px auto 0;
}
.h-streak-glowy { width: 200px; margin: -150px auto 0; animation: h-bob 5s ease-in-out infinite; }
.h-streak-num { font-family: var(--h-display); font-size: 96px; font-weight: 700; line-height: 1; color: #C2570F; }
.h-streak-label { font-size: 18px; font-weight: 700; margin-top: 4px; }
.h-week { list-style: none; padding: 0; margin: 26px 0 0; display: flex; justify-content: space-between; }
.h-week li { display: flex; }
.h-week i { width: 34px; height: 34px; border-radius: 50%; background: #F3E6D6; position: relative; }
.h-week li.on i { background: var(--h-flame); }
.h-week li.on i::after { content: ''; position: absolute; left: 12px; top: 9px; width: 10px; height: 14px; background: #FFE3B3; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.h-week li.today i { background: #fff; border: 3px dashed var(--h-flame); }

/* Prayer */
.h-prayer { background: var(--h-night); color: #F1ECFA; }
.h-prayer .h-eyebrow, .h-prayer .h-head h2 em { color: #E7B9F0; }
.h-prayer .h-head p { color: rgba(241,236,250,0.75); }
.h-prayer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }
.h-pcard { border-radius: 22px; overflow: hidden; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); transition: transform .3s var(--ease-out); }
.h-pcard:hover { transform: translateY(-6px); }
.h-pcard img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.h-pcard div { padding: 16px 18px 20px; }
.h-pcard strong { display: block; font-family: var(--h-display); font-size: 21px; }
.h-pcard span { display: block; font-size: 14px; color: rgba(241,236,250,0.7); margin-top: 4px; }
.h-prayer-glowy { width: 120px; right: 10px; top: -70px; }

/* Ask Glowy */
.h-ask { background: var(--h-sage); }
.h-ask .h-eyebrow, .h-ask .h-head h2 em { color: var(--h-green); }
.h-credit { margin-top: 18px; font-size: 14px !important; color: rgba(26,20,16,0.78) !important; }
.h-chat { position: relative; background: #FCF7EE; border-radius: 32px; padding: 48px 28px 28px; box-shadow: 0 30px 60px -28px rgba(30,60,40,0.5); max-width: 460px; margin: 40px auto 0; }
.h-chat-glowy { position: absolute; width: 110px; left: -78px; top: -96px; transform: rotate(-8deg); }
.h-bubble { border-radius: 22px; padding: 14px 18px; font-size: 16px; line-height: 1.45; max-width: 85%; margin-bottom: 12px; }
.h-bubble-user { background: var(--h-ink); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; }
.h-bubble-bot { background: #fff; border: 1px solid rgba(26,20,16,0.08); border-bottom-left-radius: 6px; }
.h-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.h-sources span { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: rgba(63,107,74,0.12); color: var(--h-green); }

/* Widgets */
.h-widgets { background: #F6EDDD; }
.h-wall {
  margin: 56px auto 0; max-width: 760px; padding: 40px; border-radius: 40px;
  background: url('/img/home/bg-sky.webp') center / cover, #DCE8F0;
  display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: auto; gap: 20px;
  box-shadow: 0 30px 60px -28px rgba(26,20,16,0.45);
}
.h-widget { background: rgba(252,247,238,0.94); border-radius: 26px; padding: 22px; box-shadow: 0 12px 30px -14px rgba(26,20,16,0.35); }
.h-widget-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--h-terracotta-text); }
.h-widget-verse p { font-family: var(--h-display); font-size: 24px; line-height: 1.25; margin: 10px 0; }
.h-widget-ref { font-size: 13px; font-weight: 600; color: rgba(26,20,16,0.55); }
.h-widget-streak { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.h-widget-streak img { width: 76px; }
.h-widget-streak strong { font-family: var(--h-display); font-size: 40px; line-height: 1; color: #C2570F; }
.h-widget-streak span { font-size: 13px; font-weight: 700; }
.h-widget-saint { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.h-widget-saint img { width: 84px; height: 84px; object-fit: cover; border-radius: 18px; }
.h-widget-saint strong { display: block; font-family: var(--h-display); font-size: 24px; margin-top: 4px; }

/* Blog */
.h-blog { padding: 110px 0; }
.h-blog-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.h-link { font-weight: 700; color: var(--h-terracotta-text); border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.h-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.h-post { background: #FCF7EE; border-radius: 22px; overflow: hidden; box-shadow: 0 1px 0 rgba(26,20,16,0.06); transition: transform .3s var(--ease-out), box-shadow .3s; }
.h-post:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(26,20,16,0.4); }
.h-post img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.h-post .meta { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--h-terracotta-text); padding: 18px 20px 0; }
.h-post h3 { font-family: var(--h-display); font-size: 22px; line-height: 1.2; padding: 8px 20px 24px; }

/* Final CTA */
.h-final { background: linear-gradient(135deg, #F08A2C, #D4A94C); color: var(--h-ink); padding: 110px 0; position: relative; overflow: hidden; }
.h-final .h-wrap { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 40px; }
.h-final .h-eyebrow { color: var(--h-ink); opacity: 0.7; }
.h-final h2 { font-size: clamp(38px, 5vw, 62px); margin-bottom: 18px; }
.h-final h2 em { color: #7A2E10; }
.h-final p { font-size: 18px; margin-bottom: 28px; }
.h-final-glowy { width: 300px; margin: 0 auto; animation: h-bob 5s ease-in-out infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .h-hero-grid, .h-split, .h-final .h-wrap { grid-template-columns: 1fr; }
  .h-split-rev > :first-child { order: 0; }
  .h-hero { padding-top: 32px; }
  .h-hero-stage { height: 520px; max-width: 480px; margin: 0 auto; width: 100%; }
  .h-trio { grid-template-columns: 1fr; gap: 56px; }
  .h-trio-mid { transform: none; }
  .h-trio-glowy { right: 4%; }
  .h-duo-glowy { left: 0; width: 100px; }
  .h-prayer-grid, .h-blog-grid { grid-template-columns: 1fr 1fr; }
  /* Saint cards run across the screen like the topic marquee. Rotation keyed on 7n so the -50% loop seam is invisible. */
  .h-cards { justify-content: flex-start; width: max-content; padding: 30px 0 50px; animation: h-scroll 50s linear infinite; }
  .h-saint, .h-saint[aria-hidden] { display: block; flex-basis: 150px; margin: 0 9px; }
  .h-saint:nth-child(n) { transform: rotate(-3deg); }
  .h-saint:nth-child(7n+2), .h-saint:nth-child(7n+4), .h-saint:nth-child(7n+6) { transform: rotate(3deg) translateY(10px); }
  .h-saint strong { font-size: 15px; }
  .h-final-glowy { width: 200px; }
}
@media (max-width: 600px) {
  .h-wrap { padding: 0 16px; }
  .h-band, .h-inside, .h-blog, .h-final { padding: 80px 0; }
  .h-hero-stage { height: 440px; }
  .h-hero-stage .h-phone { width: 180px; }
  .h-phone-main { width: 200px !important; }
  .h-phone-left { left: -4%; }
  .h-phone-right { right: -4%; }
  .h-glowy-hero { width: 100px; left: -10px; bottom: -30px; }
  .h-chip { font-size: 12px; padding: 8px 12px; }
  .h-chip-xp { top: 200px; right: 0; }
  .h-badge-a { width: 60px; right: 6%; }
  .h-badge-b { display: none; }
  .h-duo { height: 440px; }
  .h-duo .h-phone { width: 190px; }
  .h-duo-back { left: 0; }
  .h-duo-front { right: 0; }
  .h-blog-grid { grid-template-columns: 1fr; }
  .h-prayer-grid { gap: 12px; }
  .h-pcard img { aspect-ratio: 1; }
  .h-pcard div { padding: 12px 12px 14px; }
  .h-pcard strong { font-size: 17px; }
  .h-pcard span { font-size: 12px; }
  .h-prayer-glowy { width: 64px; top: -90px; right: 0; }
  .h-wall { grid-template-columns: 1fr; padding: 20px; border-radius: 28px; }
  .h-widget-streak { flex-direction: row; gap: 12px; }
  .h-badges { grid-template-columns: repeat(4, 1fr); }
  .h-badges img { width: 100%; height: auto; }
  .h-chat { padding-top: 56px; }
  .h-chat-glowy { left: -4px; top: -84px; width: 86px; }
  .h-shelf { padding-left: 16px; }
  .h-course { flex-basis: 180px; height: 250px; }
  .h-marquee span { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .h-float, .h-marquee-track, .h-cards, .h-streak-glowy, .h-final-glowy { animation: none; }
  .h-cards { width: auto; overflow-x: auto; scrollbar-width: none; }
}
