/* ═══════════════════════════════════════════════════════
   Outokummun Pursiseura ry
   ═══════════════════════════════════════════════════════ */

/* ─── Reset & tokens ───────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;

  /* Brand */
  --navy-900: #06182c;
  --navy-800: #0d2d50;
  --navy-700: #17416e;
  --brass:    #c07f3e;

  /* Neutrals */
  --bg:        #f2f6fa;
  --surface:   #ffffff;
  --surface-2: #f4f8fc;
  --fg:        #0f1e2e;
  --muted:     #536578;
  --muted-2:   #7d8d9e;
  --border:    #e1e9f1;

  /* Accent */
  --accent:       #14639f;
  --accent-dark:  #0f4c7c;
  --accent-light: #e7f0f8;

  /* Type */
  --font:       'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Shape */
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(13,45,80,0.05), 0 1px 3px rgba(13,45,80,0.04);
  --shadow-md: 0 4px 14px rgba(13,45,80,0.08), 0 2px 4px rgba(13,45,80,0.04);
  --shadow-lg: 0 18px 42px rgba(13,45,80,0.13), 0 4px 12px rgba(13,45,80,0.06);

  /* Layout */
  --max-w:      1120px;
  --max-w-text: 760px;
  --nav-h:      68px;
  --gutter:     clamp(1.15rem, 4vw, 2.5rem);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Prevent double-tap-to-zoom on interactive elements (mobile) */
a, button, .btn, input, select, textarea, label {
  touch-action: manipulation;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--fg);
  caret-color: var(--fg);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img, video {
  max-width: 100%;
  display: block;
}

/* ─── Typography ───────────────────────────────────── */
h1, h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--fg);
}

h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg);
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2.05rem); }
h3 { font-size: 1.0625rem; }

p { color: var(--muted); }

a {
  color: inherit;
  text-decoration: none;
}

strong, b { color: var(--fg); font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s;
  overflow-wrap: anywhere;
}

.text-link:hover { color: var(--accent-dark); }

/* ─── Layout ───────────────────────────────────────── */
.site-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  background-image: radial-gradient(circle, rgba(20, 99, 159, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

.site-main > * { flex-shrink: 0; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--max-w-text); }

.section { padding-block: clamp(2.75rem, 5.5vw, 4.75rem); }

.section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.two-col {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ─── Header / nav ─────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 45, 80, 0.94);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

@supports (backdrop-filter: blur(8px)) {
  header { backdrop-filter: blur(12px) saturate(150%); }
}

.nav {
  max-width: var(--max-w);
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav-links > li { position: relative; }

.nav-links > li > a,
.nav-links > li > label {
  position: relative;
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.74);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.nav-links > li > a:hover,
.nav-links > li > a:focus-visible,
.nav-links > li > label:hover,
.nav-links > li > label:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.09);
}

.nav-links > li > a.is-active { color: #fff; }

.nav-links > li > a.is-active::after {
  content: '';
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brass);
}

.caret {
  display: inline-block;
  font-size: 0.8em;
  line-height: 1;
  opacity: 0.75;
  margin-left: 0.2rem;
  transition: transform 0.2s ease;
}

.submenu-toggle { display: none; }

/* ─── Dropdown ─────────────────────────────────────── */
.dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  list-style: none;
  background: var(--navy-800);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  min-width: 210px;
  padding: 0.35rem;
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

/* invisible bridge so hover isn't lost crossing the gap */
.dropdown::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.nav-links > li:hover > .dropdown,
.nav-links > li:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.dropdown li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.09);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 0.35rem 0.3rem;
}

/* ─── Hamburger ────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background 0.18s;
}

.hamburger:hover { background: rgba(255,255,255,0.09); }

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}

.nav-toggle { display: none; }

.nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s, color 0.18s, border-color 0.18s;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active { transform: translateY(0); }

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: #bcd6ea;
  box-shadow: none;
}

.btn--outline:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.45);
  backdrop-filter: blur(6px);
  box-shadow: none;
}

.btn--ghost:hover {
  background: #fff;
  color: var(--navy-800);
  border-color: #fff;
}

.btn--light {
  background: #fff;
  color: var(--navy-800);
}

.btn--light:hover {
  background: var(--accent-light);
  color: var(--navy-800);
}

/* ─── Section headings ─────────────────────────────── */
.section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--brass);
  flex-shrink: 0;
}

