/* Lion Rouge — styled after the ESS site, in Lion Rouge colours */
:root {
  --maroon: #5A0303;     /* primary: dark bands, footer */
  --red: #941515;        /* accent: buttons, links */
  --logo-red: #B41818;
  --forest: #14261C;     /* secondary dark */
  --ink: #1F1414;        /* headings */
  --text: #4E5652;       /* body text */
  --muted: #7A817D;
  --cream: #F5F4EF;      /* page background */
  --blush: #F6EEEC;      /* light panels */
  --line: #E4DDDA;
  --hdr: 68px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Epilogue', 'Helvetica Neue', Arial, sans-serif; background: var(--cream); color: var(--text); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
/* type scale: every h1 / h2 / h3 / p shares one format site-wide */
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 56px; line-height: 1.08; }
h2 { font-size: 40px; line-height: 1.15; }
h3 { font-size: 21px; line-height: 1.3; }
p, li, dd { font-size: 18px; line-height: 1.6; }
p { margin: 0 0 1em; }
.eyebrow { display: block; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--red); margin-bottom: 14px; }
.wrap { max-width: 1344px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.lead { font-size: 20px; max-width: 760px; }
p.lead { font-size: 20px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* buttons */
.btn { display: inline-block; padding: 13px 24px; border-radius: 3px; background: var(--red); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; border: 1.5px solid var(--red); transition: background .18s, color .18s; }
.btn:hover { background: var(--maroon); border-color: var(--maroon); }
.btn.ghost { background: transparent; border-color: #fff; color: #fff; }
.btn.ghost:hover { background: #fff; color: var(--maroon); }
.btn.light { background: #fff; color: var(--maroon); border-color: #fff; }
.btn.light:hover { background: var(--blush); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--hdr); background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a.on { color: var(--red); }
.nav .btn { color: #fff; padding: 10px 18px; }
.nav .btn:hover { color: #fff; }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; color: var(--ink); font-size: 15px; font-weight: 500; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after { content: ' \25BE'; font-size: 11px; }
.dd[open] > summary, .dd > summary:hover { color: var(--red); }
.dd .menu { position: absolute; top: 34px; left: -16px; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.1); padding: 8px; min-width: 300px; display: flex; flex-direction: column; }
.dd .menu a { padding: 10px 12px; border-radius: 3px; }
.dd .menu a:hover { background: var(--blush); }
.menu-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { position: absolute; left: 10px; width: 22px; height: 2px; background: var(--ink); content: ''; transition: transform .2s; }
.menu-toggle span { top: 20px; }
.menu-toggle span::before { top: -7px; left: 0; }
.menu-toggle span::after { top: 7px; left: 0; }

/* hero */
.hero { position: relative; min-height: calc(100svh - var(--hdr)); display: flex; flex-direction: column; color: #fff; overflow: hidden; background: var(--forest); }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-slides img.on { opacity: 1; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(58,3,3,.94) 0%, rgba(58,3,3,.80) 45%, rgba(40,4,4,.25) 100%); }
.hero-inner { width: 100%; position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
.hero .wordmark { width: min(360px, 70vw); margin-bottom: 26px; }
.hero h1 { color: #fff; max-width: 1000px; margin-bottom: 16px; }
.hero p { font-size: 20px; max-width: 640px; color: rgba(255,255,255,.9); }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }

/* page hero (inner pages) */
.phero { position: relative; color: #fff; background: var(--maroon) center/cover no-repeat; padding: 120px 0 72px; }
.phero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(58,3,3,.94) 0%, rgba(58,3,3,.80) 45%, rgba(40,4,4,.25) 100%); }
.phero > .wrap { width: 100%; }
.phero h1, .phero h2 { color: #fff; max-width: 860px; }
.phero .lead { color: rgba(255,255,255,.9); max-width: 640px; margin: 20px 0 0; }
.phero .btn { margin-top: 32px; }
.scrollcue { display: none; }
.phero .wrap { position: relative; z-index: 2; }
.phero h1 { color: #fff; max-width: 900px; }
.phero .eyebrow { color: #F2C9C9; }
.crumbs { font-size: 14px; margin-bottom: 18px; color: rgba(255,255,255,.75); }
.crumbs a { color: rgba(255,255,255,.9); text-decoration: none; }

/* cards */
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 .card .ph { aspect-ratio: 21/9; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: border-color .18s, transform .18s; display: flex; flex-direction: column; }
.card .ph { aspect-ratio: 16/10; overflow: hidden; background: var(--blush); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card .body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--red); }
a.card:hover .ph img { transform: scale(1.04); }
.card .more { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: 15px; color: var(--red); }
.tag { display: inline-block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--red); margin-bottom: 8px; }
.icon { width: 46px; height: 46px; border-radius: 50%; background: var(--blush); color: var(--red); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }

/* head row for sections */
.head { display: flex; justify-content: space-between; align-items: end; gap: 56px; margin-bottom: 28px; }
.head > div { flex: 1 1 auto; }
.head p { flex: 0 1 620px; max-width: 620px; margin: 0; }
.proj .ph { aspect-ratio: 2/1; }

/* dark band */
.dark { background: var(--maroon); color: rgba(255,255,255,.85); }
.dark h2, .dark h3 { color: #fff; }
.dark .eyebrow { color: #F2C9C9; }
.dark .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.85); }
.dark .icon { background: rgba(255,255,255,.12); color: #fff; }
.forest { background: var(--forest); }
.alt { background: #fff; }
.alt .card { background: var(--cream); }

/* quote band */

/* SDG row */
.sdgs { display: flex; flex-wrap: wrap; gap: 10px; }
.sdgs img { width: 74px; height: 74px; border-radius: 3px; object-fit: cover; }

/* where we work */
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.place { padding: 40px 24px 40px 0; border-bottom: 1px solid var(--line); }
.place b { display: block; font-weight: 600; font-size: 34px; margin-bottom: 6px; line-height: 1.3; color: var(--maroon); }
.place span { font-size: 17px; }

/* project facts */
.factstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 4px; }
.factstrip > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.factstrip > div:first-child { border-left: 0; }
.factstrip dt { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--red); }
.factstrip dd { margin: 6px 0 0; color: var(--ink); font-size: 17px; line-height: 1.45; }
.sdgline { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.sdgline .eyebrow { margin: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; margin-bottom: 28px; }
.cols2:last-child { margin-bottom: 0; }
.cols2 > p { margin: 0; }
.dark .ticks li::before { border-color: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-ph img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-grid { align-items: end; }
.contact-grid .cinfo dd { font-size: 16px; line-height: 1.5; }
.contact-grid .cinfo { margin: 0; }
.contact-grid .cinfo dt { margin-top: 16px; }
.facts { display: grid; grid-template-columns: 300px 1fr; gap: 56px; }
.factbox { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 4px; padding: 26px; align-self: start; position: sticky; top: calc(var(--hdr) + 24px); }
.factbox dl { margin: 0; }
.factbox dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--red); margin-top: 18px; }
.factbox dt:first-child { margin-top: 0; }
.factbox dd { margin: 4px 0 0; font-size: 16px; color: var(--ink); }
.prose h2 { margin: 44px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.ticks { list-style: none; padding: 0 !important; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 7px; width: 16px; height: 9px; border-left: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.callout { background: var(--maroon); color: #fff; border-radius: 4px; padding: 40px; }
.callout h2 { color: #fff; margin-bottom: 14px; }

/* team */

.person { text-align: center; }
.person .ph { aspect-ratio: auto; display: grid; place-items: center; padding: 22px 0 0; background: none; overflow: visible; }
.person .ph img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; }
a.card.person:hover .ph img, .person .ph img { transform: none; }
.person .body { padding: 18px 20px 22px; }
.person h3 { margin-bottom: 4px; }
.person p { color: var(--red); font-size: 16px; font-weight: 600; }
.initials { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--maroon), var(--red)); color: #fff; font-weight: 600; font-size: 56px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; }
.cinfo dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--red); margin-top: 22px; }
.cinfo dd { margin: 4px 0 0; color: var(--ink); }
.cinfo a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.cinfo a:hover { color: var(--red); border-color: var(--red); }
form.f { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 32px; display: grid; gap: 16px; }
form.f label { font-size: 14px; font-weight: 600; color: var(--ink); display: grid; gap: 6px; }
form.f input, form.f textarea { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #D5CCC9; border-radius: 3px; background: #fff; color: var(--ink); }
form.f input:focus, form.f textarea:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: var(--red); }
form.f .trap { position: absolute; left: -9999px; }
form.f .msg { font-size: 15px; margin: 0; }
form.f .msg.ok { color: #1A6B2A; }
form.f .msg.err { color: var(--red); }

/* footer */
.site-footer { background: #1C0707; color: rgba(255,255,255,.75); padding: 72px 0 28px; }
.site-footer p, .site-footer li { font-size: 16px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer img { height: 34px; width: auto; margin-bottom: 18px; }
.fcol summary { list-style: none; cursor: default; }
.fcol summary::-webkit-details-marker { display: none; }
.tapbar { display: none; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: rgba(255,255,255,.55); }

.head-c { margin-bottom: 44px; }
.head-c .lead { margin-top: 16px; }
.band { padding: 96px 0; }

/* desktop, as on the ESS site: the page is drawn at a 1440px design width scaled to the window,
   and each section fills exactly one screen under the header; app.js shrinks content to fit */
@media (min-width: 821px) {
  html { scroll-padding-top: var(--hdr); }
  .hero { min-height: 0; height: calc(var(--screen, 100vh) - var(--hdr)); }
  .fit, .cover { height: calc(var(--screen, 100vh) - var(--hdr)); overflow: hidden; }
  .fit { display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
  .fit .card .body { padding: 18px 20px 22px; }
  .fit .gallery img { aspect-ratio: auto; height: 180px; }
  .fit .split-ph img { aspect-ratio: auto; height: calc(var(--screen, 100vh) - var(--hdr) - 120px); max-height: 520px; }
  .fit .proj p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .fit > .wrap { width: 100%; }
  .cover { display: flex; flex-direction: column; justify-content: center; padding: 0; }
  /* card photos take whatever height is left in the screen (set by app.js), so cards keep full width */
  .fit .card:not(.person) .ph { aspect-ratio: auto; height: var(--ph, 260px); }
  .wide-sdgs .sdgs { flex-wrap: nowrap; gap: 14px; }
  .wide-sdgs .sdgs img { width: auto; height: auto; flex: 1 1 0; min-width: 0; aspect-ratio: 1; }
  .scrollcue { display: flex; align-items: center; gap: 12px; position: absolute; z-index: 2; bottom: 40px; left: calc(max(0px, (100% - 1344px) / 2) + 24px); color: rgba(255,255,255,.75); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
  .scrollcue::before { content: ''; width: 1px; height: 34px; background: rgba(255,255,255,.45); }
}

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } .hero-slides img { transition: none; } }

/* tablet */
@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .facts, .contact-grid, .cols2, .split, .row2 { grid-template-columns: 1fr; gap: 24px; }
  .factstrip > div { border-left: 0; border-top: 1px solid var(--line); }
  .sdgline { flex-direction: column; align-items: start; gap: 10px; }
  .factbox { position: static; }
}
/* mobile */
@media (max-width: 820px) {
  body { font-size: 16px; }
  h1 { font-size: 32px; } h2 { font-size: 28px; } h3 { font-size: 19px; }
  p, li, dd { font-size: 16px; } p.lead, .lead, .hero p { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .menu-toggle { display: block; }
  .nav { display: none; position: fixed; top: var(--hdr); left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav > a, .dd > summary { padding: 15px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav .btn { margin-top: 18px; text-align: center; }
  .dd .menu { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; }
  .menu-toggle[aria-expanded=true] span { background: transparent; }
  .menu-toggle[aria-expanded=true] span::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span::after { transform: translateY(-7px) rotate(-45deg); }
  .g2, .g3, .g4, .gallery { grid-template-columns: 1fr; }
  .gallery, .g4:has(.person) { grid-template-columns: 1fr 1fr; gap: 12px; }
  .person .body { padding: 12px; }
  .person h3 { font-size: 15px; }
  .person p { font-size: 12.5px; }
  .initials { font-size: 44px; }
  .head { flex-direction: column; align-items: start; gap: 16px; margin-bottom: 32px; }
  .head p, .head > div { flex: none; max-width: none; }
  .places { grid-template-columns: 1fr; }
  .phero { padding: 72px 0 48px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .site-footer .base { flex-direction: column; }
  .callout, form.f { padding: 24px; }
  .sdgs img { width: 60px; height: 60px; }
}

/* contact form: compact on desktop so the section fits one screen */
@media (min-width: 821px) {
  .contact-grid form.f { padding: 24px 28px; gap: 12px; }
  .contact-grid form.f input, .contact-grid form.f textarea { padding: 10px 12px; }
}

/* phones, after the ESS mobile site: full-screen maroon menu, full-height hero, swipe rows, collapsible footer */
@media (max-width: 820px) {
  .brand img { height: 36px; }
  .nav { background: var(--maroon); padding: 8px 20px 24px; }
  .nav > a, .dd > summary { color: #fff; font-size: 22px; font-weight: 600; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .nav a.on { color: #F2C9C9; }
  .dd .menu { background: transparent; }
  .dd .menu a { color: rgba(255,255,255,.85); font-size: 17px; padding: 10px 0; }
  .nav .btn { margin-top: auto; background: #fff; color: var(--maroon); font-size: 17px; padding: 16px; }
  .nav .btn:hover { color: var(--maroon); }

  .hero { min-height: calc(100svh - var(--hdr)); }
  .hero .wordmark { width: 220px; margin-bottom: 20px; }
  .hero .ctas { flex-direction: column; gap: 10px; }
  .hero .ctas .btn { width: 100%; text-align: center; }
  .phero.cover { min-height: 70svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 0 40px; }
  .phero .lead { font-size: 17px; }
  .split { gap: 24px; }

  /* card rows swipe sideways with the next card peeking in */
  .g2:not(:has(.person)), .g3, .g4:not(:has(.person)), .gallery {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .g2:not(:has(.person))::-webkit-scrollbar, .g3::-webkit-scrollbar, .g4::-webkit-scrollbar, .gallery::-webkit-scrollbar { display: none; }
  .g2 > *, .g3 > *, .g4:not(:has(.person)) > *, .gallery > * { flex: 0 0 82%; scroll-snap-align: start; }
  .gallery > * { flex-basis: 75%; }
  .g2:not(:has(.person)), .g3, .g4:not(:has(.person)), .gallery { touch-action: pan-x pan-y; cursor: grab; }
  .g2 img, .g3 img, .g4 img, .gallery img { -webkit-user-drag: none; user-select: none; }
  .sdgs, .wide-sdgs .sdgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
  .sdgs img, .wide-sdgs .sdgs img { width: 100%; height: auto; aspect-ratio: 1; }
  .sdgline { width: 100%; }
  .card .ph, .proj .ph, .g2 .card .ph { aspect-ratio: 16/10; }

  .person .ph { padding-top: 16px; }
  .person .ph img { width: 110px; height: 110px; }

  .factstrip { grid-template-columns: 1fr 1fr; }
  .factstrip > div { border-top: 1px solid var(--line); padding: 16px; }
  .factstrip > div:nth-child(-n+2) { border-top: 0; }
  .factstrip > div:nth-child(even) { border-left: 1px solid var(--line); }
  .factstrip > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .tapbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
  .tapbar .btn { text-align: center; padding: 14px; }
  .ghost-dk { background: transparent; color: var(--maroon); border: 1.5px solid var(--maroon); }
  form.f button { position: sticky; bottom: 12px; width: 100%; justify-self: stretch !important; }

  .site-footer { padding-top: 48px; }
  .site-footer .cols { gap: 0; }
  .site-footer .cols > div { margin-bottom: 20px; }
  .fcol { border-top: 1px solid rgba(255,255,255,.12); }
  .fcol summary { cursor: pointer; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; }
  .fcol summary::after { content: '+'; color: #fff; font-size: 22px; line-height: 1; }
  .fcol[open] summary::after { content: '\2013'; }
  .fcol summary h4 { margin: 0; }
  .fcol ul { padding-bottom: 16px; }
  .site-footer .base { margin-top: 12px; }
}
