/* =========================================================================
 * Toqan marketing homepage
 * Loaded only on the home page (see partials/head.html).
 * Visual direction: large product visuals, alternating feature rows,
 * generous whitespace. Uses the shared design tokens from toqan.css.
 * ========================================================================= */

/* --- Shared bits -------------------------------------------------------- */
.home-btn--lg {
  padding: 13px 24px;
  font-size: 16px;
  border-radius: 10px;
}

.home-section__eyebrow {
  font-family: var(--font-family-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-text-on-bg);
  font-weight: 500;
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.home-section__eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.home-section__head .home-section__eyebrow { justify-content: center; }

.home-link {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-text-on-bg);
}
.home-link:hover { color: var(--primary); }

/* --- Media placeholders ------------------------------------------------- */
.home-media {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin: 0;
  background-color: var(--bg-2);
  background-image:
    radial-gradient(60% 80% at 25% 15%, color-mix(in oklab, var(--primary) 22%, transparent), transparent 70%),
    radial-gradient(70% 90% at 90% 100%, color-mix(in oklab, var(--accent-secondary) 22%, transparent), transparent 70%),
    radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 22px 22px;
}
.home-media__chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  background: color-mix(in oklab, var(--bg-1) 70%, transparent);
  border-bottom: 1px solid var(--border-muted);
  backdrop-filter: blur(6px);
}
.home-media__chrome span {
  width: 11px; height: 11px; border-radius: 999px;
  background: var(--border-color);
}
.home-media__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.home-media__play {
  width: 64px; height: 64px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-accent-600);
  color: var(--color-neutral-50);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .home-media__play { background: var(--color-accent-200); color: var(--color-neutral-900); }
.home-media__play svg { width: 26px; height: 26px; margin-left: 3px; }
.home-media__hint {
  font-size: 13px;
  font-weight: 500;
  color: var(--subtext);
  letter-spacing: 0.01em;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-1) 75%, transparent);
  border: 1px solid var(--border-muted);
}
.home-media--hero { aspect-ratio: 16 / 8; }
.home-media--thumb { aspect-ratio: 16 / 9; border-radius: 12px; box-shadow: none; margin-bottom: 20px; }
/* Screenshot variant: the image carries its own framing (transparent margin
   + shadow), so render it bare with no added box, border, or radius */
.home-media--shot { background: none; border: 0; box-shadow: none; }
.home-media--hero.home-media--shot { aspect-ratio: auto; border-radius: 0; overflow: visible; }
.home-media--shot img {
  width: 100%;
  height: auto;
  display: block;
}
/* Dual screenshot: light shot by default, dark shot under dark theme */
.home-media--shot-dual .home-shot--dark { display: none; }
[data-theme="dark"] .home-media--shot-dual .home-shot--light { display: none; }
[data-theme="dark"] .home-media--shot-dual .home-shot--dark { display: block; }

/* --- Hero --------------------------------------------------------------- */
.home-hero {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(60% 70% at 50% -5%,
      color-mix(in oklab, var(--primary) 13%, transparent) 0%,
      transparent 70%),
    var(--bg);
}
.home-hero__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.home-hero__eyebrow {
  font-family: var(--font-family-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-text-on-bg);
  font-weight: 500;
  margin: 0 0 22px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--primary) 30%, var(--border-color));
  background: color-mix(in oklab, var(--primary) 8%, transparent);
}
.home-hero__title {
  font-size: clamp(44px, 7vw, 84px);
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin: 0 0 24px;
  max-width: 16ch;
  font-weight: 600;
}
.home-hero__sub {
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.5;
  color: var(--subtext);
  max-width: 60ch;
  margin: 0 0 34px;
}
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.home-hero__note {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--subtext);
}
/* Lead-in caption above the hero screenshot — deliberately smaller than the
   hero H1 and tight to the screenshot, so it reads as an intro, not a section */
.home-showcase {
  padding: clamp(22px, 3vw, 44px) 0 clamp(40px, 6vw, 80px);
}
.home-lead {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(20px, 2.4vw, 30px);
}
.home-lead__eyebrow {
  font-family: var(--font-family-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-text-on-bg);
  font-weight: 500;
  margin: 0 0 12px;
}
.home-lead__title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--title);
}
.home-lead__body {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--subtext);
  max-width: 62ch;
  margin: 0 auto;
}
.home-hero__media-wrap {
  margin-top: 0;
  padding-bottom: 8px;
}