.section-header,
.section-head {
  max-width: 62ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.section-head h2 { margin-top: 0.6rem; }
.section-head p  { margin-top: 0.7rem; }

/* ─── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy-800);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 42%;
  transform: scale(1.02);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,24,44,0.42) 0%, rgba(6,24,44,0.14) 38%, rgba(6,24,44,0.86) 100%),
    linear-gradient(90deg, rgba(6,24,44,0.42) 0%, rgba(6,24,44,0) 60%);
}

.hero-inner {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
}

.hero--home { min-height: clamp(390px, 60vh, 560px); }
.hero--page { min-height: clamp(180px, 25vw, 290px); }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.85rem;
}

.hero-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--brass);
  flex-shrink: 0;
}

.hero-title {
  color: #fff;
  font-size: clamp(2rem, 1.25rem + 3.4vw, 3.5rem);
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}

.hero--page .hero-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.7rem); }

.hero-lead {
  color: rgba(255,255,255,0.9);
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
  max-width: 48ch;
  margin-top: 0.9rem;
  text-shadow: 0 1px 16px rgba(0,0,0,0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

/* ─── Facts ────────────────────────────────────────── */
.facts {
  position: relative;
  z-index: 2;
  margin-top: -2.75rem;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.fact {
  background: var(--surface);
  padding: 1.35rem 1rem;
  text-align: center;
}

.fact-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy-800);
}

.fact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 0.35rem;
}

/* ─── Intro / prose ────────────────────────────────── */
.intro { padding-block: clamp(2.5rem, 5vw, 4rem); }

.intro h2 { margin-bottom: 0.9rem; }

.intro p + p { margin-top: 1rem; }

.prose p + p { margin-top: 1rem; }

.prose ul, .prose ol { padding-left: 1.3rem; margin: 0.75rem 0; color: var(--muted); }

.lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 62ch;
}

/* ─── Post cards ───────────────────────────────────── */
.posts { padding-block: clamp(2.75rem, 5.5vw, 4.75rem); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #c6dbec;
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.post-card-no-img {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.5), transparent 62%),
    linear-gradient(135deg, #dde9f4 0%, #bed6ec 100%);
}

.post-card-no-img::after {
  content: '';
  width: 52px;
  height: 52px;
  opacity: 0.35;
  background-color: var(--navy-800);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 1.5v5M12 17.5v5M1.5 12h5M17.5 12h5M4.6 4.6l3.5 3.5M15.9 15.9l3.5 3.5M19.4 4.6l-3.5 3.5M8.1 15.9l-3.5 3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 1.5v5M12 17.5v5M1.5 12h5M17.5 12h5M4.6 4.6l3.5 3.5M15.9 15.9l3.5 3.5M19.4 4.6l-3.5 3.5M8.1 15.9l-3.5 3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.post-card-body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.post-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 0.4rem;
}

.post-card-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-content p:last-child { margin-bottom: 0; }

.post-card-footer {
  margin-top: auto;
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.post-card-footer svg { transition: transform 0.2s; }
.post-card:hover .post-card-footer svg { transform: translateX(3px); }

.posts-empty {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2rem;
}

/* ─── Full post list ───────────────────────────────── */
.post-list-section { padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }

/* Reading-width columns for document lists and long-form posts */
.doc-section > .container,
.post-list-section > .container { max-width: 900px; }

.post-full {
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.post-full:hover {
  border-color: #c6dbec;
  box-shadow: var(--shadow-md);
}

.post-full-body { padding: clamp(1.25rem, 3vw, 2rem); }

.post-full-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.4rem;
}

.post-full-header h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  overflow-wrap: break-word;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.post-author::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
}

.post-full-body p {
  font-size: 0.97rem;
  line-height: 1.72;
  color: var(--muted);
  overflow-wrap: break-word;
}

.post-full-body p + p { margin-top: 0.9rem; }

.post-full-body ul,
.post-full-body ol,
.post-card-body ul,
.post-card-body ol {
  padding-left: 1.3rem;
  margin: 0.6rem 0;
  color: var(--muted);
}

