/* Akari starter kit · style
 *
 * Two parts:
 *   1. @layer kit and @layer switches: the mechanics the behaviour depends on (touch targets, the menu
 *      takeover, the carousel, the form, the action bar, iOS, reveal). Keep them. They use only tokens, so
 *      they take any look. kit comes first, so the look can restyle it; switches (the phone breakpoint,
 *      landscape, reduced motion) comes last, so no look can break the behaviour.
 *   2. @layer base, components, pages: the look. Here it is a WIREFRAME, grey and plain on purpose.
 *      Replace it with the direction in RETNING.md: design every token, the type, the header, the buttons,
 *      the cards, the menu, the form and the footer from scratch. Do not adjust the wireframe.
 *      Remove --wireframe from :root when the look is yours (the build warns while it is there).
 *
 * Two kinds of rule stay unlayered, at the very end: [hidden] (RULES.md L12), and the overrides of what
 * Akari Engine injects (the cookie banner, the privacy notice), because injected CSS beats any layer.
 */
@layer kit, base, components, pages, switches;

/* =====================================================================================================
   1 · The kit: mechanics. Keep.
   ===================================================================================================== */
@layer kit {
  *, *::before, *::after { box-sizing: border-box; }

  /* html and body carry the colour of the iPhone bars; main carries the page (I1). */
  html {
    background-color: var(--color-deep);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
  }
  body { margin: 0; background-color: var(--color-deep); -webkit-font-smoothing: antialiased; }
  main { display: block; background-color: var(--color-bg); overflow-x: clip; }
  /* An instant restore after the menu closes (T4), and the scroll lock while it is open. */
  html[data-instant] { scroll-behavior: auto; }
  html[data-locked], html[data-locked] body { overflow: hidden; }

  h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
  p, li, dd, figcaption, blockquote { text-wrap: pretty; }
  /* No automatic hyphenation (L9). */
  * { hyphens: manual; }

  img, svg, video { display: block; max-width: 100%; height: auto; }
  svg.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -0.2em; }
  button, input, select, textarea { font: inherit; color: inherit; }
  :focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

  /* Anchor targets clear the header (never scroll-padding on html). */
  [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

  .nw { white-space: nowrap; }
  .visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .skip { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--color-surface); color: var(--color-text); }
  .skip:focus { top: 12px; }
  .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

  /* The contact section on a wide screen: the heading beside the form, so both fit one laptop screen (L13). */
  @media (min-width: 900px) {
    [data-form] > .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
    [data-form] > .wrap > .section__head { margin-bottom: 0; }
  }

  /* Buttons and links: 44–48 px targets (A2). */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; text-decoration: none; cursor: pointer;
  }
  .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
  .card > a, .link-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
  details > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; }

  /* Header */
  .site-header { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
  .site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
  .site-header__logo { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
  .site-nav { display: flex; align-items: center; }
  .site-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
  .menu-button { display: none; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; cursor: pointer; }

  /* The menu takeover (T2–T12) */
  .takeover {
    position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
    margin: 0; padding: 0; border: 0;
    background: var(--color-deep); color: var(--color-on-deep);
    overscroll-behavior: contain;
  }
  .takeover::backdrop { background: var(--color-deep); }
  .takeover[open] { display: flex; flex-direction: column; }
  .takeover__top {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: var(--header-h); padding: env(safe-area-inset-top) var(--gutter) 0; flex: none;
  }
  .takeover__close { display: inline-grid; place-items: center; width: 48px; height: 48px; cursor: pointer; }
  .takeover__body { flex: 1; overflow-y: auto; padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom)); }
  .takeover__links { list-style: none; margin: 0; padding: 0; }
  .takeover__links a { display: flex; align-items: center; min-height: 56px; text-decoration: none; }
  .takeover__contact a { display: inline-flex; align-items: center; min-height: 44px; }

  /* Carousel (K1–K9): the list, and the bar with the counter */
  .cards { margin: 0; padding: 0; list-style: none; }
  .cards > li { min-width: 0; }
  .carousel-bar { display: none; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
  .carousel-bar__count { font-variant-numeric: tabular-nums; }
  .carousel-bar__buttons { display: flex; gap: 8px; }
  .carousel-bar button { width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
  .carousel-bar button:disabled { cursor: default; }

  /* Form (S1–S15) */
  .form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .form fieldset { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
  .form legend { padding: 0; }
  .field { display: grid; gap: 6px; min-width: 0; }
  .field input, .field select, .field textarea {
    width: 100%; min-height: 48px;
    font-size: max(16px, 1rem); /* 16 px or iOS zooms (S9) */
  }
  .field textarea { min-height: 104px; resize: vertical; }   /* three lines: the whole form fits a laptop screen (L13) */
  .field [aria-invalid="true"] { border-color: var(--color-error); }
  .field__error { margin: 0; color: var(--color-error); }
  .form__summary ul { margin: 8px 0 0; padding-left: 20px; }
  .form__steps { display: flex; justify-content: space-between; gap: 12px; }
  /* The submit button stands in its own block: the published privacy notice goes before it. */
  [data-submit-row] { display: flex; flex-wrap: wrap; gap: 12px; }
  .form[aria-busy="true"] [type="submit"] { opacity: 0.7; cursor: progress; }
  .form__status, .form__answer { scroll-margin: calc(var(--header-h) + 16px) 0 calc(var(--bar-h) + 24px); }
  .form__status:empty { margin: 0; }
  /* The honeypot is off screen, inert and aria-hidden in the markup (S1). */
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  /* Action bar (H1–H6, E2) */
  .actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: none; align-items: center; gap: 10px;
    padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)) 72px; /* 72 px: the cookie button's slot */
    background: var(--color-deep); color: var(--color-on-deep);
    transform: translateY(110%);
    transition: transform var(--dur) var(--ease);
  }
  .actionbar[data-visible="true"] { transform: none; }
  .actionbar .btn { flex: 1; min-height: 48px; padding-inline: 12px; }
  .actionbar__slot { position: absolute; left: 12px; bottom: calc(8px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }

  /* Reveal (E5, A7): visible without JavaScript */
  html[data-js] .reveal:not([data-shown]) { opacity: 0; transform: translateY(16px); }
  .reveal { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }

  /* Footer targets (A2) */
  .site-footer { padding-bottom: env(safe-area-inset-bottom); }
  .site-footer a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
}

