/* Public home page (PRAY-128). Ported from the Constant Pray home design and scoped under .home.
   Colours come from the app roles in globals.css; the few the roles don't cover (the orange glow,
   deep blue, green, glass) are defined here for light and dark. */

.home {
  --bg: var(--canvas);
  --bg-2: var(--surface-muted);
  --muted: var(--ink-muted);
  --deep: #1557b8;
  --glow: #f47b20;
  --glow-soft: rgba(244, 123, 32, 0.24);
  --accent-ink: #b0440a;
  --green: #4fb783;
  --green-soft: rgba(60, 170, 115, 0.16);
  --green-ink: #1b7850;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-line: rgba(255, 255, 255, 0.9);
  --wm: var(--ink);
  --btn-bg: #c94b0c;
  --btn-fg: #ffffff;
  --shadow: 0 24px 60px -28px rgba(12, 35, 64, 0.35);
  --r: 20px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  position: relative;
  overflow-x: clip;
  color: var(--ink);
  background: var(--canvas);
  font-size: 17px;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  .home {
    --deep: #8fbcf5;
    --glow: #ff9447;
    --glow-soft: rgba(255, 148, 71, 0.24);
    --accent-ink: #ffb27a;
    --green: #3f9b70;
    --green-soft: rgba(90, 200, 150, 0.16);
    --green-ink: #8fdcb6;
    --glass: rgba(16, 42, 70, 0.58);
    --glass-line: rgba(232, 240, 250, 0.16);
    --btn-bg: #ff9447;
    --btn-fg: #1d0e02;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  }
}

.home :where(h1, h2, h3, p, figure, blockquote) { margin: 0; }
.home :where(h1, h2, h3) {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
.home h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  font-size: clamp(2.5rem, 6.6vw, 4.4rem);
}
.home h1 em { font-style: normal; }
.home h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.home h3 { font-size: 1.3rem; line-height: 1.25; }
.home em { font-style: italic; color: var(--accent-ink); }
.home a { color: inherit; }
.home :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

.home .wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.home .section { padding-block: clamp(64px, 10vw, 120px); }
.home .eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.home .lede { color: var(--muted); font-size: 1.12rem; max-width: 56ch; }
.home .head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 680px; }

/* buttons: min-h 44px for touch */
.home .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem var(--font-sans); cursor: pointer; text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}
.home .btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 10px 26px -12px var(--btn-bg); }
.home .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px var(--btn-bg); }
.home .btn-ghost { background: var(--glass); color: var(--ink); border-color: var(--line); backdrop-filter: blur(10px); }
.home .btn-ghost:hover { transform: translateY(-2px); border-color: var(--ink); }
.home .btn:active { transform: translateY(0) scale(0.98); }
.home .btn svg { transition: transform 0.25s; }
.home .btn:hover svg { transform: translateX(3px); }

/* ambient blobs */
.home .ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.home .ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.75; animation: home-drift 22s ease-in-out infinite alternate; }
.home .ambient i:nth-child(1) { width: 46vw; height: 46vw; max-width: 560px; max-height: 560px; background: var(--glow-soft); top: -8%; right: -6%; }
.home .ambient i:nth-child(2) { width: 38vw; height: 38vw; max-width: 460px; max-height: 460px; background: color-mix(in srgb, var(--green) 45%, transparent); bottom: -18%; left: -10%; animation-duration: 28s; animation-delay: -6s; }
.home .ambient i:nth-child(3) { width: 24vw; height: 24vw; max-width: 300px; max-height: 300px; background: color-mix(in srgb, var(--deep) 22%, transparent); top: 40%; left: 38%; animation-duration: 34s; animation-delay: -12s; }
@keyframes home-drift { to { transform: translate3d(4%, 6%, 0) scale(1.12); } }

/* nav */
.home .nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; padding-block: 12px; }
.home .nav-in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 18px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 10px 30px -22px rgba(12, 35, 64, 0.5); transition: box-shadow 0.3s;
}
.home .nav[data-scrolled="true"] .nav-in { box-shadow: var(--shadow); }
.home .brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.home .links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 0.95rem; font-weight: 500; }
.home .links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); position: relative; transition: color 0.2s; }
.home .links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px; background: var(--glow); transform: scaleX(0); transform-origin: left; transition: transform 0.3s; }
.home .links a:hover { color: var(--ink); }
.home .links a:hover::after { transform: scaleX(1); }
.home .nav-cta { display: flex; align-items: center; gap: 8px; }
.home .login { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.95rem; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 999px; transition: background 0.2s; }
.home .login:hover { background: var(--bg-2); }
.home .nav .btn { padding: 9px 18px; font-size: 0.93rem; }
.home .menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; place-items: center; }
.home .mobile-menu { margin-top: 8px; padding: 10px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; }
.home .mobile-menu a { display: flex; align-items: center; min-height: 44px; padding: 12px 14px; border-radius: 14px; text-decoration: none; font-weight: 500; }
.home .mobile-menu a:hover { background: var(--bg-2); }
@media (max-width: 820px) {
  .home .links { display: none; }
  .home .menu-btn { display: grid; }
  .home .nav-cta .btn-primary { display: none; }
  .home .nav-cta { gap: 4px; }
}
@media (min-width: 821px) { .home .mobile-menu { display: none !important; } }

