/* leveranser.hallingcast.no — global CSS.
   Tokens og komponentstil hentet fra hallingcast-repoet
   (web/assets/css/tokens/ + components/). Selvhostede fonter. */

/* ── Fonter ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/BebasNeue-Regular.woff") format("woff");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Inter-VariableFont_opsz,wght.woff") format("woff") tech(variations),
       url("../fonts/Inter-VariableFont_opsz,wght.woff") format("woff-variations");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Inter-Italic-VariableFont_opsz,wght.woff") format("woff") tech(variations),
       url("../fonts/Inter-Italic-VariableFont_opsz,wght.woff") format("woff-variations");
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* Farger (colors.css) */
  --ink: #333333;
  --ink-black: #000000;
  --paper: #ffffff;
  --gray-950: #191919;
  --gray-700: #303030;
  --gray-600: #3d3d3d;
  --gray-500: #666666;
  --gray-400: #aaaaaa;
  --gray-300: #d9d9d9;
  --gray-200: #e2e2e2;
  --gray-50:  #f7f7f7;
  --on-dark: #f7f7f7;
  --on-dark-muted: #e0e1e6;
  --accent-green: #b8d048;
  --accent-magenta: #e8a7ec;      /* rosa (tokens: FILM OR PHOTO-badge) */
  --accent-pink: #f97fff;         /* hover-rosa (text-link / footer-kontakt) */
  --brand: #00466a;

  --text-headline: var(--ink);
  --text-body: var(--ink);
  --text-muted: var(--gray-600);
  --surface-page: var(--paper);
  --surface-subtle: var(--gray-50);
  --surface-footer: var(--gray-700);

  /* Typografi (typography.css) */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display-hero-size: 110px;
  --display-hero-leading: 0.9;
  --display-hero-tracking: 0.216px;
  --display-section-size: 40px;
  --display-section-leading: 1.0;
  --display-section-tracking: -1px;
  --text-lede-size: 15px;
  --text-body-size: 16px;
  --text-body-leading: 1.5;
  --text-small-size: 14px;
  --text-small-leading: 1.4;
  --text-caption-size: 13px;
  --text-micro-size: 11px;

  /* Layout (spacing.css) */
  --content-width: 1232px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 64px;
  --space-9: 104px;
  --radius-none: 0;
  --button-height: 42px;

  /* Blokk-luft: 40px mobil / 80px desktop */
  --block-gap: 40px;
}
@media (min-width: 768px) {
  :root { --block-gap: 80px; }
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-leading);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-headline);
  text-transform: uppercase;
  margin: 0;
}
a { color: inherit; }
img { max-width: 100%; }

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: var(--space-2);
  z-index: 300;
  padding: var(--space-2) var(--space-4);
  background: var(--ink-black);
  color: var(--paper);
  transform: translateY(-150%);
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Topp: liten Hallingcast-logo + eyebrow ─────────────────────────────── */
.topbar {
  background: var(--paper);
  font-family: var(--font-body);
}
.topbar__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: 0 var(--space-5);
}
.topbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.topbar__logo img {
  display: block;
  height: 33px;
  width: auto;
  transition: transform 0.25s ease;
}
/* Hjem-hint (hallingcast navbar.css): C-en vipper -12° og «Heim» ruller ut
   med grønn underline. */
.topbar__logo:hover img,
.topbar__logo:focus-visible img { transform: rotate(-12deg); }
.topbar__logo-peek {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-black);
  border-bottom: 4px solid var(--accent-green);
  margin-left: 0;
  transition: max-width 0.3s ease, opacity 0.25s ease, margin-left 0.3s ease;
}
.topbar__logo:hover .topbar__logo-peek,
.topbar__logo:focus-visible .topbar__logo-peek {
  max-width: 120px;
  opacity: 1;
  margin-left: 9px;
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.topbar__logout {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-micro-size);
  line-height: 1.1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.topbar__logout:hover,
.topbar__logout:focus-visible { color: var(--accent-pink); }
.topbar__eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-micro-size);
  line-height: 1.1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-black);
}

/* ── Sideinnhold ────────────────────────────────────────────────────────── */
.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--block-gap) var(--space-5) var(--block-gap);
}
.blocks {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
}
.block { margin: 0; }

/* Kundelogo — tydelig, sentralt */
.client-logo {
  display: flex;
  justify-content: center;
  padding: var(--space-5) 0;
}
.client-logo img {
  display: block;
  width: min(100%, 360px);
  min-width: 0;
  height: auto;
}

/* Tittel + oppsummering */
.intro { max-width: 70ch; }
.intro__title {
  font-size: clamp(56px, 12vw, var(--display-hero-size));
  line-height: var(--display-hero-leading);
  letter-spacing: var(--display-hero-tracking);
  color: var(--ink-black);
  margin: 0 0 var(--space-6);
}
.intro__meta {
  font-weight: 300;
  font-size: var(--text-lede-size);
  line-height: 1.35;
  color: var(--text-muted);
  margin: 0 0 var(--space-5);
}
.intro p { margin: 0 0 var(--space-4); }
.intro p:last-child { margin-bottom: 0; }

