/* ============================================================
   CAPACITY EXPANSION CO. — MASTER STYLESHEET
   Color palette derived from logo (cornflower blue + black)
   ============================================================ */

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

:root {
    /* Logo-derived palette */
    --primary: #1B3A5C;
    --primary-light: #5BA4E6;
    --primary-lighter: #7DB8ED;
    --accent: #5BA4E6;
    --accent-hover: #4891D4;
    --accent-glow: rgba(91, 164, 230, 0.3);
    --dark: #0F1923;
    --text: #2D3748;
    --text-light: #64748B;
    --bg: #FFFFFF;
    --bg-alt: #F0F6FC;
    --bg-dark: #E8F1FB;
    --border: #D4E3F0;
    --success: #22C55E;
    --error: #EF4444;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
    --shadow-blue: 0 8px 30px rgba(91, 164, 230, 0.15);
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover, a:focus {
    color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    line-height: 1.3;
    font-weight: 700;
}

/* ===== UTILITIES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.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;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius);
    transition: top 0.2s;
}
.skip-link:focus {
    top: 16px;
    color: #fff;
}

.text-accent {
    color: var(--accent);
}

.center {
    text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover, .btn-outline:focus {
    background: #fff;
    color: var(--dark);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    height: 48px;
    width: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    padding: 8px 16px;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius);
    transition: all var(--transition);
    font-size: 0.95rem;
}
.nav-link:hover, .nav-link:focus {
    color: var(--primary);
    background: var(--bg-alt);
}
.nav-link.active {
    color: var(--primary);
}
.nav-link.cta-nav {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    margin-left: 8px;
}
.nav-link.cta-nav:hover, .nav-link.cta-nav:focus {
    background: var(--accent-hover);
    color: #fff;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: all var(--transition);
}
.hamburger {
    position: relative;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.mobile-nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,25,35,0.88) 0%, rgba(27,58,92,0.75) 50%, rgba(91,164,230,0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    color: #fff;
    padding: 60px 0;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0;
}

.section-tag {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-heading {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 24px;
}

.section-desc {
    max-width: 650px;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 48px;
}
.section-desc.center {
    margin-left: auto;
    margin-right: auto;
}

/* ===== SPLIT LAYOUT (About, Recognition, Leadership) ===== */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.split-reverse .split-image {
    order: -1;
}

.split-text h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    margin-bottom: 20px;
}

.split-text p {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.split-text .btn {
    margin-top: 12px;
}

.split-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    object-fit: contain;
    
}

/* ===== MISSION ===== */
.mission-section {
    background: var(--bg-alt);
}

.mission-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
}

.mission-card blockquote p {
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 16px;
    line-height: 1.8;
}
.mission-card blockquote p:last-child {
    margin-bottom: 0;
}

/* ===== VALUES ===== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 48px;
}

.value-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    transition: all var(--transition);
}
.value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-blue);
    border-color: var(--accent);
}

.value-icon {
    color: var(--accent);
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.value-card p {
    color: var(--text-light);
    font-size: 0.93rem;
}

/* ===== RECOGNITION SECTION ===== */
.recognition-section {
    background: var(--bg-alt);
}

/* ===== CULTURE / GALLERY ===== */
.culture-section {
    background: var(--bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}
.gallery-item img:hover {
    transform: scale(1.02);
}

.gallery-large {
    grid-row: 1 / 3;
}

.gallery-wide {
    grid-column: 1 / -1;
}

.gallery-wide img {
    max-height: 400px;
    object-position: center 20%;
}

/* ===== LEADERSHIP SECTION ===== */
.leadership-section {
    background: var(--bg-alt);
}

/* ===== CTA SECTION ===== */
.cta-section {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-align: center;
}

.cta-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    z-index: 0;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,25,35,0.92) 0%, rgba(27,58,92,0.88) 100%);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.cta-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #fff;
    margin-bottom: 16px;
}

.cta-content p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    padding: 140px 0 60px;
    text-align: center;
    color: #fff;
}
.page-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 12px;
}
.page-hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.15rem;
    max-width: 550px;
    margin: 0 auto;
}

/* ===== APPLY PAGE ===== */
.apply-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: start;
}

.apply-info h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.apply-info p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.benefits-list {
    list-style: none;
}
.benefits-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text);
    font-size: 1rem;
}
.benefits-list svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Form */
.apply-form-wrapper {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.apply-form-wrapper h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.form-note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

#application-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--error);
}

.field-error {
    color: var(--error);
    font-size: 0.82rem;
    min-height: 1.2em;
    margin-top: 4px;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.consent-group {
    margin-top: 8px;
}

.form-actions {
    margin-top: 12px;
}

/* Notification */
.notification {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    animation: slideDown 0.4s ease;
}
.notification svg {
    flex-shrink: 0;
    margin-top: 2px;
}
.notification strong {
    display: block;
    margin-bottom: 4px;
}
.notification p {
    font-size: 0.95rem;
    margin: 0;
}
.notification.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.notification.success svg {
    color: var(--success);
}
.notification.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.notification.error svg {
    color: var(--error);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

#submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== LEGAL PAGES ===== */
.legal-section {
    min-height: 50vh;
}

.coming-soon-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.coming-soon-card svg {
    color: var(--primary-light);
    margin: 0 auto 24px;
}
.coming-soon-card h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}
.coming-soon-card p {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 1.05rem;
}
.coming-soon-card .btn {
    margin-top: 16px;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.5);
}

.footer-nav h3,
.footer-contact h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-nav ul {
    list-style: none;
}
.footer-nav li {
    margin-bottom: 10px;
}
.footer-nav a {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}
.footer-nav a:hover {
    color: var(--accent);
}

.footer-contact a {
    color: rgba(255,255,255,0.6);
}
.footer-contact a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding: 24px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.footer-legal {
    display: flex;
    gap: 24px;
}
.footer-legal a {
    color: rgba(255,255,255,0.45);
    font-size: 0.88rem;
}
.footer-legal a:hover {
    color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .values-grid {
        grid-template-columns: 1fr 1fr;
    }
    .split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .split-reverse .split-image {
        order: 0;
    }
    .apply-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg);
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        padding: 100px 32px 40px;
        transition: right var(--transition);
        z-index: 999;
    }
    .main-nav.open {
        right: 0;
    }
    .nav-list {
        flex-direction: column;
        gap: 4px;
    }
    .nav-link {
        padding: 12px 16px;
        width: 100%;
        font-size: 1.05rem;
    }
    .nav-link.cta-nav {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
    }
    .hero {
        min-height: 75vh;
    }
    .section {
        padding: 64px 0;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-large {
        grid-row: auto;
    }
    .gallery-wide {
        grid-column: auto;
    }
    .values-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    #application-form {
        grid-template-columns: 1fr;
    }
    .apply-form-wrapper {
        padding: 28px 20px;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .mission-card {
        padding: 28px 20px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header, .mobile-nav-toggle, .cta-section, .site-footer {
        display: none;
    }
    .hero {
        min-height: auto;
        padding: 20px 0;
    }
    .hero-overlay, .hero-bg {
        display: none;
    }
    .hero-content {
        color: #000;
    }
    .section {
        padding: 24px 0;
    }
}

/* ===== FOCUS VISIBLE (Accessibility) ===== */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
