/* ==========================================================================
   MENA.DATE - SISTEMA DE DISEÑO VISUAL
   Inspirado en la identidad visual de MenaStudios (menastudios.tech)
   Reutiliza su paleta de colores, tipografías y proporciones geométricas.
   ========================================================================== */

/* Google Fonts: Archivo Black & Inter */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Paleta oficial de MenaStudios */
  --black: #080808;
  --black-deep: #030303;
  --black-surface: #0f0f10;
  --black-card: #121214;
  --cream: #f4f1ec;
  --red: #ff2b26;
  --red-hover: #e9231f;
  --red-active: #ef1717;
  --red-glow: rgba(255, 43, 38, 0.18);
  --gray: #a7a39e;
  --gray-subtle: #77736e;
  --gray-dark: #56534e;

  /* Bordes y transparencias */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.22);
  --border-glass-red: rgba(255, 43, 38, 0.4);

  /* Tipografías */
  --font-heading: 'Archivo Black', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Contenedores */
  --container-max: 1280px;
}

/* Reset & Normalización */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  background-color: var(--black);
  color: #ffffff;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-width: 320px;
  background-color: var(--black);
  color: #ffffff;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

::selection {
  background-color: var(--red-active);
  color: #ffffff;
}

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

/* Fondo con cuadrícula técnica sutil */
.background-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 43, 38, 0.09) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  background-position: center top, center top, center top;
}

/* Contenedor central (Page Shell idéntico a MenaStudios) */
.page-shell {
  width: min(100% - 48px, var(--container-max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   SITE HEADER
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: #ffffff;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.site-header.is-scrolled {
  background-color: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.site-nav {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.brand-logo-img {
  display: block;
  width: 138px;
  height: auto;
}

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

.studio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cream);
  padding: 6px 12px;
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.studio-pill:hover {
  border-color: var(--red);
  color: #ffffff;
}

.studio-pill svg {
  width: 12px;
  height: 12px;
  stroke: var(--red);
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  z-index: 1;
  padding-top: clamp(140px, 18vh, 190px);
  padding-bottom: clamp(60px, 8vh, 90px);
}

.hero-title {
  margin: 0;
  max-width: 880px;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.8vw, 4.2rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #ffffff;
}

.hero-title em {
  font-style: normal;
  color: var(--red);
}

.hero-description {
  max-width: 580px;
  margin: 28px 0 36px;
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.6;
  color: #ffffffd6;
  font-weight: 400;
}

/* Botones Principales */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Estilo unificado de botones de MenaStudios */
.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 26px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn-arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

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

.btn-red {
  background-color: var(--red);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 43, 38, 0.25);
}

.btn-red:hover {
  background-color: var(--red-hover);
  box-shadow: 0 6px 24px rgba(255, 43, 38, 0.4);
}

.btn-ghost {
  background-color: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.09);
  border-color: #ffffff;
}

/* --------------------------------------------------------------------------
   PROJECTS SECTION (SHOWCASE CARDS)
   -------------------------------------------------------------------------- */
.projects-section {
  position: relative;
  z-index: 1;
  padding: 20px 0 clamp(80px, 12vh, 120px);
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.section-label h2 {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* Tarjeta Interactiva */
.interactive-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
  padding: clamp(28px, 4vw, 42px);
  background-color: var(--black-card);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Resplandor suave con cursor */
.interactive-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 43, 38, 0.08),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.interactive-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 43, 38, 0.06);
}

.interactive-card:hover::before {
  opacity: 1;
}

.interactive-card.is-protected:hover {
  border-color: rgba(255, 43, 38, 0.32);
}

/* Cabecera de la tarjeta */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.card-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  display: grid;
  place-items: center;
  color: #ffffff;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.card-icon-wrap svg {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  transition: stroke 0.25s ease;
}

.interactive-card:hover .card-icon-wrap {
  background: rgba(255, 43, 38, 0.1);
  border-color: rgba(255, 43, 38, 0.4);
}

.interactive-card:hover .card-icon-wrap svg {
  stroke: var(--red);
}

.card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
}

.badge-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
  border: 1px solid var(--border-glass);
}

.badge-protected {
  background: rgba(255, 43, 38, 0.12);
  color: #ff8582;
  border: 1px solid rgba(255, 43, 38, 0.3);
}

.badge-protected svg {
  width: 12px;
  height: 12px;
  stroke: var(--red);
}

/* Contenido de la tarjeta */
.card-content {
  margin-bottom: 32px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 14px;
  color: #ffffff;
}

.card-title span {
  color: var(--red);
}

.card-desc {
  font-size: 0.94rem;
  line-height: 1.6;
  color: #a7a39ed0;
}

/* Pie de la tarjeta con acción */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
}

.card-url-preview {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--gray-subtle);
  transition: color 0.2s ease;
}

.interactive-card:hover .card-url-preview {
  color: var(--cream);
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 10px 18px;
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}

.interactive-card:hover .card-action-btn {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 43, 38, 0.3);
}

.card-action-btn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

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

/* --------------------------------------------------------------------------
   SITE FOOTER (Idéntico a MenaStudios)
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 50px 0 30px;
  background-color: var(--black-deep);
  border-top: 1px solid var(--border-glass);
  color: #ffffff;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.footer-logo-img {
  width: 140px;
  height: auto;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--gray);
  max-width: 320px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffffba;
  transition: color 0.18s ease;
}

.footer-link:hover {
  color: var(--red);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 0.74rem;
  color: var(--gray-subtle);
}

.footer-bottom a {
  color: var(--gray);
  transition: color 0.18s ease;
}

.footer-bottom a:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (Media Queries)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .interactive-card {
    min-height: auto;
  }
}

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

  .site-nav {
    min-height: 72px;
  }

  .brand-logo-img {
    width: 108px;
    height: auto;
  }

  .hero-section {
    padding-top: 120px;
    padding-bottom: 48px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

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

