/* ══════════════════════════════════════════════════════════════
   TONALLIX · base, atmósfera, sidebar, héroe
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg: #070605;
  --bg-soft: #0b0907;
  --surface: rgba(20, 16, 12, 0.72);
  --surface-solid: #12100d;
  --text: #f5efe4;
  --text-soft: #cec3b3;
  --muted: #9a8f80;
  --faint: #6d6357;
  --line: rgba(255, 232, 196, 0.085);
  --line-2: rgba(255, 232, 196, 0.16);
  --accent: #f7b955;
  --accent-2: #ff7d3f;
  --accent-3: #ffe3ae;
  --accent-rgb: 247, 185, 85;
  --accent2-rgb: 255, 125, 63;
  --danger: #ff6b6b;
  --sidebar: 286px;
  --font-ui: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
}

html[data-accent="jade"] {
  --accent: #5fe3c0;
  --accent-2: #20c9a8;
  --accent-3: #d8fff4;
  --accent-rgb: 95, 227, 192;
  --accent2-rgb: 32, 201, 168;
}

html[data-accent="plasma"] {
  --accent: #b69cff;
  --accent-2: #f472b6;
  --accent-3: #f0e8ff;
  --accent-rgb: 182, 156, 255;
  --accent2-rgb: 244, 114, 182;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(var(--accent-rgb), 0.26);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.55);
  outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 235, 200, 0.13) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 235, 200, 0.1);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 235, 200, 0.18);
  background-clip: padding-box;
  border: 2px solid transparent;
}

kbd {
  display: inline-block;
  padding: 3px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--faint);
  font: 500 8.5px/1 var(--font-mono);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Atmósfera ─────────────────────────────────────────────── */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 80% -12%, rgba(var(--accent-rgb), 0.1), transparent 62%),
    radial-gradient(900px 620px at 12% 108%, rgba(var(--accent2-rgb), 0.06), transparent 64%),
    var(--bg);
}

.scene-glow {
  position: absolute;
  top: -22%;
  right: -8%;
  width: 62vw;
  height: 62vw;
  min-width: 620px;
  min-height: 620px;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    transparent 0deg,
    rgba(var(--accent-rgb), 0.07) 70deg,
    transparent 150deg,
    rgba(var(--accent2-rgb), 0.05) 240deg,
    transparent 340deg
  );
  filter: blur(60px);
  animation: sceneTurn 42s linear infinite;
}

.scene-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 235, 200, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 235, 200, 0.028) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 92% 82% at 52% 16%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 92% 82% at 52% 16%, #000 0%, transparent 78%);
  opacity: 0.75;
}

.scene-grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
}

/* ── Estructura ────────────────────────────────────────────── */

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

.main {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Sidebar ───────────────────────────────────────────────── */

.sidebar {
  position: relative;
  z-index: 20;
  flex: 0 0 var(--sidebar);
  width: var(--sidebar);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 16px 14px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 14, 11, 0.9), rgba(8, 7, 5, 0.95));
  backdrop-filter: blur(30px) saturate(120%);
  -webkit-backdrop-filter: blur(30px) saturate(120%);
  overflow: hidden;
  transition: margin-left 0.36s cubic-bezier(0.22, 1, 0.36, 1), transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 4px 16px 7px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 29px;
  height: 29px;
  flex: none;
  filter: drop-shadow(0 0 13px rgba(var(--accent-rgb), 0.24));
}

.brand-word {
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1;
}

.brand-beta {
  margin-left: 1px;
  padding: 4px 5px 3px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--muted);
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-1px);
}

.sidebar-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
}

.sidebar-close svg {
  width: 14px;
  height: 14px;
}

.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 45px;
  padding: 0 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.23);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.11), rgba(var(--accent-rgb), 0.04));
  color: var(--text);
  font: 500 12.5px var(--font-ui);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.new-chat:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.055));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 0 26px rgba(var(--accent-rgb), 0.07);
}

.new-chat-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b1206;
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.2);
}

.new-chat-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.new-chat kbd {
  margin-left: auto;
}

.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 37px;
  margin-top: 10px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--faint);
  transition: border-color 0.2s, background 0.2s;
}

.side-search:focus-within {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.04);
}

.side-search-icon {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.side-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text-soft);
  font: 400 11.5px var(--font-ui);
}

.side-search input::placeholder {
  color: var(--faint);
}

