/* =====================================================================
   Elys — landing page
   ===================================================================== */
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
main { overflow-x: clip; }
section { position: relative; }
.section { padding: 120px 0 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--md-primary); }
.section-head .eyebrow .shape { --size: 32px; }
.section-head h2 { margin: 0 0 16px; }
.section-head p { margin: 0; }

/* --- Hero ---------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 120px 0 64px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.hero h1 { margin: 22px 0 24px; }
.hero h1 .accent { color: var(--md-primary); }
.hero h1 .l { display: inline-block; transition: font-variation-settings 260ms var(--ease-emph); }
.hero h1 .w { display: inline-block; white-space: nowrap; }
.hero .lead { max-width: 560px; margin: 0 0 36px; color: var(--md-on-surface-variant); font-size: clamp(17px, 1.6vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.oneliner {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  padding: 8px 8px 8px 22px;
  border-radius: var(--shape-full);
  background: var(--md-surface-container-high);
  font: 500 14px/1.2 var(--font-mono);
  color: var(--md-on-surface-variant);
}
.oneliner code { background: none !important; padding: 0 !important; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; color: var(--md-on-surface) !important; font-size: 14px !important; }
.oneliner .prompt { color: var(--md-primary); font-weight: 700; }

.hero-art {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 540px);
  justify-self: center;
}
.hero-art .blob-back {
  position: absolute; inset: -4%;
  --morph-fill: var(--md-tertiary-container);
  opacity: 0.9;
}
.hero-art .blob-main {
  position: absolute; inset: 9%;
  --morph-fill: var(--md-primary);
  filter: drop-shadow(0 24px 40px color-mix(in oklch, var(--md-primary) 35%, transparent));
}
.hero-art .logo {
  position: absolute; inset: 30%;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--md-primary-container);
  box-shadow: 0 0 0 10px color-mix(in oklch, var(--md-on-primary) 18%, transparent);
  animation: bob 6s ease-in-out infinite;
}
.hero-art .logo img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .logo .fallback { font: 400 92px/1 var(--font-brand); font-variation-settings: "wdth" 125, "wght" 900; color: var(--md-on-primary-container); }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: var(--shape-full);
  background: var(--md-surface-container-lowest);
  color: var(--md-on-surface);
  font: 600 14px/1 var(--font-plain);
  box-shadow: 0 10px 30px -10px var(--md-shadow), 0 1px 3px var(--md-shadow);
  animation: bob 7s ease-in-out infinite;
  white-space: nowrap;
}
.float-chip .shape { --size: 34px; }
.float-chip small { display: block; font: 500 12px/1.2 var(--font-mono); color: var(--md-on-surface-variant); margin-top: 3px; }
.float-chip.c1 { top: 8%; left: -6%; animation-delay: -1s; }
.float-chip.c2 { top: 46%; right: -8%; animation-delay: -3s; }
.float-chip.c3 { bottom: 6%; left: 6%; animation-delay: -5s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0;
  display: grid; place-items: center;
  width: 44px; height: 64px; border-radius: var(--shape-full);
  box-shadow: inset 0 0 0 1.5px var(--md-outline-variant);
  color: var(--md-on-surface-variant);
}
.scroll-cue span { animation: cue 1.8s var(--ease-emph) infinite; }
@keyframes cue { 0% { translate: 0 -8px; opacity: 0; } 40% { opacity: 1; } 100% { translate: 0 10px; opacity: 0; } }

/* --- Marquee ------------------------------------------------------- */
.marquee {
  margin: 40px -20px 0;
  padding: 22px 0;
  background: var(--md-primary);
  color: var(--md-on-primary);
  rotate: -2deg;
  overflow: hidden;
  box-shadow: 0 20px 50px -24px color-mix(in oklch, var(--md-primary) 60%, transparent);
}
.marquee.alt { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); rotate: 1.5deg; margin-top: -18px; box-shadow: none; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee.alt .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.marquee-track span {
  display: inline-flex; align-items: center; gap: 22px;
  padding-right: 22px;
  font: 400 clamp(26px, 3.4vw, 44px)/1 var(--font-brand);
  font-variation-settings: "wdth" 120, "wght" 760;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee-track .star { width: 30px; height: 30px; --bg: currentColor; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Bento --------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
}
.bento .card { padding: 28px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.bento .card h3 { margin: 0; }
.bento .card p { margin: 0; color: inherit; opacity: 0.86; }
.bento .card .shape { --size: 60px; }
.bento .span-2 { grid-column: span 2; }
.bento .row-2 { grid-row: span 2; }
.bento .card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklch, currentColor 9%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-m);
  pointer-events: none;
}
.bento .card:hover::after { opacity: 1; }
.bento .card[data-tilt] { transition: transform 500ms var(--spring-gentle), border-radius var(--dur-l) var(--spring-gentle); will-change: transform; }
.bento .card:hover { border-radius: var(--shape-xxl); }
.bento .card .deco {
  position: absolute; right: -40px; bottom: -40px;
  width: 190px; height: 190px;
  opacity: 0.16;
  --morph-fill: currentColor;
  pointer-events: none;
}
.bento .stat-big { font: 400 72px/0.9 var(--font-brand); font-variation-settings: "wdth" 125, "wght" 850; letter-spacing: -0.04em; margin-top: auto; }

