/* ==========================================================================
   Landing-page polish — depth, light and motion layered on top of
   welcome.css. Loaded only by welcome.blade.php (body.landing), so the
   signup/legal pages that share welcome.css stay exactly as they were.
   Every colour comes from a token that's redefined for dark mode below,
   and every looping animation is switched off under reduced motion.
   ========================================================================== */

:root {
  --fx-dot: rgba(46, 42, 38, .10);
  --fx-aurora-1: rgba(235, 131, 0, .16);
  --fx-aurora-2: rgba(255, 164, 79, .12);
  --fx-spot: rgba(235, 131, 0, .09);
  --fx-sheen: #FFC477;
  --fx-toast-bg: rgba(250, 249, 247, .82);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fx-dot: rgba(255, 255, 255, .055);
    --fx-aurora-1: rgba(255, 143, 0, .17);
    --fx-aurora-2: rgba(255, 164, 79, .08);
    --fx-spot: rgba(255, 164, 79, .09);
    --fx-sheen: #FFE0B8;
    --fx-toast-bg: rgba(29, 32, 34, .78);
  }
}
:root[data-theme="dark"] {
  --fx-dot: rgba(255, 255, 255, .055);
  --fx-aurora-1: rgba(255, 143, 0, .17);
  --fx-aurora-2: rgba(255, 164, 79, .08);
  --fx-spot: rgba(255, 164, 79, .09);
  --fx-sheen: #FFE0B8;
  --fx-toast-bg: rgba(29, 32, 34, .78);
}

/* ============ ambient backdrop: dot grid + slow aurora behind the hero ============ */
body.landing { position: relative; }
body.landing::before,
body.landing::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  pointer-events: none;
  z-index: -1;
}
body.landing::before {
  height: 1150px;
  background-image: radial-gradient(var(--fx-dot) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 78%);
}
body.landing::after {
  /* Inset from both edges so the drift below never pushes it past the
     viewport — a transformed box that crosses the inline-end edge adds
     horizontal scroll in English (LTR). */
  inset-inline: 6%;
  height: 950px;
  background:
    radial-gradient(38% 45% at 22% 18%, var(--fx-aurora-1), transparent 70%),
    radial-gradient(34% 40% at 80% 30%, var(--fx-aurora-2), transparent 70%);
  animation: fxAurora 22s ease-in-out infinite alternate;
}
@keyframes fxAurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, 3%, 0) scale(1.04); }
  100% { transform: translate3d(-2%, 5%, 0) scale(1.02); }
}

/* ============ header: section nav, CTA, scroll progress ============ */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav a {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 100px;
  transition: color .2s ease, background .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: var(--panel-raised);
}
.site-nav a:focus-visible,
.header-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.header-cta {
  font-size: 13px;
  font-weight: 800;
  color: var(--on-accent);
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  padding: 7px 17px;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px -10px var(--accent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px var(--accent); }
/* The nav + CTA take the room the "always improving" note used to fill. */
.site-header:has(.site-nav) .header-note { display: none; }
.site-header { transition: padding .25s ease; }
.site-header-bar.is-scrolled .site-header { padding-top: 10px; padding-bottom: 10px; }

.scroll-progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  transform: scaleX(var(--fx-progress, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}
:root[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* ============ hero ============ */
.landing h1.hero-title .w-sell {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent) 38%, var(--fx-sheen) 50%, var(--accent) 62%, var(--accent) 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: fxSheen 6s ease-in-out 1.4s infinite;
}
@keyframes fxSheen {
  0%       { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}

.landing .hero-illustration { position: relative; }
.landing .hero-illustration svg {
  transform: perspective(900px) rotateX(var(--fx-rx, 0deg)) rotateY(var(--fx-ry, 0deg));
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.fx-float { animation: fxFloat 6.5s ease-in-out infinite; }
.fx-float-a { animation-duration: 7s; }
.fx-float-b { animation-duration: 5.6s; animation-delay: -1.4s; }
.fx-float-c { animation-duration: 6.2s; animation-delay: -3s; }
@keyframes fxFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Floating status cards — `scale` handles the pop-in and `translate` the
   idle bob, two separate properties so the two animations never fight. */
.hero-toast {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  border-radius: 14px;
  background: var(--fx-toast-bg);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
          backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-panel);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  scale: .85;
  animation:
    fxToastIn .6s cubic-bezier(.2,.9,.3,1.25) forwards,
    fxBob 5.5s ease-in-out infinite;
}
.hero-toast-paid    { top: 8%;    inset-inline-end: 2%;   animation-delay: 1.1s, 1.7s; }
.hero-toast-kitchen { bottom: 10%; inset-inline-start: 0; animation-delay: 1.7s, 2.5s; }
@keyframes fxToastIn { to { opacity: 1; scale: 1; } }
@keyframes fxBob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -5px; }
}
.hero-toast-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--positive-bg);
  color: var(--positive-text);
}
.hero-toast-dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: fxPing 1.8s ease-out infinite;
}
@keyframes fxPing {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ============ buttons: glow + a light sweep on hover ============ */
.landing .cta-btn:not(.ghost) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 30px -16px var(--accent);
}
.landing .cta-btn:not(.ghost)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .75s ease;
  pointer-events: none;
}
.landing .cta-btn:not(.ghost):hover::after { transform: translateX(120%); }
.landing .cta-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============ feature marquee ============ */
.feature-marquee {
  max-width: 1120px;
  margin: 34px auto 0;
  padding: 0 28px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.feature-marquee-track {
  display: flex;
  width: max-content;
  animation: fxMarquee 45s linear infinite;
}
:root[dir="rtl"] .feature-marquee-track { animation-name: fxMarqueeRtl; }
.feature-marquee:hover .feature-marquee-track { animation-play-state: paused; }
.feature-marquee-run {
  flex: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  padding-inline-end: 12px;
  list-style: none;
}
.feature-marquee-run li {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--panel);
}
.feature-marquee-run li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes fxMarquee    { to { transform: translateX(-50%); } }
@keyframes fxMarqueeRtl { to { transform: translateX(50%); } }

