:root {
  --bg: #050505;
  --ink: #f6f6f2;
  --ink-soft: #c5c9c1;
  --accent: #c7ff16;
  --accent-deep: #99c600;
  --frame: rgba(190, 194, 186, 0.22);
  --bubble-stroke: rgba(255,255,255,.12);
  --ease: cubic-bezier(.2,.78,.2,1);
  --btn-shadow: 0 18px 40px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); }
body {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.hero {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #060606 url("assets/hero-bg.webp") center center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 88%, rgba(255,255,255,.08), rgba(255,255,255,0) 22%),
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.06) 24%, rgba(0,0,0,.24) 100%);
  pointer-events: none;
}

.frame {
  position: absolute;
  inset: 10px;
  z-index: 1;
  border: 1px solid var(--frame);
  pointer-events: none;
}

.brandbar {
  position: absolute;
  z-index: 14;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
}
.brand {
  display: inline-flex;
  width: clamp(92px, 7.6vw, 114px);
  opacity: .98;
}
.brand img { display: block; width: 100%; height: auto; }

.chat-stack {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: clamp(136px, 15vh, 164px);
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 160px));
  pointer-events: none;
}
.chat-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.chat-row-bottom { margin-left: 26px; }
.chat-icon {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(199,255,22,.62);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.38) inset, 0 0 16px rgba(163,212,0,.09);
  background: rgba(8, 9, 8, .62);
}
.chat-icon span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: dots 1.3s infinite;
}
.chat-icon span:nth-child(2) { animation-delay: .15s; }
.chat-icon span:nth-child(3) { animation-delay: .3s; }

.chat-bubble {
  position: relative;
  max-width: 100%;
  min-height: 74px;
  padding: 19px 24px 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(31,31,31,.94), rgba(14,14,14,.92));
  box-shadow: 0 18px 46px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.05);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.chat-bubble::before {
  content: "";
  position: absolute;
  left: -9px;
  bottom: 17px;
  width: 22px;
  height: 22px;
  background: inherit;
  border-left: inherit;
  border-bottom: inherit;
  transform: skewX(-28deg) rotate(38deg);
  border-bottom-left-radius: 10px;
}
.chat-bubble-dark {
  border: 1px solid rgba(255,255,255,.12);
}
.chat-bubble-accent {
  border: 1.5px solid rgba(199,255,22,.78);
  box-shadow: 0 18px 46px rgba(0,0,0,.34), 0 0 0 1px rgba(199,255,22,.05), inset 0 0 0 1px rgba(255,255,255,.04);
}
.chat-bubble.is-waiting { opacity: 0; transform: translateY(12px); }
.chat-bubble.is-active { opacity: 1; transform: translateY(0); }
.typewriter {
  margin: 0;
  min-height: 1.5em;
  color: #f4f4ef;
  font-size: clamp(20px, 2vw, 23px);
  line-height: 1.24;
  font-weight: 400;
  letter-spacing: -.028em;
}
.typewriter.typing::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 8px;
  vertical-align: -0.08em;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(199,255,22,.6);
  animation: blink 1s steps(1,end) infinite;
}
.typewriter.done::after { content: none; }

.mascot-wrap {
  --tx: 0px;
  --ty: 0px;
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: clamp(10px, 1.4vh, 20px);
  width: clamp(350px, 31vw, 540px);
  transform: translate3d(calc(-50% + var(--tx)), var(--ty), 0);
  transform-origin: 50% 72%;
  will-change: transform;
  pointer-events: none;
  filter: drop-shadow(0 30px 42px rgba(0,0,0,.56));
}
.mascot-wrap::after {
  content: "";
  position: absolute;
  left: 15%; right: 15%; bottom: 4.2%; height: 11%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(0,0,0,.68);
  filter: blur(30px);
}
.mascot { display: block; width: 100%; height: auto; user-select: none; }

