:root {
  --accent: #F39A2B;        /* oransje frå logoen – berre dekor og flater */
  --accent-text: #9A5200;   /* mørkare oransje for tekst/lenkjer (WCAG AA på kvitt) */
  --text: #1c1917;
  --muted: #57534e;
  --bg: #ffffff;
  --bg-soft: #fdf5ea;
  --border: #ecdcc6;
  --button-text: #1c1917;
  --focus: #9A5200;         /* fokusramme – minst 3:1 mot bakgrunnen */
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: #F5AE55;
    --text: #f5f0ea;
    --muted: #c4bab0;
    --bg: #1a1714;
    --bg-soft: #26211c;
    --border: #3d342b;
    --focus: #F39A2B;
  }
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
}

a { color: var(--accent-text); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Snarveg til innhaldet – synleg berre når han har fokus */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  background: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* Header – bilete av Labråten bak tittelen */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(18rem, 45vw, 26rem);
  padding: 3rem 0 0;
  color: #fff;
  background-color: #3a3326; /* vert vist medan biletet lastar */
  /* Mørk gradient nedst gjer at kvit tekst held kontrastkrava mot det lyse fotoet */
  background-image:
    linear-gradient(to bottom, rgba(20, 16, 10, 0.15) 0%, rgba(20, 16, 10, 0.45) 45%, rgba(20, 16, 10, 0.8) 100%),
    url("img/labraten.jpg");
  background-size: cover;
  background-position: center 55%;
  border-bottom: 4px solid var(--accent);
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding-bottom: 1.5rem;
}
.logo {
  width: 7.5rem;
  height: auto;
  flex-shrink: 0;
  /* JPEG har kvit bakgrunn – gje han ei kvit, avrunda flate så han står fint mot fotoet */
  background: #fff;
  border-radius: 50%;
  padding: 0.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
h1 {
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  margin: 0;
}
.hero h1,
.hero .tagline {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 0, 0, 0.4);
}
.tagline {
  margin: 0.25rem 0 0;
  color: #f5f0ea;
  font-size: 1.2rem;
}
.hero a { color: #FFC37A; }
.hero :focus-visible { outline-color: #FFC37A; }

.photo-credit {
  margin: 0;
  padding: 0.3rem 1rem;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: right;
  color: #e7e0d6;
  background: rgba(0, 0, 0, 0.45);
}
.photo-credit a { color: inherit; }

/* Navigasjon */
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 1rem 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
nav a {
  text-decoration: none;
  font-weight: 500;
}
nav a:hover { text-decoration: underline; }

/* Innhald */
section { padding: 1.5rem 0; }
h2 {
  font-size: 2rem;
  margin: 0 0 0.75rem;
}
.goals { padding-left: 1.25rem; }
.goals li::marker { color: var(--accent); }

.callout {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--button-text);
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
}
.button:hover { filter: brightness(1.05); }

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 0;
}
dt { font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }

footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 30rem) {
  .hero-inner { flex-direction: column; text-align: center; gap: 1rem; }
  .logo { width: 6rem; }
  .photo-credit { text-align: center; }
  dl { grid-template-columns: 1fr; }
  dd { margin-bottom: 0.5rem; }
}
