/* =========================
   Variables & Base Styles
   ========================= */

:root {
  --color-bg: #050608;
  --color-bg-alt: #101218;
  --color-surface: #181b23;
  --color-border: #262a36;
  --color-text: #f5f5f5;
  --color-text-muted: #a5a9b8;
  --color-glitch: #39ff14; /* Glitch Nómada */
  --color-totem: #ff4955;  /* Totem Studio */
  --color-whatsapp: #25d366;

  --font-sans: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-accent: "Chakra Petch", system-ui, sans-serif;

  --radius-md: 0.9rem;
  --radius-lg: 1.4rem;

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-subtle: 0 10px 25px rgba(0, 0, 0, 0.4);

  --container-width: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

/* Links & text */

a {
  color: var(--color-glitch);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  padding-left: 1.1rem;
}

p {
  margin-top: 0;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 4rem;
}

.section-alt {
  background: radial-gradient(circle at top left, rgba(57, 255, 20, 0.08), transparent 50%),
              radial-gradient(circle at bottom right, rgba(255, 73, 85, 0.12), #050608 60%);
}

.section-header {
  text-align: left;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: var(--font-accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.section-header p {
  color: var(--color-text-muted);
}

/* =========================
   Header & Navigation
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.8rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: black;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-accent);
  font-size: 1.05rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* Nav */

.main-nav {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-glitch), var(--color-totem));
  transition: width 0.2s ease-out;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #ffffff;
}

/* Menu toggle (hamburguesa) */

.menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0f14;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

/* Estado activo hamburguesa */

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Nav abierto en móvil */

.main-nav.is-open {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: rgba(5, 6, 8, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-block: 0.75rem;
}

.main-nav.is-open ul {
  flex-direction: column;
  align-items: flex-start;
  padding-inline: 1.5rem;
}

/* =========================
   Buttons & Links
   ========================= */

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-glitch), #99ff6c);
  color: #050608;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(57, 255, 20, 0.55);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.link-discord {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--color-totem);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}

.link-discord:hover,
.link-discord:focus-visible {
  color: #ff7b89;
}

.link-ghost {
  font-size: 0.9rem;
  color: var(--color-glitch);
  text-decoration: none;
}

.link-ghost:hover,
.link-ghost:focus-visible {
  text-decoration: underline;
}

/* =========================
   Hero
   ========================= */

.hero {
  padding-block: 4.5rem 4rem;
  background:
    radial-gradient(circle at top left, rgba(57, 255, 20, 0.25), transparent 60%),
    radial-gradient(circle at bottom right, rgba(255, 73, 85, 0.2), #050608 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.hero-copy h1 {
  font-family: var(--font-accent);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.7rem;
}

.hero-copy p {
  color: var(--color-text-muted);
  max-width: 34rem;
}

.hero-copy p + p {
  margin-top: 0.7rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: rgba(165, 169, 184, 0.9);
  margin-bottom: 0.6rem;
}

.hero-ctas {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-card {
  background: rgba(12, 15, 21, 0.97);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-subtle);
}

.hero-card h2 {
  font-size: 1.1rem;
  font-family: var(--font-accent);
  margin-bottom: 0.4rem;
}

.hero-card p {
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.hero-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.hero-card li {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.hero-card--totem {
  border-color: rgba(255, 73, 85, 0.6);
  background: radial-gradient(circle at top left, rgba(255, 73, 85, 0.22), #0c0f14 60%);
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.mini-logo-placeholder {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 73, 85, 0.6);
}

/* =========================
   Sobre
   ========================= */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}

.about-block {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-subtle);
}

.about-block h2 {
  font-family: var(--font-accent);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.about-block p {
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.about-block ul {
  margin: 0;
}

.about-block li {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* =========================
   Proyectos Glitch
   ========================= */

.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.6rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr);
  gap: 1.1rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-subtle);
}

.project-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(57, 255, 20, 0.2), rgba(5, 6, 8, 1));
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content h3 {
  font-size: 1.1rem;
  font-family: var(--font-accent);
  margin: 0 0 0.4rem;
}

.project-content p {
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.project-tags {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.project-tags li {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-text-muted);
}

/* Proyectos Totem con toque rojo */

.project-card--totem {
  border-color: rgba(255, 73, 85, 0.7);
}

/* =========================
   Métricas
   ========================= */

.metrics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.3rem;
}

.metric-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-subtle);
}

.metric-card h3 {
  font-family: var(--font-accent);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.metric-number {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.1rem 0;
}

.metric-caption {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.metric-card--highlight {
  border-color: rgba(57, 255, 20, 0.8);
  background: radial-gradient(circle at top left, rgba(57, 255, 20, 0.22), #181b23 60%);
}

.reviews-brief {
  margin-top: 2rem;
  max-width: 32rem;
}

.reviews-brief h3 {
  font-size: 1rem;
  font-family: var(--font-accent);
  margin-bottom: 0.4rem;
}

.reviews-brief ul {
  margin: 0;
}

.reviews-brief li {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* =========================
   Streams
   ========================= */

.streams-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.6rem;
}

.streams-block h2 {
  font-family: var(--font-accent);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.streams-block p {
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.streams-block li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.streams-card {
  background: #0f141d;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid rgba(57, 255, 20, 0.7);
  box-shadow: var(--shadow-soft);
}

.streams-card h3 {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.streams-card p {
  color: var(--color-text-muted);
  margin-bottom: 0.8rem;
}

/* =========================
   Proyectos Totem
   ========================= */

.projects-grid--totem {
  margin-top: 0.5rem;
}

/* =========================
   CTA / Contacto
   ========================= */

.section-cta {
  background: radial-gradient(circle at top, rgba(57, 255, 20, 0.15), transparent 55%),
              linear-gradient(145deg, #050608, #10121b);
}

.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.9rem;
  align-items: flex-start;
}

.cta-copy h2 {
  font-family: var(--font-accent);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.cta-copy p {
  color: var(--color-text-muted);
  margin-bottom: 0.7rem;
}

.cta-copy ul {
  margin: 0;
}

.cta-copy li {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.cta-socials h3 {
  font-size: 1rem;
  font-family: var(--font-accent);
  margin-bottom: 0.6rem;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.social-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 18, 26, 0.95);
  text-decoration: none;
}

.social-pill:hover,
.social-pill:focus-visible {
  background: rgba(27, 32, 45, 0.98);
}

.social-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.social-handle {
  font-size: 0.9rem;
}

.cta-extra {
  margin-top: 1rem;
}

.cta-extra p {
  margin: 0 0 0.3rem;
  color: var(--color-text-muted);
}

/* =========================
   Footer
   ========================= */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-block: 1.4rem;
  background: #050608;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-note {
  max-width: 28rem;
}

/* =========================
   WhatsApp Floating Button
   ========================= */

.whatsapp-float {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.8);
  z-index: 60;
  text-decoration: none;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
}

.whatsapp-icon svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

/* =========================
   Animaciones scroll
   ========================= */

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.26s ease-out, transform 0.26s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Responsive
   ========================= */

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.05fr);
    align-items: center;
  }

  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .streams-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }

  .cta-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Nav en desktop */
  .menu-toggle {
    display: none;
  }

  .main-nav {
    display: block;
  }

  .main-nav.is-open {
    position: static;
    background: transparent;
    border-bottom: none;
    padding-block: 0;
  }

  .main-nav.is-open ul {
    flex-direction: row;
    align-items: center;
    padding-inline: 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-block: 3.5rem 3.2rem;
  }

  .whatsapp-float {
    right: 1rem;
    bottom: 1rem;
    width: 52px;
    height: 52px;
  }
}
