/* Layout: full-bleed skyline hero, then one centred column of stacked brand-colour action bars.
   Every bar expands its own panel in place. Single committed look (brand colours on dark), so no light/dark switch. */
:root {
  --gmi-red: #e1251b;
  --gmi-red-deep: #b81c14;
  --gmi-ink: #231f20;
  --gmi-ink-2: #2e292a;
  --wa-green: #1f9d4c;
  --wa-green-deep: #187d3c;
  --paper: #ffffff;
  --page: #161314;
  --muted: #cfc8c9;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --col: 760px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);   /* gentle start and finish, for panel height */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-anchor: none; }
body { margin: 0; background: var(--page); color: var(--paper); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.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; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 50; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--gmi-red); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(440px, 72vh, 620px);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 48px 16px 40px; text-align: center;
  background: var(--gmi-ink);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("assets/hero-skyline.jpg") 46% 40% / cover no-repeat;
  transform: scale(1.08); will-change: transform;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,14,30,.15) 0%, rgba(10,14,30,.35) 40%, rgba(12,10,12,.86) 100%);
}
.hero-inner { will-change: transform, opacity; }
.hero-logo { width: clamp(150px, 34vw, 220px); height: auto; margin-bottom: 28px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.hero h1 {
  margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(1.45rem, 4.6vw, 2.25rem); line-height: 1.15; text-wrap: balance;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.hero h1 span { display: block; }
.hero p { margin: 14px 0 0; font-size: clamp(1.05rem, 3.2vw, 1.4rem); font-weight: 400; text-shadow: 0 2px 10px rgba(0,0,0,.5); text-wrap: balance; }

/* Hero entrance */
.hero-logo, .hero h1 span, .hero p { animation: rise .8s var(--ease) both; }
.hero h1 span:nth-child(1) { animation-delay: .12s; }
.hero h1 span:nth-child(2) { animation-delay: .22s; }
.hero p { animation-delay: .34s; }

.scroll-cue {
  margin-top: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.45); color: var(--paper); animation: bob 2s ease-in-out infinite;
}
.scroll-cue svg { width: 20px; height: 20px; }
.scroll-cue:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Action column ---------- */
.connect { max-width: var(--col); margin: 0 auto; background: var(--gmi-ink); scroll-margin-top: 8px; }
.connect-head { background: var(--paper); color: var(--gmi-red); padding: 14px 20px; }
.connect-head h2 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.65rem); font-weight: 800; letter-spacing: -.005em; }

.item { border-top: 1px solid rgba(255,255,255,.06); }
.item-h { margin: 0; font: inherit; }
.bar {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  width: 100%; min-height: 84px; padding: 18px 20px; border: 0; margin: 0;
  text-decoration: none; text-align: left; cursor: pointer; scroll-margin-top: 8px;
  font-size: clamp(1.15rem, 4.2vw, 1.6rem); font-weight: 500; line-height: 1.25;
  position: relative; overflow: hidden; isolation: isolate;
  transition: filter .15s ease, background-color .15s ease, transform .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bar:hover { filter: brightness(1.08); }
.bar:active { filter: brightness(.94); transform: scale(.985); }
.bar:focus-visible { outline: 3px solid var(--paper); outline-offset: -6px; }
/* Open indicator: a line that grows out from the centre */
.bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.6); transform: scaleX(0); transition: transform .45s var(--ease);
}
.bar[aria-expanded="true"]::after { transform: scaleX(1); }
/* Tap ripple, added by JS at the press point */
.ripple {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  width: var(--s); height: var(--s); left: var(--x); top: var(--y); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: rgba(255,255,255,.28); transform: scale(0); animation: ripple .6s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.bar .label { min-width: 0; }
.bar svg { flex: none; width: 1.25em; height: 1.25em; }
.red { background: var(--gmi-red); }
.dark { background: var(--gmi-ink); }
.green { background: var(--wa-green); }
/* Plus at the far right: the vertical stroke shrinks away (with a half turn) to leave a minus when open */
.bar .pm { margin-left: auto; transition: transform .45s var(--ease); }
.bar .pm-v { transform-box: fill-box; transform-origin: center; transition: transform .45s var(--ease); }
.bar[aria-expanded="true"] .pm { transform: rotate(180deg); }
.bar[aria-expanded="true"] .pm-v { transform: scaleY(0); }

/* Scroll-in reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Expanding panels (smooth height via grid rows) ---------- */
/* Collapse a little quicker than expand so switching tabs doesn't feel sluggish */
.panel { display: grid; grid-template-rows: 0fr; background: var(--gmi-ink-2); transition: grid-template-rows .5s var(--ease-io); }
.panel.open { grid-template-rows: 1fr; transition-duration: .65s; }
.panel-inner { overflow: hidden; min-height: 0; }
/* Closing: content fades and lifts quickly while the height collapses. Opening: it settles in slightly after. */
.panel-body { padding: 8px 16px 22px; opacity: 0; transform: translateY(-10px); transition: opacity .3s ease, transform .4s var(--ease-io); }
.panel.open .panel-body { opacity: 1; transform: none; transition: opacity .45s ease .15s, transform .6s var(--ease) .1s; }
.panel.open .stagger > * { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }

.panel-note { margin: 12px 4px 14px; color: var(--muted); font-size: .9rem; }
.panel-note strong { color: var(--paper); }
.panel-lead { margin: 14px 4px 12px; font-size: 1rem; text-align: center; text-wrap: balance; }

/* CTA buttons inside panels */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; max-width: 420px; margin: 16px auto 6px; min-height: 54px; padding: 12px 18px;
  border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1.05rem;
  box-shadow: 0 8px 22px rgba(0,0,0,.28); transition: transform .15s ease, filter .15s ease;
}
.cta svg { width: 1.2em; height: 1.2em; flex: none; }
.cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.cta[hidden] { display: none; }