.side-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.side-search-key {
  padding: 3px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.02em;
}

.side-search:focus-within .side-search-key {
  display: none;
}

/* Historial */

.history {
  flex: 1;
  min-height: 0;
  margin: 15px -6px 10px;
  padding: 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.history-group + .history-group {
  margin-top: 17px;
}

.history-label {
  padding: 0 8px 7px;
  color: var(--faint);
  font: 500 8.5px/1 var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.history-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: background 0.17s, border-color 0.17s, color 0.17s;
}

.history-item + .history-item {
  margin-top: 1px;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.history-item.active {
  border-color: rgba(var(--accent-rgb), 0.16);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.028));
  color: var(--text);
}

.history-item-icon {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--faint);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-item.active .history-item-icon {
  color: var(--accent);
}

.history-item-title {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-time {
  flex: none;
  color: var(--faint);
  font: 400 8px var(--font-mono);
  letter-spacing: 0.02em;
}

.history-delete {
  display: none;
  place-items: center;
  width: 21px;
  height: 21px;
  flex: none;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--faint);
  cursor: pointer;
}

.history-delete svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-delete:hover {
  background: rgba(255, 107, 107, 0.1);
  color: #ff9a9a;
}

.history-item:hover .history-delete {
  display: grid;
}

.history-item:hover .history-item-time {
  display: none;
}

.history-empty {
  padding: 30px 12px;
  text-align: center;
  color: var(--faint);
  animation: fadeIn 0.5s ease both;
}

.history-empty-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  color: var(--muted);
}

.history-empty-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-empty p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.history-empty span {
  display: block;
  max-width: 190px;
  margin: 0 auto;
  font-size: 10px;
  line-height: 1.55;
}

/* Pie del sidebar */

.sidebar-bottom {
  margin-top: auto;
  flex: none;
}

.plan-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.05), transparent 62%);
}

.plan-orb {
  width: 23px;
  height: 23px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff4d6, var(--accent) 42%, var(--accent-2) 82%);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.3);
}

.plan-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.plan-copy strong {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-soft);
}

.plan-copy small {
  color: var(--faint);
  font-size: 9px;
}

.plan-pill {
  flex: none;
  padding: 3px 5px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 4px;
  color: var(--accent);
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.05em;
}

.account {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 10px 3px 0;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #180f05;
  font: 600 11.5px var(--font-ui);
  box-shadow: 0 4px 13px rgba(0, 0, 0, 0.3);
}

.account-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.account-copy strong {
  font-size: 11px;
  font-weight: 500;
}

.account-copy small {
  color: var(--faint);
  font-size: 8.5px;
}

.account .icon-btn {
  width: 28px;
  height: 28px;
}

.account .icon-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Topbar ────────────────────────────────────────────────── */

.topbar {
  position: relative;
  z-index: 15;
  display: flex;
  flex: 0 0 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
  padding: 0 22px 0 26px;
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}

