/* FIS static site — clean modern responsive design */

:root {
  --color-text: #2c3e50;
  --color-text-muted: #5a6a7a;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f9fb;
  --color-border: #e2e8f0;
  --color-accent: #3d6b8e;
  --color-accent-hover: #2a5270;
  --color-link: #2b6cb0;
  --color-link-hover: #1a4f8a;
  --font-sans: "Dosis", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 960px;
  --header-height: 72px;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

a:hover {
  color: var(--color-link-hover);
}

/* Header */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.75rem 1rem;
  align-items: center;
}

.site-logo {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  max-width: 1024px;
  text-decoration: none;
}

.site-logo img {
  width: 100%;
  max-width: 1024px;
  height: auto;
}

/* Mobile nav toggle */
.nav-toggle {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-text);
}

.site-nav {
  margin: 0 1rem 1rem 1rem;
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Navigation */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--color-text-muted);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Main content */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-title {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 1.5rem;
  color: var(--color-text);
  line-height: 1.2;
}

/* Content typography */
.content h2,
.content h3,
.content h4,
.content h5 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text);
  margin: 1.75rem 0 0.75rem;
  line-height: 1.3;
}

.content h2 { font-size: 1.5rem; }
.content h3 { font-size: 1.3rem; }
.content h4 { font-size: 1.15rem; }
.content h5 { font-size: 1.05rem; font-weight: 500; }

.content p {
  margin: 0 0 1rem;
}

.content ul,
.content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.35rem;
}

.content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.content th,
.content td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.content th {
  background: var(--color-bg-alt);
  font-weight: 600;
}

.content .muted {
  color: var(--color-text-muted);
}

.content .resource-author {
  margin-top: 1.5rem;
}

.content .resource-link {
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
  display: block;
}

/* Hero section (home) */
.hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.hero-image {
  text-align: center;
}

.hero-image img {
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-image figcaption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.hero-image figcaption a {
  color: var(--color-text-muted);
}

.intro-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.intro-lead strong {
  color: var(--color-text);
}

/* About page image */
.content .figure-center {
  text-align: center;
  margin: 1.5rem 0;
}

.content .figure-center figcaption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.site-footer a {
  color: var(--color-accent);
}

/* 404 page */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-page h1 {
  font-family: var(--font-sans);
  font-size: 4rem;
  margin: 0;
  color: var(--color-accent);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-header {
    position: relative;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }

  .page-title {
    font-size: 1.6rem;
  }
}

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