/* ==========================================================================
   Ugandans Association in Poland — site.css
   Palette derived from the Ugandan flag (black / gold / red) as used in the
   association logo. Structure: the flag's six horizontal bands are reused as
   the site's signature device (hero spine, section rules, footer edge).
   ========================================================================== */

:root {
  /* Flag + brand */
  --ink:        #121110;   /* flag black, warmed slightly */
  --ink-2:      #26221E;
  --gold:       #FCDC04;   /* flag gold */
  --gold-warm:  #F0C300;
  --red:        #D90000;   /* flag red */
  --red-deep:   #A50000;   /* accessible red for text/links on light */

  /* Neutrals */
  --paper:      #FFFFFF;
  --mist:       #F1F0EE;
  --mist-2:     #E6E4E0;
  --line:       #D8D5D0;
  --muted:      #5C5852;

  /* Type */
  --display: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
  --body:    "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Metrics */
  --wrap: 1180px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --band: 7px;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--red-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ------------------------------------------------------- i18n switching -- */
/* Two language variants live side by side; the inactive one is hidden.      */
html[data-lang="en"] .i18n[lang="pl"] { display: none; }
html[data-lang="pl"] .i18n[lang="en"] { display: none; }

/* ----------------------------------------------------------- utilities -- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: var(--ink); padding: .75rem 1.25rem;
  font-weight: 700;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* The flag device: six bands, black / gold / red twice over. */
.bands { display: flex; flex-direction: column; }
.bands span { flex: 1; }
.bands span:nth-child(1), .bands span:nth-child(4) { background: var(--ink); }
.bands span:nth-child(2), .bands span:nth-child(5) { background: var(--gold); }
.bands span:nth-child(3), .bands span:nth-child(6) { background: var(--red); }

.bands--row { flex-direction: row; height: var(--band); width: 100%; }

/* Statute reference marker — every section states the article it comes from */
.ref {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .9rem;
}
.ref::before {
  content: "";
  width: 26px; height: 3px;
  background: var(--gold);
  display: inline-block;
}
.ref b { color: var(--ink); font-weight: 600; text-transform: none; letter-spacing: .04em; }

/* ------------------------------------------------------------- header -- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .bands--row { height: 4px; }

.head-inner {
  display: flex; align-items: center; gap: 1.25rem;
  padding: .6rem 0;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: 46px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-txt strong {
  font-family: var(--display);
  font-size: 1rem; font-weight: 800; letter-spacing: -.015em;
}
.brand-txt span { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  color: var(--ink); text-decoration: none;
  font-size: .93rem; font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--red); }

.lang { display: flex; border: 1px solid var(--ink); }
.lang button {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  padding: .35rem .6rem; background: transparent; color: var(--ink);
  border: 0; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--gold); }

.burger {
  display: none; margin-left: .5rem;
  background: var(--ink); color: var(--paper); border: 0;
  padding: .55rem .7rem; cursor: pointer; font-family: var(--mono); font-size: .75rem;
}

/* --------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(3.2rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.6vw, 5.1rem);
  line-height: .95;
  letter-spacing: -.035em;
  margin: 0 0 1.25rem;
  max-width: 15ch;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede {
  font-size: clamp(1.03rem, 1.5vw, 1.22rem);
  color: #DCD8D2;
  max-width: 54ch;
  margin: 0 0 2rem;
}
.eyebrow {
  font-family: var(--mono);
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}
.hero-emblem { position: relative; width: clamp(180px, 26vw, 330px); }
.hero-emblem img { width: 100%; filter: drop-shadow(0 18px 40px rgba(0,0,0,.55)); }

/* vertical flag spine on the hero's right edge */
.spine {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: clamp(14px, 2.2vw, 30px);
}
.spine span:nth-child(1), .spine span:nth-child(4) { background: #38342F; }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.6rem;
  font-weight: 700; font-size: .95rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #fff; color: var(--ink); }
.btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--red-deep); color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--gold); }

/* founding facts strip under the hero */
.facts {
  background: var(--gold);
  color: var(--ink);
}
.facts-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(18,17,16,.16);
}
.fact { background: var(--gold); padding: 1.4rem 1.3rem; }
.fact dt {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(18,17,16,.7); margin-bottom: .35rem;
}
.fact dd {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: 1.12rem; line-height: 1.2; letter-spacing: -.01em;
}

