/* ============================================
   MAIN.CSS — Cumbre.ai
   Global styles: reset, variables, typography, layout
   ============================================ */

/* --- @font-face declarations --- */
@font-face {
  font-family: 'Geist Sans';
  src: url('/assets/fonts/Geist-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Sans';
  src: url('/assets/fonts/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Sans';
  src: url('/assets/fonts/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Sans';
  src: url('/assets/fonts/Geist-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Variables --- */
:root {
  /* Colores */
  --color-fondo: #0A0A0A;
  --color-acento: #F3F4F6;
  --color-texto: #F9FAFB;
  --color-texto-secundario: #9CA3AF;
  --color-borde: #1F1F1F;
  --color-card: #111111;
  --color-glow: rgba(255, 255, 255, 0.04);

  /* Tipografía */
  --fuente-principal: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fuente-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --tamaño-base: 1rem;

  /* Espaciado */
  --espacio-xs: 0.5rem;
  --espacio-sm: 1rem;
  --espacio-md: 2rem;
  --espacio-lg: 4rem;
  --espacio-xl: 8rem;

  /* Layout */
  --max-ancho: 1200px;
  --header-height: 4rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--fuente-principal);
  font-weight: 300;
  font-size: var(--tamaño-base);
  line-height: 1.6;
  color: var(--color-texto);
  background-color: var(--color-fondo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

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

ul,
ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p {
  max-width: 65ch;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-ancho);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--espacio-sm);
  padding-right: var(--espacio-sm);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--espacio-md);
    padding-right: var(--espacio-md);
  }
}

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

.text-dim {
  opacity: 0.5;
}

/* --- Language toggle --- */
html.lang-en [data-lang="es"] {
  display: none;
}

html.lang-es [data-lang="en"] {
  display: none;
}

/* --- Selection --- */
::selection {
  background-color: rgba(243, 244, 246, 0.2);
  color: var(--color-texto);
}

/* --- Scrollbar (webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-fondo);
}

::-webkit-scrollbar-thumb {
  background: var(--color-borde);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-texto-secundario);
}

/* --- Focus styles --- */
:focus-visible {
  outline: 2px solid var(--color-acento);
  outline-offset: 2px;
}
