/* ==========================================================================
   FOA v2 — delt stilark for nye mockups
   Stram, tett, profesjonell nettside (Doffin/DFØ/Stortinget/FT-retning).
   Merkevare: navy + gull, Playfair Display (overskrifter), Source Sans 3 (UI).
   ALDRI app/iPhone-følelse. Tette rader, høy informasjonstetthet.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --navy:      #16213e;
  --navy-900:  #0f1830;
  --gold:      #c9a227;
  --gold-dark: #b08d1e;
  --cream:     #faf8f5;
  --surface:   #f4f1ea;
  --line:      #e4ddcf;
  --ink:       #1a1a2e;
  --slate:     #54546a;
  --white:     #fff;
  --maxw:      1240px;

  --radius:    8px;
  --radius-sm: 6px;
  --shadow:    0 1px 2px rgba(22, 33, 62, .06);
  --shadow-md: 0 2px 8px rgba(22, 33, 62, .08);

  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-ui:   'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; overflow-y: scroll; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: 2.4rem; letter-spacing: -.01em; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-dark); }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: .2em 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

small { font-size: .8125rem; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- Layout primitives -------------------------------------------------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: 56px 0; }

.section-surface { background: var(--surface); }
.section-cream   { background: var(--cream); }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.eyebrow {
  font-family: var(--font-ui);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 .5rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--slate);
}

.text-muted { color: var(--slate); }

/* ---- Buttons ------------------------------------------------------------ */
.btn,
.btn-gold,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  text-align: center;
}

.btn,
.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn:hover,
.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

/* Navy-flate-varianter (på hero/page-band) */
.hero .btn-ghost,
.page-band .btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, .35);
}
.hero .btn-ghost:hover,
.page-band .btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---- Cards -------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

a.card { display: block; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-head {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.site-head-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
}

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 48px; width: auto; aspect-ratio: 2418 / 796; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.site-nav a {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav a:hover { color: var(--gold-dark); }
.site-nav a[aria-current="page"] {
  color: var(--gold-dark);
  border-bottom-color: var(--gold);
}

.btn-login {
  flex: 0 0 auto;
  margin-left: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 114px;
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  padding: .45rem 1rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  transition: background-color .15s, color .15s;
}
.btn-login:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ==========================================================================
   PAGE BAND — slank navy tittel-stripe
   ========================================================================== */
.page-band {
  background: var(--navy);
  padding: 32px 0;
}
.page-band .eyebrow { color: var(--gold); }
.page-band h1 {
  color: var(--white);
  font-size: 2.4rem;
  margin: 0;
}
.page-band .lead {
  color: rgba(255, 255, 255, .82);
  margin: .6rem 0 0;
  max-width: 760px;
}

/* ==========================================================================
   HERO — navy, kompakt
   ========================================================================== */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
  margin: 0 0 .5rem;
}
.hero p,
.hero .lead { color: rgba(255, 255, 255, .85); }
.hero .lead { max-width: 720px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ==========================================================================
   NYHETSBREV — smal navy stripe
   ========================================================================== */
.newsletter {
  background: var(--navy);
  padding: 22px 0;
}
/* Nyhetsbrev rett under navy tittel-bånd: gull-linje skiller stripene + litt
   mørkere navy så det leses som en egen, smal abonner-stripe. */
.newsletter-top {
  background: var(--navy-900);
  border-top: 3px solid var(--gold);
  padding: 16px 0;
}
.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.newsletter-text { flex: 1 1 360px; }
.newsletter-text h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--white);
  margin: 0 0 .15rem;
}
.newsletter-text p {
  color: rgba(255, 255, 255, .8);
  font-size: .95rem;
  margin: 0;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex: 0 1 auto;
}
.newsletter-form input {
  font-family: var(--font-ui);
  font-size: .95rem;
  padding: .6rem .85rem;
  min-width: 260px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.newsletter-form input::placeholder { color: var(--slate); }
.newsletter-form input:focus-visible { outline-offset: 0; }
.newsletter-form button {
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  padding: .6rem 1.25rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.newsletter-form button:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

/* ==========================================================================
   FOOTER — navy, tett fler-kolonne
   ========================================================================== */
.site-foot {
  background: var(--white);
  color: var(--slate);
  border-top: 1px solid var(--line);
  padding: 48px 0 0;
}
.site-foot-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
}
.foot-col h4 {
  font-family: var(--font-ui);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 .9rem;
}
.foot-col a {
  display: block;
  color: var(--navy);
  font-size: .95rem;
  padding: .2rem 0;
  transition: color .15s;
}
.foot-col a:hover { color: var(--gold-dark); }

.foot-brand p {
  font-size: .95rem;
  line-height: 1.5;
  color: var(--slate);
  max-width: 36ch;
  margin: 0;
}
.foot-logo {
  height: 36px;
  width: auto;
  aspect-ratio: 2418 / 796;
  margin-bottom: 14px;
}

.foot-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  font-size: .8125rem;
  color: var(--slate);
}