/* The switches: the mechanics that must win over any look, so they sit in the last layer. Keep. */
@layer switches {
  /* Phone (the one breakpoint, T3: keep it equal to script.js) */
  @media (max-width: 899.98px) {
    .site-nav { display: none; }
    .menu-button { display: inline-flex; }
    .actionbar { display: flex; }
    /* Room for the action bar, in the footer's own colour (no light band above it). */
    body:has(.actionbar) .site-footer { padding-bottom: calc(32px + var(--bar-h) + env(safe-area-inset-bottom)); }
    .btn-row { display: grid; grid-template-columns: minmax(0, 1fr); }
    .btn-row .btn { width: 100%; }
    [data-submit-row] .btn { width: 100%; }

    [data-carousel] {
      display: flex; gap: 16px;
      overflow-x: auto; overscroll-behavior-x: contain;
      scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
      margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
      scrollbar-width: none;
    }
    [data-carousel]::-webkit-scrollbar { display: none; }
    [data-carousel] > li { flex: 0 0 82%; scroll-snap-align: start; scroll-margin-inline: var(--gutter); }
    .carousel-bar { display: flex; }
  }

  /* Landscape phone: fixed elements take little room (H5, T10) */
  @media (max-height: 480px) and (orientation: landscape) {
    .site-header { position: static; }
    .actionbar { padding-block: 4px calc(4px + env(safe-area-inset-bottom)); }
    .actionbar .btn { min-height: 44px; }
    .takeover__links a { min-height: 48px; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms; animation-iteration-count: 1; transition-duration: 0.01ms; }
    html[data-js] .reveal:not([data-shown]) { opacity: 1; transform: none; }
  }
}

