/* Layout concept: light "marble step" pages, navy bands for emphasis, a rowhouse roofline as the one signature graphic. */
:root {
  --ink: #0e2150;        /* headings, navy bands */
  --text: #2e3150;       /* body copy */
  --muted: #5d6180;      /* secondary copy */
  --violet: #1f4ea3;     /* logo blue: links, focus */
  --sky: #d4ab45;        /* logo gold: accents */
  --sky-soft: #eef2f9;   /* tinted panels */
  --marble: #f6f7fa;     /* page ground */
  --paper: #ffffff;      /* raised surfaces */
  --line: #dde0ea;       /* hairlines */
  --amber: #dcae47;      /* support / give action */
  --amber-ink: #3b2a00;

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.4rem, 5.2vw, 3.9rem);

  --wrap: 72rem;
  --radius: 6px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--marble);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 400; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 650; letter-spacing: 0; }
p { margin: 0; max-width: 66ch; }

a { color: var(--violet); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 92px; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand img { width: 150px; }
@media (max-width: 960px) { .brand img { width: 120px; } }
.brand span { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; }
.brand small { display: block; font-family: var(--font-body); font-size: .78rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: .5rem .7rem; border-radius: var(--radius); }
.nav a:hover { background: var(--sky-soft); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--violet); border-radius: 0; }
.nav .btn { margin-left: .5rem; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .brand span { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    font: inherit; font-size: .95rem; color: var(--ink);
    background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem max(20px, env(safe-area-inset-right, 0px)) 1rem max(20px, env(safe-area-inset-left, 0px));
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--violet); padding-left: .75rem; }
  .nav .btn { margin: 1rem 0 0; text-align: center; border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: .85rem 1.3rem; border-radius: var(--radius); text-decoration: none;
  border: 2px solid transparent; cursor: pointer; font-family: var(--font-body);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1a3270; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-give { background: var(--amber); color: var(--amber-ink); }
.btn-give:hover { background: #c99a30; }
.nav .btn-give { padding: .6rem 1rem; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.on-navy .btn-outline { border-color: #fff; color: #fff; }
.on-navy .btn-outline:hover { background: #fff; color: var(--ink); }

a.btn-primary, button.btn-primary { color: #fff; }
.on-navy a.btn-give, .nav a.btn-give, a.btn-give { color: var(--amber-ink); }
.nav a.btn-give:hover { background: #c99a30; }
.on-navy a.btn-outline { color: #fff; }
.on-navy a.btn-outline:hover { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.paper { background: var(--paper); }
.on-navy { background: var(--ink); color: #d9ddf2; }
.on-navy h2, .on-navy h3 { color: #fff; }
.on-navy a { color: #f0d27e; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--text); }
.on-navy .lede { color: #d9ddf2; }
.muted { color: var(--muted); }
.intro { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }

/* ---------- Home hero ---------- */
.hero { background: linear-gradient(var(--marble) calc(100% - 24px), var(--ink) calc(100% - 24px)); position: relative; }
.hero-body { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2rem, 4vw, 3rem); display: flex; flex-direction: column; gap: 1.5rem; }
.hero h1 { max-width: none; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
@media (max-width: 520px) { .hero h1 br { display: none; } }
.hero .lede { max-width: 46ch; }
.place { font-size: .95rem; color: var(--muted); }
.roofline { display: block; width: 100%; height: clamp(84px, 10.5vw, 150px); margin-bottom: -3px; position: relative; z-index: 1; }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); display: flex; flex-direction: column; gap: 1rem; }
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }

/* ---------- Pillars (home) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.pillar { display: flex; flex-direction: column; gap: .75rem; padding-top: 1.25rem; border-top: 3px solid var(--sky); }
.pillar p { color: #c9cee9; }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.mission {
  font-family: var(--font-display); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 1.7rem); line-height: 1.45;
  color: var(--ink); margin: 0; padding-left: 1.5rem; border-left: 3px solid var(--violet); max-width: 40ch;
}

/* ---------- Steps (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: .5rem; }
.steps li::before {
  content: counter(step); font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--violet);
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Service jump links + detail ---------- */
.jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.jump a { text-decoration: none; color: var(--ink); background: var(--sky-soft); padding: .45rem .8rem; border-radius: 999px; font-size: .92rem; }
.jump a:hover { background: #dfe6f3; }

.service { scroll-margin-top: 110px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 4rem); padding-block: 3rem; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.service:first-of-type { border-top: 0; }
.service > * { min-width: 0; }
.service .summary { font-size: var(--step-1); color: var(--ink); line-height: 1.45; }
.service .detail { display: flex; flex-direction: column; gap: 1.1rem; }
.service h4 { margin: .5rem 0 0; font-size: .95rem; font-weight: 650; color: var(--ink); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1.5rem; }
.ticks li { position: relative; padding-left: 1.2rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--sky); border-radius: 1px; }
@media (max-width: 820px) { .service { grid-template-columns: 1fr; } .ticks { grid-template-columns: 1fr; } }

.note-box { background: var(--sky-soft); border-radius: var(--radius); padding: 1rem 1.25rem; font-size: .97rem; }

/* ---------- Values / principles ---------- */
.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 3rem; margin: 0; }
.defs div { display: flex; flex-direction: column; gap: .35rem; }
.defs dt { font-weight: 650; color: var(--ink); }
.defs dd { margin: 0; }
@media (max-width: 700px) { .defs { grid-template-columns: 1fr; } }

.plain-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .4rem; }

/* ---------- Ways to get involved ---------- */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.way { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; gap: .9rem; }
.way .btn { align-self: flex-start; margin-top: auto; }
.way.give { border-color: var(--amber); box-shadow: inset 0 4px 0 var(--amber); }
@media (max-width: 900px) { .ways { grid-template-columns: 1fr; } }

/* ---------- Stats (pending) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; gap: .25rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--ink); }
.stats dt { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); }
.contact-grid > * { min-width: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
address { font-style: normal; }
.info { display: flex; flex-direction: column; gap: 1.5rem; }
.info h3 { font-size: 1rem; margin-bottom: .25rem; }

form { display: flex; flex-direction: column; gap: 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
label { font-weight: 600; color: var(--ink); font-size: .95rem; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--paper);
  border: 1px solid #b9bed0; border-radius: var(--radius); padding: .7rem .8rem; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sky); outline-offset: 0; border-color: var(--violet); }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { font-weight: 600; color: var(--ink); }
.form-status:empty { display: none; }

.signup { display: flex; flex-wrap: wrap; gap: .5rem; background: none; border: 0; padding: 0; flex-direction: row; }
.signup input { flex: 1 1 14rem; width: auto; }
.signup .form-status { flex-basis: 100%; }

/* ---------- Closing band ---------- */
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta-band .stack { max-width: 40rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1838; color: #b9bedc; font-size: .95rem; }
.site-footer a { color: #e6e9fb; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer-grid > * { min-width: 0; }
.footer-grid h2 { font-size: 1.05rem; color: #fff; font-family: var(--font-body); font-weight: 650; margin-bottom: .75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand .name { font-family: var(--font-display); font-size: 1.4rem; color: #fff; }
.footer-signup label { color: #fff; }
.footer-signup input { background: #13244f; border-color: #33467a; color: #fff; }
.footer-signup .form-status { color: #fff; }
.legal { border-top: 1px solid #1f2d55; padding-block: 1.25rem 2rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Pending content (hidden until GMRT supplies it) ---------- */
[data-pending] { display: none !important; }
html.review [data-pending] { display: revert !important; outline: 2px dashed #e0a800; outline-offset: 6px; position: relative; }
html.review [data-pending]::before {
  content: "Pending: " attr(data-pending); display: block; font: 600 .8rem/1.3 var(--font-body);
  background: #fff3c4; color: #5a4500; padding: .35rem .6rem; margin-bottom: .75rem; border-radius: 4px;
}
html.review .stats[data-pending], html.review .ticks[data-pending] { display: grid !important; }
.review-toggle {
  position: fixed; z-index: 40;
  right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  font: 600 .85rem var(--font-body); background: #fff3c4; color: #5a4500; border: 1px solid #e0a800;
  border-radius: 999px; padding: .55rem .9rem; cursor: pointer; box-shadow: 0 2px 10px rgba(22, 25, 74, .15);
}

/* ---------- Long-form text (privacy) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--step-2); }
.legal a { text-decoration: underline; }

/* ---------- Featured projects + testimonials ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.project { display: flex; flex-direction: column; gap: .6rem; padding-top: 1.25rem; border-top: 3px solid var(--sky); scroll-margin-top: 110px; }
.project h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--step-2); }
.project .area { font-size: .9rem; }
.project .area a { color: var(--muted); }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.quote { margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.5; color: var(--ink); padding-left: 1.25rem; border-left: 3px solid var(--sky); }
.quote blockquote.mission { font-size: clamp(1.35rem, 2.4vw, 1.7rem); max-width: 48ch; }
.quote figcaption { color: var(--muted); font-size: .95rem; padding-left: 1.25rem; max-width: 60ch; }
@media (max-width: 820px) { .projects, .quotes { grid-template-columns: 1fr; } }

/* ---------- Course catalogue ---------- */
.catalog { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; padding: 1.5rem; background: var(--sky-soft); border-radius: var(--radius); scroll-margin-top: 110px; }
.catalog h4 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: var(--step-2); color: var(--ink); }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; margin-top: .5rem; }
.cat-group { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.cat-group h5 { margin: 0; font-size: .95rem; font-weight: 650; color: var(--ink); }
.cat-group .plain-list { gap: .25rem; font-size: .97rem; }
@media (max-width: 700px) { .cat-grid { grid-template-columns: 1fr; } }

/* ---------- Project facts, family band, training form ---------- */
.facts { display: grid; gap: .45rem; margin: .25rem 0 0; padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem; }
.facts div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .75rem; }
.facts dt { font-weight: 650; color: var(--ink); }
.facts dd { margin: 0; }
.family-band { background: var(--sky-soft); }
.family { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 3rem; }
.family .stack { max-width: 44rem; }
.family h2 { font-size: var(--step-2); }
fieldset.cat-group { border: 0; margin: 0; padding: 0; }
fieldset.cat-group legend { font-weight: 650; color: var(--ink); font-size: .95rem; margin-bottom: .4rem; padding: 0; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; color: var(--text); font-size: .95rem; padding: .15rem 0; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; margin-top: .25rem; flex: none; accent-color: var(--violet); }
.courses-pick { margin-top: .4rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.field > .label { font-weight: 600; color: var(--ink); font-size: .95rem; }
