/*
 * app.css — Sistema visual del micrositio &ERP
 * Magenta #B81778 + Off-white #FAF8F3 + Inter + Georgia para el &
 *
 * Este archivo es AUTÓNOMO — no requiere Tailwind compilado.
 * Replica las clases esenciales que usan los partials y páginas.
 */

/* ============================================================
   FUENTE INTER (self-hosted)
   ============================================================ */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-latin-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-latin-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

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

/* ============================================================
   VARIABLES CSS (sistema de color del hub)
   ============================================================ */
:root {
    --color-magenta: #B81778;
    --color-magenta-dark: #9A1366;
    --color-magenta-light: #D21C8A;

    --color-paper: #FAF8F3;
    --color-paper-warm: #F2EEE5;
    --color-paper-border: #E8E4DB;
    --color-paper-divider: #D9D4C7;

    --color-ink: #2A2722;
    --color-ink-muted: #6B675A;
    --color-ink-subtle: #8B877A;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;

    --container-max: 1200px;
    --container-padding: 24px;
}

/* ============================================================
   RESET MÍNIMO
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-ink);
    background: var(--color-paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

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

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font: inherit;
    cursor: pointer;
    border: 0;
    background: transparent;
}

/* ============================================================
   UTILIDADES DE LAYOUT
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container-page {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.py-section {
    padding-top: 64px;
    padding-bottom: 64px;
}

@media (min-width: 768px) {
    .py-section {
        padding-top: 96px;
        padding-bottom: 96px;
    }
}

.pb-section {
    padding-bottom: 64px;
}

@media (min-width: 768px) {
    .pb-section {
        padding-bottom: 96px;
    }
}

.mt-section {
    margin-top: 64px;
}

@media (min-width: 768px) {
    .mt-section {
        margin-top: 96px;
    }
}

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
.text-display {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.text-h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.text-h2 {
    font-size: clamp(1.5rem, 2.75vw, 2rem);
    line-height: 1.2;
}

.text-h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.25;
}

.text-balance {
    text-wrap: balance;
}

/* Ampersand con Georgia */
.amp {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--color-magenta);
    font-style: italic;
}

/* Eyebrow */
.eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
    font-weight: 500;
    background: var(--color-paper-warm);
    padding: 4px 10px;
    border-radius: 2px;
}

/* ============================================================
   COLORES DE TEXTO
   ============================================================ */
.text-ink { color: var(--color-ink); }
.text-ink-muted { color: var(--color-ink-muted); }
.text-ink-subtle { color: var(--color-ink-subtle); }
.text-magenta { color: var(--color-magenta); }
.text-white { color: #fff; }

/* ============================================================
   FONDOS
   ============================================================ */
.bg-paper { background: var(--color-paper); }
.bg-paper-warm { background: var(--color-paper-warm); }
.bg-magenta { background: var(--color-magenta); }
.bg-white { background: #fff; }

/* ============================================================
   BORDES
   ============================================================ */
.border-t { border-top: 1px solid var(--color-paper-border); }
.border-b { border-bottom: 1px solid var(--color-paper-border); }
.border-y { border-top: 1px solid var(--color-paper-border); border-bottom: 1px solid var(--color-paper-border); }
.border-paper-border { border-color: var(--color-paper-border); }

/* ============================================================
   BOTONES
   ============================================================ */
.btn-primary {
    display: inline-block;
    background: var(--color-magenta);
    color: #fff;
    padding: 12px 22px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--color-magenta-dark);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--color-ink);
    padding: 12px 22px;
    border: 1px solid var(--color-paper-divider);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: var(--color-ink);
    color: var(--color-ink);
}

/* ============================================================
   PANELES Y CARDS
   ============================================================ */
.panel-warm {
    background: var(--color-paper-warm);
    border-radius: 4px;
}

.card {
    background: #fff;
    border: 1px solid var(--color-paper-border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--color-paper-divider);
}

/* ============================================================
   NAV LINK CON UNDERLINE ANIMADO (replicado del hub)
   ============================================================ */
.nav-link {
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-magenta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link:hover {
    color: var(--color-ink);
}

.nav-link-active {
    color: var(--color-ink);
    font-weight: 500;
}

.nav-link-active::after {
    transform: scaleX(1);
}

/* ============================================================
   UTILIDADES FLEX/GRID MÍNIMAS
   ============================================================ */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.block { display: block; }
.grid { display: grid; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* Breakpoints específicos - solo los que realmente usamos */
@media (min-width: 1024px) {
    .lg\:flex { display: flex; }
    .lg\:hidden { display: none; }
    .lg\:block { display: block; }
}

/* ============================================================
   MISC (sticky header, transitions)
   ============================================================ */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-40 { z-index: 40; }

.transition-colors {
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.scroll-smooth {
    scroll-behavior: smooth;
}

.scroll-mt-20 {
    scroll-margin-top: 80px;
}

/* Spacing básico - solo los que usamos */
.h-8 { height: 32px; }
.h-10 { height: 40px; }
.h-16 { height: 64px; }
.h-20 { height: 80px; }
.w-auto { width: auto; }
.w-full { width: 100%; }
.w-6 { width: 24px; }
.w-10 { width: 40px; }
.w-px { width: 1px; }
.h-5 { height: 20px; }
.h-6 { height: 24px; }
.max-w-prose { max-width: 65ch; }

.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.pt-2 { padding-top: 8px; }
.mt-2 { margin-top: 8px; }
.mt-1 { margin-top: 4px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.font-medium { font-weight: 500; }

.rounded-md { border-radius: 6px; }

@media (min-width: 640px) {
    .sm\:h-20 { height: 80px; }
    .sm\:h-10 { height: 40px; }
    .sm\:px-4 { padding-left: 16px; padding-right: 16px; }
    .sm\:text-sm { font-size: 14px; }
    .sm\:text-base { font-size: 16px; }
    .sm\:text-lg { font-size: 18px; }
}

@media (min-width: 1024px) {
    .lg\:gap-6 { gap: 24px; }
}

/* Body bg/color */
.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-sans {
    font-family: var(--font-sans);
}