/* --- Social proof / stats strip ----------------------------------------- */
.home-stats {
  border-block: 1px solid var(--border-muted);
  background: var(--bg-2);
}
.home-stats__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding-top: 36px;
  padding-bottom: 36px;
}
.home-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  align-items: center;
}
.home-stat__num {
  font-family: var(--font-family-mono);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--title);
  font-feature-settings: "tnum" 1;
}
.home-stat__num--sm { font-size: clamp(14px, 1.4vw, 17px); font-weight: 500; }
.home-stat__label { font-size: 13px; color: var(--subtext); }
.home-stat__label--lead { margin-bottom: 4px; }

/* --- Generic section ---------------------------------------------------- */
.home-section { padding: clamp(64px, 9vw, 120px) 0; }
.home-section--tint {
  background: var(--bg-2);
  border-block: 1px solid var(--border-muted);
}
.home-section__head {
  max-width: 680px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
.home-section__title {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 18px;
  font-weight: 600;
}
.home-section__lede {
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.6;
  color: var(--subtext);
  margin: 0;
}

/* --- Alternating feature rows ------------------------------------------- */
.home-features { padding: clamp(40px, 6vw, 64px) 0; }
.home-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
/* Give the slider row more room so the app screenshots are larger */
.home-feature--wide-media {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
}
.home-feature__text { order: 0; }
.home-feature__media, .home-feature .home-media { order: 1; }
.home-feature--reverse .home-feature__text { order: 1; }
.home-feature--reverse .home-feature .home-media,
.home-feature--reverse .home-media { order: 0; }
.home-feature__title {
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 600;
}
.home-feature__body {
  font-size: 18px;
  line-height: 1.6;
  color: var(--subtext);
  margin: 0 0 22px;
  max-width: 46ch;
}
/* Feature illustration tile (branded gradient + capability icon) */
.home-feature__viz {
  aspect-ratio: 16 / 11;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  color: var(--primary-text-on-bg);
  background:
    radial-gradient(70% 90% at 28% 18%, color-mix(in oklab, var(--primary) 20%, transparent), transparent 70%),
    radial-gradient(80% 90% at 92% 100%, color-mix(in oklab, var(--accent-secondary) 22%, transparent), transparent 70%),
    var(--bg-1);
  transition: transform var(--transition-speed) var(--ease-smooth),
    box-shadow var(--transition-speed) var(--ease-smooth);
}
.home-feature__viz svg { width: 88px; height: 88px; opacity: 0.92; }
.home-feature:hover .home-feature__viz { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* App examples slider (Build without code) */
.home-slider { position: relative; }
.home-slider__viewport {
  position: relative;
  /* fixed height across slides so the page never shifts; taller shots crop at the bottom */
  aspect-ratio: 1.96;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-muted);
  box-shadow: var(--shadow-lg);
  background: var(--bg-2);
}
.home-slider__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease-smooth);
  pointer-events: none;
}
.home-slider__slide.is-active { opacity: 1; pointer-events: auto; }
.home-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* keep the top; taller shots lose only the bottom */
  display: block;
}
.home-slider__cap {
  margin: 16px auto 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--subtext);
  text-align: center;
}
.home-slider__dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}
.home-slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border-color);
  cursor: pointer;
  /* scale (not width/height) so hovering one dot never shifts the others */
  transition: transform var(--transition-speed-fast) var(--ease-smooth),
    background var(--transition-speed-fast) var(--ease-smooth);
}
/* size change happens ONLY when the pointer is directly over a dot */
.home-slider__dot:hover { transform: scale(1.6); background: color-mix(in oklab, var(--primary) 55%, var(--border-color)); }
/* active slide is indicated by colour only, so auto-advance never resizes a dot */
.home-slider__dot.is-active { background: var(--primary); }

/* --- Everyone a builder ------------------------------------------------- */
.home-builder {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.home-builder .home-section__title { font-size: clamp(28px, 3.4vw, 42px); }
.home-builder__actions { margin-top: 26px; }
.home-builder__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-builder__item {
  background: var(--bg-1);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  padding: 20px 22px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--title);
  font-weight: 500;
}
/* Quote cards pop in (staggered) when the row scrolls into view */
@keyframes home-card-pop { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .home-feature.reveal .home-builder__item { opacity: 0; }
  .home-feature.is-in .home-builder__item { animation: home-card-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .home-feature.is-in .home-builder__item:nth-child(2) { animation-delay: 0.12s; }
  .home-feature.is-in .home-builder__item:nth-child(3) { animation-delay: 0.24s; }
}

/* --- What teams build (use cases) --------------------------------------- */
.home-usecases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.home-usecase {
  background: var(--bg-1);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  transition: border-color var(--transition-speed-fast) var(--ease-smooth),
    transform var(--transition-speed-fast) var(--ease-smooth);
}
.home-usecase:hover {
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border-color));
  transform: translateY(-2px);
}
.home-usecase__title { font-size: 18px; letter-spacing: -0.01em; margin: 0 0 8px; }
.home-usecase__body { font-size: 15px; line-height: 1.55; color: var(--subtext); margin: 0; }

