/* =========================
   Totalförsvarsexpo 2026
   Minimal, typography-led
   ========================= */

:root {
  --bg:#fffef9;
  --text: #0b1220;
  --muted: rgba(11, 18, 32, 0.66);
  --hairline: rgba(11, 18, 32, 0.10);

  /* Subtle Swedish accents */
  --blue: #1b62aa;
  --yellow: #fbcb3c;
  --green: #17793b;

  --max: 1040px;
  --radius: 18px;

  --space-1: 10px;
  --space-2: 14px;
  --space-3: 18px;
  --space-4: 26px;
  --space-5: 38px;
  --space-6: 56px;
  --space-7: 78px;
  --space-8: 112px;

  --shadow: 0 3px 0 rgba(11,18,32,0.06), 0 18px 40px rgba(11,18,32,0.06);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg) url('static/backgroundimage.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overscroll-behavior: none;
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--hairline);
  transform: translateY(-140%);
  transition: transform 180ms ease;
  z-index: 999;
}
.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* Top bar (minimal, static) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.topbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(11,18,32,0.88);
}

/* Small mark */
.mark {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.mark__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.02);
}
.mark__dot--blue {
  background: var(--blue);
}
.mark__dot--yellow {
  background: var(--yellow);
}
.mark__dot--green {
  background: var(--green);
}

.page {
  width: 100%;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

/* Layout spacing: generous, never dense */
.section {
  padding: var(--space-8) 0;
}
@media (max-width: 720px) {
  .section {
    padding: var(--space-7) 0;
  }
}

/* Typography */
.eyebrow {
  margin: 0 0 var(--space-3) 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000000;
  font-family: "Inter", system-ui, sans-serif;
}

.h1 {
  margin: 0 0 var(--space-5) 0;
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hero-logo {
  margin: 0 0 var(--space-5) 0;
  max-width: 1020px;
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 720px) {
  .hero-logo {
    max-width: 560px;
  }
}

.h2 {
  margin: 0 0 var(--space-4) 0;
  font-size: clamp(45px, 3.2vw, 34px);
  line-height: 1.15;
  font-weight: 1200;
  font-style: italic;
  letter-spacing: 0.09em;
  color: #4C7557;
  font-family: "Bodoni Moda", Georgia, serif;
}

.h3 {
  margin: 0 0 var(--space-3) 0;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.005em;
  font-family: "Inter"
}

.lead {
  margin: 0;
  font-size: clamp(1.125rem, 1.25vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2rem; /* Add or increase this */
}

.lead--italic {
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 50px;
  font-style: italic;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-top: 275px;
  letter-spacing: 0.07em;
}

.prose {
  max-width: 72ch;
}
.prose p {
  margin: 0 0 var(--space-3) 0;
  font-size: 17px;
  line-height: 1.7;
}
.prose p:last-child {
  margin-bottom: 0;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

.muted {
  color: var(--muted);
  font-size: 15px;
  max-width: 70ch;
  margin: 0;
  line-height: 1.7;
}

.tiny {
  font-size: 13px;
  margin-top: var(--space-3);
  line-height: 1.6;
}

/* Grid blocks (spacious) */
.grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}

.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}

/* Lists (not dense) */
.list {
  margin: var(--space-4) 0 0 0;
  padding-left: 18px;
  color: rgba(11,18,32,0.90);
  font-size: 15px;
}
.list li {
  margin: 12px 0;
  line-height: 1.6;
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.pillar {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--space-6);
  background: #fff;
  box-shadow: var(--shadow);
  border-left: 10px solid var(--hairline);
  transition: border-color 200ms ease;
}
@media (max-width: 720px) {
  .pillar {
    padding: var(--space-5);
  }
}

.pillar--blue {
  border-left-color: var(--blue);
}

.pillar--yellow {
  border-left-color: var(--yellow);
}

.pillar--green {
  border-left-color: var(--green);
}

/* Downloads */
.downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.downloads__item {
  margin: 0;
}

.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(30,94,255,0.03), rgba(255,211,77,0.02));
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.download:hover {
  transform: translateY(-1px);
  border-color: rgba(11,18,32,0.18);
}
.download:focus {
  outline: none;
  border-color: rgba(30,94,255,0.55);
  box-shadow: 0 0 0 4px rgba(30,94,255,0.10);
}

.download__title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}
.download__meta {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.7);
  flex: 0 0 auto;
}

/* Footer (minimal) */
.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--space-6) 0;
}
.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
}
@media (max-width: 720px) {
  .footer__inner {
    flex-direction: column;
  }
}
.footer__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.footer__meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* =========================
   Scroll-based reveal (CSS-only)
   - Uses modern "view()" timeline when supported.
   - Falls back to static (no hidden content).
   ========================= */

.reveal {
  /* fallback: visible */
  opacity: 1;
  transform: none;
}

@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0.001;
    transform: translateY(18px);
    will-change: transform, opacity;
    animation-name: fadeUp;
    animation-duration: 1ms; /* driven by timeline */
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view();
    /* reveal between 0%..35% of section entering viewport */
    animation-range: entry 0% cover 35%;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0.001;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

.section-image {
  width: 45%;
  height: auto;
  margin-top: var(--space-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.section-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 0 rgba(11,18,32,0.08), 0 24px 48px rgba(11,18,32,0.10);
}

.section-image-full {
  width: 100%;
  height: auto;
  margin-top: var(--space-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #ffffff;
}

/* Notification banner */
.banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #fbcb3c 0%, #ffd700 100%);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  padding: 14px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.banner__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.banner__text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.95);
  line-height: 1.4;
}

.banner__close {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  transition: all 160ms ease;
  color: rgba(11, 18, 32, 0.8);
  flex-shrink: 0;
}

.banner__close:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.banner__close:focus {
  outline: 2px solid rgba(11, 18, 32, 0.4);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .banner__text {
    font-size: 14px;
  }
}
