/* Vaskelaget — delte komponenter og layout.
   Følger designguiden: flate offset-skygger, 1.5px blekk-rammer, minimal animasjon.
   Hover komprimerer skyggen (2px→1px) eller bytter kremfyll til gult. */

/* ============ LAYOUT ============ */
.wrap { max-width: var(--container); margin: 0 auto; padding-left: var(--container-pad); padding-right: var(--container-pad); }
.band { background: var(--surface-page); }
.band--salmon { background: var(--accent-2); }
.band--teal    { background: var(--accent-3); }
.band--yellow  { background: var(--accent-strong); }
.band--ink     { background: var(--surface-inverse); color: var(--text-inverse); }
.section { padding-top: var(--space-9); padding-bottom: var(--space-9); }

h1, h2, h3, h4 { margin: 0; }
.h1 { font-size: var(--text-h1); line-height: var(--leading-tight); }
.h2 { font-size: var(--text-h2); line-height: var(--leading-heading); }
.h3 { font-size: var(--text-h3); line-height: var(--leading-heading); }
.lead { font-size: var(--text-lead); line-height: var(--leading-body); color: var(--text-secondary); }
.muted { color: var(--text-muted); }
.small { font-size: var(--text-small); }

/* ============ KNAPPER ============ */
.btn {
  display: inline-block; font-family: var(--font-body); font-size: var(--text-base); font-weight: 700;
  border: var(--border-strong); border-radius: var(--radius-sm); padding: 13px 26px;
  background: var(--surface-page); color: var(--ink); cursor: pointer; text-align: center;
}
.btn--primary { background: var(--accent); box-shadow: var(--shadow-offset-sm); }
.btn--primary:hover { box-shadow: var(--shadow-offset-pressed); color: var(--ink); }
.btn--primary:active { box-shadow: none; transform: translate(2px, 2px); }
.btn--secondary:hover { background: var(--accent-2); color: var(--ink); }
.btn--cream { background: var(--surface-page); }
.btn--cream:hover { background: var(--accent); color: var(--ink); }
.btn--sm { padding: 9px 18px; font-size: var(--text-small); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; box-shadow: none; cursor: not-allowed; }

/* pille-CTA i nav */
.btn-pill {
  border: var(--border-strong); border-radius: var(--radius-pill); padding: 8px 22px;
  font-size: var(--text-base); font-weight: 500; background: var(--surface-page); display: inline-block;
}
.btn-pill:hover { background: var(--accent); color: var(--ink); }

