/* ============================================================
   STIL — hvordan siden ser ut. De fleste vil ikke trenge å
   røre denne filen; for å endre TEKST, se js/content.js i stedet.
   ============================================================ */

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #101012;
  --color-muted: #6b6b72;
  --color-accent: #ffd400;
  --color-ink: #0e0e0e;
  --color-divider: #e6e6ea;
  --shadow-card: 0 1px 2px rgba(14,14,14,0.04), 0 8px 24px rgba(14,14,14,0.06);
  --radius: 14px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Siden fylles ovenfra og ned: header, innhold, footer. Innholdet får
   all plassen som blir til overs, slik at den svarte footeren alltid
   ligger nederst i vinduet — også på korte sider. */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--color-accent);
  color: var(--color-ink);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

#app { flex: 1 0 auto; display: flex; flex-direction: column; }
.site-footer { flex: none; }

h1, h2, h3, h4 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

/* Innholdsbredden vokser med skjermen (opptil 1720 px), og sidemargen
   er smal på mobil og romsligere på store skjermer. */
.wrap {
  width: 100%;
  max-width: clamp(1180px, 88vw, 1720px);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px);
}

/* — header / nav — */
.site-header {
  background: var(--color-ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 3px solid var(--color-accent);
}
.site-header .wrap {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: flex;
  align-items: center;
  flex: none;
}
.brand-mark-img {
  height: clamp(32px, 1.2vw + 20px, 48px);
  width: auto;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(15px, 0.35vw + 11px, 20px);
  letter-spacing: -0.01em;
}
.brand-text span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

nav.main-nav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex-wrap: wrap;
}
nav.main-nav .nav-item {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #fff;
  cursor: pointer;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(13px, 0.25vw + 10px, 16px);
  letter-spacing: 0.01em;
  padding: 10px clamp(10px, 0.6vw + 4px, 16px);
  text-align: left;
  transition: color 0.15s ease;
}
nav.main-nav .nav-item:hover { color: var(--color-accent); }
nav.main-nav .nav-item.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.nav-dropdown { position: relative; display: flex; align-items: stretch; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-ink);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-card);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 30;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu button {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 14px 16px;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-menu button:hover { background: var(--color-accent); color: var(--color-ink); }
.nav-dropdown-menu button.active { color: var(--color-accent); }

/* — buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-page {
  min-height: 48px;
  gap: 16px;
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid #a6a6ad;
}
.btn-page:hover { background: #f5f5f6; border-color: var(--color-ink); }
.btn-page:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 4px; }
.btn-page span { font-size: 1.4em; line-height: 1; }

/* — hero —
   Forsiden skalerer med skjermen: tekst, logo og luft vokser med
   bredden (vw), men holdes også igjen på lave skjermer (vh), slik at
   leveransene under alltid er synlige uten mye tom plass. */
.hero {
  --hero-small: clamp(14px, 0.45vw + 9px, 21px);
  padding: clamp(32px, 7vh, 112px) 0 clamp(36px, 8vh, 128px);
}
.hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}
.hero-text { width: 100%; }
.hero-byline {
  font-size: var(--hero-small);
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 0.9em;
}
.hero-text h1 {
  font-size: clamp(40px, min(6vw, 11vh), 128px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 0.25em;
}
.hero-period {
  font-size: var(--hero-small);
  color: var(--color-muted);
}
.hero-period span { font-weight: 600; }
.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(20px, 3vh, 40px);
}
.hero-actions .btn {
  font-size: var(--hero-small);
  padding: 0.9em 1.6em;
}
.hero-logo { width: clamp(110px, 32vw, 160px); }
.hero-logo img { width: 100%; height: auto; display: block; }

/* Mobil: knappene fyller hele bredden. */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .hero-actions .btn { width: 100%; justify-content: space-between; }
}

/* Nettbrett og større: tekst til venstre, logo til høyre. */
@media (min-width: 700px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    grid-template-areas: "text logo";
    align-items: center;
    gap: clamp(24px, 4vw, 96px);
  }
  .hero-text { grid-area: text; }
  .hero-logo {
    grid-area: logo;
    justify-self: center;
    width: clamp(200px, min(30vw, 52vh), 580px);
  }
}

/* — section titles — */
.section-label {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 24px;
}

/* — deliverables — */
.deliverables {
  flex: 1 0 auto;
  padding: clamp(28px, 4vh, 56px) 0 clamp(40px, 6vh, 88px);
  background: #fafafa;
  border-top: 1px solid var(--color-divider);
}
.deliverables .section-label { margin-bottom: 18px; }

/* Antall kolonner følger skjermbredden: 1 på mobil, 2 på nettbrett
   og 3 på PC-skjerm. */