/* Seksjonsoverskrift (40px-nivået) */
.section-heading {
  font-size: var(--display-section-size);
  line-height: var(--display-section-leading);
  letter-spacing: var(--display-section-tracking);
  color: var(--ink-black);
  margin: 0 0 var(--space-6);
}

/* Galleri — rutenett i sidens stil (blocks.css: blokkGalleri) */
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.gallery__item { margin: 0; }
.gallery__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--gray-300);
}
@media (min-width: 600px)  { .gallery__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery__grid { grid-template-columns: repeat(3, 1fr); } }

/* Nedlasting — knapper (blocks.css: .block__button) */
.downloads__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-caption-size);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink-black);
  text-decoration: none;
  text-align: left;
  padding: 10px var(--space-6);
  min-height: var(--button-height);
  line-height: 1.3;            /* lange tekster brekker inni knappen på mobil */
  border-radius: var(--radius-none);
  transition: background 0.15s ease, color 0.15s ease;
}
.button__arrow { flex: none; }
.button:hover,
.button:focus-visible {
  background: var(--accent-green);
  color: var(--ink-black);
}
.button--pink {
  background: var(--accent-magenta);
  color: var(--ink-black);
}
.button--pink:hover,
.button--pink:focus-visible {
  background: var(--ink-black);
  color: var(--paper);
}
.button--disabled,
.button--disabled:hover,
.button--disabled:focus-visible {
  background: var(--gray-200);
  color: var(--gray-500);
  cursor: not-allowed;
}
.button--disabled:hover .button__arrow { animation: none; }
.button__arrow { display: inline-flex; }
.button:hover .button__arrow { animation: arrow-spin 0.4s ease; }
.downloads__note {
  margin: var(--space-5) 0 0;
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--text-muted);
}
.downloads__note a { color: inherit; }

/* Text-link med pil (products.css: .text-link) */
.text-link {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-micro-size);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-black);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: color 0.25s ease;
}
.text-link:hover { color: var(--accent-pink); }
.text-link:active { color: var(--accent-green); }
.text-link__arrow { display: inline-flex; }
.text-link:hover .text-link__arrow { animation: arrow-spin 0.4s ease; }
@keyframes arrow-spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

/* ── Footer — forenklet mørk (footer.css) ───────────────────────────────── */
.footer {
  background: var(--surface-footer);
  color: var(--on-dark-muted);
  font-family: var(--font-body);
  padding: var(--space-7) var(--space-5) var(--space-5);
}
.footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
}
.footer__logo {
  display: block;
  width: 184px;
  max-width: 100%;
}
.footer__logo img {
  display: block;
  width: 100%;
  height: auto;
}
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--on-dark-muted);
  margin: 0;
  transition: color 0.2s ease;
}
.footer__row a {
  color: inherit;
  text-decoration: none;
}
.footer__row:hover,
.footer__row:hover a { color: var(--accent-pink); }
.footer__row-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: none;
  background-color: var(--on-dark);
  -webkit-mask: var(--m) no-repeat center / contain;
  mask: var(--m) no-repeat center / contain;
  transition: background-color 0.2s ease, transform 0.5s ease;
}
.footer__row:hover .footer__row-icon {
  background-color: var(--accent-pink);
  transform: rotateY(360deg);
}
.footer__legal {
  width: 100%;
  border-top: 1px solid rgba(247, 247, 247, 0.2);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  font-size: var(--text-small-size);
  color: var(--on-dark-muted);
}
@media (max-width: 767px) {
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ── Rot-side (leveranser.hallingcast.no/) ──────────────────────────────── */
.root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.root__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--block-gap) var(--space-5);
  text-align: center;
}
.root__logo {
  display: block;
  width: min(100%, 320px);
  min-width: 0;
  height: auto;
}
.root__title {
  font-size: var(--display-section-size);
  line-height: var(--display-section-leading);
  letter-spacing: var(--display-section-tracking);
  color: var(--ink-black);
}

/* ── Innloggingsside (middleware viser denne uten gyldig cookie) ────────── */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.login__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
}
.login__client {
  display: block;
  width: min(100%, 160px);
  min-width: 0;
  height: auto;
  margin-bottom: var(--space-7);
}
.login__mark {
  display: block;
  width: 36px;
  height: auto;
  margin-top: var(--space-9);
}
.login__form {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.login__label {
  font-weight: 700;
  font-size: var(--text-caption-size);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-black);
}
.login__row {
  display: flex;
  gap: var(--space-2);
}
.login__input {
  flex: 1;
  min-width: 0;
  height: var(--button-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--ink-black);
  border-radius: var(--radius-none);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  color: var(--ink);
}
.login__input:focus {
  outline: 2px solid var(--accent-green);
  outline-offset: 0;
}
.login__row .button {
  padding: 0 var(--space-5);
  border: 0;
  cursor: pointer;
}
.login__error {
  margin: var(--space-2) 0 0;
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .topbar__logo img,
  .button,
  .text-link,
  .footer__row,
  .footer__row-icon,
  .skip-link { transition: none; }
  .topbar__logo:hover img,
  .topbar__logo:focus-visible img { transform: none; }
  .topbar__logo-peek { display: none; }
  .button:hover .button__arrow,
  .text-link:hover .text-link__arrow { animation: none; }
  .footer__row:hover .footer__row-icon { transform: none; }
}
