/* Selvtillitsskolen — Hovedstilark */

/* Self-hostede fonter — ingen forespørsler til eksterne servere (GDPR) */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Lora'), url('../fonts/lora-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Lora SemiBold'), url('../fonts/lora-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local('Lora Italic'), url('../fonts/lora-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Inter'), url('../fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Inter Medium'), url('../fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Inter SemiBold'), url('../fonts/inter-latin-600-normal.woff2') format('woff2');
}

:root {
  --paper: #F7F1E7;
  --surface: #FFFDF8;
  --sunken: #EFE7DB;
  --hairline: #E3DACB;
  --ink: #26332F;
  --headings: #173F38;
  --muted: #6B6358;
  --olive: #5E6B4F;
  --terra: #B5764F;
  --terra-700: #9E5A3C;
  --moss: #394234;
  --cream: #F7F1E7;
  
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 20px;
  
  --serif: 'Lora', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Semantiske kontraster og tastaturfokus */
:focus-visible {
  outline: 3px solid var(--terra-700);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Nav */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--headings);
}

.brand-symbol {
  width: 32px;
  height: 32px;
}

.brand-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  color: var(--olive);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

nav a:hover {
  color: var(--terra-700);
}

/* Typografi */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--headings);
  font-weight: 600;
  line-height: 1.22;
  margin-top: 0;
}

h1 { font-size: 38px; margin-bottom: 16px; letter-spacing: -0.01em; }
h2 { font-size: 26px; margin-bottom: 14px; margin-top: 32px; }
h3 { font-size: 20px; margin-bottom: 10px; margin-top: 24px; }
h4 { font-size: 18px; margin-bottom: 8px; }

p {
  margin: 0 0 18px;
  color: var(--ink);
}

p.sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--olive);
  font-size: 21px;
  line-height: 1.45;
  margin-bottom: 24px;
}

p.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--headings);
}

.muted {
  color: var(--muted);
  font-size: 15px;
}

/* Knapper */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--terra-700);
  color: var(--surface) !important;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--olive);
}

.btn-soft {
  background: var(--sunken);
  color: var(--ink) !important;
  border: 1px solid var(--hairline);
}

.btn-soft:hover {
  background: var(--hairline);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 20px 0;
}

/* Kort & Moduler */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--terra);
  border-radius: var(--r-l);
  padding: 28px;
  margin: 20px 0;
  box-shadow: 0 4px 16px rgba(38, 51, 47, 0.04);
}

.card-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--headings);
  margin-bottom: 8px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--terra-700);
  background: var(--sunken);
  border-radius: 999px;
  padding: 4px 12px;
  margin-right: 6px;
  margin-bottom: 8px;
}

/* Erfaringssløyfen Komponent */
.loop-container {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: 32px 24px;
  margin: 32px 0;
  text-align: center;
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
  text-align: left;
}

.loop-step {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-m);
  padding: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.loop-step:hover, .loop-step.active {
  border-color: var(--terra);
  transform: translateY(-2px);
}

.loop-num {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--terra-700);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.loop-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--headings);
  margin-bottom: 6px;
}

.loop-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

/* Advarsler & Notiser */
.notice {
  background: var(--sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-m);
  padding: 16px 20px;
  font-size: 15px;
  color: var(--ink);
  margin: 20px 0;
}

.notice-warning {
  background: #FDF4EC;
  border-color: #E8D0BD;
  color: #7A4222;
}

/* Formulardesign */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--headings);
  margin-bottom: 6px;
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--terra-700);
  box-shadow: 0 0 0 3px rgba(158, 90, 60, 0.15);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

/* Footer */
footer {
  background: var(--moss);
  color: var(--cream);
  margin-top: 48px;
  border-radius: var(--r-l) var(--r-l) 0 0;
  padding: 36px 24px;
}

footer a {
  color: #D6A283;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Accessibility - Preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