/* tekstlenke med understrek */
.link-u { font-weight: 700; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.link-u--thin { border-bottom-width: 1.5px; padding-bottom: 1px; }

/* ============ NAV ============ */
.nav { max-width: var(--container); margin: 0 auto; padding: 28px var(--container-pad) 0;
       display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.nav__brand img { width: 26px; height: 26px; flex: none; }
.nav__links { display: flex; gap: 34px; font-size: var(--text-base); font-weight: 500; }
.nav__links a.is-active { font-weight: 700; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.nav__burger { display: none; background: var(--surface-page); border: var(--border-strong);
               border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer; font-size: 16px; line-height: 1; }

/* ============ KORT OG ETIKETTER ============ */
.card { background: var(--surface-page); border-radius: var(--radius-md); box-shadow: var(--shadow-offset); padding: var(--space-5); }
.card--white { background: var(--surface-card); }
.card--bordered { border: var(--border-strong); }
.badge { display: inline-block; background: var(--ink); color: var(--text-inverse);
         border-radius: var(--radius-pill); padding: 4px 12px; font-size: var(--text-tiny); font-weight: 700; }
.tag { display: inline-block; border: 1px solid var(--ink); border-radius: var(--radius-pill);
       padding: 3px 10px; font-size: 10.5px; font-weight: 700; }
.pill { display: inline-block; border: var(--border-strong); border-radius: var(--radius-pill);
        padding: 6px 18px; font-size: 12px; font-weight: 700; background: var(--surface-page); }
.pill--yellow { background: var(--accent-strong); }

/* ✓-linjer */
.checkline { display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; line-height: 1.6; }
.checkline > span:first-child { font-weight: 700; flex: none; }

/* stats */
.stats { display: flex; gap: var(--space-7); flex-wrap: wrap; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: var(--text-h3); }
.stat__label { font-size: var(--text-small); color: var(--text-muted); margin-top: 2px; }

/* ============ SKJEMA ============ */
.field { display: grid; gap: 6px; }
.field > label { font-size: var(--text-small); font-weight: 700; }
.input, .select, .textarea {
  width: 100%; background: var(--surface-page); border: var(--border-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: var(--text-base); font-family: var(--font-body); color: var(--ink);
}
.textarea { resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: var(--shadow-offset-pressed); }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* valgbare chips (ferdigheter, filtre, områder) */
.chip {
  border: var(--border-strong); border-radius: var(--radius-pill); background: var(--surface-page);
  padding: 8px 16px; font-size: var(--text-small); font-weight: 700; cursor: pointer; font-family: var(--font-body);
}
.chip:hover { background: var(--cream-100); }
.chip.is-active { background: var(--accent); box-shadow: var(--shadow-offset-pressed); }

/* ============ BILDERAMMER ============ */
.frame { border-radius: var(--radius-md); box-shadow: var(--shadow-offset); padding: 6px; background: var(--surface-card);
         overflow: hidden; min-height: 0; }
.frame--lg { box-shadow: var(--shadow-offset-lg); padding: 8px; }
.frame--salmon { background: var(--accent-2); }
.frame--teal   { background: var(--accent-3); }
.frame--yellow { background: var(--accent-strong); }
.frame > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
/* uutfylte bildeflater fra leveransen */
.ph { display: grid; place-items: center; width: 100%; height: 100%; border-radius: var(--radius-sm);
      background: var(--cream-100); border: 1.5px dashed var(--ink-300); color: var(--text-muted);
      font-size: var(--text-small); text-align: center; padding: 12px; }
.ph--portrait { background: var(--accent-2); border-style: solid; border-color: var(--ink);
                font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); }

/* ============ TABELL ============ */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.table th { text-align: left; font-weight: 700; padding: 10px 12px; border-bottom: var(--border-strong); }
.table td { padding: 12px; border-bottom: 1px solid var(--cream-100); }
.table-scroll { overflow-x: auto; }

/* ============ FOOTER ============ */
.footer { background: var(--surface-inverse); color: var(--text-inverse); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-7);
                padding-top: 60px; padding-bottom: var(--space-7); }
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 12px; }
.footer__brand img { width: 18px; height: 18px; vertical-align: -3px; }
.footer h4 { font-family: var(--font-body); font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.footer__col { display: grid; gap: 10px; font-size: 13px; align-content: start; }
.footer a { color: var(--ink-300); }
.footer a:hover { color: var(--accent); }
.footer__blurb { font-size: 13px; line-height: 1.7; color: var(--ink-300); margin: 0; max-width: 260px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
                  padding-bottom: 30px; font-size: 12px; color: var(--footer-copy); }
.footer__bottom a { color: var(--footer-copy); text-decoration: underline; }
.footer__bottom a:hover { color: var(--accent); }

/* ============ SAMTYKKE (informasjonskapsler) ============ */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 720px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--surface-card); border: var(--border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-offset-lg);
  padding: 18px 22px;
  transform: translateY(140%);
  transition: transform .25s ease-out;
}
.cookie.is-vist { transform: none; }
.cookie__tekst { font-size: 13px; line-height: 1.6; margin: 0; flex: 1; min-width: 240px; }
.cookie__tekst a { font-weight: 700; border-bottom: 1.5px solid var(--ink); padding-bottom: 1px; }
/* Å si nei skal være like lett som å si ja — begge er ordentlige knapper. */
.cookie__valg { display: flex; gap: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
  .cookie { transition: none; }
}

