/* ==========================================================================
   husleiestrom.no
   --------------------------------------------------------------------------
   Hand-written in October 2026 to replace the Elementor export. Built on the
   Rentelligent / Husleie.no design system (tokens, buttons, focus, radius,
   cards) and laid out like rentelligent.com. Additions the design system does
   not cover (marketing heading sizes, long-text line height, section rhythm)
   are marked [PROPOSED].

   Plain CSS, no build step. Sections, top to bottom:
   fonts · tokens · base · layout · type · buttons · header · footer ·
   components (alphabetical) · page sections · print
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */

/* Inter 4, variable (weight + optical size), self-hosted. SIL OFL 1.1. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----------------------------------------------------------------- tokens */

:root {
  /* design system: brand */
  --c-primary:          #00aa73;
  --c-primary-dark:     #009162;   /* button border, never a hover colour */
  --c-primary-light:    #e5f7f1;
  --c-secondary:        #0a1f44;   /* navy */
  --c-secondary-dark:   #0f192b;

  /* design system: surfaces and text */
  --c-background:       #ffffff;
  --c-card:             #fafafb;
  --c-muted:            #f5f6f8;
  --c-border:           #eef0f3;
  --c-border-dark:      #e0e2e4;
  --c-accent:           #0a1f440d; /* 5% navy, the universal hover wash */
  --c-foreground:       #090a0b;
  --c-muted-foreground: #707782;
  --c-info:             #1951b4;

  /* site roles */
  --ink:       #181d27;                     /* headings and body copy, from the old site */
  --ink-soft:  #535862;                     /* lead text, from the old site; 7.3:1 on white */
  --ink-meta:  var(--c-muted-foreground);   /* small print and labels; 4.6:1 on white */
  --on-navy:   #ffffff;
  --on-navy-soft: #c4ccda;                  /* [PROPOSED] secondary text on navy, as on rentelligent.com */
  --band-mint: #f3fbf7;                     /* the Husleiestrøm section tint, kept from the old site */

  /* design system: spacing (steps 5+ compress on phones) */
  --space-1: 4px; --space-2: 6px; --space-3: 8px; --space-4: 12px; --space-5: 16px;
  --space-6: 20px; --space-7: 24px; --space-8: 32px; --space-9: 40px; --space-10: 56px;
  /* [PROPOSED] section rhythm for a marketing page */
  --section: clamp(56px, 7vw, 96px);

  /* design system: radius ladder, nothing else */
  --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-full: 9999px;

  /* design system: type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600;
  --lh-tight: 1.1; --lh-normal: 1.4;
  --lh-prose: 1.6;                          /* [PROPOSED] paragraphs longer than one line */
  /* [PROPOSED] marketing display sizes; the design system stops at 40px (H1) */
  --text-hero:  clamp(36px, 4.6vw, 56px);
  --text-page:  clamp(32px, 3.8vw, 44px);
  --text-h2:    clamp(26px, 2.8vw, 36px);
  --text-h3:    24px;
  --text-h4:    20px;
  --text-lead:  clamp(17px, 1.3vw, 18px);
  --text-body:  16px;
  --text-sm:    14px;
  --text-xs:    12px;

  /* design system: focus, motion, effects */
  --focus: 3px solid var(--c-info);
  --motion-fast: 120ms; --motion-normal: 180ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-button: inset 0 2px 2px 0 rgba(255, 255, 255, .4), inset 0 -2px 2px 0 rgba(0, 0, 0, .17);
  --shadow-card: 0 12px 16px -4px rgba(0, 0, 0, .08);  /* [PROPOSED] the offer card shadow, from the old site */

  /* one content column for every page */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 80px;
}

@media (max-width: 768px) {
  :root {
    --space-5: 14px; --space-6: 16px; --space-7: 18px; --space-8: 24px; --space-9: 32px; --space-10: 40px;
    --header-h: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion-fast: 0ms; --motion-normal: 0ms; }
}

/* ------------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--c-background);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: var(--lh-prose);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: var(--fw-semibold); line-height: var(--lh-tight); text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
figure { margin: 0; }
address { font-style: normal; }

a { color: inherit; }
/* links inside running text: dark, with the brand green as the underline */
.prose a:not(.btn), .link, .smallprint a {
  color: inherit; text-decoration: underline; text-decoration-color: var(--c-primary);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose a:not(.btn):hover, .link:hover, .smallprint a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--c-primary-light); color: var(--c-secondary); }

.skip-link {
  position: absolute; z-index: 100; top: 8px; left: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--c-secondary); color: #fff; font-weight: var(--fw-semibold); text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.icon { width: 24px; height: 24px; flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* spacing between blocks that are not in a .prose or .stack */
