/* ==========================================================================
   MAD Maven Global Rescue — madmaveng.com
   Bone base · near-black ink · signal orange accent · Sora + DM Sans
   Generated documentary-style photographs accompany the rescue mission.
   ========================================================================== */

:root {
  --bone: #F4F1EA;
  --bone-2: #EAE5DA;
  --white: #FFFFFF;
  --ink: #15171A;
  --coal: #23262B;
  --coal-2: #2E323A;
  --body: #3A3F47;
  --muted: #6D737D;
  --line: #DDD6C9;
  --signal: #E4572E;
  --signal-dark: #C3451F;
  --signal-soft: #FBE3DA;
  --moss: #5B7B5A;
  --moss-soft: #E1EADF;

  --display: "Sora", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --w: 1200px;
  --r: 8px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(21,23,26,0.05), 0 12px 32px rgba(21,23,26,0.08);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.7; color: var(--body); background: var(--bone); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 16px; } p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
address { font-style: normal; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; color: var(--ink); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 18px; }
h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 1.9vw, 1.6rem); line-height: 1.15; }
h4 { font-size: 1.1rem; line-height: 1.25; }
h1 .hl, h2 .hl { color: var(--signal); }
.dark h1 .hl, .dark h2 .hl { color: #FF8A5B; }

.lede { font-size: 1.2rem; line-height: 1.6; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--signal-dark); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--signal); transform: rotate(45deg); }
.dark .eyebrow { color: #FF8A5B; } .dark .eyebrow::before { background: #FF8A5B; }

.wrap { width: min(var(--w), 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.center .narrow { margin-inline: auto; }
.section { padding: 104px 0; }
.section.tight { padding: 72px 0; }
.section.white { background: var(--white); }
.section.bone2 { background: var(--bone-2); }
.dark { background: var(--ink); color: rgba(255,255,255,0.78); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }
.dark .lede { color: rgba(255,255,255,0.86); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; }
@media (max-width: 760px) { .section { padding: 72px 0; } .section.tight { padding: 56px 0; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: var(--r); font-family: var(--display); font-weight: 700; font-size: 0.92rem; letter-spacing: -0.01em; border: 2px solid transparent; cursor: pointer; transition: all .25s var(--ease); }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-dark); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--bone); }
.dark .btn-outline, .hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.dark .btn-outline:hover, .hero .btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
.link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; color: var(--signal-dark); font-size: 0.92rem; }
.link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link:hover svg { transform: translateX(3px); }
.dark .link { color: #FF8A5B; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(21,23,26,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; }
.nav-wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: #fff; }
.mark { width: 42px; height: 42px; flex: none; }
.mark svg { width: 100%; height: 100%; }
.brand-text { font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.05; letter-spacing: -0.02em; }
.brand-text small { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: #FF8A5B; margin-top: 5px; }
.nav { display: flex; gap: 2px; }
.nav a { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.85); padding: 10px 14px; border-radius: var(--r); transition: background .2s, color .2s; }
.nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav a[aria-current="page"] { background: rgba(228,87,46,0.18); color: #FF8A5B; }
.nav-cta { min-height: 44px; padding: 0 20px; font-size: 0.88rem; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; transition: .3s; }
.site-header.open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 1040px) {
  .nav-toggle { display: flex; } .nav-cta { display: none; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 20px 24px; background: rgba(21,23,26,0.98); display: none; }
  .site-header.open .nav { display: flex; }
  .nav a { font-size: 1.1rem; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav a[aria-current="page"] { background: none; }
}

/* Site photographs */
.site-photo { display: block; width: 100%; height: auto; object-fit: cover; border-radius: var(--r-lg); }
.site-photo.r-16-9 { aspect-ratio: 16/9; } .site-photo.r-4-3 { aspect-ratio: 4/3; } .site-photo.r-4-5 { aspect-ratio: 4/5; } .site-photo.r-1-1 { aspect-ratio: 1/1; } .site-photo.r-3-2 { aspect-ratio: 3/2; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero::before { content: ""; position: absolute; left: -10%; top: -30%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(228,87,46,0.35), transparent 65%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; padding: 96px 0; }
.hero h1 { color: #fff; margin-bottom: 24px; }
.hero .lede { color: rgba(255,255,255,0.85); max-width: 580px; }
.hero .eyebrow { color: #FF8A5B; } .hero .eyebrow::before { background: #FF8A5B; }
.hero-grid > * { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
.hero-grid > :nth-child(2) { animation-delay: .2s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 64px; } }

/* Facts band */
.facts { background: var(--signal); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 32px 28px; border-left: 1px solid rgba(255,255,255,0.3); }
.fact:first-child { border-left: 0; }
.fact strong { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1; letter-spacing: -0.03em; }
.fact span { display: block; margin-top: 8px; font-size: 0.92rem; color: rgba(255,255,255,0.92); }
@media (max-width: 900px) { .facts-grid { grid-template-columns: 1fr 1fr; } .fact:nth-child(3) { border-left: 0; } .fact:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.3); } }
@media (max-width: 520px) { .facts-grid { grid-template-columns: 1fr; } .fact { border-left: 0 !important; border-top: 1px solid rgba(255,255,255,0.3); } .fact:first-child { border-top: 0; } }

/* Page hero */
.page-hero { padding: 88px 0 72px; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -6%; top: -50%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(228,87,46,0.35), transparent 65%); pointer-events: none; }
.page-hero .inner { max-width: 840px; position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
.page-hero .lede { color: rgba(255,255,255,0.85); }
.page-hero .eyebrow { color: #FF8A5B; } .page-hero .eyebrow::before { background: #FF8A5B; }
.crumbs { display: flex; gap: 10px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 20px; font-weight: 600; }
.crumbs a:hover { color: #fff; }
@media (max-width: 760px) { .page-hero { padding: 56px 0 48px; } }

/* Layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split.start { align-items: start; }
.split.text-wide { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 880px) { .split, .split.text-wide { grid-template-columns: 1fr; gap: 40px; } }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--white); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow); height: 100%; }
.card.flat { box-shadow: none; border: 1px solid var(--line); background: transparent; }
.card.signal { background: var(--signal-soft); box-shadow: none; }
.card.coal { background: var(--coal); color: rgba(255,255,255,0.82); }
.card.coal h3, .card.coal h4 { color: #fff; }
.card.moss { background: var(--moss-soft); box-shadow: none; }
.card h3 { margin-bottom: 10px; }
.card .num { font-family: var(--display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.2em; color: var(--signal-dark); margin-bottom: 14px; }
.card ul.list li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.card ul.list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; background: var(--signal); transform: rotate(45deg); }
a.card { display: block; color: inherit; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
a.card:hover { transform: translateY(-5px); box-shadow: 0 2px 6px rgba(21,23,26,0.06), 0 24px 56px rgba(21,23,26,0.14); }
@media (max-width: 620px) { .card { padding: 28px 24px; } }

/* Program rows */
.prog { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; padding: 72px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.prog:first-of-type { border-top: 0; padding-top: 0; }
.prog.flip { grid-template-columns: 1.1fr 0.9fr; }
.prog.flip .media { order: 2; }
.prog .num { font-family: var(--display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.22em; color: var(--signal-dark); display: block; margin-bottom: 12px; }
.tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.tags span { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: var(--r); background: var(--signal-soft); color: var(--signal-dark); font-size: 0.84rem; font-weight: 700; }
@media (max-width: 880px) { .prog, .prog.flip { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; } .prog.flip .media { order: 0; } }

/* Continents */
.continents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.continent { background: var(--white); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.continent .site-photo { border-radius: 0; aspect-ratio: 3/2; }
.continent-body { padding: 28px 28px 32px; }
.continent-body h3 { margin-bottom: 8px; }
.continent-body p { color: var(--muted); font-size: 0.96rem; }
@media (max-width: 1000px) { .continents { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .continents { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.chip::before { content: ""; width: 8px; height: 8px; background: var(--signal); transform: rotate(45deg); }
.dark .chip { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: #fff; }

/* Principles */
.principle { padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 24px; }
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle .n { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--signal); line-height: 1; }
.principle h4 { font-size: 1.35rem; margin: 0 0 6px; }

/* Quote */
.quote { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); max-width: 900px; margin: 0 auto; }
.dark .quote { color: #fff; }
.quote-ref { margin-top: 20px; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--signal-dark); }
.dark .quote-ref { color: #FF8A5B; }

/* FAQ */
.faq { max-width: 840px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 4px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); line-height: 1.25; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 36px; height: 36px; border-radius: var(--r); background: var(--signal-soft); color: var(--signal-dark); display: grid; place-items: center; font-size: 1.4rem; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 26px; max-width: 740px; }

/* Forms */
.form { display: grid; gap: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--ink); }
.field input, .field textarea, .field select { width: 100%; min-height: 52px; padding: 14px 18px; font: inherit; color: var(--ink); background: var(--bone); border: 2px solid transparent; border-radius: var(--r); transition: border-color .2s, background .2s; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--signal); background: #fff; }
.form-note { font-size: 0.88rem; color: var(--muted); }
.form-status { display: none; padding: 16px 20px; border-radius: var(--r); font-size: 0.95rem; }
.form-status.ok { display: block; background: var(--moss-soft); color: #30492F; }
.form-status.err { display: block; background: var(--signal-soft); color: var(--signal-dark); }
.notice { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 18px 20px; border-radius: var(--r-lg); background: var(--signal-soft); color: var(--signal-dark); font-size: 0.95rem; }
.notice svg { width: 28px; height: 28px; }

.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ic { width: 44px; height: 44px; border-radius: var(--r); background: var(--signal-soft); color: var(--signal-dark); display: grid; place-items: center; }
.contact-list .ic svg { width: 20px; height: 20px; }
.contact-list strong { display: block; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--signal-dark); margin-bottom: 4px; }
.contact-list a:hover { color: var(--signal-dark); }

/* CTA */
.cta { background: var(--signal); color: #fff; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; right: -8%; top: -60%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,0.1); }
.cta .inner { position: relative; padding: 104px 0; max-width: 800px; margin-inline: auto; text-align: center; }
.cta h2 { color: #fff; }
.cta .lede { color: rgba(255,255,255,0.92); }
.cta .eyebrow { color: #fff; } .cta .eyebrow::before { background: #fff; }
.cta .actions { justify-content: center; }
.cta .btn-light { color: var(--signal-dark); }
.cta .btn-outline { color: #fff; border-color: rgba(255,255,255,0.7); }
.cta .btn-outline:hover { background: #fff; color: var(--signal-dark); }
@media (max-width: 760px) { .cta .inner { padding: 72px 0; } }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); padding: 80px 0 32px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 0.8fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 20px; }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 0.82rem; color: rgba(255,255,255,0.45); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .hero-grid > * { animation: none; opacity: 1; transform: none; } html { scroll-behavior: auto; } }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--signal); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 16px; }
