:root {
  --bg: #07060c;
  --bg-soft: #0c0a14;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f3ff;
  --muted: #aaa3c4;
  --muted-soft: #7c7697;
  --pink: #ff74c8;
  --pink-soft: #ff9ad9;
  --purple: #9a6bff;
  --violet: #6d4aff;
  --cyan: #5ee7ff;
  --green: #25d366;
  --green-dark: #0f3f2a;
  --gold: #ffd166;
  --radius: 20px;
  --radius-lg: 30px;
  --container: 1180px;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", var(--font-body);
  --gradient: linear-gradient(110deg, #ff8ad4 0%, #b88cff 45%, #6ee7ff 100%);
  --gradient-soft: linear-gradient(110deg, rgba(255, 116, 200, 0.18), rgba(154, 107, 255, 0.16), rgba(94, 231, 255, 0.12));
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  color: var(--pink-soft);
  background: rgba(255, 116, 200, 0.1);
  border: 1px solid rgba(255, 116, 200, 0.16);
  padding: 0.12em 0.42em;
  border-radius: 7px;
}

::selection {
  background: rgba(255, 116, 200, 0.35);
  color: #fff;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

/* ---------- Background ---------- */

.page-glow {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.55;
}

.glow-a {
  width: 560px;
  height: 560px;
  top: -220px;
  left: -160px;
  background: radial-gradient(circle, rgba(255, 116, 200, 0.35), transparent 65%);
  animation: drift 18s ease-in-out infinite alternate;
}

.glow-b {
  width: 640px;
  height: 640px;
  right: -220px;
  top: 180px;
  background: radial-gradient(circle, rgba(109, 74, 255, 0.28), transparent 65%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 75%);
  opacity: 0.5;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(40px, 50px, 0) scale(1.1);
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  padding: 10px 0;
  background: rgba(7, 6, 12, 0.78);
  border-bottom-color: var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(255, 116, 200, 0.18);
}

.brand-name span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.main-nav a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: var(--surface-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  color: #160a20;
  background: var(--gradient);
  background-size: 160% 160%;
  box-shadow: 0 12px 34px rgba(255, 116, 200, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(255, 116, 200, 0.32);
  background-position: 100% 50%;
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.btn-lg {
  min-height: 54px;
  padding: 0 26px;
  font-size: 1rem;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--pink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.text-button:hover {
  color: #fff;
  text-decoration: underline;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.12);
  flex: none;
}

.dot-live {
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ---------- Hero ---------- */

.section {
  padding: 96px 0;
}

.hero {
  position: relative;
  padding: 70px 0 48px;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: 54px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin-bottom: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.88rem;
  backdrop-filter: blur(8px);
}

.pill strong {
  color: var(--text);
}

.hero h1 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.6vw, 4.7rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 560px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-tags li {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.83rem;
}

/* ---------- Phone mockup ---------- */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 620px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.orbit-one {
  width: 520px;
  height: 520px;
  transform: translate(-50%, -50%);
  border-style: dashed;
  animation: spin 60s linear infinite;
}

.orbit-two {
  width: 660px;
  height: 660px;
  transform: translate(-50%, -50%);
  border-color: rgba(255, 116, 200, 0.09);
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.phone {
  position: relative;
  z-index: 2;
  width: 330px;
  max-width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 46px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 40%, rgba(255, 116, 200, 0.1));
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  animation: float-phone 6s ease-in-out infinite;
}

@keyframes float-phone {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.phone-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 620px;
  overflow: hidden;
  border-radius: 38px;
  background: #0b0a12;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 8px;
  color: #d8d3ea;
  font-size: 0.7rem;
  font-weight: 600;
}

.phone-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.phone-status-icons span {
  display: inline-block;
  background: #d8d3ea;
}

.signal {
  width: 12px;
  height: 9px;
  clip-path: polygon(0 70%, 25% 70%, 25% 50%, 50% 50%, 50% 30%, 75% 30%, 75% 10%, 100% 10%, 100% 100%, 0 100%);
}

.wifi {
  width: 12px;
  height: 9px;
  border-radius: 50% 50% 0 0;
  background: transparent !important;
  border-top: 2px solid #d8d3ea;
}

.battery {
  width: 16px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.9;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

.chat-head img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-head strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.2;
}

.chat-head span {
  display: block;
  color: var(--green);
  font-size: 0.68rem;
}

.chat-head > div {
  flex: 1;
}

.chat-badge {
  display: grid !important;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.14);
  color: var(--green) !important;
  font-size: 0.72rem !important;
}

.chat-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 14px 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(154, 107, 255, 0.08), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(255, 116, 200, 0.06), transparent 40%),
    #0b0a12;
}

.chat-date {
  align-self: center;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-soft);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

.bubble {
  max-width: 86%;
  padding: 9px 12px;
  font-size: 0.76rem;
  line-height: 1.45;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.bubble-out {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  color: #f3eaff;
  background: linear-gradient(135deg, rgba(154, 107, 255, 0.55), rgba(255, 116, 200, 0.42));
}

.bubble-in {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: #191624;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bubble-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--pink-soft);
}

.bubble-line {
  display: block;
  color: #cbc5df;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 9px;
}

.mini-grid span {
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.65rem;
  text-align: center;
}

.bubble-audio {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 190px;
  color: var(--muted);
}

.play {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.6rem;
}

.wave {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  height: 22px;
}

.wave i {
  width: 3px;
  border-radius: 3px;
  background: var(--pink-soft);
  opacity: 0.85;
  animation: wave 1.15s ease-in-out infinite;
}

.wave i:nth-child(1) { height: 6px; animation-delay: 0s; }
.wave i:nth-child(2) { height: 12px; animation-delay: 0.08s; }
.wave i:nth-child(3) { height: 8px; animation-delay: 0.16s; }
.wave i:nth-child(4) { height: 16px; animation-delay: 0.24s; }
.wave i:nth-child(5) { height: 10px; animation-delay: 0.32s; }
.wave i:nth-child(6) { height: 18px; animation-delay: 0.4s; }
.wave i:nth-child(7) { height: 8px; animation-delay: 0.48s; }
.wave i:nth-child(8) { height: 14px; animation-delay: 0.56s; }
.wave i:nth-child(9) { height: 6px; animation-delay: 0.64s; }

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.7);
  }
  50% {
    transform: scaleY(1.15);
  }
}

