:root {
	--red: #a83232;
	--red-dark: #7f2020;
	--gold: #d9a514;
	--green: #315b46;
	--ink: #252d2b;
	--muted: #66706d;
	--ivory: #f7f3ea;
	--white: #fff;
	--line: #e7e1d6;
	--shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.cad-home { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--white); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
.cad-home img { display: block; max-width: 100%; height: auto; }
.cad-home a { color: inherit; }
.shell { width: min(calc(100% - 2rem), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; padding: .7rem 1rem; background: var(--white); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 20; top: 0; background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(37,45,43,.09); backdrop-filter: blur(12px); }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font-size: 1.35rem; letter-spacing: -.03em; }
.brand small { margin-top: .25rem; color: var(--muted); font-size: .68rem; }
.main-nav { display: flex; align-items: center; gap: 1.45rem; font-size: .89rem; font-weight: 650; }
.main-nav a { padding-block: 1.65rem; text-decoration: none; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a:focus, .main-nav .is-active { color: var(--red); border-color: var(--red); }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { min-width: 88px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--white); font-weight: 750; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary { color: var(--white); background: var(--red); border-color: var(--red); }
.mobile-menu nav { position: absolute; top: calc(100% + .65rem); right: 0; width: min(310px, calc(100vw - 1.25rem)); display: grid; padding: .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 16px 40px rgba(37,45,43,.16); }
.mobile-menu nav a { min-height: 46px; display: flex; align-items: center; padding: .65rem .8rem; border-radius: 5px; font-weight: 700; text-decoration: none; }
.mobile-menu nav a:hover, .mobile-menu nav a:focus { color: var(--red); background: var(--ivory); }
.mobile-menu nav .mobile-menu-cta { margin-top: .35rem; color: var(--white); background: var(--red); }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: .75rem 1.15rem; border: 2px solid var(--red); border-radius: 6px; background: var(--red); color: var(--white) !important; font-weight: 750; text-decoration: none; line-height: 1.2; transition: background .2s, border-color .2s, transform .2s; }
.button:hover, .button:focus { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }
.button-small { min-height: 42px; padding: .65rem 1rem; font-size: .86rem; white-space: nowrap; }
.button-light { color: var(--red-dark) !important; background: var(--white); border-color: var(--white); }
.button-light:hover, .button-light:focus { color: var(--white) !important; background: var(--red-dark); border-color: var(--red-dark); }
.button-ghost { background: transparent; border-color: rgba(255,255,255,.75); }
.button-outline { color: var(--red) !important; background: transparent; }

.hero { position: relative; min-height: 580px; display: grid; align-items: center; overflow: hidden; color: var(--white); background: var(--red-dark); }
.hero-media, .hero-overlay { position: absolute; inset: 0; width: 100%; height: 100% !important; }
.hero-media { object-fit: cover; object-position: center 42%; }
.hero-overlay { background: linear-gradient(90deg, rgba(83,12,12,.94) 0%, rgba(124,24,24,.78) 40%, rgba(30,25,23,.16) 78%, rgba(30,25,23,.22) 100%); }
.hero-content { position: relative; padding-block: 5rem; }
.eyebrow { margin: 0 0 .8rem; color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow-dark { color: var(--red); }
.hero h1, .section h2, .join h2 { margin: 0; font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 800; letter-spacing: -.045em; line-height: .98; }
.hero h1 { max-width: 720px; font-size: clamp(3.1rem, 7vw, 6.4rem); }
.hero-lead { max-width: 540px; margin: 1.5rem 0 2rem; font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-ivory { background: var(--ivory); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 520px); align-items: end; gap: 2rem; margin-bottom: 2.3rem; }
.section-heading h2, .resources h2 { font-size: clamp(2.25rem, 4.5vw, 4.2rem); }
.section-heading > p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.combat-grid, .project-grid, .news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.combat-card { min-height: 260px; padding: 1.65rem; border-top: 5px solid currentColor; border-radius: 8px; background: var(--white); }
.combat-red { color: var(--red); }.combat-green { color: var(--green); }.combat-gold { color: #9c7400; }
.combat-number { font-size: .78rem; font-weight: 800; letter-spacing: .13em; }
.combat-card h3 { margin: 2.8rem 0 .7rem; color: var(--ink); font-size: 1.45rem; line-height: 1.2; }
.combat-card p { margin: 0; color: var(--muted); }

.content-card, .news-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: #e6e0d5; }
.card-media:empty::after { content: "CAD-MALI"; height: 100%; display: grid; place-items: center; color: rgba(49,91,70,.55); font-weight: 800; letter-spacing: .08em; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card-media:hover img { transform: scale(1.025); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 1.35rem; }
.card-meta { margin: 0 0 .65rem; color: var(--red); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.card-body h3, .resource-item h3 { margin: 0 0 .8rem; font-size: 1.25rem; line-height: 1.25; }
.card-body h3 a, .resource-item h3 a { text-decoration: none; }
.card-body h3 a:hover, .resource-item h3 a:hover { color: var(--red); text-decoration: underline; text-underline-offset: .15em; }
.card-body > p:not(.card-meta) { margin: 0 0 1rem; color: var(--muted); }
.text-link { margin-top: auto; color: var(--red) !important; font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.section-action { margin: 2rem 0 0; text-align: center; }
.empty-note { color: var(--muted); }

.resources { color: var(--white); background: var(--green); }
.resources-layout { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.4fr); gap: clamp(2rem, 7vw, 6rem); }
.resources-intro > p:not(.eyebrow) { margin: 1.35rem 0 1.8rem; color: rgba(255,255,255,.78); font-size: 1.05rem; }
.resource-list { display: grid; align-content: start; gap: .8rem; }
.resource-item { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; padding: 1.2rem; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(255,255,255,.08); }
.resource-item .card-meta { color: #f3ce65; }
.resource-item h3 { margin-bottom: 0; font-size: 1.08rem; }
.document-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--white); font-size: 1.4rem; font-weight: 800; }

.join { padding-block: 3.2rem; color: var(--white); background: var(--red); }
.join-inner { display: grid; grid-template-columns: auto minmax(280px, 1fr) auto; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.join h2 { font-size: clamp(2.2rem, 4vw, 4rem); }
.join p { margin: 0; }

.site-footer { padding-top: 4rem; color: #dfe4e1; background: #1f2925; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-brand strong { color: var(--white); font-size: 1.8rem; }
.footer-brand p { max-width: 380px; color: #aeb8b3; }
.footer-grid h2 { margin: 0 0 1rem; color: var(--white); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; gap: .55rem; }
.footer-grid a { color: #dfe4e1; text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; padding-block: 1rem; border-top: 1px solid rgba(255,255,255,.12); color: #9ba8a2; font-size: .82rem; }

@media (max-width: 940px) {
	.header-inner { min-height: 68px; gap: 1rem; padding-block: .45rem; }
	.main-nav, .header-inner > .button { display: none; }
	.mobile-menu { display: block; }
	.hero { min-height: 540px; }
	.combat-grid, .project-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.combat-card:last-child, .project-grid > :last-child, .news-grid > :last-child { grid-column: 1 / -1; }
	.resources-layout { grid-template-columns: 1fr; }
	.join-inner { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (max-width: 640px) {
	.shell { width: min(calc(100% - 1.25rem), var(--shell)); }
	.brand img { width: 46px; height: 46px; }
	.brand strong { font-size: 1.1rem; }
	.hero { min-height: 620px; align-items: end; }
	.hero-overlay { background: linear-gradient(0deg, rgba(83,12,12,.96), rgba(124,24,24,.72) 70%, rgba(30,25,23,.2)); }
	.hero-content { padding-block: 4rem; }
	.hero h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
	.hero-actions { align-items: stretch; flex-direction: column; }
	.section { padding-block: 4rem; }
	.section-heading { grid-template-columns: 1fr; gap: .8rem; }
	.combat-grid, .project-grid, .news-grid { grid-template-columns: 1fr; }
	.combat-card:last-child, .project-grid > :last-child, .news-grid > :last-child { grid-column: auto; }
	.resources-layout { gap: 2.5rem; }
	.footer-grid { grid-template-columns: 1fr; gap: 2rem; }
	.footer-bottom { align-items: flex-start; flex-direction: column; gap: .35rem; }
}

@media (max-width: 380px) {
	.brand small { display: none; }
	.brand img { width: 42px; height: 42px; }
	.brand strong { font-size: 1rem; }
	.hero h1 { font-size: 2.8rem; }
	.button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}

@media print {
	.site-header, .hero-actions, .join, .site-footer { display: none; }
	.hero { min-height: auto; color: var(--ink); }
	.hero-media, .hero-overlay { display: none; }
	.section, .hero-content { padding-block: 1.5rem; }
}
