/* SUWAT — suwat.gig.eu
   Plain CSS, no framework. Colours taken from the original project banner:
   graphite #2B2D3A, teal #37ACBE (decorative only – too light for text on white),
   darker teal #0B6A7B for links and text accents (contrast ≥ 5.5:1 on white). */

/* ---------- Fonts (self-hosted, see assets/fonts/README.md) ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-700.woff2") format("woff2"); }

:root {
  --graphite: #2b2d3a;
  --graphite-2: #3a3d4e;
  --teal: #37acbe;
  --teal-dark: #0b6a7b;
  --teal-tint: #e8f5f7;
  --stripe: #e8e8ea;
  --ink: #23252f;
  --muted: #5a5e6e;
  --line: #dcdde2;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --radius: 4px;
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--graphite); margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p, ul, ol, dl, blockquote, figure { margin: 0 0 1.1em; }
strong { font-weight: 700; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--graphite); color: #fff; padding: 0.7rem 1rem; font-weight: 600;
  border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(43, 45, 58, 0.1); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }

.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--graphite); }
.brand__mark {
  display: inline-block; font-weight: 700; font-size: 1.55rem; letter-spacing: 0.06em;
  color: #fff; background: var(--graphite); padding: 0.1rem 1.1rem 0.1rem 0.75rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.7rem) 100%, 0 100%);
  border-bottom: 4px solid var(--teal);
}
.brand__text { font-size: 0.72rem; line-height: 1.3; color: var(--muted); max-width: 17rem; font-weight: 600; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--graphite);
  background: none; border: 2px solid var(--graphite); border-radius: var(--radius);
  padding: 0.45rem 0.8rem; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 1.2rem; height: 2px; background: currentColor; position: relative; transition: transform 0.2s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
.no-js .nav-toggle { display: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; text-decoration: none; color: var(--graphite); font-weight: 600; font-size: 0.95rem;
  padding: 0.55rem 0.2rem; border-bottom: 3px solid transparent; white-space: nowrap;
}
.site-nav a:hover { color: var(--teal-dark); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--teal); }

@media (max-width: 1179.98px) {
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 4px solid var(--teal);
    box-shadow: 0 12px 24px rgba(43, 45, 58, 0.15);
    padding: 0.5rem var(--gutter) 1rem;
    max-height: calc(100vh - 4.5rem); overflow-y: auto;
  }
  .js .site-nav.is-open { display: block; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 4px 0 0 var(--teal); padding-left: 0.8rem; }
  .no-js .site-header__inner { flex-wrap: wrap; padding-block: 0.5rem; }
  .no-js .site-nav ul { display: flex; flex-wrap: wrap; gap: 0 1rem; }
}
@media (min-width: 1180px) {
  .nav-toggle { display: none; }
  .site-nav ul { display: flex; gap: 1.4rem; }
}
@media (max-width: 520px) { .brand__text { display: none; } }

/* ---------- Home hero (recreates the project banner in HTML) ---------- */
.hero { position: relative; background: var(--graphite); color: #fff; overflow: hidden; }
.hero__grid { display: grid; min-height: 26rem; }
.hero__photo { position: relative; min-height: 14rem; }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__body { position: relative; padding: 2.5rem var(--gutter) 6rem; display: flex; flex-direction: column; justify-content: flex-end; }
.hero__kicker { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.8rem; }
.hero h1 { color: #fff; font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.35; max-width: 34rem; }
.hero__cz { font-size: 0.95rem; color: #c9cbd6; max-width: 34rem; margin: 0; }
.hero__band {
  position: absolute; right: 0; bottom: 0; height: 4.5rem; width: 100%;
  background: var(--teal); display: flex; align-items: center; justify-content: flex-end;
  padding-inline: var(--gutter);
}
.hero__band span { font-weight: 700; font-size: 2.6rem; letter-spacing: 0.06em; color: #fff; line-height: 1; }
.hero__stripes {
  height: 1.6rem;
  background: repeating-linear-gradient(-55deg, var(--stripe) 0 14px, #fff 14px 26px);
}
@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; min-height: 30rem; }
  .hero__photo { clip-path: polygon(0 0, 78% 0, 100% 100%, 0 100%); margin-right: -12%; z-index: 1; }
  .hero__body { padding: 3rem var(--gutter) 7rem 3rem; align-items: flex-end; text-align: right; }
  .hero h1, .hero__cz { margin-left: auto; }
  .hero__band { width: 62%; clip-path: polygon(2.6rem 0, 100% 0, 100% 100%, 0 100%); }
  .hero__band span { font-size: 3.4rem; }
}

/* ---------- Funding logos strip ---------- */
.funding { background: #fff; border-bottom: 1px solid var(--line); padding-block: 1.25rem; }
.funding img { width: 100%; max-width: 54rem; margin-inline: auto; }
.funding p { text-align: center; font-size: 0.9rem; color: var(--muted); margin: 0.8rem auto 0; max-width: 54rem; }

/* ---------- Page head (inner pages) ---------- */
.page-head {
  position: relative; background: var(--graphite); color: #fff; overflow: hidden;
  padding-block: clamp(2.2rem, 6vw, 3.6rem) clamp(2.6rem, 6vw, 4rem);
}
.page-head::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 38%;
  background: linear-gradient(115deg, transparent 0 22%, var(--graphite-2) 22% 100%);
}
.page-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.55rem; background: var(--teal);
}
.page-head .container { position: relative; }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: #c9cbd6; margin: 0.6rem 0 0; max-width: 46rem; }
.breadcrumb { font-size: 0.85rem; margin-bottom: 0.7rem; }
.breadcrumb a { color: #fff; }
.breadcrumb span { color: #c9cbd6; }

/* ---------- Sections and prose ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section--soft { background: var(--bg-soft); }
.section__title { position: relative; padding-bottom: 0.5rem; margin-bottom: 1.4rem; }
.section__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.5rem; height: 4px; background: var(--teal); }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.35rem; }
.lead { font-size: 1.15rem; color: var(--graphite); }
.quote {
  margin: 1.4rem 0; padding: 0.4rem 0 0.4rem 1.2rem; border-left: 4px solid var(--teal);
  font-style: italic; color: var(--graphite);
}
.quote footer { font-style: normal; font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
.note { background: var(--teal-tint); border-left: 4px solid var(--teal); padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; }
.note > :last-child { margin-bottom: 0; }

/* Facts list */
.facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; gap: 0.2rem 1.5rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; color: var(--graphite); font-size: 0.9rem; }
.facts dd { margin: 0; }
@media (min-width: 640px) { .facts > div { grid-template-columns: 10rem 1fr; } }

.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.25fr 1fr; align-items: start; } }

/* Cards linking to sections */
.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); list-style: none; padding: 0; margin: 0; }
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--teal);
  padding: 1.3rem 1.3rem 1.2rem; border-radius: 0 0 var(--radius) var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 10px 24px rgba(43, 45, 58, 0.12); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.4rem; font-size: 1.1rem; }