.hero-actions {
  position: absolute;
  z-index: 15;
  left: 50%;
  bottom: clamp(36px, 4.2vh, 46px);
  transform: translateX(-50%);
  width: min(286px, calc(100vw - 48px));
}

.cta {
  position: relative;
  display: block;
  width: 100%;
  min-height: 76px;
  border: 0;
  padding: 0 22px;
  cursor: pointer;
  background: transparent;
  transition: transform .2s var(--ease), filter .2s var(--ease);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px 19px 17px 20px / 16px 18px 18px 16px;
  box-shadow: var(--btn-shadow);
  transform: rotate(-1.2deg);
  background: var(--accent);
}
.cta span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: inherit;
  color: #0c0d0a;
  font-family: "Oswald", "Arial Narrow", Arial, Helvetica, sans-serif;
  font-size: clamp(17px, 1.25vw, 19px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.cta:hover { transform: translateY(-2px) scale(1.01); filter: brightness(1.02); }
.cta:active { transform: translateY(0) scale(.99); }
.cta:focus-visible {
  outline: 3px solid #6f82ff;
  outline-offset: 4px;
}


@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes dots {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 1080px) {
  .chat-stack { top: 124px; width: min(640px, calc(100vw - 96px)); }
  .typewriter { font-size: clamp(18px, 2.3vw, 22px); }
  .mascot-wrap { width: clamp(340px, 36vw, 500px); }
}

@media (max-width: 800px) {
  .brandbar { top: 30px; }
  .brand { width: 94px; }
  .chat-stack { top: 110px; width: min(560px, calc(100vw - 52px)); }
  .chat-row { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
  .chat-row-bottom { margin-left: 14px; }
  .chat-icon { width: 36px; height: 36px; }
  .chat-icon span { width: 4px; height: 4px; }
  .chat-bubble { min-height: 66px; padding: 16px 18px 17px; border-radius: 22px; }
  .typewriter { font-size: 18px; }
  .mascot-wrap { bottom: 22px; width: min(66vw, 390px); }
  .hero-actions { bottom: 26px; width: min(270px, calc(100vw - 38px)); }
  .cta { min-height: 68px; }
}

@media (max-width: 620px) {
  .frame {
    inset: 8px;
    border-color: rgba(174,180,167,.18);
  }
  .brandbar { top: 28px; }
  .brand { width: 96px; }
  .chat-stack {
    top: 166px;
    width: calc(100vw - 36px);
  }
  .chat-row {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    margin-bottom: 12px;
  }
  .chat-row-bottom { margin-left: 0; }
  .chat-icon {
    width: 24px;
    height: 24px;
    margin-top: 10px;
    gap: 2px;
  }
  .chat-icon span { width: 3px; height: 3px; }
  .chat-bubble {
    min-height: 54px;
    padding: 12px 14px 13px;
    border-radius: 17px;
  }
  .chat-bubble::before {
    left: -6px;
    bottom: 12px;
    width: 15px;
    height: 15px;
  }
  .typewriter {
    font-size: clamp(12px, 4vw, 16px);
    line-height: 1.3;
  }
  .mascot-wrap {
    width: min(88vw, 430px);
    bottom: -26px;
    filter: drop-shadow(0 24px 28px rgba(0,0,0,.56));
  }
  .hero-actions {
    width: min(220px, calc(100vw - 76px));
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .cta { min-height: 58px; padding: 0 10px; }
  .cta::before { border-radius: 15px 16px 14px 17px / 14px 16px 16px 14px; }
  .cta span { font-size: 15px; }
}

@media (max-width: 390px), (max-height: 740px) and (max-width: 620px) {
  .brandbar { top: 24px; }
  .brand { width: 92px; }
  .chat-stack { top: 156px; width: calc(100vw - 42px); }
  .typewriter { font-size: 12px; }
  .mascot-wrap { width: min(92vw, 430px); bottom: -34px; }
  .hero-actions { width: min(206px, calc(100vw - 98px)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  .cta { min-height: 54px; }
  .cta span { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