/* =====================================================================================================
   2 · The look: «Utsikten» (RETNING.md). NUVIs grønne profil, bomull som bakgrunn, karmen som ramme.
   ===================================================================================================== */
@layer base {
  :root {
    /* AGENTS.md requires these eight */
    --color-bg: #f4f1e8;             /* bomull, standardfargen på vinduene deres */
    --color-surface: #ffffff;
    --color-text: #112d1a;           /* NUVI-grønn, mørk */
    --color-text-muted: #47584c;
    --color-accent: #2c6a43;
    --color-accent-muted: #dbe8d3;
    --font-display: 'Archivo', var(--fallback-sans);
    --font-body: 'Albert Sans', var(--fallback-sans);

    /* Roles the kit uses */
    --color-deep: #112d1a;
    --color-on-deep: #f4f1e8;
    --color-on-accent: #ffffff;
    --color-line: #d8d3c4;
    --color-line-on-deep: rgb(244 241 232 / 0.2);
    --color-field: #6f8074;
    --color-error: #a3261c;
    --color-focus: #112d1a;
    --fallback-sans: 'Akari Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    /* The site's own */
    --color-leaf: #a8c48c;           /* strekfargen i NUVIs egne ikoner */
    --color-muted-on-deep: #c6d0c2;
    --color-shade: rgb(17 45 26 / 0.14);

    /* Measures. Spacing and type take the height into account (L13). */
    --space-section: clamp(56px, min(8vw, 10vh), 120px);
    --space-head: clamp(24px, min(3.5vw, 5vh), 48px);
    --gap: 24px;
    --gutter: clamp(20px, 5vw, 56px);
    --measure: 62ch;
    --wrap: 1240px;
    --radius: 2px;
    --header-h: 76px;
    --bar-h: 64px;
    --frame: clamp(8px, 1vw, 14px);

    --step--1: 0.875rem;
    --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
    --step-1: clamp(1.2rem, 1.08rem + 0.5vw, 1.4rem);
    --step-2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    --step-3: clamp(1.9rem, min(1.35rem + 2.3vw, 6.2vh), 3.1rem);
    --step-4: clamp(2.7rem, min(1.4rem + 4.6vw, 9.5vh), 5.25rem);

    --dur: 0.3s;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    color-scheme: light;
  }

  @font-face {
    font-family: 'Akari Fallback';
    src: local('Arial');
    size-adjust: 91.5%;
    ascent-override: 97.2%;
    descent-override: 24%;
    line-gap-override: 0%;
  }

  body { color: var(--color-text); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65; }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.04; letter-spacing: -0.015em; color: var(--color-text); }
  h1 { font-size: var(--step-4); }
  h2 { font-size: var(--step-3); }
  h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.2; letter-spacing: 0; }
  p { margin: 0 0 1em; max-width: var(--measure); }
  :is(h1, h2, h3) + :is(p, ul, ol, dl) { margin-top: 0.7em; }
  p:last-child { margin-bottom: 0; }
  a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
  a:hover { text-decoration-color: var(--color-accent); }

  .section { padding-block: var(--space-section); }
  .section__head { margin-bottom: var(--space-head); max-width: 820px; }
  .eyebrow { margin: 0 0 14px; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); }
  .lead { font-size: var(--step-1); line-height: 1.5; color: var(--color-text-muted); }

  /* Mørke bånd: samme grønn som logoen. Fokusringen blir lys her. */
  .band--deep, .site-header, .site-footer, .takeover, .actionbar { --color-focus: var(--color-leaf); }
  .band--deep { background: var(--color-deep); color: var(--color-on-deep); }
  .band--deep :is(h2, h3) { color: var(--color-on-deep); }
  .band--deep .eyebrow { color: var(--color-leaf); }
  .band--deep .lead, .band--deep p { color: var(--color-muted-on-deep); }
  .band--surface { background: var(--color-surface); }
}

