/* ==========================================================================
   home.css — homepage-only styles.
   Hero (photo bg + ink fades + 3-line stack + animated AI chat).
   Shared section/band/row/slider/button styles now live in global.css.
   ========================================================================== */

.ry-hero {
  position: relative;
  overflow: hidden;
  background: var(--ry-ink);
  min-height: clamp(600px, 88vh, 840px);
  display: flex;
  align-items: center;
}

/* --- Background photo + ink fades ---------------------------------------- */
.ry-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ry-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  display: block;
}

.ry-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(11, 14, 30, 0.97) 0%,
      rgba(11, 14, 30, 0.80) 34%,
      rgba(11, 14, 30, 0.18) 62%,
      rgba(11, 14, 30, 0) 84%),
    linear-gradient(180deg,
      var(--ry-ink) 0%,
      rgba(11, 14, 30, 0) 15%,
      rgba(11, 14, 30, 0) 74%,
      var(--ry-ink) 100%);
}

/* --- Layout -------------------------------------------------------------- */
.ry-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--ry-space-5);
  width: 100%;
  padding-top: var(--ry-space-4);
  padding-bottom: clamp(3rem, 6vw, 6rem);
}

.ry-hero__copy {
  max-width: 560px;
}

.ry-hero__title {
  font-size: clamp(2.8rem, 5.4vw, 4.4rem);
  line-height: 1.1;
  color: #fff;
  margin: 0;
}

.ry-hero__accent {
  color: var(--ry-blue-600);
}

.ry-hero__sub {
  font-size: var(--ry-text-lg);
  line-height: 1.5;
  color: var(--ry-slate-300);
  margin-top: var(--ry-space-5);
  max-width: 30em;
}

/* --- CTAs ---------------------------------------------------------------- */
.ry-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ry-space-3);
  margin-top: var(--ry-space-6);
}

/* --- Trust line ---------------------------------------------------------- */
.ry-hero__proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--ry-space-6);
  font-size: var(--ry-text-sm);
  color: var(--ry-slate-300);
}

.ry-hero__check {
  color: #0EAC78;
  font-weight: 700;
}

.ry-hero__stars {
  color: #F59E0B;
  letter-spacing: 2px;
  font-size: 15px;
}

/* ==========================================================================
   Right side — animated AI chat on a glow
   ========================================================================== */