/* hero */
.home .hero { position: relative; margin-top: -74px; padding-top: 74px; }
.home .hero-grid { position: relative; z-index: 1; display: grid; gap: 48px; align-items: center; padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 96px); }
@media (min-width: 920px) { .home .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.home .hero-copy { display: grid; gap: 22px; min-width: 0; }
.home .pill { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 0.86rem; font-weight: 500; color: var(--muted); backdrop-filter: blur(10px); }
.home .pill b { background: var(--glow); color: #1b1204; border-radius: 999px; padding: 2px 9px; font-size: 0.74rem; letter-spacing: 0.04em; }
.home .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.home .note { font-size: 0.9rem; color: var(--muted); }
.home .rise { animation: home-rise 0.9s var(--ease) both; animation-delay: calc(var(--n, 0) * 90ms); }
@keyframes home-rise { from { opacity: 0; transform: translateY(22px); } }

/* hero video and request card */
.home .circle-wrap { position: relative; display: grid; gap: 18px; justify-items: center; min-width: 0; }
.home .hero-video { position: relative; width: min(100%, 430px); aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--bg-2); border: 1px solid var(--glass-line); box-shadow: var(--shadow); }
.home .hero-video img, .home .hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes home-flicker { 0%, 100% { opacity: 0.75; transform: scale(1); } 40% { opacity: 1; transform: scale(1.07); } 70% { opacity: 0.85; transform: scale(0.97); } }
.home .glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(20px) saturate(1.4); border-radius: var(--r); box-shadow: var(--shadow); }
.home .request { width: min(100%, 400px); padding: 18px; display: grid; gap: 12px; }
.home .request-top { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.home .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 0.74rem; font-weight: 700; background: var(--bg-2); color: var(--deep); flex: none; }
.home .request p { font: 400 1.08rem/1.45 var(--font-display); }
.home .request-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home .pray { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 0.92rem var(--font-sans); cursor: pointer; transition: transform 0.2s, background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.home .pray:hover { transform: translateY(-1px); border-color: var(--glow); }
.home .pray[aria-pressed="true"] { background: var(--glow); border-color: var(--glow); color: #1b1204; box-shadow: 0 0 0 5px var(--glow-soft); }
.home .pray .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.home .pray[aria-pressed="true"] .dot { background: #1b1204; box-shadow: none; }
.home .pop { animation: home-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes home-pop { 40% { transform: scale(1.1); } }

/* proof strip */
.home .proof { border-block: 1px solid var(--line); padding-block: 28px; }
.home .proof-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; justify-content: center; color: var(--muted); }
.home .proof-in .lab { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.home .proof-in ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; list-style: none; margin: 0; padding: 0; font: 400 1.12rem var(--font-display); }
.home .proof-in li { display: flex; align-items: center; gap: 28px; }
.home .proof-in li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--glow); }

/* features */
.home .features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.home .feature { position: relative; padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s; }
.home .feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--glow) 55%, var(--line)); }
.home .feature p { color: var(--muted); font-size: 1rem; }
.home .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); margin-bottom: 6px; transition: transform 0.35s; }
.home .feature:hover .ico { transform: rotate(-6deg) scale(1.06); }