.audio-time {
  font-size: 0.62rem;
  color: var(--muted-soft);
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 9px 12px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: #191624;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.3s ease-in-out infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.18s;
}

.typing span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 10px 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 999px;
  background: #191624;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-soft);
  font-size: 0.72rem;
}

.send {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--gradient);
  color: #180b22;
  font-size: 0.8rem;
}

.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(15, 13, 24, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: float-card 7s ease-in-out infinite;
}

.float-card strong {
  display: block;
  font-size: 0.83rem;
  line-height: 1.2;
}

.float-card small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.float-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--gradient-soft);
  font-size: 1.05rem;
}

.float-one {
  top: 18%;
  left: -6%;
}

.float-two {
  right: -4%;
  bottom: 17%;
  animation-delay: -3s;
}

@keyframes float-card {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* ---------- Stats ---------- */

.stats-section {
  padding: 10px 0 40px;
}

.stats-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  backdrop-filter: blur(12px);
}

.stat {
  position: relative;
  padding: 26px 20px;
  text-align: center;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  top: 24%;
  left: 0;
  height: 52%;
  width: 1px;
  background: var(--border);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Section head ---------- */

.section-head {
  max-width: 700px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-head.left {
  margin-inline: 0;
  text-align: left;
}

.kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--pink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-head h2,
.community-card h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-head p,
.community-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  position: relative;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 15px;
  font-size: 1.45rem;
  border: 1px solid var(--border);
}

.icon-purple { background: rgba(154, 107, 255, 0.14); }
.icon-pink { background: rgba(255, 116, 200, 0.13); }
.icon-gold { background: rgba(255, 209, 102, 0.12); }
.icon-cyan { background: rgba(94, 231, 255, 0.11); }
.icon-green { background: rgba(37, 211, 102, 0.11); }
.icon-blue { background: rgba(99, 132, 255, 0.13); }

.feature-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.13rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

.feature-tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-soft);
  font-size: 0.71rem;
  letter-spacing: 0.02em;
}

