/* ============================================================
   LA TASCA -- Base Styles
   Reset, Custom Properties, Typography, @font-face
   ============================================================ */

/* ----------------------------------------------------------
   Fonts
   ---------------------------------------------------------- */
@font-face {
    font-family: 'Jost';
    src: url('/fonts/Jost-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('/fonts/SourceSerif4-Variable.woff2') format('woff2');
    font-weight: 200 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('/fonts/SourceSerif4-Italic-Latin.woff2') format('woff2');
    font-weight: 200 900;
    font-display: swap;
    font-style: italic;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('/fonts/SourceSerif4-Italic-LatinExt.woff2') format('woff2');
    font-weight: 200 900;
    font-display: swap;
    font-style: italic;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----------------------------------------------------------
   Custom Properties (Light Theme)
   ---------------------------------------------------------- */
:root {
    /* Colors */
    --color-bg:        #FAF7F2;
    --color-text:      #1A1A1A;
    --color-accent:    #8B6914;
    --color-secondary: #2C4A6E;
    --color-surface:   #F0EBE0;
    --color-border:    #D4C9B8;
    --color-muted:     #6B6358;

    /* Typography */
    --font-heading: 'Jost', 'Futura', 'Trebuchet MS', sans-serif;
    --font-body:    'Source Serif 4', 'Georgia', 'Times New Roman', serif;

    /* Font sizes (fluid) */
    --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg:   clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
    --text-xl:   clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
    --text-2xl:  clamp(1.75rem, 1.3rem + 2vw, 3rem);
    --text-3xl:  clamp(2.25rem, 1.5rem + 3.5vw, 4.5rem);

    /* Spacing */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  2rem;
    --space-xl:  4rem;
    --space-2xl: 8rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(26, 26, 26, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 26, 26, 0.1);
    --shadow-lg: 0 8px 32px rgba(26, 26, 26, 0.12);
}

/* ----------------------------------------------------------
   Dark Theme
   ---------------------------------------------------------- */
[data-theme="dark"] {
    --color-bg:        #1A1710;
    --color-text:      #F0EBE0;
    --color-accent:    #C9A84C;
    --color-secondary: #5B8CC2;
    --color-surface:   #2A2520;
    --color-border:    #3D352A;
    --color-muted:     #9B9184;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

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

a:hover {
    color: var(--color-secondary);
}

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

ul,
ol {
    list-style: none;
}

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

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

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); font-weight: 600; }
h6 { font-size: var(--text-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

small {
    font-size: var(--text-sm);
}

/* ----------------------------------------------------------
   Selection
   ---------------------------------------------------------- */
::selection {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

/* ----------------------------------------------------------
   Reduced Motion
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ----------------------------------------------------------
   Screen Reader Only
   ---------------------------------------------------------- */
.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;
}