.checklist { list-style: none; margin: 0 auto; padding: 0; max-width: 420px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checklist li { position: relative; padding: 9px 10px 9px 30px; border-radius: 6px; background: rgba(255,255,255,.05); font-size: .9rem; }
.checklist li::before { content: ""; position: absolute; left: 11px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; background: var(--gmi-red); }

/* Contact lines + copy */
.contact-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; padding: 8px 4px 0; font-size: .9rem; color: var(--muted); }
.contact-line strong, .contact-line a { color: var(--paper); font-weight: 500; word-break: break-all; }
.contact-line strong { user-select: all; -webkit-user-select: all; }
.copy { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; font-size: .78rem; cursor: pointer; }
.copy:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* Network search + locations */
.search { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0 12px; border-radius: 6px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.search:focus-within { border-color: var(--gmi-red); }
.search svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--paper); font: inherit; font-size: 16px; outline: none; }
.search input::placeholder { color: #9d9496; }

.locs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .locs { grid-template-columns: 1fr 1fr; } }
.locs li[hidden] { display: none; }
.loc {
  display: flex; align-items: center; gap: 12px; min-width: 0; height: 100%;
  padding: 14px 14px; border-radius: 6px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); text-decoration: none; color: var(--paper);
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
a.loc:hover { background: rgba(225,37,27,.18); border-color: var(--gmi-red); transform: translateY(-1px); }
a.loc:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
.loc-pin { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gmi-red); }
.loc-pin svg { width: 18px; height: 18px; }
.loc-body { min-width: 0; flex: 1; }
.loc-name { display: block; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.loc-meta { display: block; font-size: .82rem; color: var(--muted); }
.loc-act { flex: none; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
a.loc .loc-act { color: var(--paper); }
.loc[aria-disabled="true"] { opacity: .7; }

/* Team cards */
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .team { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.person { background: var(--paper); color: var(--gmi-ink); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border-top: 4px solid var(--gmi-red); }
.person-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--gmi-red); color: var(--paper); font-weight: 800; letter-spacing: .02em; }
.person-name { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.person-role { font-size: .88rem; color: var(--gmi-red-deep); font-weight: 500; }
.person-org { font-size: .8rem; color: #6b6264; }
.person-lines { list-style: none; margin: 0; padding: 0; font-size: .9rem; display: grid; gap: 2px; }
.person-lines a { color: var(--gmi-ink); text-decoration: none; word-break: break-all; }
.person-lines a:hover { color: var(--gmi-red); }
.person-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pill { flex: 1 1 auto; text-align: center; padding: 9px 12px; border-radius: 999px; border: 1px solid #d9d2d3; color: var(--gmi-ink); text-decoration: none; font-size: .85rem; font-weight: 600; transition: background-color .15s ease, border-color .15s ease; }
.pill:hover { border-color: var(--gmi-red); }
.pill.solid { background: var(--gmi-red); border-color: var(--gmi-red); color: var(--paper); }
.pill.solid:hover { background: var(--gmi-red-deep); }
.pill:focus-visible, .person-lines a:focus-visible { outline: 2px solid var(--gmi-ink); outline-offset: 2px; }

/* ---------- Footer + back to top ---------- */
footer { max-width: var(--col); margin: 0 auto; padding: 28px 16px 84px; text-align: center; font-size: .85rem; color: #a59c9d; }
footer img { width: 96px; height: auto; opacity: .9; }
footer p { margin: 10px 0 0; }
footer a { color: var(--paper); }
footer .fine { font-size: .75rem; color: #8f8687; }

.to-top {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gmi-red); color: var(--paper); box-shadow: 0 8px 22px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .25s ease, transform .25s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 22px; height: 22px; }
.to-top:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

@media (min-width: 761px) {
  .connect { margin-top: -40px; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
  .hero { padding-bottom: 88px; }
}
@media (max-width: 380px) { .checklist { grid-template-columns: 1fr; } }
/* Toned-down motion: the .reduce-motion class is added by JS only when CONFIG.respectReducedMotion is true
   and the visitor's device has "Reduce motion" on. Tab expand/collapse still animates (client's choice). */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
.reduce-motion .reveal { opacity: 1; transform: none; }
.reduce-motion .panel { transition: grid-template-rows .5s var(--ease-io) !important; }
.reduce-motion .panel.open { transition-duration: .65s !important; }
.reduce-motion .panel-body { transition: opacity .3s ease, transform .4s var(--ease-io) !important; }
.reduce-motion .panel.open .panel-body { transition: opacity .45s ease .15s, transform .6s var(--ease) .1s !important; }
.reduce-motion .bar .pm, .reduce-motion .bar .pm-v, .reduce-motion .bar::after { transition: transform .45s var(--ease) !important; }
