/* base.css — reset, tipografía, grid, utilidades */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background .3s, color .3s;
}

/* Tipografía */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-muted); }
a  { color: var(--accent); text-decoration: none; }
a:hover { opacity: .85; }

code, pre {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .875rem;
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  color: var(--accent);
}

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
}

/* Flex utils */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 1rem; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: .5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 2rem; }

/* Text utils */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Spacing utils */
.mt-sm { margin-top: .5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 2rem; }
.mb-sm { margin-bottom: .5rem; }
.mb-md { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 2rem; }

/* Section header */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
  padding: .25rem .75rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
}
.section-header h2 { margin-bottom: .75rem; }
.section-header p { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .2rem .6rem;
  border-radius: 4px; border: 1px solid currentColor;
}
.badge-accent { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.badge-muted  { color: var(--text-muted); border-color: var(--border); }

/* Tag */
.tag {
  display: inline-block;
  font-size: .7rem; font-weight: 600;
  padding: .2rem .55rem; border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

/* Highlight box */
.highlight-box {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--card-bg);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
}

/* Responsive hide */
@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-desktop { display: none !important; } }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Selection */
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
