/* The landing page's own skin — ported from V1's ava/web/design.py + the _WELCOME_HERO_CSS block
   that ships with ava.aivas.co's /welcome.

   WHY IT OVERRIDES :root. The product's app system is BLUE (--accent:#4aa3f0) because that is what
   a console full of status colour needs to sit inside. The public page is VIOLET because that is
   the aivas.co brand a visitor arrives from, and landing on a differently-coloured page reads as
   landing on a different company. Same fonts, same primitives, same tokens — only the accent ramp
   and the page scaffolding change, which is why this is a token override and not a second CSS
   framework. It is loaded ONLY by welcome.html; every other page keeps the blue system.

   Loaded from /static rather than inlined because the CSP is `default-src 'self'` (same-origin CSS
   is fine) and because a ~9 KB stylesheet inlined into every landing render is 9 KB that never
   caches. */

.wl-page {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #596273;
  --line: #e7e7eb;
  --surface: #ffffff;
  --surface2: #f6f6f7;
  --raise: #ffffff;
  --accent: #7c3aed;
  --accent-text: #6d28d9;
  --accent-ink: #3b0764;
  --on-accent: #ffffff;
  --accent-soft: rgba(124, 58, 237, .10);
  --accent-line: rgba(124, 58, 237, .42);
  --band: #f6f6f7;
  --grad-a: hsl(260, 100%, 65%);
  --grad-b: hsl(260, 100%, 50%);
  /* The landing page is one continuous set of full-bleed bands, so the shell's centred
     max-width column has to be undone here rather than special-cased in _shell.html. */
  max-width: none;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

.wl-page .btn { border-radius: 999px; }

/* ---- sticky header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px);
}
.site-header-inner {
  width: 100%; max-width: 1260px; height: 92px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.site-header .wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
  letter-spacing: -.02em; color: var(--fg); text-decoration: none;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { padding: 8px 14px; line-height: 1; display: inline-flex; align-items: center; gap: 6px; }
.header-actions .about-link { color: var(--muted); font-weight: 500; text-decoration: none; padding: 8px 10px; }
.header-actions .about-link:hover { color: var(--fg); }

/* ---- bands: white -> #f6f6f7 -> white -> gradient ---- */
.wl-container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.wl-hero { padding: 66px 0 72px; overflow: hidden; }
.wl-hero .banner { margin: 0 0 22px; }
.wl-band { background: var(--band); padding: 76px 0 72px; }
.wl-quiet { padding: 64px 0 56px; }
.wl-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.wl-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.wl-h2 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.06;
  font-size: clamp(28px, 4.4vw, 40px); margin: 12px 0 0;
}
.wl-subtitle { color: var(--muted); font-size: 16.5px; line-height: 1.6; margin: 14px 0 0; }