.topbar.scrolled {
  border-color: var(--line);
  background: rgba(8, 7, 5, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-heading {
  min-width: 0;
}

.chat-heading h2 {
  max-width: 44vw;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.012em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-heading span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font: 400 9px var(--font-mono);
  letter-spacing: 0.025em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-toggle {
  display: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.17s, color 0.17s, border-color 0.17s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-btn {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font: 500 9.5px var(--font-ui);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.demo-pill:hover {
  border-color: var(--line-2);
  color: var(--text-soft);
}

.demo-dot {
  position: relative;
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.demo-pill.connected .demo-dot {
  background: #57d9a3;
  box-shadow: 0 0 0 3px rgba(87, 217, 163, 0.12);
}

.menu-wrap {
  position: relative;
}

.model-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 9px 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font: 500 10px var(--font-ui);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.model-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.05);
}

.model-spark {
  width: 12px;
  height: 12px;
  color: var(--accent);
  fill: currentColor;
  stroke: none;
}

.model-tag {
  padding: 2.5px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font: 400 7.5px var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.model-chevron {
  width: 11px;
  height: 11px;
  color: var(--faint);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Menús flotantes ───────────────────────────────────────── */

.menu {
  position: absolute;
  z-index: 55;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: rgba(21, 17, 13, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: menuIn 0.17s ease both;
}

.model-menu {
  top: calc(100% + 8px);
  right: 0;
  width: 294px;
}

.tools-menu {
  bottom: calc(100% + 9px);
  left: 0;
  width: 298px;
}

.menu-label {
  padding: 8px 9px 7px;
  color: var(--faint);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.menu-option:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.menu-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.menu-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.menu-copy strong em {
  padding: 2px 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 4px;
  color: var(--accent);
  font: 400 7.5px var(--font-mono);
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-copy small {
  color: var(--faint);
  font-size: 9.5px;
}

.menu-check {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.menu-option.selected .menu-check {
  opacity: 1;
}

.menu-option.selected .menu-icon {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--accent);
}

/* Switches */

.switch {
  display: flex;
  align-items: center;
  width: 34px;
  height: 20px;
  flex: none;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.2s, border-color 0.2s;
}

.switch span {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8c8377;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.switch[aria-checked="true"] {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.28);
}

.switch[aria-checked="true"] span {
  transform: translateX(14px);
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

/* ── Héroe ─────────────────────────────────────────────────── */

.stage {
  flex: 1 1 auto;
  min-height: 0;
  padding: 30px 32px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1110px;
  min-height: 100%;
  margin: 0 auto;
  padding: 10px 0 18px;
  animation: heroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: 20px;
}

.hero-copy {
  max-width: 610px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 500 9.5px var(--font-mono);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.pulse-dot {
  position: relative;
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3.5px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 50%;
  animation: pulseRing 2.4s ease-out infinite;
}

.hero h1 {
  max-width: 620px;
  margin: 19px 0 0;
  color: var(--text);
  font-size: clamp(37px, 4.4vw, 60px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.048em;
}

.hero h1 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.13em;
  letter-spacing: -0.018em;
  background: linear-gradient(105deg, #fff4dc 0%, var(--accent) 48%, var(--accent-2) 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 485px;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.002em;
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 27px;
}

.hero-hint {
  color: var(--faint);
  font: 400 8.5px var(--font-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-line {
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.45), transparent);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: 500 10.5px var(--font-ui);
  letter-spacing: 0.01em;
  cursor: pointer;
}

.text-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.text-btn:hover svg {
  transform: translate(2px, -2px);
}

/* Orbe */

.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 458px;
  aspect-ratio: 1;
}

.orb-halo {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.17), transparent 64%);
  filter: blur(32px);
  animation: breathe 7s ease-in-out infinite;
}

#orb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.orb-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 228, 182, 0.68);
  pointer-events: none;
  mix-blend-mode: screen;
}

.orb-glyph svg {
  width: 58%;
  height: 58%;
  animation: spinSlow 52s linear infinite;
  filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.28));
}

.hero-visual[data-state="thinking"] .orb-glyph svg {
  animation-duration: 13s;
}

.hero-visual[data-state="listening"] .orb-glyph svg {
  animation-duration: 18s;
}

.orb-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 235, 200, 0.12);
  border-radius: 999px;
  background: rgba(18, 15, 12, 0.66);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  color: var(--text-soft);
  font: 500 9px var(--font-ui);
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: floatChip 7s ease-in-out infinite;
}

.orb-chip svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent);
}

.chip-a {
  top: 8%;
  left: 2%;
}

.chip-b {
  top: 39%;
  right: -1%;
  animation-delay: -2.3s;
}

.chip-c {
  bottom: 7%;
  left: 10%;
  animation-delay: -4.5s;
}

/* Sugerencias */

.suggestions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 30px;
}

.suggestion {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 130px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}

.suggestion::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(190px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.11), transparent 66%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.suggestion:hover {
  border-color: rgba(var(--accent-rgb), 0.26);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.045), rgba(255, 255, 255, 0.012));
  transform: translateY(-2px);
}

.suggestion:hover::before {
  opacity: 1;
}

.suggestion-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.suggestion-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--accent);
}

.suggestion-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suggestion-arrow {
  color: var(--faint);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.22s, transform 0.22s, color 0.22s;
}

.suggestion-arrow svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suggestion:hover .suggestion-arrow {
  color: var(--accent);
  opacity: 1;
  transform: translate(0, 0);
}

.suggestion-tag {
  color: var(--faint);
  font: 500 7.5px var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.suggestion-title {
  position: relative;
  z-index: 1;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.002em;
}

.suggestion:hover .suggestion-title {
  color: var(--text);
}

/* Scrim móvil */

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