.post-full-body a,
.post-card-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.post-full-body a:hover,
.post-card-body a:hover { color: var(--accent-dark); }

.post-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.post-img-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  background: var(--surface-2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-img-grid img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

/* ─── Documents ────────────────────────────────────── */
.doc-section { padding-block: clamp(2rem, 4vw, 3rem); }

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 58px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.doc-row:hover {
  border-color: #bcd6ea;
  background: #fbfdff;
  box-shadow: var(--shadow-md);
}

.doc-row::after {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: var(--muted-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v8'/%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5'/%3E%3Cpath d='M2.5 13.5h11'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v8'/%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5'/%3E%3Cpath d='M2.5 13.5h11'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color 0.2s, transform 0.2s;
}

.doc-row:hover::after {
  background-color: var(--accent);
  transform: translateY(2px);
}

.doc-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-light);
  color: var(--accent);
  flex-shrink: 0;
}

.doc-name {
  flex: 1;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.doc-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid #cfe2f1;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ─── Doc archive ──────────────────────────────────── */
.doc-archive { margin-top: 0.25rem; }

.doc-archive-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.doc-archive-toggle::-webkit-details-marker { display: none; }

.doc-archive-toggle::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}

details[open] .doc-archive-toggle::before { transform: rotate(45deg); }

.doc-archive-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.doc-archive-list { margin-top: 0.5rem; }

/* ─── Members ──────────────────────────────────────── */
.members { padding-block: clamp(2.5rem, 5vw, 4rem); }

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 0.85rem;
}

.member-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.member-info h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.member-role {
  font-size: 0.82rem;
  color: var(--muted);
}

.member-contact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.84rem;
  color: var(--muted);
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  overflow-wrap: anywhere;
}

.member-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  transition: color 0.2s;
  width: fit-content;
}

.member-contact a:hover { color: var(--accent); }

/* ─── Contact band ─────────────────────────────────── */
.contact {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  color: #fff;
}

