/* Civera — site styles (direction B, "Stitch")
   Palette and type live in :root so the brand can evolve in one place. */
:root {
  --ink: #1C1633;
  --ink-2: #4B4566;
  --violet: #5A2A8C;
  --night: #2A1B47;
  --mist: #F6F4F9;
  --white: #FFFFFF;
  --line: #E4E0EC;
  --civic: #2563C9;
  --gender: #7A2FB8;
  --education: #F2B705;
  --community: #1F8A5B;
  --signal: #E5383B;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4.5vw, 5rem);
  --space: clamp(4rem, 8vw, 6.5rem);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; max-width: 38em; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font); line-height: 1.1; }
h2 { font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -.03em; margin-bottom: .5em; }
h3 { font-weight: 800; font-size: 1.2rem; letter-spacing: -.015em; margin-bottom: .5em; line-height: 1.2; }
h4 { font-weight: 600; font-size: .95rem; margin: 1.3em 0 .4em; color: var(--ink-2); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--white); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }

/* Header: sits on the violet hero */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--violet); color: var(--white); }
.header-inner { display: flex; align-items: center; gap: 1.75rem; min-height: 4.75rem; }
.brand img { height: 2.5rem; width: auto; }
.menu { margin-left: auto; display: flex; gap: 1.6rem; font-weight: 600; font-size: .95rem; }
.menu a { text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--education); }
.menu-toggle { display: none; }
.langs { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; font-size: .82rem; font-weight: 600; }
.langs a { display: block; padding: .3rem .5rem; text-decoration: none; border-radius: 6px; }
.langs a[aria-current] { background: var(--white); color: var(--violet); }
.site-header :focus-visible { outline-color: var(--education); }

@media (max-width: 56rem) {
  .header-inner { position: relative; }
  .menu-toggle { display: inline-block; margin-left: auto; cursor: pointer; font: 600 .95rem/1 var(--font); color: var(--white); background: none; padding: .55rem .95rem; border: 1.5px solid var(--white); border-radius: 999px; }
  .menu-toggle[aria-expanded="true"] { background: var(--white); color: var(--violet); }
  .menu { display: none; }
  .menu.open { display: flex; flex-direction: column; gap: .2rem; position: absolute; left: 0; right: 0; top: 100%; background: var(--violet); padding: .5rem var(--gutter) 1.5rem; font-size: 1.15rem; border-top: 1px solid rgba(255,255,255,.2); }
  .langs { margin-left: 0; }
}

/* Hero: violet field, stitched lattice fading in on the right */
.hero { position: relative; overflow: hidden; background: var(--violet); color: var(--white); padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem); }
.hero::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: min(24rem, 30vw); background: url(/static/img/pattern.svg) repeat; background-size: 60px 120px; -webkit-mask: linear-gradient(90deg, transparent, #000 75%); mask: linear-gradient(90deg, transparent, #000 75%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-weight: 800; font-size: clamp(2.6rem, 7vw, 6rem); line-height: .98; letter-spacing: -.045em; margin-bottom: .45em; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--education); }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.5; max-width: 34em; color: #EBDDF7; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }
@media (max-width: 40rem) { .hero::after { width: 6rem; opacity: .6; } }

.btn { display: inline-block; font: 600 1rem/1 var(--font); padding: 1rem 1.5rem; border-radius: 12px; text-decoration: none; border: 2px solid transparent; transition: background-color .15s, color .15s; }
.btn-primary { background: var(--education); color: var(--ink); }
.btn-primary:hover { background: var(--white); }
.btn-quiet { border-color: var(--white); color: var(--white); }
.btn-quiet:hover { background: var(--white); color: var(--violet); }
.btn-light { background: var(--education); color: var(--ink); margin-top: auto; align-self: flex-start; }
.btn-light:hover { background: var(--white); }

/* Sections */
.section { padding: var(--space) 0; }
.intro { font-size: 1.15rem; color: var(--ink-2); margin-bottom: 2.25rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 52rem) { .two-col { grid-template-columns: 1fr; } }

.about p { font-size: 1.12rem; }
.values { margin: 0; }
.values div { padding: .9rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.values div:last-child { border-bottom: 1px solid var(--line); }
.values dt { font-weight: 600; }
.values dd { margin: 0; color: var(--ink-2); }
@media (max-width: 30rem) { .values div { grid-template-columns: 1fr; gap: .2rem; } }

/* Programme areas: photo cards */
.work { background: var(--mist); }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 68rem) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .pillars { grid-template-columns: 1fr; } }
.pillar { --c: var(--ink); background: var(--white); border-radius: var(--radius); overflow: hidden; scroll-margin-top: 6rem; display: flex; flex-direction: column; }
.pillar-civic { --c: var(--civic); } .pillar-gender { --c: var(--gender); }
.pillar-education { --c: var(--education); } .pillar-community { --c: var(--community); }
.pillar-photo { width: 100%; height: 12rem; object-fit: cover; }
.pillar-body { padding: 1.4rem 1.4rem 1.6rem; }
.glyph { width: 1.7rem; height: 1.7rem; margin-bottom: .9rem; }
.glyph rect { fill: var(--c); }
.glyph rect.c { fill: var(--signal); }
.pillar p { color: var(--ink-2); font-size: .98rem; }
.pillar ul { margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.pillar li { position: relative; padding-left: 1.1rem; margin: .3rem 0; }
.pillar li::before { content: ""; position: absolute; left: 0; top: .6em; width: .4rem; height: .4rem; border-radius: 1px; background: var(--c); }

/* How we work */
.approach { background: var(--mist); }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 52rem) { .three { grid-template-columns: 1fr; } }
.approach h3 { padding-top: 1rem; border-top: 3px solid var(--violet); }
.approach p { color: var(--ink-2); }

