/* =============================================================
   DDUTH — Main Stylesheet
   Defence & Dual Use Technology Hub  ·  dualuse.org.pl
   @import kolejność ma znaczenie
   ============================================================= */
@import '_tokens.css';
@import '_reset.css';
@import '_articles.css';
@import '_listings.css';
@import '_forms.css';


/* =============================================================
   NAWIGACJA
   Zawsze ciemna (navy) — bookend z logotypem i marką.
   ============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--palette-navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background var(--ease-mid);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: var(--nav-height);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Logo + nazwa marki */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
  text-decoration: none;
  color: var(--palette-white);
}

.nav-logo img {
  height: 40px;
  width: auto;
}

/* Logo — zawsze białe (nav zawsze dark) */
.nav-logo img { display: block; }

.nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-brand__main {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--palette-white);
}

.nav-brand__sub {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--palette-steel-200);
}

/* Linki nawigacyjne */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  margin: 0;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--palette-steel-200);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease-fast), background var(--ease-fast);
}

.nav-links a:hover {
  color: var(--palette-white);
  background: rgba(255, 255, 255, 0.07);
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--palette-white);
  border-bottom: 2px solid var(--palette-red);
  border-radius: 0;
  padding-bottom: calc(var(--space-2) - 2px);
}

/* Prawa strona nav */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

/* Przełącznik języka */
.lang-switch {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.lang-switch:hover,
.lang-switch[aria-current="true"] {
  color: var(--palette-white);
}
.lang-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: var(--text-xs);
}

/* Przycisk theme toggle */
.btn-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--palette-steel-200);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color var(--ease-fast), background var(--ease-fast), border-color var(--ease-fast);
  cursor: pointer;
}

.btn-theme:hover {
  color: var(--palette-white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Ikony słońce/księżyc */
.icon-sun  { display: block; }
.icon-moon { display: none; }

[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Mobile: ukryj nav-links, pokaż hamburger (placeholder) */
@media (max-width: 900px) {
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .nav-brand__sub { display: none; }
}


/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--ease-fast),
    color var(--ease-fast),
    border-color var(--ease-fast),
    transform var(--ease-spring);
  white-space: nowrap;
  min-height: 44px; /* WCAG 2.5.5 */
}
.btn:active { transform: scale(0.97); }

/* Primary — czerwony */
.btn-primary {
  background: var(--palette-red);
  color: var(--palette-white);
  border-color: var(--palette-red);
}
.btn-primary:hover {
  background: var(--palette-red-light);
  border-color: var(--palette-red-light);
  color: var(--palette-white);
}

/* Ghost — outline na ciemnym */
.btn-ghost {
  background: transparent;
  color: var(--palette-white);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--palette-white);
}

/* Outline dla jasnego tła */
.btn-outline {
  background: transparent;
  color: var(--accent-text);
  border-color: var(--accent-text);
}
.btn-outline:hover {
  background: var(--accent-subtle);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  min-height: 52px;
}

/* Przycisk CTA w nav */
.nav-cta {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--palette-white);
  background: var(--palette-red);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: background var(--ease-fast);
}
.nav-cta:hover {
  background: var(--palette-red-light);
  color: var(--palette-white);
}


/* =============================================================
   HERO
   Zawsze dark (navy) — niezależnie od trybu.
   Główny "punkt wejścia" i teza strony.
   ============================================================= */
.hero {
  background: var(--palette-navy-900);
  color: var(--palette-white);
  padding-block: var(--space-24) var(--space-20);
  position: relative;
  overflow: hidden;
}

/* Subtelna siatka w tle — technical feel */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero .container { position: relative; }

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--palette-red);
  border: 1px solid var(--accent-border);
  background: var(--accent-subtle);
  padding: var(--space-1) var(--space-4);
  border-radius: 2px;
  margin-bottom: var(--space-8);
}

.hero__heading {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  line-height: var(--leading-tight);
  color: var(--palette-white);
  margin-bottom: var(--space-6);
  max-width: 16ch;
}

/* Wyróżnienie słowa kluczowego */
.hero__heading em {
  font-style: normal;
  color: var(--palette-red);
}

/* Separator z czerwonym punktem — sygnatura projektu */
.hero__rule {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block: var(--space-8);
  max-width: 480px;
}
.hero__rule::before,
.hero__rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}
.hero__rule-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--palette-red);
  flex-shrink: 0;
}

.hero__body {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: rgba(255, 255, 255, 0.68);
  max-width: 52ch;
  margin-bottom: var(--space-10);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Stats pod CTA */
.hero__stats {
  display: flex;
  gap: var(--space-10);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.stat__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--palette-white);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.stat__label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-top: var(--space-1);
}


/* =============================================================
   SEKCJE
   ============================================================= */
.section {
  padding-block: var(--space-20) var(--space-24);
}

.section--surface {
  background: var(--bg-surface);
}

.section__eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--space-3);
}