.mt-sm { margin-top: var(--space-5); }
.mt-md { margin-top: var(--space-7); }
.mt-lg { margin-top: var(--space-8); }

/* ----------------------------------------------------------------- layout */

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(760px + 2 * var(--gutter)); }

.section { padding-block: var(--section); }
/* two plain white sections in a row share one gap */
.section:not(.band-mint) + .section:not(.band-mint) { padding-top: 0; }
.band-mint { background: var(--band-mint); }

.section-head { display: grid; gap: var(--space-4); margin-bottom: clamp(24px, 3vw, 40px); }
.section-head--center { justify-items: center; text-align: center; }

.split { display: grid; gap: clamp(32px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
}
.split > *, .grid > * { min-width: 0; }

.grid { display: grid; gap: var(--space-5); }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------------------------------------------- type */

.t-hero { font-size: var(--text-hero); line-height: 1.08; }
.t-page { font-size: var(--text-page); }
.t-h2   { font-size: var(--text-h2); }
.t-h3   { font-size: var(--text-h3); }
.t-h4   { font-size: var(--text-h4); line-height: 1.25; }
.lead   { font-size: var(--text-lead); line-height: 1.55; color: var(--ink-soft); max-width: 52ch; }
.meta   { font-size: var(--text-sm); line-height: var(--lh-normal); color: var(--ink-meta); }

/* long text: legal pages and the plain content pages */
.prose { max-width: 72ch; overflow-wrap: break-word; }
.prose > * + * { margin-top: var(--space-5); }
.prose h2 { margin-top: var(--space-9); font-size: var(--text-h3); }
.prose h3 { margin-top: var(--space-7); font-size: var(--text-h4); line-height: 1.25; }
.prose h2 + *, .prose h3 + * { margin-top: var(--space-4); }
.prose ul, .prose ol { display: grid; gap: var(--space-3); padding-left: 22px; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 22px; }
.prose ul > li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--c-primary); }
.prose strong { font-weight: var(--fw-semibold); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: var(--lh-normal); }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--c-border-dark); text-align: left; vertical-align: top; }
.prose th { background: var(--c-muted); font-weight: var(--fw-semibold); }

/* ---------------------------------------------------------------- buttons */
/* Design system rule 1: 40px tall, radius 8. Rule 2: each variant has its own
   hover. Rule 3: the primary carries its bevel. */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 11px 16px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; font-weight: var(--fw-semibold); line-height: 16px;
  text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-in-out), background-image var(--motion-fast) var(--ease-in-out);
}

.btn--primary { background-color: var(--c-primary); border-color: var(--c-primary-dark); color: #fff; box-shadow: var(--shadow-button); }
.btn--primary:hover { background-image: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)); }

.btn--outline { background-color: var(--c-background); border-color: var(--c-border-dark); color: var(--c-secondary-dark); }
.btn--outline:hover { background-image: linear-gradient(var(--c-accent), var(--c-accent)); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 480px) { .btn-row--stack { flex-direction: column; } .btn-row--stack .btn { width: 100%; } }

/* ----------------------------------------------------------------- header */
/* Logo and two buttons only (UX review, October 2026); no menu. */

.site-header { background: #fff; box-shadow: 0 4px 30px rgba(0, 0, 0, .07); position: relative; z-index: 10; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.logo img { width: 186px; }
.header__actions { display: flex; gap: var(--space-3); }
@media (max-width: 480px) {
  .logo img { width: 112px; }
  .header__actions .btn { padding-inline: 12px; }
}
/* narrow phones: the design system's small button, so logo and both
   buttons still fit on one row at 320px */
@media (max-width: 400px) {
  .header__inner { gap: var(--space-3); }
  .logo img { width: 100px; }
  .header__actions { gap: var(--space-2); }
  .header__actions .btn { min-height: 32px; padding: 7px 8px; font-size: 13px; line-height: 14px; }
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  padding: 56px 0 24px;
  background: var(--c-secondary) url(../img/footer-wave.svg) no-repeat center bottom 64px / min(1040px, 92%) auto;
  color: var(--on-navy);
  text-align: center;
  font-size: var(--text-sm);
}
.footer__part { display: grid; justify-items: center; gap: var(--space-4); }
.footer__part p { color: var(--on-navy-soft); }
.footer__part img { width: 190px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; margin-top: var(--space-7); list-style: none; }
.footer__part a, .footer__links a, .footer__social a { text-decoration: none; }
.footer__part a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__links a { display: inline-block; padding-block: 8px; font-size: 15px; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__heading { margin-top: var(--space-7); font-size: var(--text-sm); font-weight: var(--fw-regular); color: var(--on-navy-soft); }
.footer__social { display: flex; justify-content: center; gap: 4px; margin-top: var(--space-3); list-style: none; }
.footer__social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); }
.footer__social a:hover { background: rgba(255, 255, 255, .08); }
.footer__social svg { width: 18px; height: 18px; }
.footer__made { margin-top: var(--space-5); color: var(--on-navy-soft); }
.footer__base { margin-top: 72px; color: var(--on-navy-soft); font-size: var(--text-xs); }

