/* ═══════════════════════════════════════════════════════════
   FIX IT JAIME — Main Stylesheet
   Reset, Design Tokens, Base Typography, Utilities
   ═══════════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--neutral-900);
    background-color: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
    background: none;
}

/* ── Design Tokens (CSS Custom Properties) ────────────────── */
:root {
    /* Colors */
    --primary:        #1B4D3E;
    --primary-light:  #2D7A5F;
    --primary-dark:   #143A2F;
    --primary-rgb:    27, 77, 62;
    --accent:         #E8A838;
    --accent-hover:   #D49530;
    --accent-light:   #FFF3DC;
    --danger:         #C0392B;
    --success:        #27AE60;
    --neutral-900:    #1A1A2E;
    --neutral-700:    #3D3D5C;
    --neutral-600:    #555570;
    --neutral-400:    #8E8EA0;
    --neutral-300:    #B8B8C8;
    --neutral-200:    #D8D8E4;
    --neutral-100:    #F5F5F7;
    --surface:        #FAFBFC;
    --white:          #FFFFFF;

    /* Typography */
    --font-heading:   'Plus Jakarta Sans', sans-serif;
    --font-body:      'Inter', sans-serif;

    /* Spacing scale (8px base) */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  24px;
    --space-6:  32px;
    --space-7:  48px;
    --space-8:  64px;
    --space-9:  80px;
    --space-10: 96px;
    --space-11: 128px;

    /* Layout */
    --max-width:   1200px;
    --content-width: 800px;
    --sidebar-width: 340px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    --border-radius-pill: 50px;

    /* Shadows */
    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg:   0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-xl:   0 24px 60px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 20px rgba(232, 168, 56, 0.3);

    /* Transitions */
    --transition-fast:   0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow:   0.4s ease;

    /* Header heights */
    --topbar-height: 40px;
    --nav-height:    72px;
    --header-total:  112px;
}

/* ── Base Typography ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-4);
    color: var(--neutral-700);
}

strong, b {
    font-weight: 600;
    color: var(--neutral-900);
}

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.container-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.section {
    padding: var(--space-9) 0;
}

.section-sm {
    padding: var(--space-7) 0;
}

.section-lg {
    padding: var(--space-10) 0;
}

/* ── Section Headers ──────────────────────────────────────── */
.section-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #B57D14; /* Darkened from --accent for WCAG AA contrast on white */
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-4);
    color: var(--neutral-900);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-600);
    max-width: 640px;
    margin: 0 auto var(--space-7);
    line-height: 1.7;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

/* ── Background Variants ─────────────────────────────────── */
.bg-white   { background-color: var(--white); }
.bg-surface { background-color: var(--surface); }
.bg-light   { background-color: var(--neutral-100); }
.bg-primary { background-color: var(--primary); color: var(--white); }
.bg-accent  { background-color: var(--accent); color: var(--neutral-900); }

.bg-primary .section-label { color: var(--accent); }
.bg-primary .section-title,
.bg-primary .section-subtitle,
.bg-primary p { color: rgba(255, 255, 255, 0.9); }
.bg-primary .section-title { color: var(--white); }

/* ── Flexbox / Grid Utilities ─────────────────────────────── */
.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-2 { gap: var(--space-2); }
.flex-gap-3 { gap: var(--space-3); }
.flex-gap-4 { gap: var(--space-4); }
.flex-gap-5 { gap: var(--space-5); }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
}

/* ── 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;
}

/* ── Selection Color ──────────────────────────────────────── */
::selection {
    background: var(--accent);
    color: var(--neutral-900);
}

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