/* ============================================================
   SMCU Design System — Tokens, Reset, Typography, Utilities
   Saint Mary's Christian University
   Inspired by open.ac.uk — clean, professional, generous whitespace
   ============================================================ */

/* --- Google Fonts ------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. Design Tokens (CSS Custom Properties)
   ============================================================ */
:root {
    /* --- Navy palette ------------------------------------ */
    --smcu-navy-900: #0A1628;
    --smcu-navy-800: #0F1E38;
    --smcu-navy-700: #152E54;
    --smcu-navy-600: #1C3D6E;
    --smcu-navy-500: #234B84;
    --smcu-navy-400: #3A6BA8;
    --smcu-navy-300: #5A8BC4;
    --smcu-navy-200: #8BB0DA;
    --smcu-navy-100: #D4E2F0;
    --smcu-navy-50:  #EDF2F8;

    /* --- Gold palette ------------------------------------ */
    --smcu-gold-700: #8B6914;
    --smcu-gold-600: #B8860B;
    --smcu-gold-500: #D4A31E;
    --smcu-gold-400: #E8BF3B;
    --smcu-gold-300: #F0D06A;
    --smcu-gold-200: #F5E09A;
    --smcu-gold-100: #FDF5DC;

    /* --- Gray palette ------------------------------------ */
    --smcu-gray-900: #1A1A2E;
    --smcu-gray-800: #2D2D42;
    --smcu-gray-700: #4A4A5A;
    --smcu-gray-600: #6B6B7B;
    --smcu-gray-500: #8E8E9E;
    --smcu-gray-400: #B0B0BC;
    --smcu-gray-300: #CCCCD4;
    --smcu-gray-200: #E2E2E8;
    --smcu-gray-100: #F4F4F8;
    --smcu-gray-50:  #FAFAFE;

    /* --- Core colours ------------------------------------ */
    --smcu-white:    #FFFFFF;
    --smcu-success:  #059669;
    --smcu-danger:   #DC2626;
    --smcu-warning:  #D97706;
    --smcu-info:     #2563EB;

    /* --- Typography -------------------------------------- */
    --smcu-font-primary: 'Poppins', sans-serif;
    --smcu-font-accent:  'Playfair Display', serif;

    /* --- Shadows ----------------------------------------- */
    --smcu-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --smcu-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --smcu-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --smcu-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

    /* --- Border Radius ----------------------------------- */
    --smcu-radius-sm: 6px;
    --smcu-radius-md: 10px;
    --smcu-radius-lg: 16px;
    --smcu-radius-xl: 24px;

    /* --- Transitions ------------------------------------- */
    --smcu-transition: all 0.3s ease;
}

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

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