/* chat mock */
.chat {
  margin-top: 8px;
  flex: 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  border-radius: var(--shape-xl);
  background: var(--md-surface-container-lowest);
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}
.bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 20px;
  font: 500 14.5px/1.45 var(--font-plain);
  transform-origin: bottom right;
  animation: pop 520ms var(--spring-fast) both;
  white-space: pre-line;
  color: var(--md-on-surface);
}
.bubble.out { align-self: flex-end; background: var(--md-primary); color: var(--md-on-primary); border-bottom-right-radius: 6px; font-family: var(--font-mono); font-size: 13.5px; }
.bubble.in { align-self: flex-end; transform-origin: bottom right; background: var(--md-primary-container); color: var(--md-on-primary-container); border-bottom-right-radius: 6px; }
.bubble .meta { display: block; margin-top: 4px; font-size: 11px; opacity: 0.7; text-align: right; font-family: var(--font-plain); }
.bubble.typing { display: inline-flex; gap: 4px; padding: 14px 16px; background: var(--md-surface-container-high); }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--md-on-surface-variant); animation: dot 1s ease-in-out infinite; }
.bubble.typing i:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pop { from { transform: scale(0.4) translateY(16px); opacity: 0; } }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-5px); opacity: 1; } }
.chat-head { display: flex; align-items: center; gap: 12px; }
.chat-head .shape { --size: 44px !important; }
.chat-head b { display: block; font-size: 15px; }
.chat-head small { color: inherit; opacity: 0.75; font-size: 13px; }
.chat-head .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--font-plain); padding: 6px 10px; border-radius: var(--shape-full); background: var(--md-ok-container); color: var(--md-on-ok-container); }
.chat-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: dot 1.4s infinite; }

/* --- Stats --------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  padding: 30px 28px;
  border-radius: var(--shape-xl);
  background: var(--md-surface-container-low);
  display: grid; gap: 6px;
}
.stat:nth-child(2) { border-radius: var(--shape-xxl) var(--shape-md) var(--shape-xxl) var(--shape-md); }
.stat:nth-child(3) { border-radius: var(--shape-md) var(--shape-xxl); }
.stat .num { font: 400 64px/1 var(--font-brand); font-variation-settings: "wdth" 120, "wght" 820; letter-spacing: -0.04em; color: var(--md-primary); }

/* --- Install ------------------------------------------------------- */
.install {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--shape-xxl);
  background: var(--md-surface-container);
}
.install .btn-group { margin-bottom: 4px; }
.install .panel { animation: none; }
.tab-in { animation: tabIn 520ms var(--spring-gentle); }
@keyframes tabIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.install .note { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; color: var(--md-on-surface-variant); font-size: 14.5px; }

/* --- Steps --------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 32px 28px; border-radius: var(--shape-xl); background: var(--md-surface-container-low); display: grid; gap: 14px; align-content: start; }
.step .shape { --size: 76px; }
.step .shape b { font: 400 34px/1 var(--font-brand); font-variation-settings: "wdth" 120, "wght" 880; }
.step h3 { margin: 6px 0 0; }
.step p { margin: 0; color: var(--md-on-surface-variant); }

/* --- Docs CTA ------------------------------------------------------ */
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cta .card { padding: clamp(28px, 4vw, 48px); min-height: 380px; display: flex; flex-direction: column; overflow: hidden; }
.cta .card h3 { margin: 26px 0 12px; }
.cta .card p { margin: 0 0 28px; opacity: 0.86; max-width: 420px; }
.cta .card ul { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cta .card li { padding: 8px 14px; border-radius: var(--shape-full); background: color-mix(in oklch, currentColor 10%, transparent); font: 600 13.5px/1 var(--font-plain); }
.cta .card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 12px; font: 400 22px/1 var(--font-brand); font-variation-settings: "wdth" 110, "wght" 700; }
.cta .card .go .arrow {
  width: 56px; height: 56px; border-radius: var(--shape-full);
  display: grid; place-items: center;
  background: currentColor;
  transition: width var(--dur-l) var(--spring-fast), border-radius var(--dur-l) var(--spring-fast);
}
.cta .card .go .arrow span { color: var(--md-surface); }
.cta .card.primary .go .arrow span { color: var(--md-primary-container); }
.cta .card.tertiary .go .arrow span { color: var(--md-tertiary-container); }
.cta .card:hover .go .arrow { width: 96px; border-radius: var(--shape-lg); }
.cta .card .big-morph { position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; opacity: 0.22; --morph-fill: currentColor; pointer-events: none; }

/* --- FAQ ------------------------------------------------------------ */
.faq { display: grid; gap: 8px; max-width: 860px; }

/* --- Responsive ----------------------------------------------------- */
@media (max-width: 1040px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .install { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { width: min(80vw, 420px); order: -1; margin-top: 12px; }
  .float-chip.c1 { left: -2%; }
  .float-chip.c2 { right: -2%; }
  .steps, .cta { grid-template-columns: minmax(0, 1fr); }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento .span-2 { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .num { font-size: 46px; }
  .float-chip { font-size: 12.5px; padding: 8px 14px 8px 8px; }
  .float-chip .shape { --size: 28px; }
  .section { padding-top: 88px; }
}
