/* ==========================================================================
   EU Citizens' Rights Network — style.css
   One stylesheet for the whole site. System fonts only. No external assets.
   Palette: river navy, star gold, steel blue, paper white.
   Rebuilt as a zero-data information service: no form styles remain because
   the site has no forms.
   ========================================================================== */

:root {
  --navy: #003399;        /* EU flag blue — headers, footer, hero */
  --navy-deep: #001a4d;   /* footer base */
  --ink: #1e2a36;         /* body text on light: 13.9:1 on paper */
  --steel: #0040bf;       /* links: 7+:1 on white */
  --steel-dark: #002d80;  /* link hover */
  --gold: #ffcc00;        /* EU flag yellow — stars, rules, buttons; decorative + large UI only */
  --gold-soft: #ffdb4d;
  --paper: #fcfcfa;
  --mist: #eef2f6;        /* alternate section background */
  --line: #d8dfe6;
  --focus: #b3520e;       /* focus ring: 4.7:1 on paper */
  --max: 72rem;
  --prose: 46rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

/* ---- Accessibility helpers ---------------------------------------------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

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

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

/* ---- Layout -------------------------------------------------------------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { display: block; }

/* ---- Header & navigation -------------------------------------------------- */

.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}
.brand img { display: block; border-radius: 8px; }
.brand-name {
  font-family: var(--serif);
  line-height: 1.2;
}
.brand-name .region {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.brand-name .org {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 6px;
  font: inherit;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: rgba(255,255,255,0.12); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.97rem;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); }
.site-nav a[aria-current="page"] {
  background: rgba(255,255,255,0.16);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.site-nav a.nav-cta {
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 700;
  margin-left: 0.35rem;
}
.site-nav a.nav-cta:hover { background: var(--gold-soft); }

@media (max-width: 47.9rem) {
  .nav-toggle { display: inline-block; }
  .site-nav { flex-basis: 100%; }
  .site-nav[hidden] { display: none; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 0.75rem;
  }
  .site-nav a { padding: 0.7rem 0.75rem; }
  .site-nav a.nav-cta { margin-left: 0; text-align: center; }
}
@media (min-width: 48rem) {
  .site-nav[hidden] { display: block; } /* JS only collapses nav on small screens */
}

/* ---- Hero ------------------------------------------------------------------ */
/* The blue panel is deliberately narrower than the page — roughly the span
   between the bridge abutments in the scene below — and its bottom fades to
   transparent so the blue dissolves onto the white page. */

.hero { padding: 1.5rem 0 0; }

.hero-panel {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 6.5rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, var(--navy) 0%, #0f47c2 55%, rgba(15, 71, 194, 0) 100%);
  border-radius: 18px 18px 0 0;
}
.hero-panel h1 {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  font-weight: 600;
  color: #fff;
}
.hero-panel h1 .hero-row { display: block; white-space: nowrap; }
@media (max-width: 30rem) {
  .hero-panel h1 .hero-row { white-space: normal; }
}
.hero-panel .lede {
  font-size: 1.15rem;
  max-width: 38rem;
  color: #e6ecf3;
  margin: 0 auto 1.75rem;
}
.hero-actions {
  margin: 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-scene {
  position: relative;
  max-width: 66rem;
  margin: -5rem auto 0;
  padding: 0 1rem;
}
.hero-scene svg { display: block; width: 100%; height: auto; }

@media (max-width: 47.9rem) {
  .hero-panel { padding-bottom: 4rem; border-radius: 0; }
  .hero-scene { margin-top: -2rem; padding: 0 0.5rem; }
}

/* ---- Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
}
.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover { background: #0040bf; }

/* ---- Sections & typography --------------------------------------------------- */

.section { padding: 3rem 0; }
.section-alt { background: var(--mist); }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.25; }
main h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }

.page-head { padding: 2.75rem 0 0.5rem; }
.page-head .kicker {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4c5a68;
  margin: 0 0 0.4rem;
}
.rule {
  width: 4.5rem;
  height: 4px;
  background: var(--gold);
  border: 0;
  margin: 0.9rem 0 0;
}

.prose { max-width: var(--prose); }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }

a { color: var(--steel); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--steel-dark); }

/* ---- Cards -------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.4rem;
}
.card h3 { margin-top: 0; }
.card p { margin: 0.4rem 0 0; }
.card .card-links { margin: 0.75rem 0 0; padding: 0; list-style: none; }
.card .card-links li { margin: 0.3rem 0; }

/* ---- Callouts ------------------------------------------------------------------- */

.notice {
  max-width: var(--prose);
  border-left: 5px solid var(--gold);
  background: #fdf7e8;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.notice.notice-plain { background: var(--mist); border-left-color: var(--steel); }
.notice p:last-child { margin-bottom: 0; }
.notice strong:first-child { color: var(--navy); }

/* ---- Definition rows (Your rights page) ------------------------------------------ */

.fact {
  max-width: var(--prose);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 1.1rem 1.25rem;
  margin: 1rem 0;
}
.fact h3 { margin: 0 0 0.4rem; }
.fact p:last-child, .fact ul:last-child { margin-bottom: 0; }
.fact ul { padding-left: 1.3rem; margin: 0.5rem 0; }

/* ---- Directory list (Get help) --------------------------------------------------------- */

.directory { max-width: 52rem; }
.directory .org {
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: 0 10px 10px 0;
  background: #fff;
  padding: 1.2rem 1.4rem;
  margin: 1.1rem 0;
}
.directory .org h3 { margin: 0 0 0.3rem; }
.directory .org .what {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4c5a68;
  margin: 0 0 0.5rem;
}
.directory .org p { margin: 0.4rem 0; }

/* ---- Steps (What we do) ------------------------------------------------------------------ */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}
.pillars li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
}
.pillars h3 { margin: 0 0 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.pillars .star-dot {
  width: 0.9rem; height: 0.9rem; flex: none;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.pillars p { margin: 0; font-size: 0.98rem; }

/* ---- Tables -------------------------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; max-width: var(--prose); margin: 1rem 0; }
caption { text-align: left; font-weight: 700; color: var(--navy); padding-bottom: 0.5rem; }
th, td { border: 1px solid var(--line); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
th { background: var(--mist); color: var(--navy); }

/* ---- Footer ----------------------------------------------------------------------------------- */

.site-footer {
  background: var(--navy-deep);
  color: #cfd9e3;
  margin-top: 3rem;
  border-top: 4px solid var(--gold);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  padding: 2.5rem 0 1.5rem;
}
.site-footer h2 {
  color: #fff;
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}
.site-footer a { color: #ffe07a; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 1.25rem 0 1.75rem;
}
.footer-legal p { margin: 0.4rem 0; }
.footer-legal .disclaimer { color: #b8c5d2; }

/* ---- Print ---------------------------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; }
}

/* ---- Three audiences (home page) ------------------------------------------ */

.audiences {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}
.audiences li {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
}
.audiences h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.audiences p { margin: 0 0 1rem; flex: 1; }
.audiences .btn { align-self: flex-start; }

/* ---- Linked case studies -------------------------------------------------- */

.case-study {
  max-width: var(--prose);
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: 0 10px 10px 0;
  background: #fff;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.case-study .cs-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4c5a68;
  margin-bottom: 0.35rem;
}
.case-study p { margin: 0.3rem 0; }

/* ---- Category page back-link ---------------------------------------------- */

.backlink {
  display: inline-block;
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

/* ---- Embassy directory ----------------------------------------------------- */

.embassy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}
.embassy-grid li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.embassy-grid h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.embassy-grid p { margin: 0.2rem 0; font-size: 0.95rem; }