/* ============ DEMOBAR (kun bak porten) ============ */
.demobar { background: var(--ink); color: var(--text-inverse); font-size: var(--text-small);
           display: flex; align-items: center; gap: 18px; padding: 9px 20px; overflow-x: auto; white-space: nowrap; }
.demobar__tag { font-weight: 700; letter-spacing: .08em; color: var(--accent); flex: none; }
.demobar a { color: var(--ink-300); }
.demobar a:hover { color: var(--accent); }
.demobar a.is-active { color: var(--accent); font-weight: 700; }
.demobar__spacer { flex: 1; }
.demobar button { background: none; border: 1px solid var(--ink-300); color: var(--ink-300);
                  border-radius: var(--radius-pill); padding: 4px 12px; font-size: var(--text-tiny);
                  font-family: var(--font-body); font-weight: 700; cursor: pointer; flex: none; }
.demobar button:hover { border-color: var(--accent); color: var(--accent); }

/* ============ APP-FLATER: felles skall ============ */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 38px); }
.app__side { background: var(--cream-100); border-right: var(--border-strong); padding: 24px 0; }
.app__main { padding: 32px 40px 64px; max-width: 1080px; }
.sidetab { display: flex; align-items: center; justify-content: space-between; gap: 10px;
           padding: 10px 22px; font-size: var(--text-base); font-weight: 500; cursor: pointer;
           background: none; border: 0; width: 100%; font-family: var(--font-body); color: var(--ink); text-align: left; }
.sidetab:hover { background: var(--cream-tint); }
.sidetab.is-active { font-weight: 700; background: var(--surface-page); box-shadow: inset 3px 0 0 var(--ink); }
.sidetab[disabled] { opacity: .45; cursor: not-allowed; }
.sidetab__badge { background: var(--accent); border: 1px solid var(--ink); border-radius: var(--radius-pill);
                  padding: 1px 8px; font-size: var(--text-tiny); font-weight: 700; }
.app__grouplabel { font-size: var(--text-tiny); font-weight: 700; letter-spacing: .1em;
                   color: var(--text-muted); padding: 18px 22px 8px; }

/* ============ RESPONSIVT ============ */
@media (max-width: 900px) {
  :root { --container-pad: 20px; }
  .h1 { font-size: 32px; }
  .h2 { font-size: 26px; }
  .h3 { font-size: 21px; }
  .section { padding-top: 56px; padding-bottom: 56px; }

  /* logo | CTA | burger på én linje, menyen bretter ut under */
  .nav { padding-top: 18px; flex-wrap: wrap; gap: 12px; }
  .nav__brand { flex: 1; font-size: 18px; }
  .nav__brand img { width: 22px; height: 22px; }
  .nav .btn-pill { order: 2; padding: 7px 16px; font-size: 13px; }
  .nav__burger { order: 3; }
  .nav__links {
    display: none; order: 4; width: 100%; flex-direction: column; gap: 0;
    background: var(--surface-page); border: var(--border-strong); border-radius: var(--radius-md);
    box-shadow: var(--shadow-offset); margin-top: 14px; padding: 6px 0;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 11px 18px; }
  .nav__links a.is-active { border-bottom: 0; }
  .nav__burger { display: block; }

  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-5); padding-top: 44px; }
  .stats { gap: var(--space-5); }

  .app { grid-template-columns: 1fr; min-height: 0; }
  .app__side { border-right: 0; border-bottom: var(--border-strong); display: flex; overflow-x: auto; padding: 0; }
  .app__side .app__grouplabel { display: none; }
  .sidetab { width: auto; white-space: nowrap; padding: 12px 16px; }
  .sidetab.is-active { box-shadow: inset 0 -3px 0 var(--ink); }
  .app__main { padding: 24px 20px 48px; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
}
