/* ======================================================
   main.css — Sistema de diseño: variables, reset, tipografía
   ====================================================== */

/* FUENTES */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* VARIABLES */
:root {
    /* Paleta */
    --color-bg:            #0a0a0a;
    --color-surface:       #141414;
    --color-surface-2:     #1c1c1c;
    --color-border:        rgba(255,255,255,0.08);
    --color-text:          #f0ebe4;
    --color-text-muted:    #7a756e;
    --color-text-subtle:   #4a4540;
    --color-accent:        #c9a96e;
    --color-accent-hover:  #dbb87a;
    --color-accent-glow:   rgba(201,169,110,0.15);
    --color-danger:        #c0392b;
    --color-success:       #27ae60;
    --color-warning:       #d4a12e;

    /* Tipografía */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Inter', -apple-system, sans-serif;

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.5rem;
    --text-5xl:  3.5rem;
    --text-6xl:  5rem;
    --text-7xl:  7rem;

    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --max-width:      1280px;
    --max-width-text: 720px;
    --header-h:       72px;

    /* Bordes */
    --radius-sm: 4px;
    --radius:    8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm:   0 1px 8px rgba(0,0,0,0.4);
    --shadow:      0 4px 24px rgba(0,0,0,0.5);
    --shadow-lg:   0 8px 48px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 40px var(--color-accent-glow);

    /* Transiciones */
    --transition:      all 0.3s cubic-bezier(0.4,0,0.2,1);
    --transition-fast: all 0.15s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    min-height: 100vh;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul, ol { list-style: none; }

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* TIPOGRAFÍA */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--color-text);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
h4 { font-size: var(--text-xl); font-weight: 400; }
h5 { font-size: var(--text-lg); font-weight: 400; }

p {
    max-width: 65ch;
    color: var(--color-text);
    opacity: 0.9;
}

.text-muted   { color: var(--color-text-muted); }
.text-subtle  { color: var(--color-text-subtle); }
.text-accent  { color: var(--color-accent); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-small   { font-size: var(--text-sm); }
.text-large   { font-size: var(--text-lg); }

/* SCROLL BAR */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-text-subtle); border-radius: 2px; }

/* SELECTION */
::selection {
    background: var(--color-accent-glow);
    color: var(--color-accent);
}

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

/* DIVIDER */
.divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-8) 0;
}

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container--narrow {
    max-width: var(--max-width-text);
}

.sr-only { @extend .visually-hidden; }