/* ------------------------------------------------------------ sections -- */
.section { padding: clamp(3.4rem, 7vw, 6rem) 0; }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .ref { color: #9C968D; }
.section--ink .ref b { color: var(--gold); }

.section h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0 0 1rem;
  max-width: 20ch;
}
.section h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -.015em;
  margin: 0 0 .5rem;
}
.section p { max-width: 68ch; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
}

/* article list — used for §1–§3 and §6–§8 */
.artlist { list-style: none; margin: 0; padding: 0; }
.artlist li {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 1rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
}
.artlist li:last-child { border-bottom: 1px solid var(--line); }
.artlist .art {
  font-family: var(--mono); font-size: .82rem; font-weight: 500;
  color: var(--red-deep); padding-top: .18rem;
}
.artlist p { margin: 0; }
.section--ink .artlist li { border-color: rgba(255,255,255,.16); }
.section--ink .artlist .art { color: var(--gold); }

/* objective cards — §4 */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 2.2rem;
}
.card {
  background: var(--paper);
  padding: 1.9rem 1.6rem 1.7rem;
  position: relative;
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 100%; height: 4px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.card:hover::before { transform: scaleX(1); }
.card .num {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  color: var(--muted); display: block; margin-bottom: .9rem;
}
.card p { font-size: .96rem; color: var(--ink-2); margin: 0; }

.section--mist .cards { background: var(--mist-2); border-color: var(--mist-2); }
.section--mist .card { background: var(--paper); }

/* method rows — §5 */
.methods { display: grid; gap: 1px; background: rgba(255,255,255,.18); margin-top: 2.2rem; }
.method { background: var(--ink); padding: 1.5rem 0; display: grid; grid-template-columns: 46px 1fr; gap: 1.2rem; align-items: baseline; }
.method .k { font-family: var(--mono); color: var(--gold); font-size: .85rem; }
.method p { margin: 0; color: #DCD8D2; }

/* governance — §9–§12 */
.org { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; margin-top: 2.4rem; }
.org-box { border: 1px solid var(--line); background: var(--paper); }
.org-box header { padding: 1.25rem 1.4rem .9rem; border-bottom: 1px solid var(--line); }
.org-box header .ref { margin-bottom: .5rem; }
.org-box header h3 { margin: 0; }
.org-box .body { padding: 1.2rem 1.4rem 1.4rem; }
.org-box .body p { font-size: .94rem; margin: 0 0 1rem; color: var(--ink-2); }

.people { list-style: none; margin: 0; padding: 0; }
.people li { padding: .6rem 0; border-top: 1px dashed var(--line); }
.people li:first-child { border-top: 0; }
.people .name { font-weight: 700; display: block; }
.people .role {
  display: block;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red-deep);
  margin-bottom: .15rem;
}

.term-note {
  margin-top: 1.6rem; font-size: .9rem; color: var(--muted);
  border-left: 4px solid var(--gold); padding-left: 1rem;
}

/* Uganda at a glance */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: rgba(255,255,255,.2); margin-top: 2.4rem; }
.glance div { background: var(--ink); padding: 1.4rem 1.2rem; }
.glance dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.glance dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; }

/* news / empty state */
.newsgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 2.2rem; }
.news-item { border: 1px solid var(--line); background: var(--paper); padding: 1.5rem; }
.news-item time { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--red-deep); text-transform: uppercase; }
.news-item h3 { margin: .6rem 0 .5rem; }
.news-item p { font-size: .94rem; color: var(--ink-2); margin: 0; }

.empty {
  margin-top: 2.2rem;
  border: 2px dashed var(--line);
  padding: clamp(2rem, 5vw, 3.4rem);
  text-align: center;
  background: var(--paper);
}
.empty p { margin: 0 auto 1.4rem; color: var(--muted); max-width: 46ch; }

/* membership CTA */
.join-band {
  background: var(--red);
  color: #fff;
  padding: clamp(2.6rem, 6vw, 4.2rem) 0;
}
.join-band h2 { color: #fff; margin-bottom: .8rem; }
.join-band p { color: rgba(255,255,255,.92); margin-bottom: 1.8rem; }
.join-band .btn--gold:hover { background: var(--ink); color: var(--gold); }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 2.4rem; }
.contact-grid h3 { margin-bottom: .3rem; }
.contact-grid p { font-size: .96rem; margin: 0 0 .3rem; }
.todo {
  border-bottom: 2px dotted var(--red);
  background: #FFF6D6;
  padding: 0 .2rem;
}