/* ---------- Commands ---------- */

.commands-section {
  position: relative;
}

.commands-section::before {
  content: "";
  position: absolute;
  inset: 8% 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 60% at 50% 40%, rgba(154, 107, 255, 0.09), transparent 70%);
  pointer-events: none;
}

.command-tools {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 18px;
  height: 58px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-box:focus-within {
  border-color: rgba(255, 116, 200, 0.45);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px rgba(255, 116, 200, 0.09);
}

.search-box svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 1rem;
}

.search-box input::placeholder {
  color: var(--muted-soft);
}

.search-box kbd {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-soft);
  font-size: 0.72rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chip.active {
  color: #1a0c24;
  background: var(--gradient);
  border-color: transparent;
}

.chip .chip-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.7rem;
}

.command-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.command-meta-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + .switch-track {
  background: var(--gradient);
  border-color: transparent;
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
  background: #1a0c24;
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.switch-label b {
  color: var(--pink-soft);
  font-weight: 600;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.command-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.command-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 116, 200, 0.4);
  background: rgba(255, 255, 255, 0.055);
}

.command-card:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.command-card.is-alias {
  background: rgba(255, 255, 255, 0.018);
}

.command-card.is-alias .command-name {
  color: var(--muted);
}

.command-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.command-name {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--pink-soft);
  word-break: break-word;
}

.command-cat {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-soft);
  font-size: 0.66rem;
  white-space: nowrap;
}

.command-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.command-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  color: var(--muted-soft);
  font-size: 0.7rem;
}

.command-foot .copy {
  color: var(--pink-soft);
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.command-card:hover .copy {
  opacity: 1;
  transform: translateX(0);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 50px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.load-more-wrap .btn[hidden] {
  display: none;
}

.command-hint {
  margin: 22px 0 0;
  text-align: center;
  color: var(--muted-soft);
  font-size: 0.85rem;
}

/* ---------- Steps ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 64px;
}

.step-card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}

.step-number {
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--pink-soft);
}

.step-card h3 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 1.14rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.preview-banner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 30px;
  padding: 42px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 116, 200, 0.13), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(94, 231, 255, 0.09), transparent 45%),
    rgba(255, 255, 255, 0.025);
}

.preview-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.preview-copy p {
  margin: 0 0 24px;
  color: var(--muted);
}

.preview-images {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0;
  min-height: 230px;
}

.preview-images img {
  width: 46%;
  max-width: 210px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 3 / 4;
  transition: transform 0.35s ease;
}

.preview-images img:first-child {
  transform: rotate(-6deg) translateX(14px);
  z-index: 1;
}

.preview-images img:last-child {
  transform: rotate(5deg) translateX(-14px) translateY(16px);
}

.preview-banner:hover .preview-images img:first-child {
  transform: rotate(-3deg) translateX(4px);
}

.preview-banner:hover .preview-images img:last-child {
  transform: rotate(2deg) translateX(-4px) translateY(8px);
}

/* ---------- Community ---------- */

.community-card {
  position: relative;
  overflow: hidden;
  padding: 68px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 116, 200, 0.14), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.community-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  width: 420px;
  height: 320px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 107, 255, 0.28), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.community-logo {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(255, 116, 200, 0.22);
}

.community-card p {
  max-width: 580px;
  margin: 0 auto;
}

.community-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.community-note {
  margin-top: 22px !important;
  color: var(--muted-soft) !important;
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 30px;
  padding: 60px 0 26px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.012);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-text {
  max-width: 340px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links strong {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--pink-soft);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted-soft);
  font-size: 0.8rem;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 140;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(18, 15, 28, 0.95);
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid {
    gap: 30px;
  }

  .header-inner {
    gap: 16px;
  }

  .main-nav a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .hide-mobile {
    display: none;
  }

  .feature-grid,
  .command-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .float-one {
    left: -2%;
  }

  .float-two {
    right: -1%;
  }
}

