@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600,700&subset=latin,latin-ext&display=swap');

:root {
  --navy: #003964;
  --navy-dark: #00284a;
  --ink: #1a1a1a;
  --muted: #3d4c59;
  --beige: #f7f4f0;
  --blue: #eef4f8;
  --mint: #f0f7f2;
  --white: #ffffff;
  --line: #d5e0e8;
  --focus: #005fcc;
  --good: #1b5e20;
  --bad: #8e1b1b;
  --shadow: 0 10px 30px rgba(0, 57, 100, 0.08);
  --radius: 18px;
  --header: 88px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 100% -10%, rgba(0, 57, 100, 0.08), transparent 50%),
    var(--beige);
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: var(--navy); }

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10000;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus { top: 0.75rem; }

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(0, 57, 100, 0.08);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: min-height 0.2s ease, padding 0.2s ease;
}

header.is-scrolled .header-inner {
  min-height: 68px;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.75rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
}

.logo img {
  height: 56px;
  width: auto;
  transition: height 0.2s ease;
}

header.is-scrolled .logo img { height: 42px; }

.logo-text { line-height: 1.15; }

.nav-toggle {
  display: none;
  border: 2px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

nav ul {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-nav a {
  display: inline-block;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

#main-nav a:hover,
#main-nav a.active {
  background: var(--blue);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 8% 4rem;
  border-radius: 28px;
  background:
    radial-gradient(600px 280px at 90% 10%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(145deg, #003964 0%, #0b567f 58%, #1d6d78 100%);
  color: var(--white);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border: 40px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero h1,
.hero .hero-lead,
.hero .motto { color: var(--white); position: relative; }

.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.35rem, 4.6vw + 0.45rem, 4.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: none;
  white-space: nowrap;
}

.hero .hero-lead {
  margin: 0.35rem 0;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 700;
  font-style: normal;
  max-width: 40rem;
}

.hero .motto {
  margin: 0.85rem 0 0.35rem clamp(1.5rem, 6vw, 3.25rem);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  font-style: normal;
  max-width: 36rem;
}

.cta-buttons,
.actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-2px); background: var(--navy-dark); }

.hero .btn { background: var(--white); color: var(--navy); border-color: var(--white); }

.hero .btn:hover { background: var(--beige); }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.hero .btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-secondary:hover { background: var(--navy); color: var(--white); }

.hero .btn-secondary:hover { background: var(--white); color: var(--navy); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.external-icon { margin-right: 0.35rem; font-size: 0.85em; }

.panel,
.source,
.section-screen,
.prose-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem;
  margin: 1.25rem 0;
}

.section-screen { scroll-margin-top: 110px; }

.principles .section-screen {
  margin: 0 0 3.5rem;
}

.principles .section-screen:last-child {
  margin-bottom: 0;
}

.source {
  margin: 0 0 2.75rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.source:hover {
  transform: translateY(-4px);
  border-color: #b7cddd;
  box-shadow: 0 16px 36px rgba(0, 57, 100, 0.12);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 180px;
  padding: 1.25rem;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #b7cddd;
  box-shadow: 0 16px 36px rgba(0, 57, 100, 0.12);
}

.card strong { color: var(--navy); font-size: 1.15rem; }

.card span { color: var(--muted); }

main > h1,
.page-title {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 2rem 0 2.5rem;
}

h2 { color: var(--navy); line-height: 1.25; }

.principles {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.principle-nav {
  position: sticky;
  top: 96px;
  align-self: start;
  scroll-margin-top: 110px;
  overflow: visible;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.8rem;
}

.principle-select-label,
.principle-select { display: none; }

.principle-nav a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}

.principle-nav a[aria-current="true"] { background: var(--blue); }

.principle-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.principle-num {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}

.principle-pager {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.example {
  margin: 0.8rem 0;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--blue);
  border: 1px solid var(--line);
}

.example.good { background: #f3faf4; border-color: #b7dfc0; }

.example.bad { background: #fff6f6; border-color: #f0c2c2; }

.example strong { color: var(--navy); }

.example.good strong { color: var(--good); }

.example.bad strong { color: var(--bad); }

.example strong.em {
  font-weight: 700;
  color: inherit;
}

.source h2 { margin-top: 0; }

.video-card,
figure {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--navy);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-consent {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 1rem;
}

figcaption { margin-top: 0.7rem; color: var(--navy); font-weight: 600; }

address {
  font-style: normal;
  background: var(--white);
  border-left: 4px solid var(--navy);
  border-radius: 0 16px 16px 0;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
}

footer {
  background: var(--navy);
  color: var(--white);
  padding: 1.6rem 1.25rem 2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

footer p { margin: 0.15rem 0; }

footer a,
.cookie-settings {
  color: var(--white);
  font-weight: 400;
}

.cookie-settings,
.cookie-text-btn {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.cookie-text-btn { color: var(--navy); padding: 0.7rem 0.2rem; }

.reveal {
  animation: rise 0.6s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; }
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  background: var(--white);
  color: var(--ink);
  border-top: 4px solid var(--navy);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.16);
  padding: 1rem 1.25rem 1.2rem;
}

.cookie-banner-inner { max-width: var(--max); margin: 0 auto; }

.cookie-banner h2 { margin: 0 0 0.35rem; font-size: 1.2rem; }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 0.9rem; }

.cookie-actions .btn { min-width: 11rem; }

.cookie-panel { display: grid; gap: 0.7rem; margin-top: 0.9rem; }

.cookie-panel[hidden] { display: none; }

.cookie-panel label { display: flex; gap: 0.55rem; align-items: flex-start; }

@media (max-width: 1024px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr; }
  .principle-nav { position: static; }
  .nav-toggle { display: inline-flex; }
  #main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 3px solid var(--navy);
    padding: 0.6rem 1rem 1rem;
  }
  #main-nav.open { display: block; }
  #main-nav ul { flex-direction: column; }
}

@media (max-width: 768px) {
  .principle-links { display: none; }
  .principle-select-label {
    display: block;
    margin: 0 0 0.4rem;
    color: var(--navy);
    font-weight: 700;
  }
  .principle-select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.55rem 0.75rem;
    border: 2px solid var(--navy);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
  }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 3rem 1.25rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .btn, .card, .source, .logo img, .header-inner { transition: none; }
}

@media print {
  header, footer, .nav-toggle, .cta-buttons, .cookie-banner, .principle-nav, .principle-pager { display: none; }
  .hero { background: none; color: black; box-shadow: none; }
  .hero h1, .hero .hero-lead, .hero .motto { color: black; }
}
