/* stipa.info — static site stylesheet */

:root {
  --accent: #1a9fd4;
  --accent-strong: #0e7fab;
  --accent-soft: #e6f6fd;
  --bg: #ffffff;
  --bg-alt: #f5f7f9;
  --surface: #ffffff;
  --text: #1d2329;
  --text-muted: #5b6670;
  --border: #dde3e8;
  --warn-bg: #fff6e5;
  --warn-border: #f0b14a;
  --warn-text: #5c3d00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 4px 16px rgba(16, 24, 32, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4cc3f2;
    --accent-strong: #82d6f7;
    --accent-soft: #10303d;
    --bg: #12161a;
    --bg-alt: #181d22;
    --surface: #1c2228;
    --text: #e6eaee;
    --text-muted: #9aa6b1;
    --border: #2c343c;
    --warn-bg: #2e2412;
    --warn-border: #b9852f;
    --warn-text: #f3d9a6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

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

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

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

.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: .5rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 10;
}

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

/* Header */

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

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.brand {
  display: inline-flex;
  line-height: 0;
  border-radius: 6px;
}

.brand img {
  width: 145px;
  height: 48px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: .45rem .85rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--bg-alt);
  color: var(--accent-strong);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Hero */

.hero {
  background: linear-gradient(180deg, var(--accent-soft), var(--bg));
  padding: 3rem 0 2rem;
}

.hero .eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent-strong);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: var(--measure);
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.015em;
}

.hero .lead {
  max-width: var(--measure);
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* Main content */

main {
  flex: 1;
}

.content {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

.content > * {
  max-width: var(--measure);
}

.content h2 {
  margin: 2.25rem 0 .75rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

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

.button {
  display: inline-block;
  margin-top: .5rem;
  padding: .7rem 1.25rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--accent);
}

@media (prefers-color-scheme: dark) {
  .button {
    background: var(--accent);
    color: #0b1a21;
  }

  .button:hover {
    background: var(--accent-strong);
  }

  /* The logo has dark text on a transparent background. */
  .brand {
    background: #fff;
    padding: 4px 8px;
  }
}

.notice {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--warn-border);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-text);
}

.notice p:last-child {
  margin-bottom: 0;
}

/* Download list */

.downloads {
  display: grid;
  gap: .75rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.download {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}

.download:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.download .type {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
}

.download .type-pdf {
  background: #fdeceb;
  color: #b3261e;
}

@media (prefers-color-scheme: dark) {
  .download .type-pdf {
    background: #3a1f1d;
    color: #f2a49d;
  }
}

.download .info {
  flex: 1;
  min-width: 0;
}

.download .title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.download .meta {
  display: block;
  color: var(--text-muted);
  font-size: .9rem;
}

.download .arrow {
  flex: none;
  color: var(--accent-strong);
  font-size: 1.25rem;
  line-height: 1;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: .9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .hero {
    padding: 2rem 0 1.25rem;
  }

  .download {
    gap: .75rem;
    padding: .8rem .9rem;
  }

  .download .type {
    width: 2.5rem;
    height: 2.5rem;
  }

  .download .arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download {
    transition: none;
  }

  .download:hover {
    transform: none;
  }
}

@media print {
  .site-nav,
  .skip-link,
  .button,
  .download .arrow {
    display: none;
  }

  .hero {
    background: none;
    padding: 1rem 0 0;
  }

  .download {
    box-shadow: none;
  }

  .download::after {
    content: " (https://stipa.info" attr(href) ")";
    font-size: .8rem;
  }
}