@media (max-width: 900px) {
  .hide-mobile,
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    inset: 78px 16px auto;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(12, 10, 20, 0.97);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
  }

  .main-nav a {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-open .main-nav {
    display: flex;
  }

  .hero {
    padding-top: 46px;
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-tags {
    justify-content: center;
  }

  .hero-visual {
    min-height: 570px;
    order: 2;
  }

  .orbit-one {
    width: 440px;
    height: 440px;
  }

  .orbit-two {
    width: 560px;
    height: 560px;
  }

  .float-one {
    left: 2%;
    top: 15%;
  }

  .float-two {
    right: 2%;
    bottom: 15%;
  }

  .section {
    padding: 74px 0;
  }

  .preview-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .preview-copy .btn {
    margin-inline: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .brand {
    font-size: 1.1rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .btn {
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .btn-lg {
    min-height: 50px;
    padding: 0 20px;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .phone {
    width: 294px;
  }

  .phone-frame {
    height: 570px;
  }

  .hero-visual {
    min-height: 540px;
  }

  .orbit-one {
    width: 360px;
    height: 360px;
  }

  .orbit-two {
    width: 470px;
    height: 470px;
  }

  .float-card {
    padding: 9px 12px;
  }

  .float-card small {
    display: none;
  }

  .float-one {
    left: -1%;
  }

  .float-two {
    right: -1%;
  }

  .stats-card {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 20px 14px;
  }

  .stat:nth-child(3)::before {
    display: none;
  }

  .stat:nth-child(odd)::before {
    display: none;
  }

  .stat:nth-child(4)::before {
    display: block;
  }

  .feature-grid,
  .command-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    margin-bottom: 38px;
  }

  .command-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .command-meta-actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .search-box {
    height: 54px;
    padding-inline: 14px;
  }

  .search-box kbd {
    display: none;
  }

  .preview-banner {
    padding: 28px 20px;
  }

  .preview-images img {
    max-width: 150px;
  }

  .community-card {
    padding: 48px 20px;
  }

  .community-actions {
    flex-direction: column;
  }

  .community-actions .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Mejoras: accesibilidad y progreso ---------- */

.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--gradient);
  color: #160a20;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 14px;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 90;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--gradient);
  box-shadow: 0 0 16px rgba(255, 116, 200, 0.55);
}

/* ---------- Categorías ---------- */

.categories-section {
  position: relative;
  padding-top: 24px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  color: var(--text);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.category-card:hover::after {
  opacity: 1;
}

.category-card:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.category-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  font-size: 1.25rem;
}

.category-card-count {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-soft);
  font-size: 0.7rem;
  white-space: nowrap;
}

.category-card h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ---------- Controles del explorador ---------- */

.command-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.btn-sm {
  min-height: 40px;
  padding: 0 15px;
  font-size: 0.86rem;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.84rem;
}

.sort-control select {
  min-height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  appearance: none;
  -webkit-appearance: none;
}

.sort-control select:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.sort-control select option {
  background: #15111f;
  color: var(--text);
}

/* ---------- Tarjetas de comando mejoradas ---------- */

.command-card {
  cursor: pointer;
}

.command-cat {
  align-self: flex-start;
}

.favorite-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted-soft);
  font-size: 1.02rem;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.favorite-btn:hover {
  color: var(--gold);
  border-color: rgba(255, 209, 102, 0.4);
  transform: scale(1.08);
}

.favorite-btn.active {
  color: var(--gold);
  background: rgba(255, 209, 102, 0.12);
  border-color: rgba(255, 209, 102, 0.38);
}

.favorite-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.command-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.command-copy,
.command-detail {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.command-copy:hover {
  color: #1a0c24;
  background: var(--gradient);
  border-color: transparent;
}

.command-copy.copied {
  color: var(--green);
  border-color: rgba(37, 211, 102, 0.4);
  background: rgba(37, 211, 102, 0.1);
}

.command-detail:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.command-copy:focus-visible,
.command-detail:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.command-alias-info {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Modal de comando ---------- */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 8, 0.74);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: fade-in 0.2s ease;
}

.modal-card {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 40px);
  padding: 30px;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 116, 200, 0.1), transparent 42%),
    linear-gradient(160deg, #16111f, #0b0912);
  box-shadow: var(--shadow);
  animation: modal-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.modal-cat {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
}

.modal-title {
  margin: 0 0 12px;
  padding-right: 34px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--pink-soft);
  word-break: break-word;
}

