/* Home page only. Loaded via front matter "styles: /assets/css/pages/home.css". */

/* Hero ---------------------------------------------------------------------- */
.home-hero { padding-bottom: clamp(32px, 5vw, 64px); }
/* One-column layout with the scene still in its absolute layout: room for the card that hangs below it. */
@media (min-width: 620px) and (max-width: 1079px) { .home-hero { padding-bottom: clamp(88px, 11vw, 120px); } }
.home-hero .fx-grid { -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 0%, transparent 72%); mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 0%, transparent 72%); }
.home-hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 46% at 72% 52%, rgba(108, 77, 255, 0.26), rgba(108, 77, 255, 0) 70%),
    radial-gradient(18% 18% at 74% 56%, rgba(70, 232, 212, 0.1), rgba(70, 232, 212, 0) 70%);
}
@media (max-width: 1079px) {
  .home-hero__glow { background: radial-gradient(70% 40% at 50% 70%, rgba(108, 77, 255, 0.24), rgba(108, 77, 255, 0) 70%); }
}
.home-hero .hero__copy { position: relative; z-index: 2; }
/* "Pause animations" for the hero scene, card and channel strip (WCAG 2.2.2); the footer
   carries the same control on every page. */
.home-hero__controls { position: relative; z-index: 2; display: flex; justify-content: flex-end; margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .home-hero .hero__copy > * { animation: rise-in 900ms var(--ease-out) both; }
  .home-hero .hero__copy > :nth-child(2) { animation-delay: 70ms; }
  .home-hero .hero__copy > :nth-child(3) { animation-delay: 140ms; }
  .home-hero .hero__copy > :nth-child(4) { animation-delay: 210ms; }
  .home-hero .hero__copy > :nth-child(5) { animation-delay: 260ms; }
  .hero-scene { animation: hero-scene-in 1400ms 120ms var(--ease-out) both; }
}
@keyframes hero-scene-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