/* --- How it works ------------------------------------------------------- */
.home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.home-step { padding-top: 8px; }
.home-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--color-accent-600);
  color: var(--color-neutral-50);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 20px;
}
[data-theme="dark"] .home-step__num { background: var(--color-accent-200); color: var(--color-neutral-900); }
.home-step__title { font-size: 21px; letter-spacing: -0.02em; margin: 0 0 8px; }
.home-step__body { font-size: 16px; line-height: 1.6; color: var(--subtext); margin: 0; }

/* --- Trust -------------------------------------------------------------- */
.home-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.home-trust .home-section__title { font-size: clamp(28px, 3.2vw, 40px); }
.home-trust__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.home-trust__item {
  position: relative;
  padding-left: 34px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--subtext);
}
.home-trust__item strong { color: var(--title); font-weight: 600; }
.home-trust__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 18%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--primary);
}

/* --- Industries --------------------------------------------------------- */
.home-industries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.home-industry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg-1);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 24px;
  transition: border-color var(--transition-speed-fast) var(--ease-smooth),
    transform var(--transition-speed-fast) var(--ease-smooth);
}
.home-industry--live:hover {
  border-color: color-mix(in oklab, var(--primary) 45%, var(--border-color));
  transform: translateY(-2px);
}
.home-industry--soon { opacity: 0.8; }
.home-industry__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: color-mix(in oklab, var(--primary) 14%, transparent);
  color: var(--primary-text-on-bg);
  margin-bottom: 14px;
}
.home-industry__badge--soon { background: color-mix(in oklab, var(--text) 8%, transparent); color: var(--subtext); }
.home-industry__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--title);
}
.home-industry__arrow { width: 18px; height: 18px; opacity: 0.7; }
.home-industry__body { font-size: 16px; line-height: 1.6; color: var(--subtext); margin: 0 0 18px; }
.home-industry__link { margin-top: auto; font-size: 15px; font-weight: 500; color: var(--primary-text-on-bg); }
.home-industry__link--muted { color: var(--subtext); }

/* --- FAQ ---------------------------------------------------------------- */
.home-faq { display: flex; flex-direction: column; }
.home-faq__item { border-bottom: 1px solid var(--border-color); }
.home-faq__item:first-child { border-top: 1px solid var(--border-color); }
.home-faq__q {
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  color: var(--title);
  padding: 22px 40px 22px 0;
  position: relative;
}
.home-faq__q::-webkit-details-marker { display: none; }
.home-faq__q::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 400;
  color: var(--subtext);
}
.home-faq__item[open] .home-faq__q::after { content: "−"; }
.home-faq__a {
  margin: 0;
  padding: 0 40px 24px 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--subtext);
}
.home-faq__a a { color: var(--primary-text-on-bg); text-decoration: underline; text-underline-offset: 2px; }

/* --- Final CTA ---------------------------------------------------------- */
.home-cta {
  padding: clamp(64px, 9vw, 120px) 0 clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--border-muted);
  background:
    radial-gradient(70% 120% at 50% 120%,
      color-mix(in oklab, var(--primary) 14%, transparent) 0%,
      transparent 70%),
    var(--bg);
}
.home-cta__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.home-cta__title {
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 16px;
  max-width: 18ch;
  font-weight: 600;
}
.home-cta__sub { font-size: 19px; color: var(--subtext); margin: 0 0 32px; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 980px) {
  .home-feature,
  .home-builder,
  .home-trust { grid-template-columns: 1fr; gap: 36px; }
  /* Stack: text first, media second, regardless of reverse */
  .home-feature__text,
  .home-feature--reverse .home-feature__text { order: 0; }
  .home-feature .home-media,
  .home-feature--reverse .home-media { order: 1; }
  .home-pillars,
  .home-steps,
  .home-usecases { grid-template-columns: 1fr; }
  .home-industries { grid-template-columns: 1fr; }
}
@media (min-width: 981px) and (max-width: 1140px) {
  .home-usecases { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .home-stats__inner { grid-template-columns: 1fr; gap: 22px; }
}

/* =========================================================================
 * Grain texture + customer marquee
 * ========================================================================= */
.home-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}
[data-theme="dark"] .home-grain { opacity: 0.06; }

