/* 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, «Fire tak, ett sted» (RETNING.md).
 *
 * 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: «Fire tak, ett sted» (RETNING.md)
   ===================================================================================================== */
@layer base {
  :root {
    /* AGENTS.md requires these eight */
    --color-bg: #f7f4ec;
    --color-surface: #ffffff;
    --color-text: #14241a;
    --color-text-muted: #4d5a50;
    --color-accent: #056839;
    --color-accent-muted: #dcebdf;
    --font-display: 'Jost', var(--fallback-display);
    --font-body: 'Work Sans', var(--fallback-sans);

    /* Roles the kit uses */
    --color-deep: #00381c;           /* footer, menu, action bar and the iPhone bars (I1) */
    --color-on-deep: #f7f4ec;
    --color-on-deep-muted: #b9d3bf;
    --color-on-accent: #ffffff;
    --color-accent-hover: #00381c;
    --color-paper-2: #efe9dc;
    --color-line: #ddd5c4;
    --color-line-on-deep: rgb(247 244 236 / 0.18);
    --color-field: #7a8a7e;          /* field borders: 3:1 against the surface (A1) */
    --color-error: #a3261c;
    --color-focus: #c8173f;
    --fallback-sans: 'Akari Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --fallback-display: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    /* The four businesses: their colours from today's front page, toned for contrast (RETNING.md) */
    --c-hytte: #056839;
    --c-hytte-on: #ffffff;
    --c-bod: #e39a2d;
    --c-bod-on: #14241a;
    --c-bod-ink: #9a540c;
    --c-montasje: #c8173f;
    --c-montasje-on: #ffffff;
    --c-blefjell: #213f78;
    --c-blefjell-on: #ffffff;

    --biz: var(--color-accent);
    --biz-on: var(--color-on-accent);
    --biz-ink: var(--color-accent);

    /* 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, 4.5vh), 48px);
    --gap: clamp(16px, 2vw, 28px);
    --gutter: clamp(16px, 5vw, 56px);
    --measure: 64ch;
    --wrap: 1240px;
    --radius: 6px;
    --header-h: 76px;
    --bar-h: 64px;
    --gable: clamp(22px, 4vw, 56px);

    --step--1: 0.875rem;
    --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
    --step-1: clamp(1.2rem, 1.08rem + 0.5vw, 1.45rem);
    --step-2: clamp(1.45rem, 1.2rem + 1vw, 2rem);
    --step-3: clamp(1.9rem, min(1.35rem + 2.2vw, 6.2vh), 3.1rem);
    --step-4: clamp(2.5rem, min(1.5rem + 3.6vw, 9vh), 4.9rem);

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

    color-scheme: light;
  }

  [data-biz="hytte"] { --biz: var(--c-hytte); --biz-on: var(--c-hytte-on); --biz-ink: var(--c-hytte); }
  [data-biz="bod"] { --biz: var(--c-bod); --biz-on: var(--c-bod-on); --biz-ink: var(--c-bod-ink); }
  [data-biz="montasje"] { --biz: var(--c-montasje); --biz-on: var(--c-montasje-on); --biz-ink: var(--c-montasje); }
  [data-biz="blefjell"] { --biz: var(--c-blefjell); --biz-on: var(--c-blefjell-on); --biz-ink: var(--c-blefjell); }

  /* Work Sans, measured with verktoy/fontmetrics.mjs (Y7) */
  @font-face {
    font-family: 'Akari Fallback';
    src: local('Arial');
    size-adjust: 108.4%;
    ascent-override: 85.8%;
    descent-override: 22.1%;
    line-gap-override: 0%;
  }

  body { color: var(--color-text); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.7; }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; color: var(--color-text); }
  h1 { font-size: var(--step-4); line-height: 1.02; letter-spacing: -0.02em; }
  h2 { font-size: var(--step-3); }
  h3 { font-size: var(--step-1); line-height: 1.2; }
  p { margin: 0 0 1em; max-width: var(--measure); }
  :is(h1, h2, h3) + :is(p, ul, ol) { margin-top: 0.7em; }
  p:last-child { margin-bottom: 0; }
  a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }
  strong { font-weight: 600; }

  .section { padding-block: var(--space-section); }
  .section__head { margin-bottom: var(--space-head); max-width: 760px; }
  .eyebrow {
    display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
    font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--biz-ink);
  }
  .lead { font-size: var(--step-1); line-height: 1.5; color: var(--color-text-muted); }
}

