/* ---------------------------------------------------------
   PQuest — Base styles
   --------------------------------------------------------- */

:root {
  --color-background: #ffffff;
  --color-surface: #f6f7f8;
  --color-text: #20252b;
  --color-text-muted: #5d6670;
  --color-accent: #315f78;
  --color-accent-dark: #24495e;
  --color-border: #dfe3e6;

  --content-width: 1120px;
  --text-width: 760px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;

  --radius: 6px;
}


/* Base
   --------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-accent-dark);
}


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

.container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.text-container {
  max-width: var(--text-width);
}


/* Typography
   --------------------------------------------------------- */

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-2);
}


/* Header
   --------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.site-name {
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-text);
}


/* Main content
   --------------------------------------------------------- */

main {
  min-height: 60vh;
}

.section {
  padding-block: var(--space-6);
}

.section + .section {
  border-top: 1px solid var(--color-border);
}

.section-muted {
  background: var(--color-surface);
}

.lead {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
}


/* Links used as calls to further information
   --------------------------------------------------------- */

.text-link {
  display: inline-block;
  margin-top: var(--space-1);
  font-weight: 600;
  text-decoration: none;
}

.text-link::after {
  content: " →";
}


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

.card {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
}

.card h3 {
  margin-bottom: var(--space-1);
}

.card-label {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}


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

.site-footer {
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-name {
  margin-bottom: var(--space-2);
  font-weight: 650;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}

.footer-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-text);
}

.copyright {
  margin-top: var(--space-3);
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}


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

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}


/* Small screens
   --------------------------------------------------------- */

@media (max-width: 640px) {
  :root {
    --space-5: 2.5rem;
    --space-6: 3.5rem;
  }

  .header-inner {
    min-height: auto;
    padding-block: var(--space-2);
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1);
  }

  .site-nav {
    width: 100%;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .card {
    padding: var(--space-3);
  }
}


/* Respect reduced-motion preferences
   --------------------------------------------------------- */

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