.home-marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--border-muted);
  background: var(--bg);
  padding: 14px 0 16px;
  text-align: center;
}
.home-marquee__label {
  font-family: var(--font-family-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtext);
  margin: 0 0 10px;
}
.home-marquee__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.home-marquee__track {
  display: flex;
  width: max-content;
}
.home-marquee__group {
  display: flex;
  flex: 0 0 auto;
}
.home-marquee__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 120px;
  height: 80px;
  /* spacing via margin (not gap) so the loop distance is exact across groups */
  margin: 0 18px;
  color: var(--subtext);
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity var(--transition-speed-fast) var(--ease-smooth),
    transform var(--transition-speed-fast) var(--ease-smooth);
}
.home-marquee__item img {
  max-height: 38px;
  max-width: 156px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
/* Per-logo size tuning */
.home-marquee__item img[src*="prosus"] { max-height: 35px; max-width: 143px; }
.home-marquee__item img[src*="olx"] { max-height: 44px; max-width: 179px; }
.home-marquee__item img[src*="goodhabitz"] { max-height: 74px; max-width: 242px; }
.home-marquee__item img[src*="emag"],
.home-marquee__item img[src*="media24"] { max-height: 68px; max-width: 193px; }
.home-marquee__item:hover { opacity: 1; transform: translateY(-2px); }
/* Dark mode: sit logos on a light chip so dark-ink wordmarks stay legible */
[data-theme="dark"] .home-marquee__item {
  background: #f7f5ef;
  border-radius: 12px;
  padding: 0 16px;
}
@media (prefers-reduced-motion: no-preference) {
  .home-marquee__track { animation: home-marquee 28s linear infinite; }
  .home-marquee:hover .home-marquee__track { animation-play-state: paused; }
}
/* Track holds 4 identical groups; moving 25% advances exactly one group */
@keyframes home-marquee { from { transform: translateX(0); } to { transform: translateX(-25%); } }

/* =========================================================================
 * Motion & atmosphere
 * Personality through layered animated gradients, an orchestrated page
 * load, and scroll reveals. All motion is gated behind no-preference.
 * ========================================================================= */

/* --- Atmospheric drifting gradient blobs (hero + CTA) ------------------- */
.home-hero, .home-cta { overflow: hidden; }
.home-hero__inner,
.home-hero__media-wrap,
.home-cta__inner { position: relative; z-index: 1; }
.home-hero::before,
.home-hero::after,
.home-cta::before {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.home-hero::before {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -16%; left: -10%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-secondary) 60%, transparent), transparent 70%);
  opacity: 0.5;
}
.home-hero::after {
  width: 40vw; height: 40vw; max-width: 540px; max-height: 540px;
  top: -8%; right: -8%;
  background: radial-gradient(circle, color-mix(in oklab, var(--primary) 55%, transparent), transparent 70%);
  opacity: 0.42;
}
.home-cta::before {
  width: 44vw; height: 44vw; max-width: 560px; max-height: 560px;
  bottom: -24%; left: 50%; margin-left: -280px;
  background: radial-gradient(circle, color-mix(in oklab, var(--primary) 50%, transparent), transparent 70%);
  opacity: 0.45;
}

/* --- Micro-interactions ------------------------------------------------- */
.home-feature .home-media {
  transition: transform var(--transition-speed) var(--ease-smooth),
    box-shadow var(--transition-speed) var(--ease-smooth);
}
.home-feature .home-media:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.home-media__play { position: relative; }
.home-media__play::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid color-mix(in oklab, var(--color-accent-600) 55%, transparent);
}
[data-theme="dark"] .home-media__play::before { border-color: color-mix(in oklab, var(--color-accent-200) 55%, transparent); }

/* --- Keyframes ---------------------------------------------------------- */
@keyframes home-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes home-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes home-pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes home-drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(42px, 30px) scale(1.12); } }
@keyframes home-drift-b { from { transform: translate(0, 0) scale(1); } to { transform: translate(-48px, 22px) scale(1.08); } }