.deliverable-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.4vw, 24px);
}
@media (min-width: 600px)  { .deliverable-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .deliverable-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-3, .grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.deliverable-card {
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  padding: clamp(20px, 1.6vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.deliverable-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.deliverable-card-static { cursor: default; box-shadow: none; }
.deliverable-card-static:hover { border-color: var(--color-divider); transform: none; }
.deliverable-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.deliverable-num { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--color-muted); }
.pill {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.deliverable-card h3 { font-size: clamp(19px, 0.6vw + 12px, 26px); }
.deliverable-card p { font-size: clamp(14px, 0.3vw + 10px, 17px); margin: 0; color: var(--color-muted); }
@media (min-width: 600px) { .deliverable-card { min-height: 170px; } }

/* — page shell — */
.page { padding-top: clamp(32px, 5vh, 64px); padding-bottom: clamp(48px, 7vh, 96px); }
.page h1 { font-size: clamp(30px, 7vw, 52px); margin: 0 0 16px; }
.rule { height: 1px; background: var(--color-divider); margin: 20px 0 36px; border: 0; }

/* — two column with aside — */
.with-aside {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.aside-box {
  background: #fffdf2;
  color: var(--color-ink);
  border: 1px solid #eee4a9;
  border-radius: var(--radius);
  padding: 28px;
  align-self: start;
}
.aside-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 16px;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #e7dfb9;
  font-size: 14px;
}
.fact-row span:first-child { color: var(--color-muted); }
.fact-row span:last-child { font-weight: 600; text-align: right; }

.task-body h3 { font-size: 19px; margin: 28px 0 10px; }
.task-body ul { margin: 0; padding-left: 20px; font-size: clamp(15px, 0.3vw + 11px, 18px); line-height: 1.7; }
.task-body p { font-size: clamp(16px, 0.3vw + 12px, 19px); line-height: 1.65; color: var(--color-muted); }

/* — team / om oss — */
.team-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.team-photo {
  aspect-ratio: 4 / 5;
  background: var(--color-ink);
  display: grid;
  place-items: center;
  color: var(--color-accent);
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 900;
  font-size: 56px;
  position: relative;
  overflow: hidden;
}
/* Brede skjermer: kvadratiske bilder, så kortene ikke blir for høye. */
@media (min-width: 1400px) { .team-photo { aspect-ratio: 1 / 1; } }
.team-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-info { padding: 22px; }
.team-info h3 { font-size: 21px; margin: 0 0 16px; }
.linkedin-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-decoration: none;
  color: var(--color-ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.linkedin-btn:hover { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-accent); }
.team-note {
  margin-top: 36px;
  border-top: 1px solid var(--color-divider);
  padding-top: 20px;
  font-size: 14px;
  color: var(--color-muted);
}

/* — prosjektdagbok — */
.diary-intro { font-size: 16px; max-width: 60ch; margin: 0 0 24px; color: var(--color-muted); }
.diary-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-divider);
}
.diary-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--color-divider);
}
.diary-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.diary-week { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: 18px; min-width: 80px; }
.diary-date { font-size: 13px; min-width: 90px; color: var(--color-muted); }
.diary-body { display: block; max-width: 80ch; }
.diary-body p { font-size: 16px; line-height: 1.7; margin: 0; color: var(--color-text); }
.diary-choice {
  font-size: 14px;
  line-height: 1.65;
  border-left: 3px solid var(--color-accent);
  padding-left: 14px;
}

/* — status reports — */
.status-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 10px;
}
.status-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px;
}
.status-card h3 { font-size: 19px; margin: 0 0 10px; }
.status-card p { font-size: 15px; line-height: 1.65; margin: 0; color: var(--color-muted); }
.status-card p + p { margin-top: 12px; }

/* — bildegalleri på statussidene — */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}
.gallery-thumb {
  padding: 0;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
/* Skjermbilder er brede, så de beskjæres mindre enn bildene i 4:3. */
.gallery-2 .gallery-thumb img { aspect-ratio: 16 / 9; }
.gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(14,14,14,0.06), 0 14px 32px rgba(14,14,14,0.12);
}
.gallery-thumb:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* — stor bildevisning (lightbox) — */
body.no-scroll { overflow: hidden; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 14, 14, 0.92);
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox-nav,
.lightbox-close {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: background 0.15s ease;
}
.lightbox-nav:hover,
.lightbox-close:hover { background: var(--color-accent); color: var(--color-ink); }
.lightbox-nav:focus-visible,
.lightbox-close:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
}
.lightbox-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* Smal skjerm: pilene legges nederst i stedet for på sidene av bildet. */
@media (max-width: 640px) {
  .lightbox { flex-wrap: wrap; align-content: center; }
  .lightbox-img { order: -1; flex-basis: 100%; max-height: 70vh; }
  .lightbox-count { position: static; transform: none; flex-basis: 100%; text-align: center; }
  .diary-entry { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
  .diary-row { flex-direction: row; align-items: baseline; gap: 12px; }
}

/* — refleksjon — */
.refl-hero {
  background: var(--color-ink);
  color: #fff;
  padding: 56px 0;
}
.refl-hero .section-label { color: var(--color-accent); }
.refl-hero h1 { max-width: 24ch; }
.refl-item { margin-bottom: 28px; border-top: 1px solid var(--color-divider); padding-top: 14px; }
.refl-item h3 { font-size: 21px; margin: 0 0 8px; }
.refl-item p { font-size: 15px; line-height: 1.65; margin: 0; color: var(--color-muted); }
.refl-quote {
  background: var(--color-accent);
  border-radius: var(--radius);
  padding: 28px;
  align-self: start;
}
.refl-quote-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}
.refl-quote p {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
}

/* — footer — */
.site-footer {
  background: var(--color-ink);
  color: #fff;
  border-top: 3px solid var(--color-accent);
}
.site-footer .wrap {
  padding-top: 36px;
  padding-bottom: 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
}
.footer-brand strong { font-family: "Archivo", system-ui, sans-serif; font-weight: 900; font-size: 15px; display: block; margin-bottom: 6px; }
.footer-brand span { color: rgba(255,255,255,0.6); }
.footer-note { color: rgba(255,255,255,0.6); }

/* ============================================================
   Responsive: below 860px things above stack to one column;
   at 860px and up the desktop layout (side-by-side) kicks in.
   ============================================================ */
@media (min-width: 860px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  /* Et odde siste kort fyller hele bredden i stedet for å stå alene i venstre kolonne. */
  .grid-2 > .status-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  /* Et partall bilder vises i to kolonner, så ingen rad får en tom plass. */
  .gallery.gallery-2 { grid-template-columns: repeat(2, 1fr); }

  .with-aside { grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); gap: clamp(40px, 4vw, 80px); }

  .refl-grid { grid-template-columns: 1fr 1fr; }
}