@layer components {
  /* The roofline from the logo: the signature (RETNING.md) */
  .roof { width: 56px; height: auto; flex: none; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: square; stroke-linejoin: miter; }
  .roof--big { width: clamp(88px, 10vw, 140px); }

  /* Gable: a photo or card framed by the shape of a roof */
  .gable { clip-path: polygon(0 var(--gable), 50% 0, 100% var(--gable), 100% 100%, 0 100%); }

  .btn {
    padding: 12px 22px; border: 2px solid transparent; border-radius: var(--radius);
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; letter-spacing: 0.01em;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .btn--primary { background: var(--color-accent); color: var(--color-on-accent); }
  .btn--primary:hover { background: var(--color-accent-hover); }
  .btn--ghost { border-color: currentColor; background: transparent; }
  .btn--ghost:hover { background: var(--color-accent-muted); }
  .btn--biz { background: var(--biz); color: var(--biz-on); }
  .btn--biz:hover { background: var(--color-text); color: var(--color-surface); }
  .btn:active { transform: translateY(1px); }
  .link-cta { font-family: var(--font-display); font-weight: 600; color: var(--biz-ink); text-decoration: none; border-bottom: 2px solid currentColor; }
  .link-cta:hover { color: var(--color-text); }

  /* Header */
  .site-header { background: var(--color-bg); color: var(--color-text); border-bottom: 1px solid var(--color-line); }
  .site-header__logo img { height: 56px; width: auto; }
  .site-nav { gap: 2px; }
  .site-nav a:not(.btn) {
    position: relative; padding: 0 clamp(8px, 1vw, 14px); text-decoration: none;
    font-family: var(--font-display); font-weight: 500; font-size: 1.02rem;
  }
  .site-nav a:not(.btn)::after {
    content: ""; position: absolute; left: clamp(8px, 1vw, 14px); right: clamp(8px, 1vw, 14px); bottom: 8px; height: 2px;
    background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease);
  }
  .site-nav a:not(.btn):hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav .btn { margin-left: 10px; }
  .menu-button { padding: 0 14px; background: transparent; border: 2px solid currentColor; border-radius: var(--radius); font-family: var(--font-display); font-weight: 600; }
  .menu-button:hover { background: var(--color-accent-muted); }

  .takeover__top h2 { font-size: var(--step-1); color: inherit; }
  .takeover__close { background: transparent; color: inherit; border: 2px solid currentColor; border-radius: var(--radius); }
  .takeover__close:hover { background: var(--color-line-on-deep); }
  .takeover__links { margin-bottom: 28px; }
  .takeover__links a { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; border-bottom: 1px solid var(--color-line-on-deep); }
  .takeover__links a:hover { color: var(--color-on-deep-muted); }
  .takeover .btn--primary { background: var(--color-on-deep); color: var(--color-deep); }
  .takeover .btn--ghost { color: var(--color-on-deep); }
  .takeover .btn--ghost:hover { background: var(--color-line-on-deep); }
  .takeover__contact { margin-top: 28px; display: grid; gap: 2px; color: var(--color-on-deep-muted); }
  .takeover__contact a { font-weight: 600; color: var(--color-on-deep); }
  .takeover__contact p { margin: 0; }

  /* Carousel bar */
  .carousel-bar__count { color: inherit; font-weight: 600; }
  .carousel-bar button { background: transparent; color: inherit; border: 2px solid currentColor; border-radius: var(--radius); }
  .carousel-bar button:hover { background: var(--color-line-on-deep); }
  .carousel-bar button:disabled { opacity: 0.35; }

  /* Form */
  .form { max-width: 640px; gap: 12px; padding: clamp(18px, 2.5vw, 28px); background: var(--color-surface); border-radius: var(--radius); border: 1px solid var(--color-line); }
  .field label { font-weight: 600; }
  @media (min-width: 900px) {
    .form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
    .form > * { grid-column: 1 / -1; }
    .form > .field--half { grid-column: auto; }
  }
  .field__hint { margin: 0; font-size: var(--step--1); color: var(--color-text-muted); }
  .field input, .field select, .field textarea { padding: 11px 14px; background: var(--color-surface); border: 1.5px solid var(--color-field); border-radius: var(--radius); }
  .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--color-text); }
  .field__error { font-weight: 600; font-size: 0.95rem; }
  .form__summary { padding: 16px 20px; border: 2px solid var(--color-error); border-radius: var(--radius); background: var(--color-surface); }
  .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-top: 6px solid var(--color-accent); border-radius: var(--radius); }
  .form__answer h3 { margin-bottom: 8px; }

  /* Slot: the designed placeholder (D2), a frame in the paper colour with the roofline */
  .slot {
    display: grid; align-content: center; gap: 6px; min-height: 120px; padding: 22px 24px;
    border: 2px dashed var(--color-field); border-radius: var(--radius);
    background: var(--color-paper-2); color: var(--color-text-muted);
  }
  .slot--image { min-height: 0; place-content: center; justify-items: center; text-align: center; padding: 14px; }
  .slot--image .icon { width: 28px; height: 28px; color: var(--color-text-muted); }
  .slot--mark { display: inline-grid; place-items: center; flex: none; width: 56px; height: 48px; min-height: 0; padding: 0; }
  .slot--mark .slot__type { font-size: 0.875rem; letter-spacing: 0; }
  .slot__type { font-family: var(--font-display); font-size: var(--step-1); 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: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); }
  .on-deep .slot { background: var(--color-line-on-deep); border-color: var(--color-on-deep-muted); color: var(--color-on-deep-muted); }
  .on-deep .slot__type { color: var(--color-on-deep); }
  .on-deep .slot__rec { color: var(--color-on-deep); }

  /* Footer */
  .site-footer { background: var(--color-deep); color: var(--color-on-deep); padding: clamp(48px, 7vh, 72px) 0 calc(28px + env(safe-area-inset-bottom)); }
  .site-footer p { margin: 0; }
  .site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 28px 48px; }
  .site-footer__logo img { width: 117px; height: auto; }
  .site-footer__label { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.9rem; color: var(--color-on-deep-muted); }
  .site-footer__store { display: grid; gap: 2px; }
  .site-footer__store a { justify-content: flex-start; }
  .site-footer__biz { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .site-footer__biz li { display: grid; gap: 0; padding-top: 14px; border-top: 4px solid var(--biz); }
  .site-footer__biz a { justify-content: flex-start; }
  .site-footer__biz li > a { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; text-decoration: none; }
  .site-footer__biz li > a:hover { text-decoration: underline; }
  .site-footer__biz span a { color: var(--color-on-deep-muted); }
  .site-footer__biz [data-biz="bod"] { --biz: var(--c-bod); }
  .site-footer__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--color-line-on-deep); font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: 0 24px; align-items: center; color: var(--color-on-deep-muted); }
  .site-footer__legal a { color: var(--color-on-deep); }
  .site-footer a:hover { color: var(--color-on-deep-muted); }

  .actionbar .btn--primary { background: var(--color-on-deep); color: var(--color-deep); }
  .actionbar .btn--primary:hover { background: var(--color-accent-muted); }
  .actionbar .btn--ghost { color: var(--color-on-deep); }
  .actionbar .btn--ghost:hover { background: var(--color-line-on-deep); }

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