@layer components {
  .btn { padding: 13px 24px; border: 1.5px solid transparent; border-radius: var(--radius); font-weight: 600; line-height: 1.2; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
  .btn--primary { background: var(--color-accent); color: var(--color-on-accent); }
  .btn--primary:hover { background: var(--color-deep); }
  .btn--ghost { border-color: currentColor; background: transparent; }
  .btn--ghost:hover { background: var(--color-accent-muted); color: var(--color-text); border-color: var(--color-accent-muted); }
  .link-cta { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--color-accent); }
  .link-cta:hover { color: var(--color-accent); }
  .link-cta .icon { transition: transform var(--dur) var(--ease); }
  .link-cta:hover .icon { transform: translateX(4px); }

  /* På mørk bunn er knappen lysegrønn med mørk tekst. */
  :is(.site-header, .takeover, .actionbar, .band--deep) .btn--primary { background: var(--color-leaf); color: var(--color-deep); }
  :is(.site-header, .takeover, .actionbar, .band--deep) .btn--primary:hover { background: var(--color-on-deep); }
  :is(.takeover, .actionbar, .band--deep) .btn--ghost:hover { background: var(--color-line-on-deep); color: var(--color-on-deep); border-color: currentColor; }

  .site-header { background: var(--color-deep); color: var(--color-on-deep); border-bottom: 1px solid var(--color-line-on-deep); }
  .site-header__logo img { height: 46px; width: auto; }
  .site-nav { gap: 2px; }
  .site-nav a:not(.btn) { padding: 0 14px; text-decoration: none; font-weight: 600; font-size: 1rem; border-bottom: 2px solid transparent; transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
  .site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--color-leaf); border-bottom-color: var(--color-leaf); }
  .site-nav .btn { margin-left: 14px; }
  .menu-button { padding: 0 14px; background: transparent; color: inherit; border: 1.5px solid var(--color-line-on-deep); border-radius: var(--radius); font-weight: 600; }
  .menu-button:hover { border-color: var(--color-leaf); color: var(--color-leaf); }

  .takeover__top h2 { font-size: var(--step--1); font-family: var(--font-body); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-leaf); }
  .takeover__close { background: transparent; color: inherit; border: 1.5px solid var(--color-line-on-deep); border-radius: var(--radius); }
  .takeover__close:hover { border-color: var(--color-leaf); color: var(--color-leaf); }
  .takeover__links { margin-bottom: 32px; }
  .takeover__links a { font-family: var(--font-display); font-size: var(--step-2); font-weight: 800; letter-spacing: -0.01em; border-bottom: 1px solid var(--color-line-on-deep); }
  .takeover__links a:hover { color: var(--color-leaf); }
  .takeover__contact { margin-top: 32px; display: grid; gap: 4px; color: var(--color-muted-on-deep); }
  .takeover__contact a { font-weight: 600; color: var(--color-on-deep); }
  .takeover__contact p { margin: 0; }

  /* Karmen: bildet står i en hvit vinduskarm med vannbrett under. Signaturen. */
  .pane { position: relative; margin: 0; padding: var(--frame); background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-line), 0 24px 48px -28px var(--color-shade); }
  .pane::after { content: ""; position: absolute; left: calc(-1 * var(--frame)); right: calc(-1 * var(--frame)); bottom: calc(-1 * var(--frame)); height: var(--frame); background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-line), 0 10px 18px -10px var(--color-shade); }
  .pane picture, .pane img { display: block; width: 100%; height: 100%; }
  .pane img { object-fit: cover; }
  .band--deep .pane { box-shadow: none; }
  .band--deep .pane::after { box-shadow: none; }

  .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--gap); }
  .card { height: 100%; padding: 28px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); }
  .card h3 { margin-bottom: 10px; }
  .carousel-bar__count { color: var(--color-text-muted); font-weight: 600; font-size: var(--step--1); }
  .carousel-bar button { background: transparent; color: inherit; border: 1.5px solid var(--color-line); border-radius: var(--radius); transition: border-color var(--dur) var(--ease); }
  .carousel-bar button:hover:not(:disabled) { border-color: var(--color-accent); }
  .carousel-bar button:disabled { color: var(--color-line); }
  .band--deep .carousel-bar__count { color: var(--color-muted-on-deep); }
  .band--deep .carousel-bar button { border-color: var(--color-line-on-deep); }
  .band--deep .carousel-bar button:hover:not(:disabled) { border-color: var(--color-leaf); }
  .band--deep .carousel-bar button:disabled { color: var(--color-line-on-deep); }

  details { border-bottom: 1px solid var(--color-line); }
  details > summary { justify-content: space-between; gap: 16px; padding: 14px 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); list-style: none; }
  details > summary::-webkit-details-marker { display: none; }
  details > summary .icon { transition: transform var(--dur) var(--ease); color: var(--color-accent); }
  details[open] > summary .icon { transform: rotate(45deg); }
  details > summary:hover { color: var(--color-accent); }
  details > p { padding: 0 0 20px; color: var(--color-text-muted); }

  .form { max-width: 620px; }
  .form legend { margin-bottom: 4px; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
  .field label { font-weight: 600; font-size: 0.95rem; }
  .field__hint { margin: 0; font-size: var(--step--1); color: var(--color-text-muted); }
  .field input, .field select, .field textarea { padding: 12px 14px; background: var(--color-surface); border: 1.5px solid var(--color-field); border-radius: var(--radius); transition: border-color var(--dur) var(--ease); }
  .field :is(input, select, textarea):hover { border-color: var(--color-text); }
  .field__error { font-weight: 600; font-size: 0.95rem; }
  .form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .form__summary { padding: 16px 20px; border: 2px solid var(--color-error); background: var(--color-surface); }
  .form__progress { margin: 0; font-weight: 600; color: var(--color-text-muted); }
  .form__direct { margin-top: 16px; font-size: 1rem; color: var(--color-text-muted); }
  .form__direct a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--color-text); }
  .form__status { margin: 16px 0 0; font-weight: 600; }
  .form__answer { margin-top: 24px; padding: 28px; background: var(--color-surface); border: 1px solid var(--color-line); border-left: 6px solid var(--color-accent); }
  .form__answer h3 { margin-bottom: 8px; }

  /* Slot: en tom karm som venter på innholdet (D2). */
  .slot {
    display: grid; align-content: center; gap: 6px; min-height: 120px; padding: 22px 26px;
    border: var(--frame) solid var(--color-surface); outline: 1px dashed var(--color-field); outline-offset: -1px;
    background: var(--color-accent-muted); color: var(--color-text-muted);
  }
  .slot--image { min-height: 0; place-content: center; justify-items: center; text-align: center; padding: 12px; }
  .slot--image .icon { width: 28px; height: 28px; color: var(--color-accent); }
  .slot--mark { display: inline-grid; place-items: center; flex: none; width: 56px; height: 48px; min-height: 0; padding: 0; border-width: 2px; }
  .slot--mark .slot__type { font-size: 0.875rem; letter-spacing: 0; }
  .slot__type { font-family: var(--font-display); font-size: var(--step-0); font-weight: 600; color: var(--color-text); }
  .slot__text { font-size: 0.95rem; line-height: 1.5; max-width: 46ch; }
  .slot__rec { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); }

  .site-footer { background: var(--color-deep); color: var(--color-muted-on-deep); padding: clamp(48px, 7vw, 80px) 0 calc(32px + env(safe-area-inset-bottom)); }
  .site-footer p { margin: 0; }
  .site-footer strong { color: var(--color-on-deep); font-family: var(--font-display); font-weight: 600; }
  .site-footer a { justify-content: flex-start; color: var(--color-on-deep); text-decoration-color: var(--color-line-on-deep); }
  .site-footer a:hover { color: var(--color-leaf); }
  .site-footer__logo { height: 56px; width: auto; margin-bottom: 20px; }
  .site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 32px; }
  .site-footer__grid > div { display: grid; align-content: start; gap: 2px; }
  .site-footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-line-on-deep); font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: center; }
  .site-footer__legal p { margin: 0; }

  .actionbar { border-top: 1px solid var(--color-line-on-deep); }
  .actionbar .btn--ghost { color: var(--color-on-deep); border-color: var(--color-line-on-deep); }

  @media (max-width: 899.98px) {
    .form__row { grid-template-columns: minmax(0, 1fr); }
    .site-header__logo img { height: 40px; }
  }
  @media (max-height: 480px) and (orientation: landscape) {
    .takeover__links a { font-size: var(--step-1); }
  }
}