/* ============ pointer spotlight on cards (class added by landing-fx.js) ============ */
.fx-spot { position: relative; }
.fx-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--fx-mx, 50%) var(--fx-my, 50%), var(--fx-spot), transparent 65%);
  opacity: 0;
  transition: opacity .35s ease;
}
.fx-spot:hover::after { opacity: 1; }

/* ============ featured plan: a slowly travelling light around its border ============ */
@property --fx-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.landing .tier.featured {
  border-color: transparent;
  box-shadow: var(--shadow-panel), 0 30px 70px -40px var(--accent);
}
.landing .tier.featured:hover { box-shadow: var(--shadow-panel), 0 34px 80px -38px var(--accent); }
.landing .tier.featured::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--fx-angle), var(--accent), var(--accent-soft) 18%, var(--border-strong) 34%, var(--border-strong) 66%, var(--accent-soft) 82%, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: fxSpin 7s linear infinite;
  pointer-events: none;
}
@keyframes fxSpin { to { --fx-angle: 360deg; } }

/* ============ staggered entrances for grids ============ */
@keyframes fxRise {
  from { opacity: 0; transform: translateY(22px); }
}
.landing .reveal.is-visible .tier-grid > .tier,
.landing .how-list.is-visible > .how-item,
.landing .platform-grid > .reveal.is-visible,
.landing .compartments > .reveal.is-visible {
  animation: fxRise .7s cubic-bezier(.2,.7,.3,1) backwards;
}
.landing .reveal.is-visible .tier-grid > .tier:nth-child(2),
.landing .how-list.is-visible > .how-item:nth-child(2),
.landing .platform-grid > .reveal.is-visible:nth-child(2),
.landing .compartments > .reveal.is-visible:nth-child(2) { animation-delay: .09s; }
.landing .reveal.is-visible .tier-grid > .tier:nth-child(3),
.landing .how-list.is-visible > .how-item:nth-child(3),
.landing .platform-grid > .reveal.is-visible:nth-child(3),
.landing .compartments > .reveal.is-visible:nth-child(3) { animation-delay: .18s; }
.landing .reveal.is-visible .tier-grid > .tier:nth-child(4),
.landing .how-list.is-visible > .how-item:nth-child(4),
.landing .platform-grid > .reveal.is-visible:nth-child(4) { animation-delay: .27s; }

/* ============ small touches ============ */
.landing .how-icon { transition: transform .25s ease, background .25s ease; }
.landing .how-item:hover .how-icon { transform: scale(1.08); background: var(--accent-glow); }
.landing .faq-item summary { transition: color .2s ease; }
.landing .faq-item summary:hover { color: var(--accent); }
.landing .faq-item[open] > p { animation: fxFadeDown .35s ease both; }
@keyframes fxFadeDown { from { opacity: 0; transform: translateY(-6px); } }

/* ============ closing CTA ============ */
#start { padding-top: 96px; }
.closing-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 60px 28px 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-tray);
  background:
    radial-gradient(70% 110% at 50% 0%, var(--accent-glow), transparent 62%),
    var(--panel);
  box-shadow: var(--shadow-tray);
}
.closing-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--fx-dot) 1px, transparent 1.3px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000 20%, transparent 75%);
}
.closing-cta-handle {
  position: relative;
  width: 132px;
  height: 12px;
  margin-bottom: 8px;
  border-radius: 100px;
  background: var(--panel-raised);
  box-shadow: 0 2px 6px rgba(0,0,0,.18) inset, 0 1px 0 rgba(255,255,255,.04);
}
.closing-cta-handle::after {
  content: "";
  position: absolute;
  inset: 3px 30%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
}
.closing-cta h2 {
  font-weight: 900;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.15;
}
.closing-cta p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 52ch;
}
.closing-cta .cta-row { justify-content: center; margin-top: 10px; }

/* ============ responsive ============ */
@media (max-width: 960px) {
  .site-nav { display: none; }
}
@media (max-width: 860px) {
  .hero-toast { font-size: 11.5px; padding: 7px 11px 7px 9px; }
  .feature-marquee { margin-top: 26px; }
  #start { padding-top: 72px; }
  .closing-cta { padding: 48px 22px 44px; border-radius: 22px; }
}
@media (max-width: 480px) {
  .header-actions { gap: 10px; }
  .header-cta { padding: 6px 13px; }
}

/* ============ reduced motion: keep the look, drop the movement ============ */
@media (prefers-reduced-motion: reduce) {
  body.landing::after,
  .fx-float,
  .hero-toast,
  .hero-toast-dot,
  .feature-marquee-track,
  .landing .tier.featured::before,
  .landing h1.hero-title .w-sell { animation: none !important; }
  .hero-toast { opacity: 1; scale: 1; }
  .landing h1.hero-title .w-sell { background-position: 0 0; }
  .landing .hero-illustration svg { transform: none; }
  .feature-marquee { -webkit-mask-image: none; mask-image: none; }
  .feature-marquee-track { width: auto; }
  .feature-marquee-run { flex-wrap: wrap; justify-content: center; padding-inline-end: 0; }
  .feature-marquee-run[aria-hidden="true"] { display: none; }
}