.section__heading {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.section__lead {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-12);
  line-height: var(--leading-loose);
}


/* =============================================================
   KARTY — TRZY FILARY
   ============================================================= */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.pillar-card {
  padding: var(--space-8);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease-mid), transform var(--ease-mid);
}

.pillar-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.pillar-card--featured {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  position: relative;
}

.pillar-card--featured::before {
  content: 'Wyróżnik';
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 2px var(--space-3);
  border-radius: 2px;
}

.pillar-card__icon {
  width: 44px;
  height: 44px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--accent-text);
}

.pillar-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
}

.pillar-card__body {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: var(--leading-base);
  max-width: none;
}


/* =============================================================
   ABOUT STRIP — krótki opis organizacji
   ============================================================= */
.about-strip {
  padding-block: var(--space-20);
}

.about-strip .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about-strip__eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--space-4);
}

.about-strip__heading {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-5);
}

.about-strip__body {
  color: var(--text-muted);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-6);
}

.about-strip__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-subtle);
}

.about-strip__meta strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 768px) {
  .about-strip .container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}


/* =============================================================
   FOOTER
   Zawsze dark — symetria z nav.
   ============================================================= */
.site-footer {
  background: var(--palette-near-black);
  color: var(--text-subtle);
  padding-block: var(--space-12) var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: end;
  margin-bottom: var(--space-8);
}

.footer__logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.footer__logo-wrap img {
  height: 32px;
  width: auto;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--palette-white);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-subtle);
  margin-top: var(--space-1);
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-end;
}

.footer__nav a {
  font-size: var(--text-sm);
  color: var(--text-subtle);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.footer__nav a:hover { color: var(--palette-steel-200); }

.footer__bottom {
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  max-width: none;
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.footer__legal a:hover { color: var(--palette-steel-200); }

@media (max-width: 640px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav { align-items: flex-start; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}


/* =============================================================
   NAWIGACJA MOBILNA
   ============================================================= */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--palette-white);
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  transition: background var(--ease-fast);
}
.nav-hamburger:hover { background: rgba(255,255,255,.08); }
.nav-hamburger .icon-close { display: none; }

/* CTA i język w liście — ukryte globalnie, widoczne tylko w otwartym menu mobilnym */
.nav-links__mobile-cta  { display: none; }
.nav-links__mobile-lang { display: none; }

@media (max-width: 900px) {
  .nav-links    { display: none; }
  .nav-cta      { display: none; }
  .nav-hamburger { display: flex; }

  /* Ukryj napis marki — zostaje sam symbol logo */
  .nav-brand    { display: none; }

  /* Trzymaj toggle i hamburger przy prawej krawędzi */
  .nav-actions  { margin-left: auto; }

  /* Przenieś język do menu mobilnego */
  .nav-actions .lang-switch,
  .nav-actions .lang-sep { display: none; }

  /* Dropdown */
  .site-header.nav--open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--palette-navy-800);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: var(--space-2) var(--container-pad) var(--space-5);
    gap: 0;
    z-index: 99;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
  }

  .site-header.nav--open .nav-links li + li {
    border-top: 1px solid rgba(255,255,255,.05);
  }

  .site-header.nav--open .nav-links a {
    display: block;
    padding: var(--space-4) 0;
    font-size: var(--text-base);
    border-radius: 0;
    border-bottom: none;
  }

  /* CTA na końcu menu mobilnego */
  .site-header.nav--open .nav-links__mobile-cta {
    display: block;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255,255,255,.1) !important;
  }

  .site-header.nav--open .nav-links__mobile-cta .nav-cta {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }

  /* Język na końcu menu mobilnego */
  .site-header.nav--open .nav-links__mobile-lang {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) 0 var(--space-2);
    border-top: 1px solid rgba(255,255,255,.05);
  }
  .site-header.nav--open .nav-links__mobile-lang .lang-switch {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--text-subtle);
    padding: 0;
    text-decoration: none;
    transition: color var(--ease-fast);
  }
  .site-header.nav--open .nav-links__mobile-lang .lang-switch:hover,
  .site-header.nav--open .nav-links__mobile-lang .lang-switch[aria-current] {
    color: var(--palette-white);
  }
  .site-header.nav--open .nav-links__mobile-lang .lang-sep {
    color: rgba(255,255,255,.2);
    font-size: var(--text-xs);
  }

  /* Hamburger → X */
  .nav--open .nav-hamburger .icon-burger { display: none; }
  .nav--open .nav-hamburger .icon-close  { display: block; }
}


/* =============================================================
   BREADCRUMB — subtelny i dostępny (WCAG: linki nie czerwone,
   szary spełnia kontrast, aria-current wyróżniony)
   ============================================================= */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-bottom: var(--space-6);
}
.breadcrumb a {
  color: var(--text-subtle);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
}
.breadcrumb [aria-current] {
  color: var(--text-muted);
}