body {
    font-family: var(--smcu-font-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--smcu-gray-900);
    background-color: var(--smcu-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

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

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

::selection {
    background-color: var(--smcu-gold-100);
    color: var(--smcu-navy-900);
}

:focus-visible {
    outline: 2px solid var(--smcu-gold-500);
    outline-offset: 2px;
}

/* ============================================================
   3. Typography
   ============================================================ */

/* --- Links ----------------------------------------------- */
a {
    color: var(--smcu-navy-500);
    text-decoration: none;
    transition: var(--smcu-transition);
}

a:hover {
    text-decoration: underline;
}

/* --- Headings -------------------------------------------- */
h1, .smcu-h1 {
    font-family: var(--smcu-font-primary);
    font-size: 40px;
    font-weight: 700;
    color: var(--smcu-navy-700);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2, .smcu-h2 {
    font-family: var(--smcu-font-primary);
    font-size: 32px;
    font-weight: 600;
    color: var(--smcu-navy-700);
    line-height: 1.25;
    margin-bottom: 1rem;
}

h3, .smcu-h3 {
    font-family: var(--smcu-font-primary);
    font-size: 24px;
    font-weight: 600;
    color: var(--smcu-navy-700);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h4, .smcu-h4 {
    font-family: var(--smcu-font-primary);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

h5, .smcu-h5 {
    font-family: var(--smcu-font-primary);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

h6, .smcu-h6 {
    font-family: var(--smcu-font-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* --- Body text ------------------------------------------- */
p {
    margin-bottom: 1rem;
}

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

strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

/* ============================================================
   4. Utility Classes — Text
   ============================================================ */

/* --- Lead text ------------------------------------------- */
.smcu-lead {
    font-size: 1.2rem;
    color: var(--smcu-gray-600);
    line-height: 1.7;
}

/* --- Eyebrow label --------------------------------------- */
.smcu-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--smcu-gold-600);
    display: block;
    margin-bottom: 0.75rem;
}

/* --- Text alignment -------------------------------------- */
.smcu-text-center { text-align: center; }
.smcu-text-left   { text-align: left; }
.smcu-text-right  { text-align: right; }

/* --- Text colour ----------------------------------------- */
.smcu-text-white   { color: var(--smcu-white); }
.smcu-text-navy    { color: var(--smcu-navy-700); }
.smcu-text-gold    { color: var(--smcu-gold-500); }
.smcu-text-muted   { color: var(--smcu-gray-600); }
.smcu-text-success { color: var(--smcu-success); }
.smcu-text-danger  { color: var(--smcu-danger); }

/* ============================================================
   5. Utility Classes — Spacing
   ============================================================ */

/* --- Margin bottom --------------------------------------- */
.smcu-mb-0 { margin-bottom: 0; }
.smcu-mb-1 { margin-bottom: 0.5rem; }
.smcu-mb-2 { margin-bottom: 1rem; }
.smcu-mb-3 { margin-bottom: 1.5rem; }
.smcu-mb-4 { margin-bottom: 2rem; }
.smcu-mb-5 { margin-bottom: 3rem; }

/* ============================================================
   6. Animation Classes
   ============================================================ */

/* --- Scroll-triggered fade-in-up ------------------------- */
/* Animations only apply when JS adds the 'smcu-animate-ready' class to body */
body.smcu-animate-ready .smcu-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

body.smcu-animate-ready .smcu-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Without JS, everything is visible by default */
.smcu-animate {
    opacity: 1;
    transform: none;
}

/* --- Staggered children ---------------------------------- */
.smcu-stagger > *:nth-child(1) { transition-delay: 0.1s; }
.smcu-stagger > *:nth-child(2) { transition-delay: 0.2s; }
.smcu-stagger > *:nth-child(3) { transition-delay: 0.3s; }
.smcu-stagger > *:nth-child(4) { transition-delay: 0.4s; }
.smcu-stagger > *:nth-child(5) { transition-delay: 0.5s; }
.smcu-stagger > *:nth-child(6) { transition-delay: 0.6s; }

/* ============================================================
   Compatibility tokens — used by templates in inline styles
   ============================================================ */
:root {
    /* Spacing scale */
    --smcu-space-1: 0.25rem;
    --smcu-space-2: 0.5rem;
    --smcu-space-3: 1rem;
    --smcu-space-4: 1.5rem;
    --smcu-space-5: 2rem;
    --smcu-space-6: 2.5rem;
    --smcu-space-7: 3rem;
    --smcu-space-8: 4rem;
    --smcu-space-10: 6rem;

    /* Font sizes */
    --smcu-fs-xs: 0.75rem;
    --smcu-fs-small: 0.85rem;
    --smcu-fs-body: 1rem;
    --smcu-fs-body-lg: 1.15rem;
    --smcu-fs-h4: 1.25rem;
    --smcu-fs-h3: 1.5rem;
    --smcu-fs-h2: 2rem;
    --smcu-fs-h1: 2.5rem;
    --smcu-fs-display: 3.5rem;

    /* Font weights */
    --smcu-fw-medium: 500;
    --smcu-fw-semibold: 600;
    --smcu-fw-bold: 700;

    /* Line heights */
    --smcu-lh-body: 1.6;

    /* Colors (semantic aliases) */
    --smcu-text: var(--smcu-gray-900);
    --smcu-text-muted: var(--smcu-gray-600);
    --smcu-border: var(--smcu-gray-200);

    /* Misc */
    --smcu-shadow: var(--smcu-shadow-md);
    --smcu-radius: var(--smcu-radius-md);
    --smcu-radius-full: 9999px;
    --smcu-duration: 0.3s;
    --smcu-dur-slow: 0.5s;
    --smcu-ease: cubic-bezier(0.4, 0, 0.2, 1);
}