@layer pages {
  /* ---------- Hero: teksten til venstre, utsikten i karmen til høyre ---------- */
  .hero { padding-block: clamp(28px, min(4vw, 6vh), 64px) clamp(40px, min(5vw, 8vh), 88px); }
  .hero__grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
  .hero__text .lead { margin-top: 0.9em; max-width: 34ch; color: var(--color-text-muted); }
  .hero__text .btn-row { margin-top: clamp(20px, 3.4vh, 36px); }
  .hero .pane { align-self: center; }
  .hero .pane img { aspect-ratio: 5 / 6; max-height: min(64vh, 620px); }
  .hero__facts { list-style: none; margin: clamp(24px, 4.5vh, 48px) 0 0; padding: 20px 0 0; border-top: 1px solid var(--color-line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
  .hero__facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
  .hero__facts .icon { color: var(--color-accent); margin-top: 0.05em; }

  /* ---------- Produkter: fire kort på mørk bunn, med strekikonene ---------- */
  .products__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--color-line-on-deep); }
  .product { position: relative; display: grid; align-content: start; gap: 12px; height: 100%; padding: clamp(22px, 2.4vw, 34px); border-right: 1px solid var(--color-line-on-deep); color: var(--color-on-deep); text-decoration: none; transition: background-color var(--dur) var(--ease); }
  .products__list > li:last-child .product { border-right: 0; }
  .product svg.draw { width: 72px; height: 72px; color: var(--color-leaf); }
  .product h3 { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.01em; }
  .product p { font-size: 1rem; line-height: 1.55; }
  .product__more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; font-weight: 600; color: var(--color-leaf); }
  .product__more .icon { transition: transform var(--dur) var(--ease); }
  a.product:hover { background: var(--color-line-on-deep); }
  a.product:hover .product__more .icon { transform: translateX(4px); }
  .product__soon { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted-on-deep); }

  /* ---------- Hvorfor: karmen til venstre, fire grunner til høyre ---------- */
  .why__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
  .why .pane img { aspect-ratio: 4 / 5; max-height: min(70vh, 640px); }
  .why__list { list-style: none; margin: var(--space-head) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px) clamp(24px, 3vw, 48px); }
  .why__list li { padding-top: 16px; border-top: 2px solid var(--color-text); }
  .why__list p { color: var(--color-text-muted); font-size: 1rem; }

  /* ---------- Prosjekter ---------- */
  .projects__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
  .project { display: grid; align-content: start; gap: 18px; }
  .project .pane { margin-bottom: var(--frame); }
  .project .pane img { aspect-ratio: 3 / 2; }
  .project p { color: var(--color-text-muted); font-size: 1rem; }
  .project__where { margin: 0 0 6px; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
  .projects__quote { margin-top: clamp(32px, 5vw, 64px); max-width: 720px; }

  /* ---------- Leverandører og avdelinger ---------- */
  .partners__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
  .partner { display: grid; align-content: start; gap: 14px; height: 100%; padding: 24px; background: var(--color-surface); border: 1px solid var(--color-line); }
  .partner__logo { display: flex; align-items: center; height: 56px; }
  .partner__logo img { height: 44px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
  .partner p { font-size: 1rem; color: var(--color-text-muted); }
  .places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
  .places li { padding-top: 16px; border-top: 2px solid var(--color-leaf); }
  .places h3 { color: var(--color-on-deep); margin-bottom: 6px; }
  .places a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-on-deep); }
  .places a:hover { color: var(--color-leaf); }

  /* ---------- Vinduer: åpningsmåtene, tegnet ---------- */
  .types__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--color-line); border-left: 1px solid var(--color-line); }
  .type { display: grid; align-content: start; gap: 10px; height: 100%; padding: clamp(20px, 2vw, 30px); background: var(--color-surface); border-right: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
  .type svg.draw { width: 84px; height: 84px; color: var(--color-accent); margin-bottom: 6px; }
  .type p { font-size: 1rem; color: var(--color-text-muted); }

  .spec__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
  .spec .pane img { aspect-ratio: 4 / 3; }
  .spec__list { margin: var(--space-head) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
  .spec__list div { padding: 14px 0; border-top: 1px solid var(--color-line-on-deep); }
  .spec__list dt { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-leaf); }
  .spec__list dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.25; color: var(--color-on-deep); }
  .spec__note { margin-top: 20px; font-size: 1rem; }

  .material__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
  .material .pane img { aspect-ratio: 4 / 5; max-height: min(70vh, 640px); }
  .material__blocks { display: grid; gap: clamp(24px, 3vw, 40px); margin-top: var(--space-head); }
  .material__blocks > div { padding-top: 16px; border-top: 2px solid var(--color-text); }
  .material__blocks p { color: var(--color-text-muted); }

  .glass__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
  .glass__list { border-top: 1px solid var(--color-line); }

  svg.draw { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  svg.draw .thin { stroke-width: 1.25; }
  svg.draw .dash { stroke-dasharray: 3 4; stroke-width: 1.25; }

  @media (max-width: 899.98px) {
    .hero { padding-top: 20px; }
    .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .hero .pane { order: -1; }
    .hero .pane img { aspect-ratio: 4 / 3; max-height: 34svh; }
    .hero__text .lead { max-width: none; }
    .hero__facts { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 16px; margin-top: 24px; }

    .products__list { border: 0; gap: 16px; }
    .product { border: 1px solid var(--color-line-on-deep); }
    .products__list > li:last-child .product { border-right: 1px solid var(--color-line-on-deep); }

    .why__grid, .spec__grid, .material__grid, .glass__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .why .pane img, .material .pane img { aspect-ratio: 4 / 3; max-height: none; }
    .why__list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .spec__list { grid-template-columns: minmax(0, 1fr); }

    .partners__list, .places { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .partner { grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 16px; padding: 16px; }
    .partner__logo img { height: 34px; }

    .types__list { border: 0; }
    .type { border: 1px solid var(--color-line); }
  }
}

/* ---------- Unlayered: what Akari Engine injects (E1, E2) ---------- */
body #cc-main {
  --cc-btn-primary-bg: var(--color-accent);
  --cc-btn-primary-color: var(--color-on-accent);
  --cc-btn-primary-hover-bg: var(--color-deep);
  --cc-btn-primary-hover-color: var(--color-on-deep);
  --cc-toggle-on-bg: var(--color-accent);
  --cc-toggle-on-knob-bg: var(--color-surface);
}
body .floating-cookie-btn {
  position: fixed; left: 12px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 31;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--color-accent); color: var(--color-on-accent);
}
body .ae-privacy-notice { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-text-muted); }

/* ---------- Unlayered, and last: [hidden] always hides (L12) ---------- */
[hidden]:not([hidden="until-found"]) { display: none; }
