/* ──────────────────────────────────────────────────────────────────────
   Authgen / $AUTH — landing page styles
   Palette: deep near-black background, hot orange accent, soft white text.
   Mobile-first.
   ────────────────────────────────────────────────────────────────────── */

:root {
  --bg:           #0a0a0a;
  --bg-soft:      #131313;
  --surface:      #1a1a1a;
  --surface-lift: #232323;
  --orange:       #ff6a1a;
  --orange-bright:#ff8b3d;
  --orange-deep:  #cc4f08;
  --ink:          #f5f1eb;
  --ink-soft:     #b8b0a5;
  --ink-mute:     #807a72;
  --line:         #2a2a2a;
  --line-soft:    #1f1f1f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  /* big diffuse orange glow up-right + secondary glow mid-left, both bleeding
     all the way across the page so the gradient never hits a hard edge. */
  background:
    radial-gradient(1400px 900px at 78% 4%,
      rgba(255, 106, 26, .22) 0%,
      rgba(255, 106, 26, .10) 28%,
      rgba(255, 106, 26, .03) 50%,
      transparent 70%),
    radial-gradient(900px 700px at -5% 38%,
      rgba(255, 138, 50, .07) 0%,
      transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--orange); color: var(--bg); }

/* ── Custom scrollbar (matches the dark + orange theme) ───────── */
/* Firefox */
html { scrollbar-width: thin; scrollbar-color: var(--orange-deep) transparent; }
/* WebKit / Chromium */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--orange-deep) 0%, var(--orange) 100%);
  border: 2px solid var(--bg);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-bright) 100%);
}
*::-webkit-scrollbar-corner { background: transparent; }

/* ── Header ─────────────────────────────────────────────────── */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 32px;
  background: transparent;
  /* no border, no backdrop blur. just sits over the hero. */
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  color: var(--orange);
  flex-shrink: 0;
}
.brand-name {
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-weight: 700;
}
.brand-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--orange);
  background: rgba(255, 106, 26, .12);
  padding: 3px 8px;
  border-radius: 4px;
}
.nav {
  display: flex;
  gap: 28px;
  margin-left: 12px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.nav a {
  color: var(--ink-soft);
  transition: color .15s ease;
}
.nav a:hover { color: var(--orange); }
.topbar .cta { margin-left: auto; }

/* ── Buttons ───────────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.cta-primary {
  background: var(--orange);
  color: var(--bg);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(255, 106, 26, .25);
}
.cta-primary:hover {
  background: var(--orange-bright);
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 28px rgba(255, 106, 26, .4);
}
.cta-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.cta-ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  /* Account for the absolutely-positioned topbar above (~80px) so the hero
     doesn't sit under it. */
  padding: 140px 32px 100px;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
}
.hero-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(255, 106, 26, .08);
  border: 1px solid rgba(255, 106, 26, .25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(46px, 7.2vw, 96px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.96;
  margin: 0 0 26px;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--orange);
  font-weight: 700;
}
.lede {
  max-width: 480px;
  margin: 0 0 36px;
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.hero-art {
  display: grid;
  place-items: center;
}
.logo-ring {
  width: 100%;
  max-width: 420px;
  position: relative;
  filter: drop-shadow(0 30px 80px rgba(255, 106, 26, .25));
}
.logo-ring svg {
  width: 100%;
  height: auto;
  color: var(--orange);
  animation: floatLogo 6s ease-in-out infinite;
}
@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-10px) rotate(-2deg); }
}