/* ==========================================================================
   KURS-LISTE — tett, tabell-aktig
   ========================================================================== */
.kurs-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.kurs-row {
  display: grid;
  grid-template-columns: auto 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px 20px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: background-color .12s;
}
.kurs-row:last-child { border-bottom: 0; }
.kurs-row:hover { background: var(--cream); }

.kurs-date {
  font-weight: 700;
  color: var(--navy);
  font-size: .95rem;
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
  min-width: 48px;
}
.kurs-date .kurs-day   { display: block; font-size: 1.35rem; line-height: 1; }
.kurs-date .kurs-month { display: block; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-dark); }

.kurs-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.kurs-title {
  min-width: 0;
}
.kurs-title strong,
.kurs-title .kurs-name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.2;
}
.kurs-title .kurs-meta {
  display: block;
  font-size: .85rem;
  color: var(--slate);
  margin-top: 2px;
  line-height: 1.35;
}

.kurs-row .kurs-price {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Praktisk info som én ryddig linje: «Digitalt · 09:30–14:50 · 6 timer».
   Klokkeslett og antall timer skal ALDRI brytes til to linjer. */
.kurs-row .kurs-info {
  font-size: .9rem;
  color: var(--slate);
  white-space: nowrap;
  text-align: right;
}
.kurs-row .kurs-info .kurs-nowrap { white-space: nowrap; }
.kurs-row .kurs-place {
  font-size: .9rem;
  color: var(--slate);
  white-space: nowrap;
}

/* ---- Badge -------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 4px;
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge-gold    { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.badge-navy    { background: var(--navy); color: var(--white); border-color: var(--navy); }
.badge-outline { background: transparent; }

/* ==========================================================================
   ARTIKKEL-RUTENETT — 3-kol kort
   ========================================================================== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
a.article-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.article-body { padding: 16px 18px 18px; }
.article-date {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--gold-dark);
  margin: 0 0 .35rem;
}
.article-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin: 0 0 .4rem;
}
.article-card p {
  font-size: .95rem;
  color: var(--slate);
  margin: 0;
}

/* ==========================================================================
   Småhjelpere
   ========================================================================== */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-12 { gap: 12px; }
.gap-20 { gap: 20px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.section-head { margin-bottom: 28px; }

/* ==========================================================================
   RESPONSIV
   ========================================================================== */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .site-foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .btn-login { margin-left: auto; }
}

@media (max-width: 760px) {
  h1, .page-band h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.1rem; }

  .container { padding: 0 20px; }
  section { padding: 44px 0; }

  .newsletter-inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { min-width: 0; flex: 1 1 auto; }

  .grid-2, .grid-3, .grid-4,
  .article-grid { grid-template-columns: 1fr; }

  .site-foot-inner { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Kurs-rad: pakk om til kompakt kort */
  .kurs-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "date title"
      "date info"
      "date price";
    row-gap: 4px;
    column-gap: 14px;
  }
  .kurs-thumb { display: none; }
  .kurs-date  { grid-area: date; }
  .kurs-title { grid-area: title; }
  .kurs-row .kurs-info,
  .kurs-row .kurs-place {
    grid-area: info;
    text-align: left;
  }
  .kurs-row .kurs-price {
    grid-area: price;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .site-foot-inner { grid-template-columns: 1fr; }
}