.contact h2 { color: #fff; margin-bottom: 0.85rem; }
.contact p  { color: rgba(255,255,255,0.82); max-width: 60ch; }
.contact .section-tag { color: #9cc4e6; }
.contact .text-link { color: #fff; text-decoration-color: rgba(255,255,255,0.5); }
.contact .text-link:hover { color: #fff; text-decoration-color: #fff; }
.contact .btn { margin-top: 1.5rem; }
.col-label { padding-top: 0.35rem; }

/* ─── Footer ───────────────────────────────────────── */
footer {
  background: var(--navy-900);
  padding-block: clamp(2.25rem, 4vw, 3rem) 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand img { height: 34px; width: auto; }

.footer-tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  max-width: 34ch;
}

.footer-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.9rem;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.62);
}

.footer-list a,
.footer-inner a {
  color: rgba(255,255,255,0.62);
  transition: color 0.2s;
  overflow-wrap: anywhere;
}

.footer-list a:hover,
.footer-inner a:hover { color: #fff; }

.footer-bottom {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: color 0.2s;
}

.footer-link-btn:hover { color: #fff; }

/* ─── Modal (privacy notice, etc.) ─────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-head h3 { font-size: 0.95rem; font-weight: 600; color: var(--fg); }

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius);
  transition: color 0.15s;
}

.modal-close:hover { color: var(--fg); }

.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--fg);
}

.modal-body p { margin-bottom: 1rem; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body a { color: var(--accent); }

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  gap: 0.2rem;
}

/* ─── Forms ────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(20,99,159,0.15);
}

/* ─── Alerts ───────────────────────────────────────── */
.alert {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ─── Login ────────────────────────────────────────── */
.login-wrapper {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 8vh, 5rem) var(--gutter);
  background: var(--surface-2);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.login-card .section-tag {
  display: flex;
  margin-bottom: 0.75rem;
}

.login-card h2 { margin-bottom: 1.75rem; }

.login-btn {
  width: 100%;
  padding: 0.8rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.login-btn:hover { background: var(--accent-dark); }

.login-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0 1.25rem;
}

.login-footer {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin: 0.6rem 0;
}

/* ─── Gallery ──────────────────────────────────────── */
.gallery-section { padding-block: clamp(2.5rem, 5vw, 4rem); }

.gallery-block { margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }

.gallery-block-title {
  text-align: center;
  font-size: clamp(1.25rem, 1.1rem + 0.9vw, 1.7rem);
  margin-bottom: 1rem;
}

.gallery-block-desc {
  text-align: center;
  max-width: 60ch;
  margin: -0.5rem auto 1.1rem;
  font-size: 0.95rem;
}

.gallery-block video {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: #000;
}

.slideshow {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b1a2a;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-md);
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  cursor: zoom-in;
}

.slideshow .slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(6,24,44,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.slide-btn:hover {
  background: rgba(6,24,44,0.8);
  transform: translateY(-50%) scale(1.06);
}

.slide-btn--prev { left: 0.75rem; }
.slide-btn--next { right: 0.75rem; }

.slide-dots {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 80%;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(6,24,44,0.35);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.dot:hover { background: rgba(255,255,255,0.75); }

.dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ─── Competition gallery ──────────────────────────── */
.comp-gallery {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.comp-year-header {
  background: var(--navy-800);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  padding: 0.7rem 1rem;
}

.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.comp-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 0.85rem;
  text-align: center;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.comp-entry:last-child { border-right: none; }

.comp-place {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.comp-entry img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}

.comp-entry img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.comp-title {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.comp-author {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--fg);
}

/* ─── Lightbox ─────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 14, 26, 0.92);
  backdrop-filter: blur(6px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: default;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
}

.lightbox-close:hover { background: rgba(255,255,255,0.28); }

.lightbox-nav:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-50%) scale(1.06);
}

.lightbox-nav--prev { left: 1rem; }
.lightbox-nav--next { right: 1rem; }

/* ─── Post inline attachments ──────────────────────── */
.post-doc-list { flex-direction: row; flex-wrap: wrap; }

.post-doc-list .doc-row {
  min-height: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  gap: 0.5rem;
  box-shadow: none;
}

.post-doc-list .doc-row::after { display: none; }

.post-doc-list .doc-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.post-doc-list .doc-icon svg { width: 13px; height: 13px; }

.post-doc-list .doc-name { flex: 0 1 auto; }

.post-doc-list .doc-type {
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
}

/* ═══ Responsive ═══════════════════════════════════ */
@media (max-width: 940px) {
  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    background: var(--navy-800);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.28);
    padding: 0.6rem var(--gutter) 1.1rem;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0.3s;
  }

  .nav-toggle:checked ~ .nav-links {
    max-height: calc(100vh - var(--nav-h));
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
  }

  .nav-links > li > a,
  .nav-links > li > label {
    padding: 0.7rem 0.6rem;
    font-size: 1rem;
  }

  .nav-links > li > a.is-active {
    padding-left: 0.9rem;
    background: rgba(255,255,255,0.08);
  }

  .nav-links > li > a.is-active::after {
    left: 0;
    right: auto;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 3px;
    height: auto;
  }

  .caret { float: right; }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid rgba(255,255,255,0.18);
    border-radius: 0;
    padding: 0;
    margin: 0 0 0 0.6rem;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease, margin-bottom 0.25s ease;
  }

  .submenu-toggle:checked ~ .dropdown {
    max-height: 400px;
    padding: 0.2rem 0 0.2rem 0.75rem;
    margin-bottom: 0.5rem;
  }

  .submenu-toggle:checked ~ label .caret { transform: rotate(180deg); }

  .dropdown::before { display: none; }

  .dropdown li a { padding: 0.5rem 0.4rem; font-size: 0.92rem; }
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .comp-entry img { height: 190px; }
}

@media (max-width: 580px) {
  .logo { font-size: 0.95rem; }
  .nav-logo-img { height: 30px; }
  .comp-grid { grid-template-columns: 1fr; }
  .comp-entry { border-right: none; border-bottom: 1px solid var(--border); }
  .comp-entry:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; }
  .facts { margin-top: -1.75rem; }
  .hero-actions .btn,
  .btn-row .btn { flex: 1 1 auto; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-nav--prev { left: 0.5rem; }
  .lightbox-nav--next { right: 0.5rem; }
}

@media (max-width: 380px) {
  .logo { font-size: 0.88rem; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