.modal-desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.modal-usage {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.82rem;
}

.modal-usage strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-soft);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-usage code {
  font-size: 0.85rem;
  word-break: break-word;
}

.modal-aliases-wrap {
  margin-bottom: 6px;
}

.modal-aliases-wrap > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--muted-soft);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alias-chip {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.alias-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.alias-chip:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.modal-actions .btn {
  min-height: 44px;
  font-size: 0.88rem;
}

.modal-open {
  overflow: hidden;
}

/* ---------- Preguntas frecuentes ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(255, 116, 200, 0.28);
  background: rgba(255, 255, 255, 0.045);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--pink-soft);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  background: rgba(255, 116, 200, 0.1);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: -2px;
}

.faq-item p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ---------- Volver arriba ---------- */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(18, 15, 28, 0.9);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease,
    border-color 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: rgba(255, 116, 200, 0.45);
}

.back-to-top svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Responsive de las mejoras ---------- */

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-card {
    padding: 15px;
  }

  .category-card-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }

  .category-card h3 {
    font-size: 0.93rem;
  }

  .category-card p {
    font-size: 0.78rem;
  }

  .command-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .command-controls .btn {
    width: 100%;
  }

  .sort-control {
    justify-content: space-between;
  }

  .sort-control select {
    flex: 1;
  }

  .modal-card {
    padding: 24px 20px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .back-to-top {
    right: 16px;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }

  .faq-item summary {
    padding: 15px 16px;
    font-size: 0.94rem;
  }

  .faq-item p {
    padding: 0 16px 16px;
  }
}

@media (max-width: 420px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Mejoras iOS, movil, PWA y escritorio
   ============================================================ */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --mobile-bar-height: 64px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

body.scroll-locked {
  overscroll-behavior: none;
}

[hidden] {
  display: none !important;
}

button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

section[id] {
  scroll-margin-top: calc(88px + var(--safe-top));
}

/* ---------- Header y navegacion con safe area ---------- */

.site-header {
  padding-top: calc(16px + var(--safe-top));
}

.site-header.scrolled {
  padding-top: calc(10px + var(--safe-top));
}

.btn-ghost,
.toast,
.back-to-top,
.mobile-bar,
.main-nav {
  -webkit-backdrop-filter: blur(18px);
}

/* ---------- Buscador: boton para borrar ---------- */

.search-box {
  position: relative;
}

.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    transform 0.15s ease;
}

.search-clear:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.search-clear:active {
  transform: scale(0.92);
}

/* ---------- Chips con desplazamiento tactil ---------- */

.category-chips {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 2px;
}

.chip {
  scroll-snap-align: start;
}

.chip:active {
  transform: scale(0.97);
}

/* ---------- Tarjetas: objetivos tactiles comodos ---------- */

.command-copy,
.command-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.command-card:active {
  transform: scale(0.995);
}

/* ---------- Modal: bottom sheet en celular ---------- */

.modal {
  padding: max(20px, var(--safe-top)) max(20px, var(--safe-right))
    max(20px, var(--safe-bottom)) max(20px, var(--safe-left));
}

