/* ============================================
   CaML — Dark Desert Theme
   Desert at dusk: warm earth, sand, terracotta
   ============================================ */

:root {
    --bg-deep:       #110e0a;
    --bg-primary:    #1a1410;
    --bg-secondary:  #231c16;
    --bg-card:       #2a2219;
    --bg-elevated:   #342a20;

    --sand:          #e2d5c1;
    --sand-muted:    #b8a890;
    --sandstone:     #d4a574;
    --terracotta:    #c17346;
    --terracotta-light: #d4854f;
    --sage:          #7aab94;
    --sage-muted:    #5a8a74;

    --text-primary:  #e2d5c1;
    --text-secondary:#a09484;
    --text-body:     #c4b8a4;

    --border:        #3d3027;
    --border-light:  #4a3d30;

    --font-heading:  'Cormorant Garamond', Georgia, serif;
    --font-body:     'Inter', -apple-system, sans-serif;

    --max-width:     1100px;
    --section-pad:   100px;
}

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

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

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-body);
    line-height: 1.7;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(17, 14, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(61, 48, 39, 0.5);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-brand img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.nav-brand span {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--sandstone);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--sand-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--sandstone);
}

.nav-cta {
    background: var(--terracotta);
    color: var(--bg-deep) !important;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 500 !important;
    transition: background 0.3s !important;
}

.nav-cta:hover {
    background: var(--terracotta-light) !important;
}

/* ---- Mobile Nav Toggle ---- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--sand-muted);
    margin: 5px 0;
    transition: 0.3s;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--terracotta);
    color: #fff;
}

.btn-primary:hover {
    background: var(--terracotta-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--sand);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--sandstone);
    color: var(--sandstone);
}

/* ---- Section Base ---- */
section {
    padding: var(--section-pad) 40px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    color: var(--sandstone);
    line-height: 1.2;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
}

/* ---- Alternating Backgrounds ---- */
.bg-deep { background: var(--bg-deep); }
.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }

/* ---- Page Header (for inner pages) ---- */
.page-header {
    padding: 140px 40px 60px;
    text-align: center;
}

.page-header .section-title {
    margin-bottom: 12px;
}

.page-header .section-desc {
    margin: 0 auto;
    max-width: 640px;
}

/* ---- Content Links ---- */
a.content-link {
    color: var(--sage);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

a.content-link:hover {
    border-color: var(--sage);
}

/* ---- Cards (shared) ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    transition: border-color 0.3s, transform 0.3s;
}

.card:hover {
    border-color: var(--border-light);
}

/* ---- Timeline / Results ---- */
.timeline-entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 36px 40px;
    margin-bottom: 24px;
    transition: border-color 0.3s;
}

.timeline-entry:hover {
    border-color: var(--border-light);
}

.timeline-date {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--terracotta);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.timeline-entry h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--sand);
    margin-bottom: 12px;
    line-height: 1.3;
}

.timeline-entry p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.timeline-entry a {
    color: var(--sage);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.timeline-entry a:hover {
    border-color: var(--sage);
}

/* Timeline entry with image (grid layout) */
.timeline-entry.has-img {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

.timeline-entry .entry-img {
    width: 100%;
    border-radius: 8px;
    border: none;
    background: #fff;
    padding: 12px;
    margin-top: 4px;
}

.timeline-entry .entry-img + .entry-img {
    margin-top: 12px;
}

.timeline-entry .entry-images {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-entry .entry-images img {
    width: 100%;
    border-radius: 8px;
    border: none;
    background: #fff;
    padding: 12px;
}

.timeline-entry .entry-images img.invert-dark {
    filter: invert(1) hue-rotate(180deg);
}

@media (max-width: 768px) {
    .timeline-entry.has-img {
        grid-template-columns: 1fr;
    }

    .timeline-entry .entry-images {
        order: -1;
    }
}

/* ---- Team Grid ---- */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 48px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 36px;
    transition: border-color 0.3s;
}

.team-card:hover {
    border-color: var(--border-light);
}

.team-card .role {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 8px;
}

.team-card h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--sand);
    margin-bottom: 12px;
}

.team-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.team-card a {
    color: var(--sage);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.team-card a:hover {
    border-bottom: 1px solid var(--sage);
}

/* ---- Endorsement Quote ---- */
.endorsement {
    border-left: 3px solid var(--terracotta);
    padding: 24px 32px;
    margin-bottom: 32px;
    background: var(--bg-card);
    border-radius: 0 8px 8px 0;
}

.endorsement blockquote {
    font-family: var(--font-heading);
    font-size: 18px;
    font-style: italic;
    color: var(--sand);
    line-height: 1.7;
    margin-bottom: 16px;
}

.endorsement cite {
    font-family: var(--font-body);
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    color: var(--sandstone);
    letter-spacing: 0.3px;
}

/* ---- Principles ---- */
.principle {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.principle:last-child {
    border-bottom: none;
}

.principle h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--sand);
    margin-bottom: 12px;
}

.principle p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 720px;
}

/* ---- CTA Banner (reusable) ---- */
.cta-banner {
    text-align: center;
    padding: 80px 40px;
    position: relative;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(193, 115, 70, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner h2 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    color: var(--sandstone);
    margin-bottom: 16px;
}

.cta-banner p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

/* ---- Footer ---- */
.footer-section {
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--sandstone);
    margin-bottom: 12px;
}

.footer-brand h3 img {
    height: 28px;
    width: 28px;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 4px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.footer-links h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sand-muted);
    margin-bottom: 16px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--sage);
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.footer-legal {
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    :root {
        --section-pad: 64px;
    }

    nav {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-deep);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    section {
        padding: var(--section-pad) 20px;
    }

    .page-header {
        padding: 100px 20px 40px;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
