/* ============================================================
   Element Human — "Ask Ellie" product surface
   Used by: index.html (hero) + ellie.html (product page)

   Design intent: same EH palette, but a NEW-product feel —
   Gemini-style ambient gradient that drifts and slowly shifts
   hue, an LLM-prompt-bar signup instead of buttons, lots of air.
   ============================================================ */

/* ---------- Hero shell ---------- */
.ellie-hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 96px 24px 120px;
  /* Near-opaque base: the site's fixed .bg-orbs must not bleed through
     the Ellie hero — they belong to the Measurement story below
     (ellie.js fades them in on scroll). The last ~15% dissolves to
     transparent so the hero blends into the orb-lit sections instead
     of ending on a hard seam. */
  background: linear-gradient(180deg, #0c1520 0%, #0c1520 84%, rgba(12, 21, 32, 0) 100%);
}

/* Orb fade-in choreography (index only — driven by ellie.js).
   Orbs start invisible at the top of the page and reach full strength
   once the hero has scrolled away. */
body.has-ellie-hero .bg-orbs {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

/* Nav choreography (index only): hidden at the top so nothing competes
   with "Ask Ellie"; slides in once the visitor scrolls (ellie.js adds
   .ellie-nav-visible past ~120px). :focus-within keeps it reachable
   for keyboard users even at the top. Hero grows to full 100svh since
   the nav no longer claims its 64px at first paint. */
body.has-ellie-hero .nav {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
body.has-ellie-hero.ellie-nav-visible .nav,
body.has-ellie-hero .nav:focus-within {
  transform: none;
  opacity: 1;
}
body.has-ellie-hero .ellie-hero {
  min-height: 100svh;
}

/* Aurora background — northern-lights ribbons in the EH palette,
   confined to the TOP of the hero (Gemini-style: glow up top,
   dissolving into the dark base below the headline). Kept subtle in
   intensity but with clearly visible motion: shorter cycles, wider
   sideways travel, and a pronounced hue drift. */
.ellie-hero::before,
.ellie-hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(60px);
  will-change: transform, filter;
  border-radius: 50%;
}
/* Ribbon 1 — full-family sweep (green → teal → cyan → blue → violet)
   hugging the very top. The wide hue-rotate swing in the keyframes is
   what makes the colours visibly cycle over time. */
.ellie-hero::before {
  top: -20%;
  left: -40%;
  width: 175%;
  height: 42%;
  background: linear-gradient(94deg,
    transparent 3%,
    rgba(84, 228, 43, 0.20) 16%,
    rgba(16, 168, 183, 0.24) 34%,
    rgba(0, 160, 255, 0.22) 52%,
    rgba(0, 122, 255, 0.20) 68%,
    rgba(143, 33, 161, 0.16) 84%,
    transparent 97%);
  transform: rotate(-12deg);
  animation: ellie-aurora-a 10s ease-in-out infinite alternate;
}
/* Ribbon 2 — counter-flowing (pink → purple → blue → cyan → teal),
   just below ribbon 1, still upper-third */
.ellie-hero::after {
  top: -4%;
  right: -40%;
  width: 170%;
  height: 34%;
  background: linear-gradient(98deg,
    transparent 4%,
    rgba(255, 33, 152, 0.12) 18%,
    rgba(143, 33, 161, 0.20) 36%,
    rgba(0, 122, 255, 0.20) 56%,
    rgba(0, 160, 255, 0.18) 74%,
    rgba(16, 168, 183, 0.14) 88%,
    transparent 98%);
  transform: rotate(-8deg);
  animation: ellie-aurora-b 14s ease-in-out infinite alternate;
}
@keyframes ellie-aurora-a {
  0%   { transform: translateX(-22%) rotate(-16deg) scaleY(0.8);  filter: blur(56px) hue-rotate(-30deg); }
  50%  { transform: translateX(10%)  rotate(-7deg)  scaleY(1.55); filter: blur(70px) hue-rotate(55deg); }
  100% { transform: translateX(24%)  rotate(-14deg) scaleY(0.9);  filter: blur(56px) hue-rotate(-15deg); }
}
@keyframes ellie-aurora-b {
  0%   { transform: translateX(22%)  rotate(-5deg)  scaleY(0.85); filter: blur(58px) hue-rotate(25deg); }
  50%  { transform: translateX(-12%) rotate(-13deg) scaleY(1.6);  filter: blur(72px) hue-rotate(-60deg); }
  100% { transform: translateX(-24%) rotate(-6deg)  scaleY(0.8);  filter: blur(58px) hue-rotate(35deg); }
}

.ellie-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Type ---------- */
.ellie-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 34px;
}
.ellie-hero__title {
  font-size: clamp(64px, 11vw, 124px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  color: #F0F0F5;
}
/* Static gradient on "Ellie" — one fixed sweep, no animation. */
.ellie-grad {
  background: linear-gradient(96deg, #54E42B 0%, #00A0FF 52%, #8F21A1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ellie-hero__sub {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
  max-width: 560px;
  margin: 0 0 40px;
}

/* ---------- Prompt-bar signup ---------- */
.ellie-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(640px, 100%);
  background: rgba(14, 24, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 7px 7px 7px 24px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ellie-bar:focus-within {
  border-color: rgba(0, 160, 255, 0.55);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(0, 122, 255, 0.12);
}
.ellie-bar__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: #F0F0F5;
  font: inherit;
  font-size: 15.5px;
  padding: 10px 2px;
}
.ellie-bar__input::placeholder { color: rgba(255, 255, 255, 0.38); }

/* LLM picker */
.ellie-llm { position: relative; flex-shrink: 0; }
.ellie-llm__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.ellie-llm__btn:hover { background: rgba(255, 255, 255, 0.09); }
.ellie-llm__btn svg { display: block; }
.ellie-llm__chev { opacity: 0.55; transition: transform 0.2s ease; }
.ellie-llm.is-open .ellie-llm__chev { transform: rotate(180deg); }
.ellie-llm__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 190px;
  background: rgba(14, 24, 38, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 30;
}
.ellie-llm.is-open .ellie-llm__menu { display: block; }
.ellie-llm__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.ellie-llm__opt:hover { background: rgba(255, 255, 255, 0.07); }
.ellie-llm__opt[aria-selected="true"] { background: rgba(0, 122, 255, 0.14); }
.ellie-llm__opt svg { flex-shrink: 0; }

/* Send button */
.ellie-send {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #007AFF, #00A0FF);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 122, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ellie-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0, 122, 255, 0.5);
}
.ellie-send svg { display: block; }

/* Error + success */
.ellie-bar-error {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: #ff7b7b;
  min-height: 18px;
}
.ellie-success {
  display: none;
  align-items: center;
  gap: 12px;
  width: min(640px, 100%);
  background: rgba(84, 228, 43, 0.08);
  border: 1px solid rgba(84, 228, 43, 0.35);
  border-radius: 999px;
  padding: 16px 26px;
  color: #F0F0F5;
  font-size: 15px;
  justify-content: center;
}
.ellie-success.is-visible { display: flex; }
.ellie-signup-wrap.is-done .ellie-bar,
.ellie-signup-wrap.is-done .ellie-bar-error { display: none; }

.ellie-hero__note {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.42);
}

/* ---------- Scroll hint ---------- */
.ellie-scrollhint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  opacity: 0.85;
  animation: ellie-bob 2.6s ease-in-out infinite;
  padding: 6px 10px;
}
.ellie-scrollhint:hover { opacity: 1; }
.ellie-scrollhint span { margin-bottom: 6px; white-space: nowrap; }
.ellie-scrollhint svg { display: block; }
.ellie-scrollhint svg + svg { margin-top: -9px; }
.ellie-scrollhint svg:nth-of-type(1) { opacity: 0.95; }
.ellie-scrollhint svg:nth-of-type(2) { opacity: 0.55; }
.ellie-scrollhint svg:nth-of-type(3) { opacity: 0.28; }
@keyframes ellie-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}
.ellie-scrollhint { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .ellie-hero::before,
  .ellie-hero::after,
  .ellie-scrollhint { animation: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .ellie-hero { padding: 72px 18px 110px; }
  .ellie-hero__title { font-size: clamp(56px, 17vw, 76px); }
  .ellie-bar {
    border-radius: 26px;
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
  }
  .ellie-bar__input {
    flex: 1 1 100%;
    order: 1;
    padding: 8px 10px;
  }
  .ellie-llm { order: 2; flex: 1; }
  .ellie-llm__btn { width: 100%; justify-content: center; }
  .ellie-llm__menu { left: 0; right: auto; }
  .ellie-send { order: 3; width: 46px; }
}

/* ============================================================
   /ellie PRODUCT PAGE
   ============================================================ */
.ellie-page-hero {
  min-height: 68svh;
}

.ellie-section {
  position: relative;
  padding: 96px 24px;
}
.ellie-section--alt { background: rgba(0, 0, 0, 0.18); }
.ellie-section__inner { max-width: 980px; margin: 0 auto; }
.ellie-section__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 14px;
  text-align: center;
}
.ellie-section__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #F0F0F5;
  text-align: center;
  margin: 0 0 16px;
}
.ellie-section__lede {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

/* ---------- Chat mockup ---------- */
.ellie-chat {
  max-width: 680px;
  margin: 0 auto;
  background: rgba(14, 24, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 28px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
.ellie-chat__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ellie-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #54E42B, #00A0FF, #8F21A1);
  flex-shrink: 0;
}
.ellie-chat__name { font-size: 14.5px; font-weight: 600; color: #F0F0F5; }
.ellie-chat__status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(84, 228, 43, 0.8);
  margin-left: auto;
}

.ellie-msg { display: flex; margin-bottom: 16px; }
.ellie-msg--user { justify-content: flex-end; }
.ellie-msg__bubble {
  max-width: 82%;
  padding: 13px 17px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  text-align: left;
}
.ellie-msg--user .ellie-msg__bubble {
  background: rgba(0, 122, 255, 0.22);
  border: 1px solid rgba(0, 122, 255, 0.28);
  color: #F0F0F5;
  border-bottom-right-radius: 6px;
}
.ellie-msg--ellie .ellie-msg__bubble {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  border-bottom-left-radius: 6px;
}
.ellie-msg__bubble strong { color: #F0F0F5; }
.ellie-msg__bubble .ellie-stat {
  color: #54E42B;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* Mini bar chart inside a bubble */
.ellie-msg__chart {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  height: 64px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.ellie-msg__bar {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
}
.ellie-msg__bar--win { background: linear-gradient(180deg, #54E42B, rgba(84, 228, 43, 0.4)); }
.ellie-msg__bar span {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* Suggestion chips */
.ellie-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}
.ellie-chip {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 9px 16px;
}

/* ---------- Data stats ---------- */
.ellie-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.ellie-stat-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
}
.ellie-stat-tile__num {
  display: block;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #54E42B, #00A0FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.ellie-stat-tile__label {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}
@media (max-width: 760px) {
  .ellie-stats { grid-template-columns: repeat(2, 1fr); }
}
