/* pkes.gig.eu – Polski Komitet Elektrostatyki SEP
   Plain CSS, no build step. Colours and type are custom properties below.
   Square corners everywhere (border-radius: 0). No inline styles (CSP). */

/* Archivo (SIL OFL 1.1, see ../fonts/OFL-archivo.txt): variable weight 100–900, width 62–125 % */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0e2233;        /* hero, contact band, footer */
  --navy-2: #173550;      /* lines and borders on navy */
  --blue: #2589cf;        /* SEP blue (from the SEP logo) */
  --blue-ink: #17679f;    /* links and accents on white (AA contrast) */
  --spark: #ffd23f;       /* the discharge: primary buttons, positive charge */
  --paper: #ffffff;
  --mist: #eef3f7;
  --ink: #13212d;
  --muted: #4c5d6b;
  --on-navy: #c4d8e8;

  --font: "Archivo", "Segoe UI", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 4rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--spark); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--spark); color: var(--navy); padding: 0.6rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  font-weight: 700;
  font-stretch: 112%;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.2;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--spark { background: var(--spark); color: var(--navy); }
.btn--spark:hover { background: #fff; }
.btn--line { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--line:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn--blue { background: var(--blue-ink); color: #fff; }
.btn--blue:hover { background: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid var(--navy-2);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: inline-flex; align-items: baseline; gap: 0.4rem; color: #fff; text-decoration: none; }
.brand__mark { font-weight: 800; font-stretch: 125%; font-size: 1.35rem; letter-spacing: 0.02em; }
.brand__sub { font-weight: 500; font-stretch: 100%; font-size: 1rem; color: var(--spark); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.main-nav a {
  display: block; padding: 0.5rem 0.85rem; color: var(--on-navy); text-decoration: none; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="true"] { color: #fff; border-bottom-color: var(--spark); }

.menu-toggle { display: none; }

@media (max-width: 47.99rem) {
  .js .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; padding: 0; margin-right: -0.5rem;
    background: transparent; border: 0; color: #fff; cursor: pointer;
    -webkit-appearance: none; appearance: none;
  }
  .menu-toggle__lines, .menu-toggle__lines::before, .menu-toggle__lines::after {
    display: block; width: 1.5rem; height: 2px; background: currentColor; position: relative;
    transition: transform 0.2s, background-color 0.2s;
  }
  .menu-toggle__lines::before, .menu-toggle__lines::after { content: ""; position: absolute; left: 0; }
  .menu-toggle__lines::before { top: -7px; }
  .menu-toggle__lines::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__lines { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__lines::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__lines::after { transform: translateY(-7px) rotate(-45deg); }

  .js .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy); border-bottom: 1px solid var(--navy-2);
    display: none;
  }
  .js .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 0.5rem var(--gutter) 1rem; }
  .main-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--navy-2); }
  html:not(.js) .site-header__inner { height: auto; flex-wrap: wrap; padding-top: 0.75rem; padding-bottom: 0.25rem; }
  html:not(.js) .main-nav ul { flex-direction: row; flex-wrap: wrap; padding: 0; }
  html:not(.js) .main-nav a { padding: 0.5rem 0.75rem 0.5rem 0; border: 0; }
}

/* ---------- Hero: field lines ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  min-height: min(52rem, calc(100svh - var(--header-h)));
  display: flex; align-items: center;
  isolation: isolate;
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
/* keeps the text side calm and readable over the lines */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--navy) 0%, rgba(14, 34, 51, 0.9) 32%, rgba(14, 34, 51, 0.3) 55%, rgba(14, 34, 51, 0) 70%);
}
.hero__inner { padding-top: clamp(3rem, 9vh, 6rem); padding-bottom: clamp(4rem, 11vh, 7rem); pointer-events: none; }
.hero__inner a { pointer-events: auto; }
.hero__title {
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.3rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.hero__line { display: block; }
.hero__org {
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 500;
  color: var(--on-navy);
  padding-left: 0.9rem;
  border-left: 4px solid var(--spark);
}
.hero__lead { max-width: 34rem; margin: 2rem 0 0; font-size: 1.15rem; color: #e6eff6; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2.25rem 0 0; }
.hero__hint {
  position: absolute; right: var(--gutter); bottom: 1.25rem; margin: 0; max-width: 18rem;
  font-size: 0.8125rem; line-height: 1.4; color: var(--on-navy); text-align: right; opacity: 0.8;
  display: none;
}
@media (hover: hover) and (pointer: fine) and (min-width: 64rem) { .js .hero__hint { display: block; } }

/* the canvas starts empty and fades in when the lines are ready */
.js .hero__field { opacity: 0; transition: opacity 0.6s; }
.js .hero__field.is-ready { opacity: 1; }

@media (max-width: 47.99rem) {
  .hero { min-height: 0; align-items: flex-start; }
  .hero::before { background: linear-gradient(180deg, rgba(14, 34, 51, 0.15) 0%, rgba(14, 34, 51, 0.85) 45%, var(--navy) 75%); }
  .hero__inner { padding-top: 11rem; padding-bottom: 3rem; }
  .hero__title { font-stretch: 112%; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--mist { background: var(--mist); }
.section--rule { border-top: 1px solid #d5e0e9; }
.section--navy { background: var(--navy); color: #fff; }
.section h2 {
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  letter-spacing: -0.005em;
  margin-bottom: 1.5rem;
}
.section h3 { font-weight: 700; font-stretch: 110%; font-size: 1.2rem; margin-bottom: 0.6rem; }

/* About */
.about { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.about__text { max-width: 40rem; }
.about__lead { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; font-weight: 500; }
.about__aside { border-left: 4px solid var(--blue); padding: 0.25rem 0 0.25rem 1.5rem; }
.about__count { font-size: 1.05rem; }
.about__count strong { font-stretch: 120%; font-weight: 800; font-size: 1.6rem; color: var(--blue-ink); }
.sep { display: flex; align-items: center; gap: 0.9rem; margin-top: 1.5rem; color: var(--ink); text-decoration: none; font-size: 0.95rem; line-height: 1.4; }
.sep img { flex: none; }
.sep:hover span { text-decoration: underline; }
@media (max-width: 47.99rem) { .about { grid-template-columns: 1fr; } }

/* Areas */
.areas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--navy); }
.areas__intro, .area { padding: 1.75rem 1.5rem 2rem 0; }
.area { padding-left: 1.5rem; border-left: 1px solid #c9d6e1; border-bottom: 1px solid #c9d6e1; }
.areas__intro { border-bottom: 1px solid #c9d6e1; padding-right: 2rem; }
.areas__intro h2 { margin-bottom: 1rem; font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.areas__intro p { color: var(--muted); }
.area h3::before {
  content: ""; display: block; width: 1.75rem; height: 3px; margin-bottom: 1rem; background: var(--blue);
}
.area p { color: var(--muted); font-size: 1rem; }
/* 4th column: the item that starts a row has no left rule */
.area:nth-child(4n + 1) { border-left: 0; padding-left: 0; }
@media (max-width: 63.99rem) {
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area:nth-child(4n + 1) { border-left: 1px solid #c9d6e1; padding-left: 1.5rem; }
  .area:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}
@media (max-width: 35.99rem) {
  .areas { grid-template-columns: 1fr; }
  .area, .area:nth-child(4n + 1) { border-left: 0; padding-left: 0; }
}

/* Presidium */
.presidium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.presidium__item { border-top: 2px solid var(--navy); padding-top: 1rem; }
.presidium__item p { margin: 0; }
.presidium__role { font-size: 0.9375rem; font-weight: 600; color: var(--blue-ink); margin-bottom: 0.6rem !important; }
.presidium__name { font-weight: 700; font-stretch: 112%; font-size: 1.3rem; line-height: 1.25; }
.presidium__name .person__title { display: block; font-weight: 400; font-stretch: 100%; font-size: 0.9375rem; color: var(--muted); }
.presidium__inst { color: var(--muted); margin-top: 0.4rem !important; }
.presidium__mail { margin-top: 0.4rem !important; font-size: 0.9375rem; overflow-wrap: anywhere; }
@media (max-width: 63.99rem) { .presidium { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 35.99rem) { .presidium { grid-template-columns: 1fr; } }

/* Members: filter + table */
.members__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; align-items: end; margin-bottom: 2rem; }
.members__head h2 { margin-bottom: 0; }
.members__head p { color: var(--muted); max-width: 30rem; }
@media (max-width: 47.99rem) { .members__head { grid-template-columns: 1fr; } }

.filter { display: none; }
.js .filter { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.filter__field { margin: 0; }
.filter label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.35rem; }
.filter input, .filter select {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 0.7rem 0.85rem;
  border: 2px solid #9fb2c2; background: #fff;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.filter select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2313212d' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center;
}
.filter input:focus, .filter select:focus { border-color: var(--navy); }
.filter__status { grid-column: 1 / -1; margin: 0; font-size: 0.9375rem; color: var(--muted); }
@media (max-width: 47.99rem) {
  .js .filter { grid-template-columns: 1fr; }

}

.table-wrap { border-top: 2px solid var(--navy); }
.members { width: 100%; border-collapse: collapse; }
.members thead th {
  text-align: left; font-size: 0.875rem; font-weight: 600; color: var(--muted);
  padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid #c9d6e1;
}
.members tbody th, .members td { text-align: left; vertical-align: top; padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid #dde6ee; font-weight: 400; }
.members tbody tr:hover { background: #f6f9fb; }
.members tbody th { width: 38%; }
.members td:last-child { overflow-wrap: anywhere; }
.person__title { color: var(--muted); font-size: 0.9375rem; }
.person__name { font-weight: 700; }
.tag {
  display: table; margin-top: 0.35rem; padding: 0.1rem 0.5rem;
  font-size: 0.8125rem; font-weight: 600; background: var(--mist); color: var(--blue-ink);
  border-left: 3px solid var(--spark);
}
.members__empty { padding: 1.5rem 0; color: var(--muted); }
@media (max-width: 47.99rem) {
  .members thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .members, .members tbody, .members tr, .members tbody th, .members td { display: block; width: auto; }
  .members tbody tr { padding: 1rem 0; border-bottom: 1px solid #dde6ee; }
  .members tbody th, .members td { border: 0; padding: 0.1rem 0; }
  .members tbody th { width: auto; margin-bottom: 0.25rem; }
}

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem 4rem; align-items: start; }
.contact__lead { color: var(--on-navy); font-size: 1.15rem; max-width: 24rem; }
.contact__card { border-left: 4px solid var(--spark); padding-left: 1.5rem; color: var(--on-navy); }
.contact__card a { color: #fff; }
.contact__name { font-weight: 700; font-stretch: 112%; font-size: 1.4rem; color: #fff; margin-bottom: 0.4rem; }
.contact__mail { font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 700; font-stretch: 110%; overflow-wrap: anywhere; }
.contact__mail a { text-decoration-color: var(--spark); }
@media (max-width: 47.99rem) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy); border-top: 1px solid var(--navy-2); font-size: 0.9375rem; }
.site-footer__inner { display: grid; grid-template-columns: auto 1fr; gap: 1rem 2rem; padding-top: 2rem; padding-bottom: 2rem; align-items: center; }
.site-footer__org { display: flex; align-items: center; gap: 0.9rem; margin: 0; line-height: 1.35; color: #fff; }
.site-footer__org img { flex: none; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1.5rem; }
.site-footer a { color: var(--on-navy); }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: #fff; }
.site-footer__host { grid-column: 1 / -1; margin: 0; padding-top: 1rem; border-top: 1px solid var(--navy-2); font-size: 0.875rem; }
@media (max-width: 47.99rem) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer nav ul { justify-content: flex-start; }
}

/* ---------- Text pages (accessibility statement) ---------- */
.page-head { background: var(--navy); color: #fff; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.page-head h1 { font-weight: 800; font-stretch: 120%; font-size: clamp(2rem, 4.5vw, 3.4rem); }
.page-head p { margin: 0.9rem 0 0; color: var(--on-navy); }
.page-head a { color: #fff; }
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-stretch: 112%; margin: 2.75rem 0 1rem; }
.prose h3 { margin: 2rem 0 0.75rem; }
.prose > section > h2:first-child { margin-top: 2.75rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35rem; }

/* ---------- 404 ---------- */
.notfound { position: relative; overflow: hidden; background: var(--navy); color: #fff; isolation: isolate; }
.notfound .hero__field { z-index: -2; }
.notfound::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--navy) 0%, rgba(14, 34, 51, 0.9) 40%, rgba(14, 34, 51, 0.2) 75%);
}
.notfound__inner { padding-top: clamp(3.5rem, 10vh, 7rem); padding-bottom: clamp(3.5rem, 10vh, 7rem); pointer-events: none; }
.notfound__inner a { pointer-events: auto; }
.notfound__code {
  display: block; font-weight: 900; font-stretch: 125%;
  font-size: clamp(5rem, 16vw, 11rem); line-height: 0.9; color: var(--spark); letter-spacing: -0.02em;
}
.notfound h1 { font-weight: 800; font-stretch: 118%; font-size: clamp(1.9rem, 4vw, 3rem); margin-top: 1rem; }
.notfound__lead { max-width: 34rem; margin-top: 1.25rem; color: #e6eff6; font-size: 1.1rem; }
.notfound__hint { font-size: 1.05rem; font-stretch: 100%; font-weight: 600; margin: 2.5rem 0 0.75rem; color: var(--on-navy); }
.notfound__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.notfound__links a { color: #fff; font-weight: 600; }
.notfound .hero__actions { margin-top: 2rem; }
