/* ==========================================================================
   ISC2 East of England Chapter — site styles
   No framework, no build step. Edit the tokens below to re-theme.
   ========================================================================== */

:root {
  --navy-900: #071528;
  --navy-800: #0b1f3a;
  --navy-700: #13305a;
  --green-600: #2f8f4e;
  --green-500: #3ba55c;
  --green-100: #e5f4ea;
  --purple-500: #5b4fa8;
  --ink: #16202e;
  --ink-muted: #4a5668;
  --line: #dde3ea;
  --surface: #ffffff;
  --surface-alt: #f4f7fa;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(7, 21, 40, .06), 0 8px 24px rgba(7, 21, 40, .06);
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy-800); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1em; }

a { color: var(--green-600); text-underline-offset: 3px; }
a:hover { color: var(--navy-700); }

:focus-visible { outline: 3px solid var(--green-500); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--navy-800); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy-800); }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; font-weight: 800; }
.brand-text span { font-size: .8rem; color: var(--ink-muted); font-weight: 500; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .5rem; cursor: pointer; color: var(--navy-800);
}
.nav-toggle svg { width: 24px; height: 24px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  display: block; padding: .5rem .85rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); font-weight: 550; font-size: .95rem;
}
.site-nav a:hover { background: var(--surface-alt); color: var(--navy-800); }
.site-nav a[aria-current="page"] { color: var(--green-600); background: var(--green-100); }
.site-nav .btn { margin-left: .5rem; }
.site-nav .btn:hover { background: var(--green-600); color: #fff; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .site-nav a { padding: .8rem .75rem; }
  .site-nav .btn { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-500); color: #fff; }
.btn-primary:hover { background: var(--green-600); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-outline { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline:hover { background: var(--navy-800); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(91, 79, 168, .45), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(59, 165, 92, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(4rem, 9vw, 6rem);
}
.hero::after {
  /* subtle grid texture */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: rgba(255,255,255,.85); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-500); margin-bottom: 1rem;
}
.hero .eyebrow { color: #8fe0a8; }

.page-hero { padding: clamp(3rem, 7vw, 4.5rem) 0; }
.page-hero h1 { max-width: none; }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-muted); font-size: 1.1rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1.1fr .9fr; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card p { color: var(--ink-muted); }
.card p:last-child { margin-bottom: 0; }
.card .card-link { margin-top: auto; font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.card .card-link:hover { text-decoration: underline; }

a.card { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover { transform: translateY(-3px); border-color: var(--green-500); box-shadow: 0 12px 32px rgba(7,21,40,.1); }

.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-600); margin-bottom: 1rem; flex: none;
}
.icon svg { width: 24px; height: 24px; }
.icon.purple { background: #ecebf7; color: var(--purple-500); }
.icon.navy { background: #e6ecf4; color: var(--navy-700); }

/* ---------- Steps ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li {
  counter-increment: step; position: relative; padding: 1.25rem 1.25rem 1.25rem 4.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step); position: absolute; left: 1.25rem; top: 1.2rem;
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-800); color: #fff; font-weight: 700; font-size: .95rem;
}
.steps h3 { margin-bottom: .25rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-muted); }

/* ---------- Officers ---------- */

.officer { align-items: flex-start; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--navy-700), var(--purple-500));
}
.officer .role {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-600);
  margin-bottom: .25rem;
}
.officer h3 { margin-bottom: .1rem; }
.officer .creds { color: var(--ink-muted); font-size: .95rem; margin: 0; }

/* ---------- Callout / CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #fff; border-radius: calc(var(--radius) * 1.5);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid; gap: 1.5rem; grid-template-columns: 1fr auto; align-items: center;
}
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { color: rgba(255,255,255,.8); margin: 0; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

.callout {
  border-left: 4px solid var(--green-500); background: var(--green-100);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink);
}
.callout p:last-child { margin: 0; }

/* ---------- Lists ---------- */

.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .65rem; }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.region-tags { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.region-tags li {
  padding: .35rem .85rem; border-radius: 999px; font-size: .9rem; font-weight: 600;
  background: #fff; border: 1px solid var(--line); color: var(--navy-700);
}

/* ---------- FAQ ---------- */

.faq { display: grid; gap: .75rem; max-width: 820px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.25rem;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; font-weight: 650; color: var(--navy-800);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--green-600);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 1.1rem; color: var(--ink-muted); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Contact ---------- */

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list .icon { margin: 0; }
.contact-list strong { display: block; color: var(--navy-800); }
.contact-list span { color: var(--ink-muted); }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-900); color: rgba(255,255,255,.75); padding: 3.5rem 0 2rem; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand-text span { color: rgba(255,255,255,.6); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; color: rgba(255,255,255,.55);
}

/* ---------- Utilities ---------- */

.text-muted { color: var(--ink-muted); }
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }
.stack-sm > * + * { margin-top: .75rem; }
.pt-0 { padding-top: 0; }
