/* ==========================================================================
   AILuce APEX — Apple-calm motion design layer (loaded after styles.css)
   Same brand colors. Same fonts. Cinematic motion. Minimal text.
   Does not touch Lucy widget styles.
   ========================================================================== */

/* ---- 1. Quiet eyebrows ---------------------------------------------------- */
.eyebrow {
  text-transform: none; letter-spacing: 0.01em;
  font-size: 0.92rem; font-weight: 500; color: rgba(47, 47, 47, 0.6);
}
.eyebrow::before { display: none; }
.dark .eyebrow { color: rgba(223, 227, 231, 0.62); }

/* ---- 2. Air ---------------------------------------------------------------- */
.section { padding-block: clamp(6rem, 10vw, 10rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.4rem); }

/* ---- 3. Display type -------------------------------------------------------- */
h1, h2, h3, .display { letter-spacing: -0.03em; }
.lede { max-width: 54ch; }

/* ---- 4. Buttons: pill-soft --------------------------------------------------- */
.btn { border-radius: 999px; padding: 0.95rem 2.1rem; }
.btn-primary { box-shadow: 0 2px 10px rgba(88, 194, 176, 0.28); }
.btn-primary:hover { box-shadow: 0 8px 26px rgba(88, 194, 176, 0.4); }

/* ---- 5. HERO: full viewport, canvas stage ------------------------------------ */
.hero-full {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: 72px;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-full .container { position: relative; z-index: 2; }
.hero-full h1 { font-size: clamp(2.9rem, 1.6rem + 6vw, 5.4rem); max-width: 12ch; }
.hero-full .lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); margin-top: 1.4rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero-kicker { color: rgba(223, 227, 231, 0.6); margin-top: 1.6rem; font-size: 0.95rem; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  width: 26px; height: 44px; border: 2px solid rgba(223, 227, 231, 0.35);
  border-radius: 14px; z-index: 2;
}
.scroll-hint::after {
  content: ""; position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 4px; height: 9px; border-radius: 3px; background: var(--teal);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint { 0%, 100% { opacity: 0.4; top: 8px; } 50% { opacity: 1; top: 16px; } }

/* ---- 6. REVEAL on scroll ------------------------------------------------------ */
[data-rv] { opacity: 0; transform: translateY(30px) scale(0.985); }
[data-rv].in {
  opacity: 1; transform: none;
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--rvd, 0s);
}
[data-rv="zoom"] { transform: scale(0.94); }
[data-rv="left"] { transform: translateX(-36px); }
[data-rv="right"] { transform: translateX(36px); }

/* ---- 7. STICKY STORY: pinned visual, scrolling steps --------------------------- */
.story { position: relative; background: #232323; color: #DFE3E7; padding: 5rem 0; }
.story-step h3 { color: #fff; }
/* Mobile: story becomes a simple dark band, no tall sticky steps */
@media (max-width: 959px) {
  .story-step { min-height: 0; padding: 1.6rem 0; }
  .story-visual { margin: 0 auto 1rem; }
}
/* Mobile: flow diagram stays legible via horizontal swipe */
@media (max-width: 640px) {
  .flow { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 1rem; }
  .flow svg { min-width: 620px; }
}
.story-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) {
  .story-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .story-pin { position: sticky; top: 0; min-height: 100svh; display: flex; align-items: center; justify-content: center; }
}
.story-visual {
  position: relative; width: min(420px, 80vw); aspect-ratio: 1;
  border-radius: 28px;
  background:
    radial-gradient(320px 320px at 50% 42%, rgba(88, 194, 176, 0.28), transparent 70%),
    rgba(223, 227, 231, 0.05);
  border: 1px solid rgba(223, 227, 231, 0.14);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: background 0.8s ease;
}
.story-visual .orb {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 90px rgba(88, 194, 176, 0.55);
  animation: float 5s ease-in-out infinite;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.8s ease;
}
.story-visual[data-step="1"] .orb { transform: scale(1.25); }
.story-visual[data-step="2"] .orb { transform: translateX(46px) scale(0.9); background: var(--teal-dark); }
.story-visual[data-step="3"] .orb { transform: translateX(-46px) scale(1.1); }
@keyframes float { 0%, 100% { margin-top: 0; } 50% { margin-top: -16px; } }
.story-steps { display: grid; gap: 0; }
.story-step {
  min-height: 62vh; display: flex; flex-direction: column; justify-content: center;
  opacity: 0.28; transition: opacity 0.6s ease; padding: 2rem 0;
}
.story-step.active { opacity: 1; }
.story-step .n { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; color: var(--teal); margin-bottom: 0.8rem; }
.story-step h3 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.4rem); margin-bottom: 0.7rem; }
.story-step p { color: rgba(223, 227, 231, 0.72); max-width: 38ch; font-size: 1.05rem; }