@media (prefers-reduced-motion: no-preference) {
  /* Drifting blobs */
  .home-hero::before { animation: home-drift-a 20s ease-in-out infinite alternate; }
  .home-hero::after  { animation: home-drift-b 26s ease-in-out infinite alternate; }
  .home-cta::before  { animation: home-drift-a 24s ease-in-out infinite alternate; }

  /* Orchestrated hero page-load (staggered reveals) */
  .home-hero__inner > * { animation: home-rise 0.7s var(--ease-smooth) both; }
  .home-hero__eyebrow    { animation-delay: 0.05s; }
  .home-hero__title      { animation-delay: 0.13s; }
  .home-hero__sub        { animation-delay: 0.22s; }
  .home-hero__actions    { animation-delay: 0.31s; }
  .home-hero__note       { animation-delay: 0.40s; }
  .home-hero__media-wrap { animation: home-rise 0.9s 0.5s var(--ease-smooth) both; }
  .home-media--hero      { animation: home-float 7s 1.6s ease-in-out infinite; }
  .home-media__play::before { animation: home-pulse 2.6s ease-out infinite; }

  /* Scroll reveals — the .reveal class is added by JS, so if JS is absent
     or errors, nothing is hidden and the page can never go blank.
     A JS safety-timeout also force-reveals everything after a moment. */
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
  }
  .reveal.is-in { opacity: 1; transform: none; }

  /* Stagger grid children that reveal together */
  .home-usecase:nth-child(2) { transition-delay: 0.07s; }
  .home-usecase:nth-child(3) { transition-delay: 0.14s; }
  .home-usecase:nth-child(4) { transition-delay: 0.07s; }
  .home-usecase:nth-child(5) { transition-delay: 0.14s; }
  .home-usecase:nth-child(6) { transition-delay: 0.21s; }
  .home-step:nth-child(2) { transition-delay: 0.10s; }
  .home-step:nth-child(3) { transition-delay: 0.20s; }
  .home-stat:nth-child(2) { transition-delay: 0.08s; }
  .home-stat:nth-child(3) { transition-delay: 0.16s; }
}

/* =========================================================================
 * Connects to your stack — hub & spoke visual
 * ========================================================================= */

.hsv {
  --size: clamp(260px, 42vw, 520px);
  --hub: calc(var(--size) * 0.23);
  --radius: calc(var(--size) * 0.33);
  --chip: calc(var(--size) * 0.16);
  position: relative;
  width: var(--size);
  height: var(--size);
  margin: 0 auto;
}

.hsv__spoke {
  position: absolute;
  top: calc(50% - 1.5px);
  left: 50%;
  height: 3px;
  width: var(--radius);
  transform-origin: 0 50%;
  transform: rotate(var(--angle));
  border-radius: 999px;
  opacity: 0.85;
  background: linear-gradient(90deg, var(--color-accent-500), var(--brand));
  z-index: 1;
}

.hsv__hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: var(--hub); height: var(--hub);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--color-accent-300), var(--color-accent-500));
  box-shadow: 0 0 80px color-mix(in oklab, var(--color-accent-400) 50%, transparent), 0 20px 60px color-mix(in oklab, var(--color-accent-500) 38%, transparent);
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.hsv__mark { width: 62%; height: auto; }
.hsv__mark path { fill: #fff; }

.hsv__chip {
  position: absolute;
  left: calc(50% + var(--x) * var(--radius));
  top: calc(50% + var(--y) * var(--radius));
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 4;
}
.hsv__card {
  width: var(--chip); height: var(--chip);
  border-radius: calc(var(--size) * 0.034);
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-accent-500);
}
.hsv__card img { width: 60%; height: 60%; object-fit: contain; }
.hsv__mono { font-family: var(--font-family-heading); font-weight: 800; font-size: calc(var(--chip) * 0.46); color: var(--brand); line-height: 1; }

@keyframes hsv-hub-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hsv-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.04); } }
@keyframes hsv-pop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes hsv-draw {
  0% { width: 0; background: #ECE4DE; }
  85% { background: #ECE4DE; }
  100% { width: var(--radius); background: linear-gradient(90deg, var(--color-accent-500), var(--brand)); }
}
@keyframes hsv-connect { from { border-color: transparent; } to { border-color: var(--color-accent-500); } }

@media (prefers-reduced-motion: no-preference) {
  .hsv__hub { animation: hsv-breathe 4s ease-in-out infinite; }
  /* Scroll-scrubbed: animations are applied but paused; JS sets currentTime
     from scroll progress. The hub keeps breathing (running). */
  .hsv.is-scrub .hsv__hub { animation: hsv-breathe 4s ease-in-out infinite, hsv-hub-in 0.25s ease both; animation-play-state: running, paused; }
  .hsv.is-scrub .hsv__chip { animation: hsv-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both paused; animation-delay: calc(var(--i) * 0.4s + 0.2s); }
  .hsv.is-scrub .hsv__spoke { animation: hsv-draw 0.6s ease both paused; animation-delay: calc(var(--i) * 0.4s + 0.4s); }
  .hsv.is-scrub .hsv__card { animation: hsv-connect 0.35s ease both paused; animation-delay: calc(var(--i) * 0.4s + 0.95s); }
}