/* The scene: shared 640x600 coordinate system for SVG paths, canvas and DOM nodes. */
.hero-scene { position: relative; container-type: inline-size; z-index: 1; }
@media (max-width: 1079px) { .hero-scene { width: 100%; max-width: 640px; margin-inline: auto; } }
@media (min-width: 1320px) { .hero-scene { margin-right: calc(-1 * clamp(0px, 3vw, 40px)); } }
.hero-scene__stage { position: relative; aspect-ratio: 640 / 600; }
.hero-scene__svg, .hero-scene__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scene__svg { overflow: visible; }
.hero-scene__canvas { pointer-events: none; }
.hs-floor ellipse, .hs-floor path { fill: none; stroke: url(#hs-floor-grad); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hs-leads path { fill: none; stroke: rgba(169, 166, 255, 0.28); stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
.hs-streams path { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; }

.hero-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(34px, 9.6cqw, 62px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.hero-node__disc {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: var(--text-1);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 60%), rgba(18, 21, 32, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 30px -10px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(108, 77, 255, 0.05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: box-shadow 700ms var(--ease-out), color 700ms var(--ease-out);
}
.hero-node__disc .icon { width: 42%; height: 42%; }
.hero-node.is-hit .hero-node__disc {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(125, 240, 226, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 26px -2px rgba(70, 232, 212, 0.55), 0 0 0 6px rgba(70, 232, 212, 0.08);
  transition-duration: 120ms;
}
.hero-node__label {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  white-space: nowrap;
}
@container (max-width: 520px) { .hero-node__label { display: none; } }

.hero-hub {
  position: absolute;
  left: 50%;
  top: 55%;
  width: clamp(84px, 23cqw, 146px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.hero-hub::before {
  content: "";
  position: absolute;
  inset: -70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(108, 77, 255, 0.5), rgba(108, 77, 255, 0.14) 45%, transparent 75%);
}
.hero-hub__ring {
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(169, 166, 255, 0) 0deg, rgba(169, 166, 255, 0.85) 70deg, rgba(125, 240, 226, 0.9) 100deg, rgba(169, 166, 255, 0) 160deg, rgba(169, 166, 255, 0) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
}
.hero-hub__ring--outer { inset: -26%; opacity: 0.45; transform: rotate(160deg); }
.hero-hub__disc {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(138, 110, 255, 0.35), rgba(20, 16, 50, 0.92) 62%), #0B0B18;
  box-shadow: inset 0 0 0 1px rgba(169, 166, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 60px -6px rgba(108, 77, 255, 0.85), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
}
.hero-hub__mark { width: 46%; height: 46%; filter: drop-shadow(0 6px 18px rgba(108, 77, 255, 0.65)); }
.hero-hub__pulse { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1px rgba(169, 166, 255, 0.5); opacity: 0; }
.hero-hub.is-hit .hero-hub__disc { box-shadow: inset 0 0 0 1px rgba(169, 166, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 80px 0 rgba(108, 77, 255, 0.95), 0 30px 60px -20px rgba(0, 0, 0, 0.9); }
.hero-hub__disc { transition: box-shadow 600ms var(--ease-out); }
@media (prefers-reduced-motion: no-preference) {
  .hero-hub__ring { animation: hub-spin 9s linear infinite; }
  .hero-hub__ring--outer { animation-duration: 16s; animation-direction: reverse; }
  .hero-hub__pulse { animation: hub-pulse 3.2s var(--ease-out) infinite; }
  .hero-hub__pulse:nth-of-type(2) { animation-delay: 1.6s; }
}
@keyframes hub-spin { to { transform: rotate(360deg); } }
@keyframes hub-pulse { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }

/* Floating glass conversation card (a looping mini chat demo). */
.hero-card {
  position: absolute;
  left: -8%;
  bottom: -11%;
  z-index: 3;
  width: clamp(236px, 47cqw, 296px);
  border-radius: var(--r-xl);
  background: rgba(16, 18, 28, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 40px 80px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.hero-card__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.hero-card__who { min-width: 0; line-height: 1.3; }
.hero-card__who strong { display: block; font-size: 0.8125rem; }
.hero-card__who span { display: block; font-size: 0.6875rem; color: var(--text-3); white-space: nowrap; }
.hero-card__head .badge { margin-left: auto; }
/* Desktop: the card is bottom-anchored, so it grows upwards as the loop adds messages.
   Narrow (card in normal flow): fixed height so the loop never shifts the layout. */
.hero-card__log { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 96px; padding: 14px; overflow: hidden; }
.hero-card__log .msg { max-width: 92%; }
.hero-card__log .msg__bubble { font-size: 0.8125rem; padding: 9px 12px; line-height: 1.45; }
.hero-card__log .msg__meta { font-size: 0.6875rem; }
.hero-card__log .chat-event { font-size: 0.6875rem; padding: 6px 10px; }
.hero-card__log .typing { padding: 10px 13px; }

.hero-pill {
  position: absolute;
  right: -1%;
  bottom: 9%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 50cqw;
  padding: 10px 14px 10px 10px;
  border-radius: var(--r-lg);
  background: rgba(16, 18, 28, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(245, 181, 68, 0.3), 0 24px 50px -20px rgba(0, 0, 0, 0.9);
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-2);
}
.hero-pill strong { display: block; font-size: 0.8125rem; color: var(--text-1); }
.hero-pill .badge { align-self: flex-start; margin-left: 4px; }
.hero-pill .icon-tile { width: 32px; height: 32px; border-radius: 10px; color: var(--warning); background: rgba(245, 181, 68, 0.1); border: 0; box-shadow: inset 0 0 0 1px rgba(245, 181, 68, 0.35); }
.hero-pill .icon-tile .icon { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-card { animation: float-y 9s var(--ease-in-out) infinite alternate; }
  .hero-pill { animation: float-y 7s var(--ease-in-out) -3s infinite alternate; }
}
@keyframes float-y { from { transform: translateY(0); } to { transform: translateY(-10px); } }

@container (max-width: 560px) {
  .hero-card { position: relative; left: auto; bottom: auto; margin: -10cqw auto 0; width: min(100%, 340px); }
  .hero-card__log { height: 238px; }
  .hero-pill { display: none; }
}

/* Channel strip -------------------------------------------------------------- */
.channel-strip { position: relative; padding-block: clamp(24px, 3vw, 40px) clamp(40px, 5vw, 64px); }
.channel-strip__label { text-align: center; font-family: var(--font-body); font-weight: 400; font-size: 0.9375rem; letter-spacing: 0; color: var(--text-3); margin-bottom: 22px; }

/* Problem ------------------------------------------------------------------- */
.problem-card { padding: 0; overflow: hidden; }
.problem-card__visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 168px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(80% 90% at 50% 100%, rgba(255, 255, 255, 0.035), transparent 70%), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 24px);
  overflow: hidden;
}
.problem-card__body { padding: 22px 24px 26px; }
.problem-card .card__title { font-size: 1.125rem; }

.pv-apps { position: relative; width: 190px; height: 92px; }
.pv-apps .channel-icon { position: absolute; width: 50px; height: 50px; top: 20px; background: linear-gradient(160deg, #262B3C, #161925); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 20px -8px rgba(0, 0, 0, 0.8); }
.pv-apps .channel-icon .icon { width: 22px; height: 22px; color: var(--text-2); }
.pv-apps .channel-icon:nth-child(1) { left: 0; transform: rotate(-10deg) translateY(10px); }
.pv-apps .channel-icon:nth-child(2) { left: 34px; transform: rotate(-4deg); }
.pv-apps .channel-icon:nth-child(3) { left: 70px; transform: translateY(-8px); z-index: 2; color: var(--text-1); }
.pv-apps .channel-icon:nth-child(4) { left: 106px; transform: rotate(5deg); }
.pv-apps .channel-icon:nth-child(5) { left: 140px; transform: rotate(10deg) translateY(10px); }
.pv-apps__dot { position: absolute; z-index: 3; top: 6px; left: 108px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px var(--surface-1), 0 0 12px rgba(255, 92, 122, 0.8); }

.pv-clock { display: grid; justify-items: center; gap: 10px; }
.pv-clock__time { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; color: var(--text-1); }
.pv-clock__time .icon { width: 22px; height: 22px; color: var(--violet-300); }
.pv-clock__status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-3); }
.pv-clock__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-disabled); }

.pv-repeat { display: grid; gap: 6px; justify-items: center; }
.pv-repeat span { padding: 4px 11px; border-radius: var(--r-bubble-in); font-size: 0.75rem; color: var(--text-2); background: var(--surface-3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.pv-repeat span:nth-child(2) { transform: translateX(18px); opacity: 0.8; }
.pv-repeat span:nth-child(3) { transform: translateX(-14px); opacity: 0.6; }
.pv-repeat span:nth-child(4) { transform: translateX(10px); opacity: 0.4; }

.pv-blind { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 92px; padding: 0 6px; border-bottom: 1px solid var(--border-strong); }
.pv-blind span { width: 22px; border-radius: 4px 4px 0 0; border: 1px dashed var(--border-strong); border-bottom: 0; }
.pv-blind span:nth-child(1) { height: 38%; }
.pv-blind span:nth-child(2) { height: 64%; }
.pv-blind span:nth-child(3) { height: 48%; }
.pv-blind span:nth-child(4) { height: 82%; }
.pv-blind span:nth-child(5) { height: 56%; }
.pv-blind .pv-blind__q { width: auto; height: auto; border: 0; }
.pv-blind__q { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 2.5rem; font-weight: 600; color: var(--text-3); text-shadow: 0 0 24px var(--ink); }

/* Platform bento -------------------------------------------------------------- */
.module-kicker { display: inline-flex; align-items: center; gap: 10px; }
.module-title { margin-top: 16px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.4375rem); line-height: 1.28; letter-spacing: -0.015em; color: var(--text-1); }
.module-title span { color: var(--text-3); }
.bento .card__text { max-width: 560px; }

.bv-inbox { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .bv-inbox { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.bv-inbox .inbox-list { padding: 8px; border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.02); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.bv-channels { position: relative; display: grid; place-items: center; min-height: 190px; }
.bv-channels__hub { position: relative; z-index: 2; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: radial-gradient(circle at 30% 20%, rgba(138, 110, 255, 0.4), #120F2A 70%); box-shadow: inset 0 0 0 1px rgba(169, 166, 255, 0.45), 0 0 40px -6px rgba(108, 77, 255, 0.9); }
.bv-channels__hub svg { width: 30px; height: 30px; }
.bv-channels__ring { position: absolute; inset: 0; margin: auto; width: 180px; height: 180px; border-radius: 50%; border: 1px dashed rgba(138, 110, 255, 0.3); }
.bv-channels .channel-icon { position: absolute; width: 36px; height: 36px; left: 50%; top: 50%; margin: -18px 0 0 -18px; transform: rotate(var(--a)) translateY(-90px) rotate(calc(-1 * var(--a))); }
.bv-channels .channel-icon .icon { width: 16px; height: 16px; }

.bv-agent { display: flex; flex-direction: column; gap: 10px; }
.bv-agent .msg { max-width: 100%; }
.bv-agent .msg__bubble { font-size: 0.8125rem; }
.bv-agent .chat-event { font-size: 0.75rem; }

.bv-handoff { display: grid; gap: 10px; }
.bv-handoff .chat-event { align-self: stretch; font-size: 0.75rem; }
.bv-handoff .chat-summary { font-size: 0.75rem; }
.bv-handoff .chat-summary dl { gap: 4px 12px; }

.bv-insights { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .bv-insights { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.bv-insights .bars { height: 84px; }
@media (max-width: 639px) {
  .bv-channels, .bv-insights .chart-card + .chart-card { display: none; }
  .problem-card__visual { height: 132px; }
}

/* How it works --------------------------------------------------------------- */
.how { overflow: clip; }
.how .fx-grid { -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 0%, transparent 75%); }
.how-steps .step__text { max-width: 300px; }

/* Demo ------------------------------------------------------------------------ */
.demo-section .chat-demo { max-width: 1160px; margin-inline: auto; }
.demo-section .app-window { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 50px 120px -40px rgba(108, 77, 255, 0.45), 0 40px 80px -30px rgba(0, 0, 0, 0.9); }
.demo-section__frame { position: relative; }
.demo-section__frame::before { content: ""; position: absolute; inset: -1px; border-radius: calc(var(--r-xl) + 1px); padding: 1px; background: linear-gradient(160deg, rgba(169, 166, 255, 0.5), rgba(108, 77, 255, 0.05) 30%, rgba(108, 77, 255, 0.05) 70%, rgba(70, 232, 212, 0.35)); -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); pointer-events: none; z-index: 2; }

/* Solutions teaser ----------------------------------------------------------- */
.solution-card .icon-tile { width: 48px; height: 48px; border-radius: 14px; }
.solution-card .card__title { margin-top: 22px; font-size: 1.3125rem; }
.solution-card__index { position: absolute; top: clamp(22px, 2.6vw, 32px); right: clamp(22px, 2.6vw, 32px); }
.solution-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

/* Capability highlights ---------------------------------------------------- */
.capabilities { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); border-radius: var(--r-2xl); background: var(--grad-surface), var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.05); overflow: hidden; }
@media (min-width: 960px) { .capabilities { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.capabilities > .fx-beam { z-index: 2; }
.capability { position: relative; display: flex; flex-direction: column; padding: clamp(26px, 3vw, 40px); }
.capability + .capability { border-top: 1px solid var(--border-subtle); }
@media (min-width: 960px) { .capability + .capability { border-top: 0; border-left: 1px solid var(--border-subtle); } }
.capability .card__title { margin-top: 22px; }
.capability .card__text { margin-bottom: 4px; }
.capability__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.capability .card__footer { padding-top: 24px; }
