/* ---------------------------------------------------------------------
   Rogaland brand tokens — strict monochrome. No accent colours, no
   gradients, no shadows. White space carries the hierarchy.
   --------------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #f4f4f5;
  --color-text: #1c1c1e;
  --color-text-secondary: #6b7280;
  --color-max-contrast: #000000;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --size-hero: clamp(2.5rem, 5vw + 1rem, 4.5rem); /* 48–72px */
  --size-h1: clamp(2rem, 3vw + 1rem, 2.5rem); /* 32–40px */
  --size-h2: clamp(1.5rem, 1.5vw + 1rem, 1.75rem); /* 24–28px */
  --size-body: 1.0625rem; /* 17px, within 16–18px */
  --size-caption: 0.8125rem; /* 13px, within 12–14px */
  --size-button: 0.9375rem; /* 15px, within 14–16px */

  --max-width: 1120px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* ------------------------------------------------------------------ */
/* Reset                                                                */
/* ------------------------------------------------------------------ */

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--size-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: 0.015em;
  margin: 0 0 var(--space-2);
}

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

/* Visible keyboard focus everywhere — the monochrome palette gives no
   excuse for a missing or low-contrast focus ring. */
:focus-visible {
  outline: 2px solid var(--color-max-contrast);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-max-contrast);
  color: var(--color-bg);
  padding: var(--space-1) var(--space-2);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

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

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

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

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.logo-link img {
  height: 32px;
  width: auto;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  text-decoration: underline;
}

main {
  min-height: 60vh;
}

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

section.bg-secondary {
  background: var(--color-bg-secondary);
}

.site-footer {
  border-top: 1px solid var(--color-text-secondary);
  padding-block: var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--size-caption);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  justify-content: space-between;
}

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

.footer-links {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

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

.hero-heading {
  font-size: var(--size-hero);
  font-weight: 700;
}

.h1 {
  font-size: var(--size-h1);
  font-weight: 600;
}

.h2 {
  font-size: var(--size-h2);
  font-weight: 600;
}

.subheadline {
  font-size: var(--size-h2);
  font-weight: 400;
  color: var(--color-text-secondary);
}

.caption {
  font-size: var(--size-caption);
  color: var(--color-text-secondary);
}

/* ------------------------------------------------------------------ */
/* Components                                                          */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--size-button);
  font-weight: 500;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: 1px solid var(--color-max-contrast);
  cursor: pointer;
}

.btn-primary {
  background: var(--color-max-contrast);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-text);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-max-contrast);
}

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

.hero {
  text-align: center;
  padding-block: var(--space-6) var(--space-5);
}

.hero .subheadline {
  max-width: 40ch;
  margin-inline: auto;
  margin-top: var(--space-2);
}

.hero .btn {
  margin-top: var(--space-4);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.card {
  border: 1px solid var(--color-text-secondary);
  border-radius: 4px;
  padding: var(--space-4);
}

.card h3 {
  font-size: var(--size-h2);
  font-weight: 600;
}

.card p {
  color: var(--color-text-secondary);
}

/* Forms */

.form-field {
  margin-bottom: var(--space-3);
}

.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--size-body);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-text-secondary);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-max-contrast);
}

.form-errors {
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--size-caption);
  margin-top: var(--space-1);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  border: 1px solid var(--color-max-contrast);
  border-radius: 4px;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}

/* Utility */

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

.mt-0 {
  margin-top: 0;
}