/* Get involved */
.involve { background: var(--night); color: var(--white); }
.involve .intro { color: #D9D0EA; }
.way { display: flex; flex-direction: column; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.25); }
.way p { color: #E1D9EE; }
.involve :focus-visible { outline-color: var(--education); }

/* Transparency */
.transparency { background: var(--mist); }
.legal { margin: 1.5rem 0 0; }
.legal div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.legal dt { color: var(--ink-2); }
.legal dd { margin: 0; font-weight: 600; }
@media (max-width: 30rem) { .legal div { grid-template-columns: 1fr; gap: .1rem; } }
.docs { list-style: none; margin: 0; padding: 0; }
.docs li { padding: 1rem 1.25rem; background: var(--white); border-radius: 10px; border-left: 4px solid var(--violet); margin-bottom: .75rem; }
.docs strong { display: block; font-weight: 600; }
.docs span { color: var(--ink-2); font-size: .95rem; }
.transparency h3 { margin-top: .4rem; }

/* Contact */
.big-email { display: inline-block; font: 800 clamp(1.6rem, 5vw, 3.6rem)/1.1 var(--font); letter-spacing: -.03em; text-decoration: none; border-bottom: 4px solid var(--education); word-break: break-word; }
.big-email:hover { color: var(--violet); }
.contact-list { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 2.5rem 0 0; }
.contact-list dt { color: var(--ink-2); font-size: .9rem; }
.contact-list dd { margin: 0; font-weight: 600; font-size: 1.1rem; }

/* Footer */
.band { height: 30px; background: url(/static/img/band.svg) repeat-x left center / auto 30px; }
.site-footer { background: var(--night); color: #E1D9EE; }
.site-footer .band { background-color: var(--white); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; font-size: .92rem; }
.footer-inner img { height: 2.25rem; width: auto; margin-bottom: .8rem; }
.footer-meta { text-align: right; }
.footer-meta p { margin-left: auto; }
.footer-meta .credit { color: #B9AECB; font-size: .85rem; }
.footer-langs { display: flex; gap: 1.2rem; justify-content: flex-end; }
@media (max-width: 40rem) { .footer-meta { text-align: left; } .footer-meta p { margin-left: 0; } .footer-langs { justify-content: flex-start; } }

/* 404 */
.notfound main { padding: 4rem var(--gutter); min-height: 80vh; }
.notfound main > a img { height: 2.5rem; width: auto; margin-bottom: 3rem; }
.notfound section { margin-bottom: 2rem; }
.notfound h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .4rem; }

/* ---- Motion: gentle entrance on load and reveal on scroll ---- */
@media (prefers-reduced-motion: no-preference) {
  /* hero entrance */
  .js .hero h1 span, .js .hero .lead, .js .hero .actions { opacity: 0; transform: translateY(28px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
  .js .hero h1 span:nth-child(1) { animation-delay: .05s; }
  .js .hero h1 span:nth-child(2) { animation-delay: .2s; }
  .js .hero .lead { animation-delay: .38s; }
  .js .hero .actions { animation-delay: .52s; }
  .js .hero::after { opacity: 0; animation: fade 1.6s ease .3s forwards, drift 40s linear 1.9s infinite; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes drift { from { background-position: 0 0; } to { background-position: 0 -480px; } }

  /* scroll reveal */
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }

  /* small interactive touches */
  .pillar { transition: transform .35s ease, box-shadow .35s ease; }
  .pillar:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(42, 27, 71, .12); }
  .pillar-photo { transition: transform .6s ease; }
  .pillar:hover .pillar-photo { transform: scale(1.04); }
  .btn { transition: background-color .15s, color .15s, transform .15s; }
  .btn:hover { transform: translateY(-1px); }
}
.site-header { transition: box-shadow .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(28, 22, 51, .25); }

/* International opportunities */
.intl { position: relative; overflow: hidden; background: var(--violet); color: var(--white); }
.intl::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: min(18rem, 24vw); background: url(/static/img/pattern.svg) repeat; background-size: 60px 120px; -webkit-mask: linear-gradient(90deg, transparent, #000 80%); mask: linear-gradient(90deg, transparent, #000 80%); opacity: .55; pointer-events: none; }
.intl-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.intl h2 { color: var(--white); }
.intl-text { font-size: 1.15rem; color: #EBDDF7; max-width: 36em; }
.intl-side ul { list-style: none; margin: 0 0 1.75rem; padding: 0; }
.intl-side li { position: relative; padding: .7rem 0 .7rem 1.6rem; border-top: 1px solid rgba(255,255,255,.22); font-weight: 600; }
.intl-side li:last-child { border-bottom: 1px solid rgba(255,255,255,.22); }
.intl-side li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: .55rem; height: .55rem; border-radius: 2px; background: var(--education); }
.intl :focus-visible { outline-color: var(--education); }
@media (max-width: 52rem) { .intl-inner { grid-template-columns: 1fr; } .intl::after { width: 6rem; opacity: .35; } }