.card h3 a { color: var(--graphite); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.card:focus-within { outline: 3px solid var(--teal-dark); outline-offset: 2px; }
.card h3 a:focus-visible { outline: none; }

/* News entries (O projekcie) */
.entry { padding-block: 2rem; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; padding-top: 0; }
.entry__date { display: inline-block; font-size: 0.85rem; font-weight: 700; color: #fff; background: var(--graphite); padding: 0.15rem 0.6rem; border-radius: var(--radius); margin-bottom: 0.8rem; }
.entry h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }

/* Partners */
.partners { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .partners { grid-template-columns: 1fr 1fr; } }
.partner { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 2rem); }
.partner__logo { height: 7.5rem; display: flex; align-items: center; margin-bottom: 1.2rem; }
.partner__logo img { max-height: 100%; width: auto; }
.partner__role { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 0.3rem; }
.partner h2 { font-size: 1.3rem; }
.partner p { font-size: 0.98rem; }

/* Document lists */
.docs { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.docs li { border-bottom: 1px solid var(--line); }
.docs a {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center;
  padding: 0.75rem 0.4rem; text-decoration: none; color: var(--ink);
}
.docs a:hover { background: var(--teal-tint); }
.docs a:hover .docs__title { text-decoration: underline; }
.docs__icon {
  font-size: 0.68rem; font-weight: 700; color: #fff; background: #b4232a; padding: 0.15rem 0.35rem; border-radius: 2px; letter-spacing: 0.04em;
}
.docs__title { font-weight: 600; color: var(--teal-dark); }
.docs__title small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.docs__meta { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }

.workshop { margin-bottom: 3rem; }
.workshop__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; }
.workshop__head h2 { margin-bottom: 0.4rem; }