@layer pages {
  /* ---------- Front page hero ---------- */
  .hero { padding-block: clamp(20px, min(4vw, 5vh), 56px); }
  .hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
  .hero__text { min-width: 0; }
  .hero h1 { margin-bottom: 0.32em; }
  .hero .lead { margin-bottom: clamp(20px, 3.5vh, 32px); max-width: 34em; }
  .section--tight-top { padding-top: clamp(32px, 5vh, 56px); }
  .hero__media { margin: 0; position: relative; height: clamp(420px, calc(100svh - var(--header-h) - 2 * clamp(20px, min(4vw, 5vh), 56px)), 780px); }
  .hero__media picture, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
  .hero__media figcaption {
    position: absolute; left: 16px; bottom: 16px; padding: 6px 12px; border-radius: var(--radius);
    background: var(--color-deep); color: var(--color-on-deep); font-size: var(--step--1);
  }
  .hero__facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: clamp(18px, 3vh, 28px) 0 0; padding: 0; list-style: none; color: var(--color-text-muted); font-size: 0.95rem; }
  .hero__facts li { display: flex; align-items: center; gap: 8px; }
  .hero__facts .icon { color: var(--color-accent); }

  /* ---------- The four businesses ---------- */
  .biz-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
  .biz-card {
    position: relative; display: grid; grid-template-rows: auto auto 1fr auto; height: 100%;
    background: var(--color-surface); border-radius: 0 0 var(--radius) var(--radius);
    transition: transform var(--dur) var(--ease);
  }
  .biz-card::before { content: ""; display: block; height: calc(var(--gable) + 14px); background: var(--biz); clip-path: polygon(0 var(--gable), 50% 0, 100% var(--gable), 100% 100%, 0 100%); }
  .biz-card:hover { transform: translateY(-4px); }
  .biz-card__logo { display: flex; align-items: center; min-height: 92px; padding: 18px 22px 6px; }
  .biz-card__logo img { width: auto; max-width: 100%; max-height: 56px; }
  .biz-card__body { padding: 8px 22px 0; }
  .biz-card h3 { font-size: var(--step-1); margin-bottom: 6px; }
  .biz-card h3 a { text-decoration: none; }
  .biz-card h3 a::after { content: ""; position: absolute; inset: 0; }
  .biz-card h3 a:hover { text-decoration: underline; }
  .biz-card p { font-size: 0.97rem; color: var(--color-text-muted); }
  .biz-card__more { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 10px 22px 16px; font-family: var(--font-display); font-weight: 600; color: var(--biz-ink); }

  /* ---------- The store (front page) ---------- */
  .split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
  .split--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .split--flip > .split__media { order: 2; }
  .split__media picture, .split__media img { width: 100%; height: 100%; object-fit: cover; }
  .split__media--store { height: clamp(360px, 72vh, 640px); }
  .chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; padding: 0; }
  .chips li { padding: 6px 14px; border: 1.5px solid var(--color-line); border-radius: 999px; background: var(--color-surface); font-size: 0.95rem; }
  .infobox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; padding: 20px 22px; margin-bottom: 24px; border-left: 4px solid var(--biz); background: var(--color-surface); border-radius: 0 var(--radius) var(--radius) 0; }
  .infobox p { margin: 0; }
  .infobox__label { font-family: var(--font-display); font-weight: 600; color: var(--biz-ink); }
  .infobox a { display: inline-flex; align-items: center; min-height: 32px; }

  /* ---------- Work photos ---------- */
  .on-deep { background: var(--color-deep); color: var(--color-on-deep); }
  .on-deep h2, .on-deep h3 { color: var(--color-on-deep); }
  .on-deep .lead { color: var(--color-on-deep-muted); }
  .on-deep .eyebrow { color: var(--color-on-deep-muted); }
  .jobs__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
  .job { margin: 0; }
  .job__img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
  .job__img picture, .job__img img { width: 100%; height: 100%; object-fit: cover; }
  .job figcaption { display: grid; gap: 2px; padding-top: 12px; }
  .job__tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 500; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-on-deep-muted); }
  .job__tag::before { content: ""; width: 12px; height: 12px; border-radius: 2px; background: var(--biz); }
  .job__text { color: var(--color-on-deep); }
  .on-paper .job__tag { color: var(--color-text-muted); }
  .on-paper .job__text { color: var(--color-text); }
  .on-paper .carousel-bar { color: var(--color-text); }
  .on-paper .carousel-bar button:hover { background: var(--color-accent-muted); }

  /* ---------- Brands ---------- */
  .brands { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
  .brands li { display: grid; place-items: center; height: 96px; padding: 14px 18px; background: var(--color-surface); border-radius: var(--radius); }
  .brands img { width: auto; height: auto; max-width: 100%; max-height: 56px; }
  .brands li.is-square img { max-height: 68px; }
  .brands__note { margin-top: 18px; color: var(--color-text-muted); font-size: 0.97rem; }

  /* ---------- Closing band: reviews and contact ---------- */
  .closing__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
  .contact-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 4px; }
  .contact-list li { display: flex; align-items: center; gap: 12px; min-height: 44px; }
  .contact-list a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
  .contact-list li > span { min-width: 0; overflow-wrap: anywhere; }
  .hero__facts a, .ticks a, .biz-card h3 a, .infobox a { display: inline-flex; align-items: center; min-height: 44px; }
  .contact-list .icon { color: var(--color-on-deep-muted); }
  .on-deep .btn--primary { background: var(--color-on-deep); color: var(--color-deep); }
  .on-deep .btn--primary:hover { background: var(--color-accent-muted); }
  .on-deep .btn--ghost { color: var(--color-on-deep); }
  .on-deep .btn--ghost:hover { background: var(--color-line-on-deep); }

  /* ---------- Subpage: the business band ---------- */
  .pagehead { position: relative; padding-block: clamp(20px, min(4vw, 5vh), 56px); }
  .pagehead__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
  .pagehead__logo { display: inline-flex; padding: 14px 18px; margin-bottom: clamp(16px, 3vh, 28px); background: var(--color-surface); border-radius: var(--radius); border-top: 5px solid var(--biz); }
  .pagehead__logo img { height: clamp(40px, 6vh, 56px); width: auto; }
  .pagehead h1 { font-size: clamp(2.4rem, min(1.4rem + 3vw, 8vh), 4.25rem); margin-bottom: 0.3em; }
  .pagehead .lead { margin-bottom: clamp(18px, 3vh, 28px); }
  .pagehead__media { height: clamp(360px, calc(100svh - var(--header-h) - 2 * clamp(20px, min(4vw, 5vh), 56px)), 680px); }
  .pagehead__media picture, .pagehead__media img { width: 100%; height: 100%; object-fit: cover; }
  .pagehead .btn--primary { background: var(--biz); color: var(--biz-on); }
  .pagehead .btn--primary:hover { background: var(--color-text); color: var(--color-surface); }
  .pagehead--plain { padding-bottom: 0; }
  .pagehead--plain h1 { margin-bottom: 0.25em; }
  .pagehead--plain + [data-form] { padding-top: clamp(24px, 4vh, 40px); }
  .slot-row { margin-top: clamp(24px, 4vh, 40px); max-width: 760px; }
  .crumb { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 0.95rem; color: var(--color-text-muted); }
  .crumb a { display: inline-flex; align-items: center; min-height: 44px; }

  /* Lists of what they do */
  .ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
  .ticks li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--color-line); }
  .ticks .icon { margin-top: 0.2em; color: var(--biz-ink); }
  .ticks--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .band { background: var(--color-paper-2); }
  .band--biz { background: var(--biz); color: var(--biz-on); }
  .band--biz h2, .band--biz h3 { color: var(--biz-on); }

  /* Product cards (Hytte og Fritid) */
  .products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
  .product { display: grid; grid-template-rows: 170px auto; height: 100%; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; }
  .product__img { display: grid; place-items: center; padding: 14px; background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
  .product__img img { max-height: 140px; width: auto; }
  .product__body { padding: 16px 18px 20px; }
  .product h3 { font-size: 1.1rem; margin-bottom: 4px; }
  .product p { font-size: 0.95rem; color: var(--color-text-muted); margin: 0; }

  /* Photo grid on subpages */
  .photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
  .photos .job__img { aspect-ratio: 4 / 5; }
  .photos__wide { grid-column: span 2; display: grid; }

  /* Contact card for one business */
  .contact-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding: clamp(24px, 4vw, 48px); background: var(--color-surface); border-radius: var(--radius); border-top: 8px solid var(--biz); }
  .contact-card h2 { font-size: var(--step-2); }
  .contact-card .contact-list .icon { color: var(--biz-ink); }
  .contact-card .contact-list a { font-weight: 600; }

  /* Kontakt page */
  .people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
  .person { padding: 22px 24px; background: var(--color-surface); border-radius: var(--radius); border-top: 6px solid var(--biz); }
  .person h3 { margin-bottom: 8px; }
  .person .contact-list { margin: 0; }
  .person .contact-list li { min-height: 40px; }
  .person .contact-list .icon { color: var(--biz-ink); }
  .person p { color: var(--color-text-muted); font-size: 0.95rem; margin: 8px 0 0; }
  .kontakt-form { padding-top: clamp(20px, 4vh, 40px); }

  @media (max-width: 899.98px) {
    .eyebrow { gap: 10px; font-size: 0.85rem; letter-spacing: 0.05em; }
    .eyebrow .roof { width: 40px; }
    .hero__grid, .pagehead__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .hero__media, .pagehead__media { height: auto; }
    .hero__media img, .pagehead__media img { aspect-ratio: 4 / 3; height: auto; }
    .biz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .biz-card__logo { min-height: 64px; padding: 12px 14px 2px; }
    .biz-card__logo img { max-height: 40px; }
    .biz-card__body { padding: 6px 14px 0; }
    .biz-card h3 { font-size: 1.08rem; }
    .biz-card p { font-size: 0.92rem; line-height: 1.5; }
    .biz-card__more { margin: 6px 14px 10px; font-size: 0.95rem; }
    .split, .split--flip, .closing__grid, .contact-card { grid-template-columns: minmax(0, 1fr); }
    .split--flip > .split__media { order: 0; }
    .split__media--store { height: auto; }
    .split__media--store img { aspect-ratio: 4 / 3; height: auto; }
    .infobox { grid-template-columns: minmax(0, 1fr); }
    .brands { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .brands li { height: 72px; padding: 10px; }
    .brands img { max-height: 40px; }
    .brands li.is-square img { max-height: 52px; }
    .ticks, .ticks--3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product { grid-template-rows: 130px auto; }
    .product__img img { max-height: 104px; }
    .product__body { padding: 12px 14px 16px; }
    .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .people { grid-template-columns: minmax(0, 1fr); }
    .jobs__list.cards { gap: 14px; }
  }
}

/* ---------- 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; }
