@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #1c2127;
  background: #fff;
}

h1, h2, h3, p, ul { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: #156082; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 64px 0; }
.tint { background: #dceaf7; }

h1 { font-size: 40px; line-height: 1.2; margin-bottom: 20px; }
h2 { font-size: 28px; margin-bottom: 28px; }
h3 { font-size: 18px; }

/* Topp */
.topbar {
  background: #156082;
  color: #fff;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 68px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}
.topbar nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.topbar nav a:hover {
  color: #fff;
  border-bottom-color: #dceaf7;
}
.topbar a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Intro */
.intro { padding: 80px 0 72px; }
.intro p {
  max-width: 640px;
  margin-bottom: 16px;
  font-size: 18px;
}
.button {
  display: inline-block;
  margin-top: 12px;
  padding: 11px 20px;
  background: #156082;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}
.button:hover { background: #0f4a66; }

/* Team */
.team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px 20px;
}
.person {
  display: block;
  color: inherit;
  text-decoration: none;
}
.person img,
.modal-box img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}
.person img { margin-bottom: 12px; }
.role {
  color: #156082;
  font-weight: 600;
}
.person .role { font-size: 15px; line-height: 1.4; }
.read-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 15px;
  color: #156082;
  text-decoration: underline;
}
.person:hover h3 { text-decoration: underline; }

/* Popup (åpnes med #id i adressen, ingen JavaScript) */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  padding: 20px;
  align-items: center;
  justify-content: center;
}
.modal:target { display: flex; }
.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 30, 0.6);
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: start;
}
.modal-box h3 { font-size: 22px; }
.modal-box .role { margin-bottom: 12px; }
.modal-box p { font-size: 16px; }
.modal-box p + p { margin-top: 10px; }
.modal-box p + a { display: inline-block; margin-top: 12px; }
.close {
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 30px;
  line-height: 1;
  color: #1c2127;
  text-decoration: none;
}

/* Studiet */
.courses {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px 40px;
}
.courses li { color: #3d4650; }
.courses strong {
  display: block;
  color: #1c2127;
}

/* Kontakt */
#kontakt p { margin-bottom: 12px; }

footer {
  padding: 24px 0;
  font-size: 14px;
  color: #5b6570;
  border-top: 1px solid #e3e6ea;
}

@media (max-width: 900px) {
  .team { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  section { padding: 48px 0; }
  .intro { padding: 56px 0 48px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .team { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .modal-box { grid-template-columns: 1fr; padding: 28px 20px 24px; gap: 16px; }
  .modal-box img { max-width: 140px; }
}