.ry-hero__device {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.ry-hero__device::before {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(124, 58, 237, 0.45) 0%,
    rgba(37, 99, 235, 0.26) 42%,
    rgba(37, 99, 235, 0) 70%);
  filter: blur(46px);
  z-index: 0;
  pointer-events: none;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {

  .ry-hero {
    min-height: 560px;
  }

  .ry-hero__inner {
    grid-template-columns: 1fr;
  }

  .ry-hero__device {
    display: none;
  }

  .ry-hero__bg::after {
    background:
      linear-gradient(180deg,
        rgba(11, 14, 30, 0.74) 0%,
        rgba(11, 14, 30, 0.82) 60%,
        var(--ry-ink) 100%);
  }

  .ry-hero__bg img {
    object-position: 64% center;
  }
}

/* ==========================================================================
   Lifecycle stacking section (#ry-life-sec) — replaces the old .ry-flow strip.
   White background. Cards pin and stack as you scroll; each card's compact top
   bar (number + title) stays visible when covered, so the stack reads as tabs.
   IMPORTANT: no ancestor of .ry-life may have overflow:hidden, or sticky breaks.
   ========================================================================== */
.ry-life-sec {
  background: #fff;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.ry-life {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vh, 4.5rem);   /* scroll travel between pins */
  padding-bottom: 12vh;            /* small buffer so the last card settles */
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.ry-life__card {
  position: sticky;
  top: calc(88px + var(--i) * 48px);   /* 48px increment == the peeking bar height */
  z-index: calc(var(--i) + 1);
  background: #fff;
  box-shadow: 0 30px 60px -28px rgba(11, 26, 46, .35);
  overflow: hidden;
  transition: opacity .35s ease;
}
/* Earlier cards recede once a later card slides over them (set by home.js) */
.ry-life__card.is-under { opacity: .55; }

/* Compact top bar — this is the strip that peeks when the card is covered */
.ry-life__bar {
  display: flex;
  align-items: center;
  gap: .7rem;
  height: 48px;
  padding: 0 1.4rem;
  background: #fff;
  border-bottom: 1px solid var(--ry-slate-200);
}
.ry-life__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ry-blue-50, #EDF1FB);
  color: var(--ry-blue-600);
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: .85rem;
  flex-shrink: 0;
}
.ry-life__title {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  color: var(--ry-ink);
}

.ry-life__inner {
  background: var(--ry-slate-50, #F8FAFC);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 420px;
}

.ry-life__text {
  align-self: center;
  padding: clamp(1.75rem, 4vw, 3.25rem);
}
.ry-life__d {
  color: var(--ry-slate-600, #475569);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
  max-width: 44ch;
}
.ry-life__cta { margin: 1.6rem 0 0; }

.ry-life__media {
  border-left: 1px solid var(--ry-slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ry-life__media img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

/* ==========================================================================
   Lifecycle — completed (pinned/covered) state
   When a card is covered by the next one, .is-under is set by home.js.
   Treat that peeking bar as a completed step: green check, green struck title.
   Add these rules after your existing .ry-life rules.
   ========================================================================== */

/* Number badge -> green check */
.ry-life__card.is-under .ry-life__num {
  background: #dcfce7;
  font-size: 0;
}

.ry-life__card.is-under .ry-life__num::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background-color: #16a34a;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Title -> green, struck through, faded */
.ry-life__card.is-under .ry-life__title {
  color: #16a34a;
  text-decoration: line-through;
  opacity: 0.7;
}

/* Motion-safe: static stack, no pinning */
@media (prefers-reduced-motion: reduce) {
  .ry-life__card { position: static; opacity: 1; }
}

/* Mobile: drop the pinning, plain vertical stack, image under text */
@media (max-width: 768px) {
  .ry-life { gap: 1.5rem; padding-bottom: 0; }
  .ry-life__card { position: static; opacity: 1; }
  .ry-life__inner { grid-template-columns: 1fr; min-height: 0; }
  .ry-life__media {
    order: 2;
    border-left: 0;
    border-top: 1px solid var(--ry-slate-200);
  }
}

/* ==========================================================================
   Command Center — dashboard screenshot section
   Title/sub use the normal constrained .ry-band width (set elsewhere).
   The image is the hero element: it breaks out wider than the text column.
   ========================================================================== */

#ry-cmd {
	padding-bottom: 150px;
}

.ry-cmd__shot {
  position: relative;
  width: min(95vw, 1500px);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
}

.ry-cmd__shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 60px 140px -34px rgba(11, 26, 46, 0.55), 0 0 0 1px rgba(11, 26, 46, 0.06);
}

/* ---- Callout layer ---- */

.ry-cmd__colayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ry-cmd__co {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 240px;
}

.ry-cmd__card {
  --tail-color: var(--ry-primary, #2563EB);
  position: relative;
  border-radius: 13px;
  padding: 13px 15px;
  background: var(--ry-primary, #2563EB);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 45px -18px rgba(37, 99, 235, 0.55);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ry-cmd__shot.is-in .ry-cmd__card {
  opacity: 1;
  transform: none;
}

/* Staggered entrance */

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(1) .ry-cmd__card {
  transition-delay: 0.10s;
}

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(2) .ry-cmd__card {
  transition-delay: 0.22s;
}

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(3) .ry-cmd__card {
  transition-delay: 0.34s;
}

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(4) .ry-cmd__card {
  transition-delay: 0.46s;
}

/* Card text */

.ry-cmd__card-t {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.2;
  margin: 0 0 4px;
  color: #ffffff;
}

.ry-cmd__card-d {
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

/* ---- Pointer tails ---- */

.ry-cmd__card::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 7px solid transparent;
}

.ry-cmd__co--down .ry-cmd__card::after {
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: var(--tail-color);
}

.ry-cmd__co--up .ry-cmd__card::after {
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: var(--tail-color);
}

.ry-cmd__co--left .ry-cmd__card::after {
  left: -13px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: var(--tail-color);
}

.ry-cmd__co--right .ry-cmd__card::after {
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: var(--tail-color);
}

/* ---- Reduced motion: show callouts, no movement ---- */

@media (prefers-reduced-motion: reduce) {
  .ry-cmd__card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Mobile: clean screenshot only, no callouts ---- */

@media (max-width: 1024px) {
  .ry-cmd__colayer {
    display: none;
  }
}

@media (max-width: 768px) {
  .ry-cmd__shot {
    width: 100%;
  }
  .ry-cmd__shot img {
    border-radius: 12px;
  }
}

/* ==========================================================================
   Command Center callouts — entrance + pulse
   Replace the matching blocks in cmd-section.css with these.
   ========================================================================== */

.ry-cmd__card {
  --tail-color: var(--ry-primary, #2563EB);
  position: relative;
  border-radius: 13px;
  padding: 13px 15px;
  background: var(--ry-primary, #2563EB);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 45px -18px rgba(37, 99, 235, 0.55);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ry-cmd__shot.is-in .ry-cmd__card {
  opacity: 1;
  transform: none;
  animation: ry-cmd-pulse 4s ease-out infinite;
  animation-delay: 0.9s;
}

/* Staggered entrance */

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(1) .ry-cmd__card {
  transition-delay: 0.10s;
}

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(2) .ry-cmd__card {
  transition-delay: 0.22s;
}

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(3) .ry-cmd__card {
  transition-delay: 0.34s;
}

.ry-cmd__shot.is-in .ry-cmd__co:nth-child(4) .ry-cmd__card {
  transition-delay: 0.46s;
}

@keyframes ry-cmd-pulse {
  0% {
    box-shadow: 0 22px 45px -18px rgba(37, 99, 235, 0.55), 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  70% {
    box-shadow: 0 22px 45px -18px rgba(37, 99, 235, 0.55), 0 0 0 14px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 22px 45px -18px rgba(37, 99, 235, 0.55), 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ry-cmd__card {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

.db-cta {
	text-align: center;
	margin-top: 100px;
}