/* showcase */
.home .showcase { background: linear-gradient(180deg, var(--bg), var(--bg-2)); position: relative; overflow: hidden; }
.home .show-grid { position: relative; z-index: 1; display: grid; gap: 48px; align-items: center; }
@media (min-width: 920px) { .home .show-grid { grid-template-columns: 0.9fr 1.1fr; } }
.home .phone { justify-self: center; width: min(100%, 340px); border-radius: 40px; padding: 12px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(20px); box-shadow: var(--shadow); animation: home-float 9s ease-in-out infinite; }
@keyframes home-float { 50% { transform: translateY(-10px); } }
.home .screen { border-radius: 30px; background: var(--surface); border: 1px solid var(--line); padding: 18px 14px 14px; display: grid; gap: 14px; min-height: 470px; align-content: start; }
.home .screen-head { display: flex; justify-content: space-between; align-items: baseline; padding-inline: 4px; }
.home .screen-head strong { font: 500 1.25rem var(--font-display); }
.home .screen-head span { font-size: 0.8rem; color: var(--muted); }
.home .tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg-2); border-radius: 999px; padding: 4px; gap: 2px; }
.home .tabs button { min-height: 44px; border: 0; background: transparent; color: var(--muted); font: 600 0.82rem var(--font-sans); padding: 8px 4px; border-radius: 999px; cursor: pointer; transition: background 0.3s, color 0.3s; }
.home .tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(12, 35, 64, 0.4); }
.home .panel { display: grid; gap: 10px; }
.home .item { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 6px; font-size: 0.9rem; animation: home-rise 0.5s var(--ease) both; animation-delay: calc(var(--n, 0) * 70ms); }
.home .item-top { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.home .item-top .av { width: 24px; height: 24px; font-size: 0.62rem; }
.home .tag { margin-left: auto; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--glow-soft); color: var(--accent-ink); }
.home .item small { color: var(--muted); }
.home .steps { display: grid; gap: 22px; list-style: none; margin: 28px 0 0; padding: 0; counter-reset: s; }
.home .steps li { display: grid; grid-template-columns: auto 1fr; gap: 16px; counter-increment: s; }
.home .steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--deep); font: 500 1rem var(--font-display); color: var(--deep); }
.home .steps p { color: var(--muted); font-size: 1rem; }
.home .steps h3 { font-size: 1.15rem; margin-bottom: 2px; }

/* benefits */
.home .benefits { display: grid; border-top: 1px solid var(--line); }
.home .benefit { display: grid; gap: 8px 40px; padding-block: 28px; border-bottom: 1px solid var(--line); transition: padding-left 0.4s var(--ease); }
@media (min-width: 760px) { .home .benefit { grid-template-columns: 1fr 1.2fr; align-items: baseline; } .home .benefit:hover { padding-left: 14px; } }
.home .benefit h3 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.home .benefit p { color: var(--muted); }

/* testimonials */
.home .sample-flag { display: inline-block; justify-self: start; font-size: 0.8rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 4px 12px; }
.home .quotes { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.home .quote { padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 20px; align-content: space-between; transition: transform 0.35s, box-shadow 0.35s; }
.home .quote:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: var(--shadow); }
.home .quote blockquote { font: 400 1.18rem/1.45 var(--font-display); }
.home .quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.home .quote figcaption b { display: block; color: var(--ink); font-weight: 600; }

/* faq */
.home .faq-grid { display: grid; gap: 40px; }
@media (min-width: 920px) { .home .faq-grid { grid-template-columns: 0.8fr 1.2fr; } }
.home .faq { display: grid; border-top: 1px solid var(--line); }
.home .faq details { border-bottom: 1px solid var(--line); }
.home .faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 44px; padding-block: 20px; font: 500 1.15rem var(--font-display); }
.home .faq summary::-webkit-details-marker { display: none; }
.home .faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); transition: transform 0.35s; margin-right: 6px; }
.home .faq details[open] summary::after { transform: rotate(225deg); }
.home .faq details p { color: var(--muted); padding-bottom: 22px; max-width: 60ch; animation: home-rise 0.45s both; }

/* closing call to action */
.home .cta-box { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(36px, 7vw, 80px) clamp(22px, 6vw, 72px); background: linear-gradient(135deg, #1557b8, #1b7850); color: #f4f8fd; display: grid; gap: 22px; justify-items: start; }
.home .cta-box::before { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -200px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 62%); opacity: 0.55; animation: home-flicker 5s ease-in-out infinite; }
.home .cta-box > * { position: relative; }
.home .cta-box h2 { max-width: 16ch; }
.home .cta-box p { max-width: 48ch; opacity: 0.9; }
.home .cta-box .btn { background: #ff9447; color: #1d0e02; box-shadow: none; }

/* footer */
.home footer { padding-block: 48px 40px; border-top: 1px solid var(--line); margin-top: clamp(64px, 10vw, 120px); }
.home .foot { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.home .foot h4 { margin: 0 0 12px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.home .foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 0.96rem; }
.home .foot ul a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); transition: color 0.2s; }
.home .foot a:hover { color: var(--ink); }
.home .foot-about { grid-column: span 2; display: grid; gap: 12px; align-content: start; max-width: 34ch; color: var(--muted); font-size: 0.96rem; }
@media (max-width: 520px) { .home .foot-about { grid-column: auto; } }
.home .legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.86rem; color: var(--muted); }

html:has(.home) { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; }
  html:has(.home) { scroll-behavior: auto; }
}