/* Publications (media) */
.media-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.media-list li { border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.2rem; background: #fff; }
.media-list__source { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.2rem; }
.media-list a { font-weight: 600; }
.media-list p:last-child { margin-bottom: 0; }

/* Gallery */
.album { margin-bottom: 3.5rem; }
.album__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1.5rem; margin-bottom: 1.2rem; }
.album__head h2 { margin: 0; }
.album__head p { margin: 0; color: var(--muted); }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.gallery a { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); border-radius: var(--radius); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery a:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox { padding: 0; border: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(20, 21, 28, 0.94); color: #fff; }
.lightbox::backdrop { background: rgba(20, 21, 28, 0.8); }
.lightbox__stage { position: absolute; inset: 3.5rem 1rem 4.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8rem; }
.lightbox__img { max-width: 100%; max-height: calc(100% - 3rem); object-fit: contain; }
.lightbox__caption { margin: 0; font-size: 0.95rem; text-align: center; }
.lightbox__btn {
  position: absolute; width: 3rem; height: 3rem; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; display: grid; place-items: center;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox__btn svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 0.8rem; right: 0.8rem; }
.lightbox__prev { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.8rem; top: 50%; transform: translateY(-50%); }
.lightbox__open { position: absolute; left: 50%; bottom: 1.2rem; transform: translateX(-50%); color: #fff; font-size: 0.9rem; }
.lightbox :focus-visible { outline-color: #fff; }
body.lightbox-open { overflow: hidden; }

/* Contact */
.contact-card { background: var(--bg-soft); border-top: 4px solid var(--teal); padding: clamp(1.3rem, 3vw, 2rem); border-radius: 0 0 var(--radius) var(--radius); }
.contact-card address { font-style: normal; }
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; }
.contact-card dt { font-weight: 700; }
.contact-card dd { margin: 0; }

/* Accessibility statement */
.statement h2 { margin-top: 2.4rem; }
.statement section > h2:first-child { margin-top: 2.4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--graphite); color: #d6d8e0; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-logos { background: #fff; padding-block: 1.25rem; border-top: 1px solid var(--line); }
.footer-logos img { width: 100%; max-width: 54rem; margin-inline: auto; }
.footer-main { display: grid; gap: 2rem; padding-block: 2.5rem 1.5rem; }
@media (min-width: 860px) { .footer-main { grid-template-columns: 1.4fr 1fr; } }
.footer-main p { font-size: 0.92rem; margin-bottom: 0.7rem; }
.footer-title { font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: 0.6rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.footer-nav a { display: inline-block; padding: 0.25rem 0; text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-block: 1.2rem 1.6rem; font-size: 0.85rem; }
.footer-bottom p { margin: 0 0 0.4rem; }

/* 404 */
.error-page { text-align: left; }

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .nav-toggle, .skip-link, .footer-nav, .hero__stripes { display: none !important; }
  .page-head, .hero, .site-footer { background: none; color: #000; }
  .page-head h1, .hero h1 { color: #000; }
  a { color: #000; }
}