/* ---- split hero ---- */
.hero {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, .8fr);
  gap: clamp(56px, 6vw, 92px); align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: -140px -180px auto auto; width: 620px; height: 620px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-soft), transparent 70%);
}
.hero > * { position: relative; z-index: 1; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; margin: 0;
  background: var(--accent-soft); border-radius: 999px; font-size: 13.5px; font-weight: 500;
  color: var(--accent-text);
}
.hero-pill .live { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; flex: none; }
.hero-pill .live::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: #4ade80;
  opacity: .75; animation: ava-ping 1.5s cubic-bezier(0, 0, .2, 1) infinite;
}
.hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(42px, 6.2vw, 66px); line-height: .98; letter-spacing: -.035em; margin: 0;
}
.hero-title .grad {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { color: var(--muted); font-size: 18px; line-height: 1.6; margin: 20px 0 0; max-width: 58ch; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.hero-tags span {
  font-size: 12.5px; color: var(--fg); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; background: var(--surface);
}

/* ---- the self-playing chat vignette ---- */
.presence {
  position: relative; isolation: isolate; overflow: hidden; margin: 28px 0 0;
  min-height: 330px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; padding: 22px;
  color: #fff; background: linear-gradient(145deg, #1e1b4b 0%, #3b0764 100%);
  box-shadow: 0 20px 46px rgba(30, 27, 75, .22); font-family: var(--font-display);
}
.presence::before, .presence::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(52px); pointer-events: none;
}
.presence::before { width: 220px; height: 220px; top: -90px; left: -50px; background: rgba(124, 58, 237, .34); }
.presence::after { width: 250px; height: 250px; right: -90px; bottom: -110px; background: rgba(109, 40, 217, .30); }
.chat-stage { display: flex; min-height: 284px; flex-direction: column; justify-content: space-between; }
.chat-stack { display: flex; flex-direction: column; gap: 13px; }
.chat-step { transition: opacity .42s cubic-bezier(.22, 1, .36, 1), transform .42s cubic-bezier(.22, 1, .36, 1); }
.wl-motion .chat-step { opacity: 0; transform: translateY(12px) scale(.96); }
.wl-motion .chat-step.is-shown { opacity: 1; transform: none; }
.chat-ava { max-width: 89%; }
.chat-user { display: flex; justify-content: flex-end; }
.chat-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: rgba(255, 255, 255, .58); font-size: 11.5px; }
.chat-avatar {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: linear-gradient(145deg, #a78bfa, #7c3aed); color: #fff;
  font-weight: 800; font-size: 10px;
}
.chat-bubble {
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 17px 17px 17px 4px; padding: 12px 14px;
  background: rgba(255, 255, 255, .09); backdrop-filter: blur(7px); color: rgba(255, 255, 255, .92);
  font-size: 12.5px; line-height: 1.5; min-height: 56px;
}
.chat-user .chat-bubble {
  max-width: 72%; min-height: 0; border: 0; border-radius: 17px 17px 4px 17px; background: #7c3aed; color: #fff;
}
.chat-file {
  display: flex; align-items: center; gap: 9px; margin: 0 0 9px; padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; background: rgba(255, 255, 255, .08);
  color: #fff; font-size: 12px; font-weight: 600;
}
.chat-file svg { color: #a78bfa; flex: none; }
.chat-delivery { margin: 0; }
.chat-caption { margin: 13px 0 0; color: rgba(255, 255, 255, .42); font-size: 10.5px; }
@keyframes ava-ping { 75%, 100% { transform: scale(2.15); opacity: 0; } }

/* ---- metrics strip ---- */
.metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 72px 0 0;
  padding: 40px 0 0; border-top: 1px solid var(--line);
}
.metric b {
  display: block; font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(32px, 4vw, 46px); line-height: 1; font-variant-numeric: tabular-nums;
}
.metric p { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }

/* ---- the auth card: the brand 'door' into the product ---- */
.authcard {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow-lg); padding: 30px; align-self: center;
}
.authcard::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
}
.authcard h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; margin: 0 0 4px; }
.authcard .sub { margin: 0 0 14px; }
.authcard .field { margin: 8px 0; }
.authcard form .btn { width: 100%; margin-top: 4px; padding: 12px 16px; }
.waitlist-form { margin: 6px 0 0; }
.forgot { font-size: 13px; margin: 12px 0 0; text-align: center; }
.closed-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }

/* ---- capability cards ---- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px;
  box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); margin: 0 0 16px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---- quiet zone: trust line + data-use disclosure ---- */
.trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; margin: 0;
  color: var(--muted); font-size: 13.5px;
}
.trust span { display: flex; align-items: center; gap: 8px; }
.trust svg { flex: none; color: var(--accent-text); }
.datause { max-width: 760px; margin: 32px auto 0; }
.datause h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.01em; }
.datause summary {
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); list-style: none;
  display: flex; align-items: center; gap: 6px; padding: 6px 0; justify-content: center;
}
.datause summary::-webkit-details-marker { display: none; }
.datause summary::before { content: '\25B8'; display: inline-block; color: var(--muted); transition: transform .15s ease; }
.datause[open] summary::before { transform: rotate(90deg); }
.datause .card { border-radius: 20px; padding: 26px; margin-top: 10px; text-align: left; }
.datause ul { margin: 8px 0; padding-left: 20px; }
.datause li { margin: 4px 0; color: var(--fg); font-size: 14px; line-height: 1.5; }
.datause .limited-use { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* ---- closing CTA band ---- */
.wl-cta {
  position: relative; overflow: hidden; text-align: center; padding: 88px 0;
  background: linear-gradient(135deg, #9333ea, #4f46e5);
}
.wl-cta::before {
  content: ""; position: absolute; top: -96px; left: -64px; width: 320px; height: 320px;
  border-radius: 50%; background: rgba(255, 255, 255, .10); filter: blur(64px);
}
.wl-cta::after {
  content: ""; position: absolute; bottom: -112px; right: -64px; width: 384px; height: 384px;
  border-radius: 50%; background: rgba(30, 27, 75, .40); filter: blur(64px);
}
.wl-cta .wl-container { position: relative; z-index: 1; }
.wl-cta h2 {
  font-family: var(--font-display); font-weight: 900; color: #fff; letter-spacing: -.02em;
  font-size: clamp(30px, 4.6vw, 44px); line-height: 1.04; margin: 0;
}
.wl-cta p { color: #ede9fe; font-size: 17.5px; line-height: 1.6; margin: 18px auto 0; max-width: 52ch; }
.wl-cta-btn {
  display: inline-flex; align-items: center; gap: 10px; margin: 32px 0 0; background: #fff;
  color: #6d28d9; border-radius: 999px; padding: 16px 30px; font-weight: 600; font-size: 16.5px;
  transition: transform .2s ease; text-decoration: none;
}
.wl-cta-btn:hover { transform: translateY(-1px); }
.wl-cta-btn svg { transition: transform .2s ease; }
.wl-cta-btn:hover svg { transform: translateX(4px); }

.site-footer {
  padding: 36px 22px 30px; border-top: 1px solid var(--line); color: var(--muted);
  font-size: 13px; text-align: center; line-height: 1.8;
}

/* ---- motion. The hidden states exist ONLY after JS opts in by adding .wl-motion, so a page
       with JS off (or reduced motion honoured) renders complete rather than blank. ---- */
.wl-motion .hero-item { opacity: 0; transform: translateY(24px); }
.wl-motion.hero-ready .hero-item {
  animation: hero-enter .7s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(.15s + var(--hero-i, 0) * .16s);
}
@keyframes hero-enter { to { opacity: 1; transform: none; } }
.wl-motion .focus-reveal {
  opacity: 0; transform: translateY(24px) scale(.96); transform-origin: center center;
  will-change: opacity, transform;
}
.wl-motion .focus-reveal.is-settled { opacity: 1; transform: none; will-change: auto; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero::before { width: 420px; height: 420px; inset: -80px -120px auto auto; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 981px) and (max-height: 850px) {
  .site-header-inner { height: 76px; }
  .wl-hero { padding: 28px 0 40px; }
  .hero-title { font-size: clamp(42px, 4.7vw, 58px); }
  .presence { min-height: 280px; }
  .chat-stage { min-height: 234px; }
}
@media (max-width: 640px) {
  .site-header-inner { height: 68px; padding: 0 12px; gap: 8px; }
  .site-header .wordmark { font-size: 21px; }
  .header-actions .about-link { display: none; }
  .header-actions { gap: 5px; }
  .header-actions .btn { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .wl-container { padding: 0 14px; }
  .wl-hero { padding: 16px 0 42px; }
  /* Promote the copy's children into the one-column hero so a phone can put the account action
     directly after the headline without the page carrying the same content twice. */
  .hero { gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy > * { position: relative; z-index: 1; }
  .hero-title { order: 1; }
  .authcard { order: 2; margin-top: 34px; padding: 28px 20px 26px; scroll-margin-top: 76px; }
  .authcard h2 { margin-bottom: 14px; }
  .authcard .sub { margin-bottom: 22px; line-height: 1.65; }
  .hero-lede { order: 3; margin-top: 48px; }
  .hero-tags { order: 4; }
  .presence { order: 5; }
  .wl-motion.hero-ready .authcard { animation-delay: .05s; }
  .wl-band { padding: 56px 0; }
  .wl-quiet { padding: 48px 0 44px; }
  .wl-cta { padding: 64px 0; }
  .metrics { grid-template-columns: 1fr; gap: 22px; margin-top: 52px; text-align: center; }
  .feature-grid { grid-template-columns: 1fr; }
  .trust { flex-direction: column; align-items: center; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-pill .live::before { animation: none; }
  .hero-item, .focus-reveal, .chat-step { opacity: 1 !important; transform: none !important; }
}