/* --------------------------------------------------------------- forms -- */
.form { margin-top: 2.4rem; max-width: 780px; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .4rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin: .3rem 0 0; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field textarea,
.field select {
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--body);
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--gold); outline-offset: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: .8rem; align-items: start; margin-bottom: 1rem; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--red); }
.legal {
  margin-top: 2rem; padding: 1.4rem 1.5rem;
  background: var(--mist); border-left: 5px solid var(--gold);
  font-size: .87rem; color: var(--ink-2);
}
.legal h3 { font-size: .98rem; margin-bottom: .5rem; }

/* --------------------------------------------------------- statute page -- */
.doc-head { background: var(--ink); color: #fff; padding: clamp(2.6rem, 6vw, 4.4rem) 0; }
.doc-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 .8rem; }
.doc-head p { color: #CFCAC3; max-width: 60ch; margin: 0; }

.notice {
  background: #FFF6D6; border: 1px solid var(--gold-warm);
  padding: 1.1rem 1.3rem; font-size: .9rem; margin: 2rem 0 0;
}
.notice strong { display: block; margin-bottom: .3rem; }

.doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.toc { position: sticky; top: 108px; align-self: start; }
.toc h2 { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: .35rem; }
.toc a { font-size: .88rem; text-decoration: none; color: var(--ink); border-left: 3px solid var(--line); padding-left: .7rem; display: block; }
.toc a:hover { border-left-color: var(--red); color: var(--red-deep); }

.chapter { margin-bottom: 2.8rem; }
.chapter > h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -.02em;
  padding-bottom: .6rem; border-bottom: 3px solid var(--ink);
  margin: 0 0 1.6rem;
}
.article { margin-bottom: 1.9rem; }
.article h3 {
  font-family: var(--display); font-size: 1.08rem; margin: 0 0 .55rem;
  display: flex; align-items: baseline; gap: .7rem;
}
.article h3 .par { font-family: var(--mono); color: var(--red-deep); font-size: .95rem; }
.article ol, .article ul { margin: .5rem 0 0; padding-left: 1.3rem; }
.article li { margin-bottom: .4rem; }
.article p { margin: 0 0 .5rem; }

/* -------------------------------------------------------------- footer -- */
.site-foot { background: var(--ink); color: #B9B4AC; padding-top: 0; }
.foot-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; padding: clamp(2.6rem, 5vw, 4rem) 0 2rem; }
.foot-inner h3 { font-family: var(--display); color: #fff; font-size: 1rem; margin: 0 0 .8rem; }
.foot-inner ul { list-style: none; margin: 0; padding: 0; }
.foot-inner li { margin-bottom: .45rem; }
.foot-inner a { color: #B9B4AC; text-decoration: none; font-size: .93rem; }
.foot-inner a:hover { color: var(--gold); }
.foot-brand img { width: 88px; margin-bottom: 1rem; }
.foot-brand p { font-size: .9rem; margin: 0; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 1.2rem 0 2rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* -------------------------------------------------------------- motion -- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- responsive -- */
@media (min-width: 640px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .cards { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 900px) {
  .burger { display: inline-block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); flex-direction: column; align-items: stretch;
    gap: 0; padding: .5rem 1.25rem 1.5rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { color: #fff; padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--gold); }
  .lang { margin-top: 1rem; align-self: flex-start; border-color: var(--gold); }
  .lang button { color: #fff; }
  .lang button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }

  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-emblem { width: 150px; order: -1; }
  .spine { display: none; }
  .facts-inner { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; }
  .toc ol { display: flex; flex-wrap: wrap; gap: .4rem; }
  .toc a { border-left: 0; border: 1px solid var(--line); padding: .3rem .6rem; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .facts-inner { grid-template-columns: 1fr; }
  .artlist li { grid-template-columns: 1fr; gap: .3rem; }
  .foot-bottom { flex-direction: column; }
}

@media print {
  .site-head, .site-foot, .cta-row, .lang, .burger, .toc { display: none; }
  body { font-size: 11pt; }
  .doc-head { background: #fff; color: #000; }
}

/* featured news item with a flyer */
.news-item--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 1.8rem; align-items: start; }
.news-figure { display: block; border: 1px solid var(--line); }
.news-figure img { width: 100%; height: auto; }
.news-figure:hover { border-color: var(--red); }
.news-item--feature time { display: block; margin-bottom: .1rem; }
.news-item--feature h3 { font-size: 1.5rem; letter-spacing: -.02em; }
.news-meta { margin-top: .9rem; font-size: .92rem; color: var(--muted); }
@media (max-width: 820px) { .news-item--feature { grid-template-columns: 1fr; gap: 1.2rem; } }