/* ------------------------------------------------------------- components */

/* article card: image, title, outline button */
.article-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
}
.article-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-card__body { display: flex; flex: 1; flex-direction: column; align-items: center; gap: var(--space-6); padding: var(--space-7); text-align: center; }
.article-card__title { font-size: 18px; font-weight: var(--fw-medium); line-height: 1.35; }
.article-card .btn { margin-top: auto; }

/* check list: green check icon, one line per point */
.checks { display: grid; gap: var(--space-4); list-style: none; }
.checks li { display: flex; align-items: flex-start; gap: var(--space-3); }
.checks .icon { margin-top: 0; }

/* document list: one clickable row per terms document (the Vilkår page).
   Design system rule 7: a clickable surface changes background and border
   together on hover. */
.doc-list { display: grid; gap: var(--space-4); max-width: 760px; list-style: none; }
.doc-link {
  display: grid; gap: var(--space-2); padding: var(--space-6) var(--space-7);
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background-color var(--motion-fast) var(--ease-in-out), border-color var(--motion-fast) var(--ease-in-out);
}
.doc-link:hover { background: var(--c-accent); border-color: var(--c-border-dark); }
.doc-link:focus-visible { outline-color: var(--c-primary); }
.doc-link__title { font-size: 18px; line-height: 1.3; }
.doc-link:hover .doc-link__title { text-decoration: underline; text-decoration-color: var(--c-primary); text-underline-offset: 3px; }

/* embedded listings from husleie.no */
.embed { width: 100%; height: 420px; border: 0; }
@media (max-width: 719px) { .embed { height: 1180px; } }

/* photo with the design-system card radius */
.photo img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; }

/* small print under an offer */
.smallprint { font-size: var(--text-sm); line-height: 1.5; color: var(--ink-meta); }
.smallprint > * + * { margin-top: var(--space-3); }

/* step card: check icon beside a title and a sentence */
.step-card {
  display: flex; gap: var(--space-4); padding: var(--space-8) var(--space-7);
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
}
.step-card h3 { font-size: 22px; font-weight: var(--fw-medium); }
.step-card p { margin-top: var(--space-3); color: var(--ink-meta); }

/* price list table: scrolls sideways on small screens rather than squashing */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-border-dark); border-radius: var(--radius-md); }
.price-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: var(--text-sm); line-height: var(--lh-normal); }
.price-table th, .price-table td { padding: 14px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-border); }
.price-table thead th { background: var(--c-muted); font-weight: var(--fw-semibold); white-space: nowrap; }
.price-table tbody th { font-weight: var(--fw-semibold); }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table a { color: var(--c-info); text-underline-offset: 3px; }

/* ---------------------------------------------------------- page sections */

/* hero: text left, photo right; photo under the text below 900px */
.hero { padding-block: clamp(32px, 5vw, 64px); }
.hero h1 + .lead { margin-top: var(--space-7); }
.hero .btn-row { margin-top: var(--space-8); }
.hero .photo img { aspect-ratio: 793 / 715; max-height: 620px; }
@media (max-width: 899px) { .hero .photo img { aspect-ratio: 3 / 2; } }

/* offer: photo left, white card right */
.offer__card {
  padding: clamp(24px, 3vw, 40px);
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.offer__card h2 { font-size: clamp(28px, 2.6vw, 33px); font-weight: var(--fw-medium); }
.offer__card .t-h4 { margin-top: var(--space-4); font-weight: var(--fw-medium); }
.offer__card .checks { margin-top: var(--space-7); color: var(--ink-meta); }
.offer__card .smallprint { margin-top: var(--space-7); }
.offer__card .btn { margin-top: var(--space-7); }
.offer .photo img { aspect-ratio: 1; }
@media (max-width: 899px) { .offer .photo { display: none; } }

.center { display: flex; justify-content: center; margin-top: var(--space-8); }

/* plain page: title block above long text */
.page-head { padding-block: clamp(40px, 6vw, 72px) var(--space-8); }
.page-head .lead { margin-top: var(--space-5); }
.page-head h1 + .meta { margin-top: var(--space-4); }
.page-body { padding-bottom: var(--section); }

/* ------------------------------------------------------------------ print */

@media print {
  .site-header .header__actions, .site-footer, .skip-link { display: none; }
  body { color: #000; }
}