/* ---- 8. PRODUCT CARDS ---------------------------------------------------------- */
.cards-2 { display: grid; gap: 1.5rem; margin-top: 3rem; }
@media (min-width: 900px) { .cards-2 { grid-template-columns: 1fr 1fr; } }
.p-card {
  position: relative; border-radius: 24px; overflow: hidden;
  background: var(--charcoal); color: var(--light);
  padding: clamp(2rem, 4vw, 3.2rem);
  min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.5s ease;
}
.p-card:hover { transform: translateY(-8px) scale(1.01); box-shadow: 0 30px 70px rgba(47, 47, 47, 0.25); }
.p-card .p-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 300px at 70% 20%, rgba(88, 194, 176, 0.25), transparent 70%);
}
.p-card h3 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); color: #fff; margin-bottom: 0.6rem; position: relative; }
.p-card p { color: rgba(223, 227, 231, 0.72); max-width: 36ch; position: relative; }
.p-card .p-tag {
  position: absolute; top: 1.6rem; left: 1.8rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--charcoal); background: var(--teal);
  padding: 0.35rem 0.8rem; border-radius: 100px;
}
.p-card .p-link { margin-top: 1.4rem; color: var(--teal); font-weight: 600; position: relative; }

/* ---- 9. STATS band: animated counters -------------------------------------------- */
.stats-band { display: grid; gap: 2.5rem; margin-top: 3rem; }
@media (min-width: 800px) { .stats-band { grid-template-columns: repeat(4, 1fr); } }
.stat .num {
  font-family: var(--font-display); font-weight: 650;
  font-size: clamp(2.6rem, 2rem + 2.6vw, 4rem); letter-spacing: -0.03em; color: var(--charcoal);
}
.stat .num small { font-size: 0.45em; font-weight: 550; color: var(--teal-dark); }
.stat p { color: rgba(47, 47, 47, 0.65); margin-top: 0.4rem; font-size: 0.98rem; }
.dark .stat .num { color: #fff; }
.dark .stat p { color: rgba(223, 227, 231, 0.65); }

/* ---- 10. MARQUEE ------------------------------------------------------------------ */
.marquee { overflow: hidden; white-space: nowrap; padding: 1.6rem 0; border-block: 1px solid rgba(47, 47, 47, 0.1); }
.marquee-track { display: inline-flex; gap: 3.5rem; animation: mq 26s linear infinite; }
.marquee span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 550; letter-spacing: 0.02em; color: rgba(47, 47, 47, 0.5); }
.marquee span i { font-style: normal; color: var(--teal); margin-right: 3.5rem; }
@keyframes mq { to { transform: translateX(-50%); } }
.dark .marquee { border-block-color: rgba(223, 227, 231, 0.14); }
.dark .marquee span { color: rgba(223, 227, 231, 0.45); }

/* ---- 11. STEPS: quiet --------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 2rem; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.steps li { border-top: 2px solid var(--charcoal); padding-top: 1.25rem; }
.steps .step-n { font-size: 0.85rem; font-weight: 600; color: rgba(47, 47, 47, 0.5); letter-spacing: 0.06em; }
.steps h3 { margin: 0.6rem 0 0.5rem; font-size: 1.25rem; }
.steps p { color: rgba(47, 47, 47, 0.72); font-size: 0.98rem; }

/* ---- 12. FAQ: hairline dividers ------------------------------------------------------- */
.faq-list { border-top: 1px solid rgba(47, 47, 47, 0.14); max-width: 46rem; }
.faq-list details { border: 0; border-bottom: 1px solid rgba(47, 47, 47, 0.14); border-radius: 0; background: none; padding: 0; margin: 0; }
.faq-list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.35rem 0; font-weight: 550; font-size: 1.05rem; letter-spacing: -0.01em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font-weight: 400; font-size: 1.4rem; line-height: 1; color: rgba(47, 47, 47, 0.45); transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 1.5rem; color: rgba(47, 47, 47, 0.75); max-width: 60ch; }

/* ---- 13. Parallax ---------------------------------------------------------------------- */
[data-plx] { will-change: transform; }

/* ---- 16. SHOWPIECE VISUALS ------------------------------------------------------------ */

