/*
Theme Name:        Lara Excellence Theme
Theme URI:         https://laradayschool.com
Author:            Lara Day School
Author URI:        https://laradayschool.com
Description:       A premium, production-ready custom WordPress theme for Lara Day School — built to international school standards with modern design, full SEO optimization, performance-first architecture, and accessibility compliance. Inspired by leading UK, US, and Canadian school websites.
Version:           1.0.0
Requires at least: 6.4
Tested up to:      6.6
Requires PHP:      8.3
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       lara-excellence
Tags:              education, school, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-site-editing, block-styles, wide-blocks, accessibility-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* ==========================================================================
   DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* ── Brand Colours ──────────────────────────────────────────────────── */
    --color-primary:          #0B2D6E;   /* Deep Royal Blue  */
    --color-primary-dark:     #071D4A;   /* Midnight Blue     */
    --color-primary-light:    #1A4A9E;   /* Medium Blue       */
    --color-primary-muted:    #E8EEF8;   /* Ice Blue Tint     */

    --color-gold:             #C8960C;   /* Deep Gold         */
    --color-gold-light:       #E8B422;   /* Warm Gold         */
    --color-gold-pale:        #FDF6E3;   /* Cream Gold Tint   */

    --color-white:            #FFFFFF;
    --color-off-white:        #F8F9FB;
    --color-light-grey:       #F1F3F7;
    --color-mid-grey:         #D1D5DB;
    --color-border:           #E2E6EA;

    --color-text-primary:     #0F172A;   /* Near Black        */
    --color-text-secondary:   #374151;   /* Dark Grey         */
    --color-text-muted:       #6B7280;   /* Medium Grey       */
    --color-text-light:       #9CA3AF;   /* Light Grey        */

    --color-success:          #059669;
    --color-warning:          #D97706;
    --color-error:            #DC2626;
    --color-info:             #2563EB;

    /* ── Typography ─────────────────────────────────────────────────────── */
    --font-display:           'Poppins', sans-serif;
    --font-body:              'Inter', sans-serif;

    --font-size-xs:           0.75rem;    /*  12px */
    --font-size-sm:           0.875rem;   /*  14px */
    --font-size-base:         1rem;       /*  16px */
    --font-size-lg:           1.125rem;   /*  18px */
    --font-size-xl:           1.25rem;    /*  20px */
    --font-size-2xl:          1.5rem;     /*  24px */
    --font-size-3xl:          1.875rem;   /*  30px */
    --font-size-4xl:          2.25rem;    /*  36px */
    --font-size-5xl:          3rem;       /*  48px */
    --font-size-6xl:          3.75rem;    /*  60px */
    --font-size-7xl:          4.5rem;     /*  72px */

    --font-weight-light:      300;
    --font-weight-regular:    400;
    --font-weight-medium:     500;
    --font-weight-semibold:   600;
    --font-weight-bold:       700;
    --font-weight-extrabold:  800;

    --line-height-tight:      1.2;
    --line-height-snug:       1.375;
    --line-height-normal:     1.5;
    --line-height-relaxed:    1.625;
    --line-height-loose:      2;

    --letter-spacing-tight:   -0.025em;
    --letter-spacing-normal:   0em;
    --letter-spacing-wide:     0.025em;
    --letter-spacing-wider:    0.05em;
    --letter-spacing-widest:   0.1em;

    /* ── Spacing Scale ───────────────────────────────────────────────────── */
    --space-1:    0.25rem;   /*  4px */
    --space-2:    0.5rem;    /*  8px */
    --space-3:    0.75rem;   /* 12px */
    --space-4:    1rem;      /* 16px */
    --space-5:    1.25rem;   /* 20px */
    --space-6:    1.5rem;    /* 24px */
    --space-8:    2rem;      /* 32px */
    --space-10:   2.5rem;    /* 40px */
    --space-12:   3rem;      /* 48px */
    --space-16:   4rem;      /* 64px */
    --space-20:   5rem;      /* 80px */
    --space-24:   6rem;      /* 96px */
    --space-32:   8rem;      /* 128px */

    /* ── Border Radius ───────────────────────────────────────────────────── */
    --radius-sm:    0.25rem;
    --radius-md:    0.5rem;
    --radius-lg:    0.75rem;
    --radius-xl:    1rem;
    --radius-2xl:   1.5rem;
    --radius-full:  9999px;

    /* ── Shadows ─────────────────────────────────────────────────────────── */
    --shadow-xs:   0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm:   0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10);
    --shadow-md:   0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10);
    --shadow-lg:   0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10);
    --shadow-xl:   0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10);
    --shadow-2xl:  0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-blue: 0 10px 40px -10px rgba(11, 45, 110, 0.35);
    --shadow-gold: 0 10px 40px -10px rgba(200, 150, 12, 0.35);

    /* ── Transitions ─────────────────────────────────────────────────────── */
    --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ── Layout ──────────────────────────────────────────────────────────── */
    --container-sm:   640px;
    --container-md:   768px;
    --container-lg:   1024px;
    --container-xl:   1280px;
    --container-2xl:  1440px;
    --container-max:  1536px;

    --header-height:        80px;
    --header-height-scroll: 64px;

    /* ── Z-Index Scale ───────────────────────────────────────────────────── */
    --z-below:      -1;
    --z-base:        0;
    --z-raised:     10;
    --z-dropdown:   100;
    --z-sticky:     200;
    --z-overlay:    300;
    --z-modal:      400;
    --z-toast:      500;
    --z-tooltip:    600;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    tab-size: 4;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Focus Visible ───────────────────────────────────────────────────────── */
:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ── Skip Link ───────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: var(--z-toast);
    padding: var(--space-3) var(--space-6);
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: top var(--transition-fast);
}
.skip-link:focus {
    top: var(--space-4);
}

/* ── Typography Base ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-tight);
}

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

p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-gold); }

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

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

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

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

/* ── No-JS fallback ──────────────────────────────────────────────────────── */
/* If JavaScript is disabled, ensure all scroll-reveal content is visible
   and the hero slider falls back to a static (non-animated) first slide. */
noscript + .hero .swiper-slide:not(:first-child),
body:not(.js-loading):not(.js-loaded) [data-animate] {
    opacity: 1 !important;
    transform: none !important;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

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

@media (min-width: 1280px) {
    .container { padding-inline: var(--space-8); }
}

@media (min-width: 1440px) {
    .container { max-width: var(--container-2xl); }
}

.container--wide { max-width: var(--container-2xl); }
.container--narrow { max-width: var(--container-md); }

/* ── Section Spacing ─────────────────────────────────────────────────────── */
.section {
    padding-block: var(--space-20);
}

@media (max-width: 768px) {
    .section { padding-block: var(--space-12); }
}

/* ── Grid Utilities ──────────────────────────────────────────────────────── */
.grid {
    display: grid;
    gap: var(--space-8);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ==========================================================================
   COMPONENT: BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-8);
    font-family: var(--font-display);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
}
.btn:hover::after { transform: translateX(0); }

.btn--primary {
    background: var(--color-gold);
    color: var(--color-primary-dark);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-gold);
}
.btn--primary:hover {
    background: var(--color-gold-light);
    border-color: var(--color-gold-light);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(200, 150, 12, 0.5);
}

.btn--secondary {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
}
.btn--secondary:hover {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

.btn--outline-gold {
    background: transparent;
    color: var(--color-gold);
    border-color: var(--color-gold);
}
.btn--outline-gold:hover {
    background: var(--color-gold);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn--sm {
    padding: var(--space-2) var(--space-5);
    font-size: var(--font-size-xs);
}

.btn--lg {
    padding: var(--space-4) var(--space-10);
    font-size: var(--font-size-base);
}

/* ==========================================================================
   COMPONENT: SECTION HEADINGS
   ========================================================================== */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-widest);
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-4);
}

.section-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--color-gold);
    flex-shrink: 0;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: var(--font-weight-extrabold);
    color: var(--color-primary);
    margin-bottom: var(--space-6);
}

.section-heading--white { color: var(--color-white); }

.section-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    max-width: 600px;
}

.section-description--white { color: rgba(255,255,255,0.8); }

/* ── Centred variant ─────────────────────────────────────────────────────── */
.section-header--center {
    text-align: center;
}
.section-header--center .section-label {
    justify-content: center;
}
.section-header--center .section-description {
    margin-inline: auto;
}

/* ==========================================================================
   COMPONENT: CARDS
   ========================================================================== */

.card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: transparent;
}

.card__image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card__body {
    padding: var(--space-6);
}

.card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.card__tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--color-primary-muted);
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.card__date {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.card__title {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-3);
    line-height: var(--line-height-snug);
    transition: color var(--transition-fast);
}

.card:hover .card__title { color: var(--color-gold); }

.card__excerpt {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gold);
    transition: gap var(--transition-fast);
}
.card__link:hover { gap: var(--space-3); color: var(--color-gold); }
.card__link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}
.card:hover .card__link svg { transform: translateX(4px); }

/* ==========================================================================
   COMPONENT: BADGES & TAGS
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
}

.badge--gold   { background: var(--color-gold-pale); color: var(--color-gold); }
.badge--blue   { background: var(--color-primary-muted); color: var(--color-primary); }
.badge--white  { background: rgba(255,255,255,0.2); color: var(--color-white); }

/* ==========================================================================
   COMPONENT: BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: var(--space-4) 0;
}

.breadcrumbs a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}
.breadcrumbs a:hover { color: var(--color-gold); }

.breadcrumbs__sep {
    color: var(--color-mid-grey);
    font-size: var(--font-size-xs);
}

.breadcrumbs__current {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   COMPONENT: PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-12) 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: var(--space-2);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ==========================================================================
   COMPONENT: FORMS
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11, 45, 110, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-light);
}

/* ==========================================================================
   COMPONENT: BACK TO TOP
   ========================================================================== */

#back-to-top {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    z-index: var(--z-sticky);
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

#back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--color-gold);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   COMPONENT: OVERLAY & MODAL
   ========================================================================== */

.overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   COMPONENT: LOADING STATES
   ========================================================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-light-grey) 25%,
        var(--color-mid-grey) 50%,
        var(--color-light-grey) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   ACCESSIBILITY — REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   WORDPRESS CORE CLASSES
   ========================================================================== */

.alignleft  { float: left; margin-right: var(--space-6); margin-bottom: var(--space-4); }
.alignright { float: right; margin-left: var(--space-6); margin-bottom: var(--space-4); }
.aligncenter { margin-inline: auto; display: block; }
.alignwide  { max-width: var(--container-2xl); margin-inline: auto; }
.alignfull  { max-width: 100%; width: 100%; margin-inline: calc(-1 * var(--space-6)); }

.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
    padding-top: var(--space-2);
}

.sticky {}
.gallery {}
.bypostauthor {}

/* WordPress comment form */
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast);
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    #back-to-top,
    .no-print { display: none !important; }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a { text-decoration: underline; }
    a[href]::after { content: " (" attr(href) ")"; }

    img { max-width: 100% !important; }

    h1, h2, h3 { page-break-after: avoid; }
    p, blockquote { orphans: 3; widows: 3; }
}