/* ── Sections ──────────────────────────────────────────────── */
.section {
  padding: 90px 28px;
  max-width: 1240px;
  margin: 0 auto;
}
.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
  margin: 0;
}
.section-alt > .section-head,
.section-alt > div,
.section-alt > article {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.section-head { margin-bottom: 48px; }
.section-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(32px, 5.2vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0;
  color: var(--ink);
}

/* ── 3-col card row ────────────────────────────────────────── */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px 28px;
  position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--orange);
  box-shadow: 0 16px 40px rgba(255, 106, 26, .15);
}
.card-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin-bottom: 16px;
}
.card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Manifesto ─────────────────────────────────────────────── */
.manifesto {
  max-width: 760px;
}
.manifesto p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.manifesto p:last-child {
  font-weight: 700;
  color: var(--orange);
  font-style: italic;
  font-size: 22px;
}

/* ── Token ─────────────────────────────────────────────────── */
.token-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.token-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.token-card-wide { grid-column: 1 / -1; }
.token-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.token-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--ink-soft);
}
.token-foot {
  font-size: 14.5px;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0;
}
.token-foot a {
  color: var(--orange);
  font-weight: 600;
}
.token-foot a:hover { text-decoration: underline; }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  transition: border-color .15s ease;
}
.faq details[open] {
  border-color: var(--orange);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 24px;
  color: var(--orange);
  font-weight: 300;
  line-height: 0;
  margin-top: 4px;
  transition: transform .2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ── Footer ────────────────────────────────────────────────── */
.footbar {
  border-top: 1px solid var(--line);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.footbar a {
  color: var(--orange);
}
.footbar a:hover { text-decoration: underline; }

/* ── Floating chat FAB + drawer ────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255, 106, 26, .45);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.chat-fab:hover {
  background: var(--orange-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 106, 26, .6);
}
.chat-fab-icon {
  font-size: 18px;
  display: inline-block;
  transform: translateY(-1px);
}

.chat-drawer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 110;
  width: 380px;
  max-height: 75vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65), 0 8px 24px rgba(255, 106, 26, .15);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.chat-drawer.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.chat-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-head-left { display: flex; align-items: center; gap: 12px; }
.chat-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--bg);
  border-radius: 50%;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px rgba(255, 106, 26, .4);
}
.chat-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.chat-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, .8);
}
.chat-close {
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.chat-close:hover { color: var(--ink); background: var(--surface-lift); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.chat-msg {
  display: flex;
  max-width: 100%;
}
.chat-msg-user { justify-content: flex-end; }
.chat-bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.chat-msg-bot .chat-bubble {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-msg-user .chat-bubble {
  background: var(--orange);
  color: var(--bg);
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.chat-typing {
  display: inline-flex;
  gap: 4px;
  padding: 14px;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--ink-mute);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.chat-input textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  outline: none;
  max-height: 120px;
  transition: border-color .15s ease;
}
.chat-input textarea:focus { border-color: var(--orange); }
.chat-input textarea::placeholder { color: var(--ink-mute); }
.chat-send {
  background: var(--orange);
  color: var(--bg);
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
  flex-shrink: 0;
}
.chat-send:hover { background: var(--orange-bright); transform: scale(1.05); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.chat-foot {
  padding: 8px 16px 10px;
  background: var(--bg-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-mute);
  text-align: center;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .topbar { padding: 18px 22px; }
  .nav { display: none; }
  .hero { padding: 96px 22px 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { order: -1; }
  .logo-ring { max-width: 220px; }
  .section { padding: 64px 22px; }
  .section-alt > .section-head,
  .section-alt > div,
  .section-alt > article { padding: 0 22px; }
  .three-col { grid-template-columns: 1fr; gap: 12px; }
  .token-grid { grid-template-columns: 1fr 1fr; }
  .token-card-wide { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 44px; }
  .lede { font-size: 16px; }
  .manifesto p { font-size: 16.5px; }
  .manifesto p:last-child { font-size: 18px; }
  .section-head h2 { font-size: 30px; }
  .token-grid { grid-template-columns: 1fr; }

  .chat-fab {
    bottom: 16px;
    right: 16px;
    padding: 12px 18px;
  }
  .chat-fab-label { display: none; }
  .chat-fab-icon { font-size: 20px; }
  .chat-drawer {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
  }
}