/* Revenue flow diagram: animated pipeline with traveling signal dots */
.flow { max-width: 880px; margin: 3rem auto 0; }
.flow svg { width: 100%; height: auto; display: block; }
.flow .fp { fill: none; stroke: rgba(223, 227, 231, 0.22); stroke-width: 2; stroke-dasharray: 7 9; animation: dashmove 1.1s linear infinite; }
@keyframes dashmove { to { stroke-dashoffset: -16; } }
.flow .fnode { fill: rgba(223, 227, 231, 0.06); stroke: rgba(223, 227, 231, 0.3); }
.flow .fnode.hot { stroke: #58C2B0; }
.flow .flabel { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: #DFE3E7; letter-spacing: 0.04em; }
.flow .fsub { font-family: var(--font-body); font-size: 11px; fill: rgba(223, 227, 231, 0.55); }
.flow .fdot { fill: #58C2B0; filter: drop-shadow(0 0 6px rgba(88, 194, 176, 0.9)); }
.flow-light .fp { stroke: rgba(47, 47, 47, 0.2); }
.flow-light .fnode { fill: rgba(47, 47, 47, 0.04); stroke: rgba(47, 47, 47, 0.25); }
.flow-light .flabel { fill: #2F2F2F; }
.flow-light .fsub { fill: rgba(47, 47, 47, 0.55); }

/* Live dashboard card: animated bars + pulsing live dot */
.dash {
  border-radius: 22px; background: var(--charcoal); color: var(--light);
  padding: 1.8rem; max-width: 520px; margin: 2.5rem auto 0;
  border: 1px solid rgba(223, 227, 231, 0.12);
  box-shadow: 0 30px 70px rgba(47, 47, 47, 0.22);
}
.dash-head { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.95rem; margin-bottom: 1.4rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #58C2B0; position: relative; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #58C2B0; opacity: 0.6; animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(1.4); opacity: 0; } }
.dash-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.dash-bars i {
  flex: 1; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #58C2B0, #3FA593);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.in .dash-bars i, .arv.in .dash-bars i { transform: scaleY(1); }
.dash-bars i:nth-child(1) { height: 42%; transition-delay: 0.05s; }
.dash-bars i:nth-child(2) { height: 68%; transition-delay: 0.15s; }
.dash-bars i:nth-child(3) { height: 54%; transition-delay: 0.25s; }
.dash-bars i:nth-child(4) { height: 88%; transition-delay: 0.35s; }
.dash-bars i:nth-child(5) { height: 74%; transition-delay: 0.45s; }
.dash-bars i:nth-child(6) { height: 100%; transition-delay: 0.55s; background: linear-gradient(180deg, #7ad9c8, #58C2B0); }
.dash-foot { display: flex; justify-content: space-between; margin-top: 1.2rem; font-size: 0.85rem; color: rgba(223, 227, 231, 0.6); }
.dash-foot strong { color: #fff; font-size: 1.05rem; display: block; }

/* Voice bars: talking AI waveform */
.voicebars { display: flex; align-items: center; gap: 5px; height: 64px; margin: 2rem auto 0; justify-content: center; }
.voicebars i { width: 5px; border-radius: 3px; background: #58C2B0; animation: vb 1.1s ease-in-out infinite; }
.voicebars i:nth-child(1) { height: 30%; animation-delay: 0s; }
.voicebars i:nth-child(2) { height: 60%; animation-delay: 0.12s; }
.voicebars i:nth-child(3) { height: 90%; animation-delay: 0.24s; }
.voicebars i:nth-child(4) { height: 55%; animation-delay: 0.36s; }
.voicebars i:nth-child(5) { height: 100%; animation-delay: 0.48s; }
.voicebars i:nth-child(6) { height: 70%; animation-delay: 0.6s; }
.voicebars i:nth-child(7) { height: 40%; animation-delay: 0.72s; }
.voicebars i:nth-child(8) { height: 85%; animation-delay: 0.84s; }
.voicebars i:nth-child(9) { height: 50%; animation-delay: 0.96s; }
.voicebars i:nth-child(10) { height: 65%; animation-delay: 1.08s; }
@keyframes vb { 0%, 100% { transform: scaleY(0.4); opacity: 0.6; } 50% { transform: scaleY(1); opacity: 1; } }

/* Chat bubbles with typing indicator */
.chatdemo { max-width: 440px; margin: 2.5rem auto 0; display: grid; gap: 0.9rem; }
.bubble {
  max-width: 82%; padding: 0.9rem 1.2rem; border-radius: 18px; font-size: 0.98rem; line-height: 1.5;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.in .bubble, .arv.in .bubble { opacity: 1; transform: none; }
.bubble.q { justify-self: start; background: rgba(47, 47, 47, 0.06); border: 1px solid rgba(47, 47, 47, 0.1); transition-delay: 0.1s; }
.bubble.a { justify-self: end; background: var(--charcoal); color: #fff; transition-delay: 0.7s; }
.typing { display: inline-flex; gap: 5px; padding: 0.2rem 0; }
.typing b { width: 7px; height: 7px; border-radius: 50%; background: #58C2B0; animation: tp 1s ease-in-out infinite; }
.typing b:nth-child(2) { animation-delay: 0.15s; }
.typing b:nth-child(3) { animation-delay: 0.3s; }
@keyframes tp { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-5px); opacity: 1; } }

/* v2 class aliases for the chatbot page demo (same styling, renamed classes) */
.chat-demo { max-width: 440px; margin: 2.5rem auto 0; display: grid; gap: 0.9rem; }
.chat-bubble {
  max-width: 82%; padding: 0.9rem 1.2rem; border-radius: 18px; font-size: 0.98rem; line-height: 1.5;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.in .chat-bubble, .arv.in .chat-bubble { opacity: 1; transform: none; }
.chat-bubble.user { justify-self: start; background: rgba(47, 47, 47, 0.06); border: 1px solid rgba(47, 47, 47, 0.1); transition-delay: 0.1s; }
.chat-bubble.bot { justify-self: end; background: var(--charcoal); color: #fff; transition-delay: 0.7s; }
.chat-typing { display: inline-flex; gap: 5px; padding: 0.2rem 0; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #58C2B0; animation: tp 1s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: 0.15s; }
.chat-typing i:nth-child(3) { animation-delay: 0.3s; }

/* Tilt cards: subtle 3D on hover */
.tilt { transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.5s ease; transform-style: preserve-3d; }
.tilt:hover { transform: translateY(-8px) rotateX(2deg) rotateY(-2deg); }

/* Big number ticker */
.tick-num { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; font-size: clamp(3rem, 2.2rem + 4vw, 5rem); }

@media (prefers-reduced-motion: reduce) {
  .flow .fp { animation: none; }
  .voicebars i, .typing b, .live-dot::after { animation: none; }
  .dash-bars i { transform: scaleY(1); }
  .bubble { opacity: 1; transform: none; }
}
.arv { opacity: 0; transform: translateY(28px); }
.arv.in {
  opacity: 1; transform: none;
  transition: opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--rvd, 0s);
}
@media (prefers-reduced-motion: reduce) { .arv { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-rv] { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .hero-canvas { display: none; }
}

/* ---- Lucy avatar face ---- */
.lucy-fab{padding:0;overflow:hidden;background:none}
.lucy-fab img{width:100%;height:100%;object-fit:cover;display:block;border-radius:50%}
img.lucy-avatar{background:none;display:block;object-fit:cover;padding:0}

/* ---- v2 class aliases: dark proof band, stats, dashboard bits ---- */
.section-dark { background: var(--charcoal); color: var(--light); }
.section-dark .eyebrow { color: rgba(223, 227, 231, 0.62); }
.section-dark .section-head h2 { color: #fff; }
.section-dark .lede { color: rgba(223, 227, 231, 0.72); }
.stat-num {
  display: block; font-family: var(--font-display); font-weight: 650;
  font-size: clamp(2.6rem, 2rem + 2.6vw, 4rem); letter-spacing: -0.03em; color: var(--charcoal);
}
.stat-num small { font-size: 0.45em; font-weight: 550; color: var(--teal-dark); }
.stat-label { display: block; color: rgba(47, 47, 47, 0.65); margin-top: 0.4rem; font-size: 0.98rem; }
.section-dark .stat-num { color: #fff; }
.section-dark .stat-label { color: rgba(223, 227, 231, 0.65); }
.dash-dot { width: 9px; height: 9px; border-radius: 50%; background: #58C2B0; position: relative; flex: none; }
.dash-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #58C2B0; opacity: 0.6; animation: ping 1.6s ease-out infinite; }
.dash-note { margin-top: 1.2rem; font-size: 0.85rem; color: rgba(223, 227, 231, 0.6); }

/* ---- CTA bands ---- */
.cta-band {
  margin-top: 3.5rem; padding: 2.75rem; border-radius: 24px;
  background: var(--charcoal); color: var(--light); text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 0.7rem; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
.cta-band p { color: rgba(223, 227, 231, 0.72); max-width: 44ch; margin: 0 auto 1.4rem; }
.cta-band p:last-child { margin-bottom: 0; }
.cta-final { text-align: center; padding: 2rem 0; }
.cta-final h2 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
.cta-final .lede { margin-bottom: 2rem; }