.modal-card {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px - var(--safe-top) - var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.modal-backdrop {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Barra movil ---------- */

.mobile-bar {
  display: none;
}

.mobile-bar-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 5px 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.mobile-bar-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-bar-item.active {
  color: var(--pink-soft);
  background: rgba(255, 116, 200, 0.09);
}

.mobile-bar-item:active {
  transform: scale(0.95);
}

.mobile-bar-item b {
  position: absolute;
  top: 2px;
  right: 50%;
  margin-right: -24px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gradient);
  color: #1a0c24;
  font-size: 0.62rem;
  line-height: 17px;
  text-align: center;
}

/* ---------- Aviso sin JavaScript ---------- */

.noscript-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Tablets y celulares ---------- */

@media (max-width: 900px) {
  body {
    padding-bottom: calc(var(--mobile-bar-height) + var(--safe-bottom));
  }

  .mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 85;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px calc(8px + var(--safe-right))
      calc(6px + var(--safe-bottom)) calc(8px + var(--safe-left));
    border-top: 1px solid var(--border);
    background: rgba(10, 8, 16, 0.93);
  }

  .back-to-top {
    bottom: calc(var(--mobile-bar-height) + 14px + var(--safe-bottom));
  }

  .toast {
    bottom: calc(var(--mobile-bar-height) + 18px + var(--safe-bottom));
  }

  .main-nav {
    inset: calc(76px + var(--safe-top)) calc(16px + var(--safe-right)) auto
      calc(16px + var(--safe-left));
    max-height: calc(100dvh - 96px - var(--safe-top));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* En pantallas tactiles no dejamos efectos hover pegados. */
  .command-card:hover,
  .category-card:hover,
  .feature-card:hover,
  .favorite-btn:hover,
  .btn:hover {
    transform: none;
  }

  .command-copy,
  .command-detail {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .favorite-btn {
    width: 40px;
    height: 40px;
  }

  .text-button {
    min-height: 40px;
    padding: 0 2px;
  }

  .chip {
    min-height: 40px;
  }

  .alias-chip {
    min-height: 34px;
  }

  .faq-item summary {
    min-height: 52px;
  }

  .category-chips {
    scrollbar-width: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(
      calc(100% - 28px - var(--safe-left) - var(--safe-right)),
      var(--container)
    );
  }

  .site-header {
    padding-top: calc(12px + var(--safe-top));
  }

  .site-header.scrolled {
    padding-top: calc(8px + var(--safe-top));
  }

  .search-box {
    height: 56px;
  }

  .search-clear {
    width: 32px;
    height: 32px;
  }

  .sort-control select {
    font-size: 1rem;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - var(--safe-top) - 12px);
    padding: 28px 20px calc(24px + var(--safe-bottom));
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    animation: sheet-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .modal-card::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(-50%);
    pointer-events: none;
  }

  .modal-close {
    top: calc(16px + var(--safe-top));
    right: 16px;
    width: 40px;
    height: 40px;
  }

  .modal-title {
    padding-right: 44px;
  }

  .modal-actions {
    gap: 9px;
  }

  .modal-actions .btn {
    min-height: 48px;
  }

  .back-to-top {
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .mobile-bar-item {
    font-size: 0.64rem;
  }

  .command-hint {
    font-size: 0.8rem;
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Pantallas grandes ---------- */

@media (min-width: 1440px) {
  :root {
    --container: 1240px;
  }

  .command-grid {
    gap: 16px;
  }

  .command-card {
    padding: 20px;
  }
}

/* ---------- Ajustes para pantallas pequenas ---------- */

@media (max-width: 380px) {
  .mobile-bar-item {
    font-size: 0.6rem;
  }

  .mobile-bar-item svg {
    width: 20px;
    height: 20px;
  }

  .brand {
    gap: 8px;
    font-size: 1rem;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 10.5vw, 2.7rem);
  }
}

/* ---------- Modo instalado (PWA) ---------- */

@media (display-mode: standalone) {
  .skip-link {
    top: calc(-70px - var(--safe-top));
  }

  .skip-link:focus {
    top: calc(14px + var(--safe-top));
  }

  .mobile-bar {
    padding-bottom: calc(6px + var(--safe-bottom));
  }
}

/* ---------- Botón de instalación ---------- */

.install-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Bloqueo de scroll (iOS incluido) ---------- */

body.scroll-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ---------- iOS: evita el zoom al enfocar campos ---------- */

@media (max-width: 900px) {
  .search-box input,
  .sort-control select {
    font-size: 16px;
  }
}

/* ---------- Escritorio ---------- */

@media (min-width: 901px) {
  html {
    scrollbar-gutter: stable;
  }

  .mobile-bar {
    display: none !important;
  }

  .command-card:focus-within {
    border-color: var(--border-strong);
  }
}

/* ---------- Celular en horizontal con poca altura ---------- */

@media (max-width: 900px) and (max-height: 430px) {
  .mobile-bar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  .back-to-top {
    bottom: calc(14px + var(--safe-bottom));
  }

  .toast {
    bottom: calc(18px + var(--safe-bottom));
  }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

