/* 
   THE NOBLE TRUST | DESIGN SYSTEM V3.0
   Theme: Compassionate Prestige - Fully Responsive Edition
   Architect: Senior Responsive Web Architect
*/

:root {
    /* Color Tokens */
    --clr-primary: #002B5B;
    --clr-secondary: #2A9D8F;
    --clr-accent: #E9C46A;
    --clr-terracotta: #E29578;
    --clr-bg: #FDFBF7;
    --clr-white: #FFFFFF;
    --clr-text: #1D1D1D;
    --clr-text-muted: #5E6C84;

    /* Typography - Fluid System (Clamp) */
    --ff-heading: 'Playfair Display', serif;
    --ff-body: 'Inter', sans-serif;

    --fs-base: 1rem;
    --fs-h1: clamp(2.5rem, 8vw, 4.5rem);
    --fs-h2: clamp(2rem, 6vw, 3.5rem);
    --fs-h3: clamp(1.5rem, 4vw, 2.5rem);
    --fs-body: 1rem;

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

    /* Shadow & Depth */
    --shadow-soft: 0 10px 30px rgba(0, 43, 91, 0.05);
    --shadow-strong: 0 20px 40px rgba(0, 43, 91, 0.1);

    /* Layout */
    --radius-lg: clamp(16px, 4vw, 32px);
    --radius-md: clamp(12px, 3vw, 16px);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Breakpoints */
    --content-max-width: 1400px;
}

/* -------------------------------------------------------------------------- */
/*  BASE STYLES (MOBILE FIRST)                                                */
/* -------------------------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base 16px for a11y */
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--ff-body);
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--ff-heading);
    font-weight: 900;
    color: var(--clr-primary);
    line-height: 1.2;
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

/* -------------------------------------------------------------------------- */
/*  LAYOUT COMPONENTS                                                         */
/* -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 4rem);
}

.section-padding {
    padding: clamp(3rem, 10vh, 8rem) 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-md);
}

/* -------------------------------------------------------------------------- */
/*  NAVIGATION (MOBILE FIRST)                                                */
/* -------------------------------------------------------------------------- */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-wrapper {
    position: relative;
}

.logo img {
    height: clamp(40px, 8vw, 60px);
    width: auto;
}

/* Navigation Drawer (Mobile) */
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--clr-primary);
    padding: 8rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    list-style: none;
    transition: var(--transition);
}

.nav-links.active {
    right: 0;
}

.nav-links a {
    color: var(--clr-white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clr-secondary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--clr-secondary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Burger Toggle */
.nav-toggle {
    display: block;
    cursor: pointer;
    z-index: 2100;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--clr-primary);
    margin: 5px 0;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* -------------------------------------------------------------------------- */
/*  MEDIA QUERIES (RESPONSIVE RULES)                                         */
/* -------------------------------------------------------------------------- */

/* ----- MOBILE LANDSCAPE ----- */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 0.5rem 0;
    }

    .nav-links {
        padding-top: 5rem;
        overflow-y: auto;
    }

    .section-padding {
        padding: 2rem 0;
    }
}

/* ----- TABLET PORTRAIT (768px+) ----- */
@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reveal Nav for Tablet Landscape / Large Tablet */
    .nav-toggle {
        display: none;
    }

    .nav-links {
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        gap: 2rem;
    }

    .nav-links a {
        color: var(--clr-primary);
        font-size: 0.9rem;
    }
}

/* ----- LAPTOP / DESKTOP (1024px+) ----- */
@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    nav {
        padding: 1.5rem 0;
    }
}

/* ----- LARGE DESKTOP (1920px+) ----- */
@media (min-width: 1920px) {
    :root {
        --content-max-width: 1600px;
    }

    .container {
        padding: 0 4rem;
    }

    .section-padding {
        padding: 10rem 0;
    }
}

/* -------------------------------------------------------------------------- */
/*  UI COMPONENTS                                                             */
/* -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem 2rem;
    min-height: 48px;
    /* Touch target size */
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--clr-primary);
    color: var(--clr-white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.btn-primary:disabled {
    background: var(--clr-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--clr-secondary);
    color: var(--clr-white);
}

.btn-outline {
    border: 2px solid var(--clr-primary);
    color: var(--clr-primary);
}

.card {
    background: var(--clr-white);
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 5vw, 3rem);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

/* Stat Box Fixes */
.stat-box {
    text-align: center;
}

.stat-number {
    font-family: var(--ff-heading);
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--clr-accent);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    min-height: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: 2px solid var(--clr-secondary);
    border-color: transparent;
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}

.no-scroll {
    overflow: hidden;
}

/* -------------------------------------------------------------------------- */
/*  ACCESSIBILITY & UTILITIES                                                 */
/* -------------------------------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* -------------------------------------------------------------------------- */
/*  FOOTER DESIGN                                                             */
/* -------------------------------------------------------------------------- */

footer {
    background-color: var(--clr-primary);
    color: var(--clr-white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: start;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    }
}

.footer-column h4 {
    color: var(--clr-accent);
    font-size: 1.1rem;
    font-family: var(--ff-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-md);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(233, 196, 106, 0.2);
    display: inline-block;
}

.footer-brand p {
    margin: 1.5rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--clr-white);
}

.footer-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--clr-accent);
    padding-left: 8px;
}

.footer-contact address {
    font-style: normal;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-contact a {
    color: var(--clr-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--clr-accent);
}

.footer-bottom {
    margin-top: var(--space-xl);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* -------------------------------------------------------------------------- */
/*  RECENT WORK SLIDER                                                        */
/* -------------------------------------------------------------------------- */

.slider-section {
    padding: var(--space-xl) 0;
    background: var(--clr-white);
    overflow: hidden;
}

.slider-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.slider-slide {
    min-width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0 10px;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

/* Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.slider-btn {
    width: 50px;
    height: 50px;
    background: var(--clr-white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: var(--transition);
    color: var(--clr-primary);
}

.slider-btn:hover {
    background: var(--clr-primary);
    color: var(--clr-white);
    transform: scale(1.1);
}

.slider-btn.prev {
    transform: translateX(-25px);
}

.slider-btn.next {
    transform: translateX(25px);
}

/* Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(0, 43, 91, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--clr-secondary);
    width: 30px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .slider-slide {
        aspect-ratio: 4 / 3;
    }

    .slider-nav {
        display: none;
        /* Swipe only on mobile */
    }
}