/* Layout and components. Mobile-first (360px up). No colours or font names here: they come from brand.css. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; scroll-padding-bottom: 6.5rem; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; overflow-wrap: break-word; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 8vw, 4rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 44rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--color-accent); color: var(--color-accent-contrast); padding: .75rem 1rem; z-index: 100; border-radius: var(--radius-sm); }
.skip:focus { top: .75rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--color-muted); margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--color-muted); max-width: 40rem; }
.todo { display: inline-block; background: var(--color-todo-bg); color: var(--color-todo-text); border: 1px dashed var(--color-todo-line); padding: .1rem .5rem; border-radius: 4px; font-size: .85rem; font-family: var(--font-body); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--color-bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--color-muted); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--color-text); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--color-accent-contrast); }
@media (min-width: 75rem) { .nav { flex-wrap: nowrap; gap: 1.5rem; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.6rem; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .2s ease, background-color .2s ease; }
.btn-primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-quiet { background: transparent; border-color: var(--color-control-border); color: var(--color-text); min-height: 44px; padding: .5rem 1.1rem; font-weight: 500; }
.btn-quiet:hover { border-color: var(--color-text); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.microcopy { font-size: .9rem; color: var(--color-muted); margin-top: .8rem; }

/* Sections */
.section { padding: clamp(3.5rem, 10vw, 7rem) 0; }
.section-alt { background: var(--color-surface-alt); }
.hero { padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(13.5rem, 100%), 1fr)); }
.card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 1.4rem; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.checks { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .9rem; }
.checks li { padding-left: 1.8rem; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: .55em; width: .9rem; height: .5rem; border-left: 3px solid var(--color-accent); border-bottom: 3px solid var(--color-accent); transform: rotate(-45deg); }

/* Concepts: selectable list. Without JS every panel is shown in turn. */

/* Gallery: swipe on touch via scroll-snap, arrows and keys on desktop */

/* FAQ */
details { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); margin-bottom: .75rem; }
summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--color-accent); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 0 1.25rem 1.1rem; color: var(--color-muted); }

/* Form */
.form-card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.25rem); }
.progress { display: none; margin-bottom: 1.5rem; }
.js .progress { display: block; }
.progress-label { font-size: .9rem; color: var(--color-muted); margin-bottom: .5rem; }
.progress-bar { height: 6px; border-radius: 3px; background: var(--color-surface-alt); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 50%; background: var(--color-accent); transition: width .3s ease; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.js fieldset[hidden] { display: none; }
legend { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1rem; padding: 0; }
.field { margin-bottom: 1.1rem; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field .opt { font-weight: 400; color: var(--color-muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: .7rem .9rem; font: inherit; color: var(--color-text); background: var(--color-bg); border: 1.5px solid var(--color-control-border); border-radius: var(--radius-sm); }
.field textarea { min-height: 8rem; resize: vertical; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--color-danger); }
.field-error { color: var(--color-danger); font-size: .92rem; margin-top: .3rem; min-height: 0; }
.consent-row { display: flex; gap: .75rem; align-items: flex-start; margin: 1.25rem 0; }
.consent-row input { width: 1.4rem; height: 1.4rem; margin-top: .2rem; flex: none; accent-color: var(--color-accent); }
.consent-row label { font-weight: 400; margin: 0; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-top: 1rem; border: 1px solid; }
.alert[hidden] { display: none; }
.alert-error { border-color: var(--color-danger); color: var(--color-danger); }
.alert-ok { border-color: var(--color-ok); color: var(--color-ok); }
.js .no-js-only { display: none; }

/* Sticky CTA bar, mobile only */
.sticky-cta { position: fixed; inset: auto 0 0 0; z-index: 30; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: var(--color-bg); border-top: 1px solid var(--color-line); transform: translateY(110%); transition: transform .3s ease; display: none; }
.js .sticky-cta { display: block; }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; }
@media (min-width: 62rem) { .js .sticky-cta { display: none; } }

/* Footer */
.site-footer { border-top: 1px solid var(--color-line); padding: 3rem 0 6rem; color: var(--color-muted); font-size: .95rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.2fr 1fr; } }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.footer-links a, .footer-links button { min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
.seal { margin-top: 1.5rem; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }

/* Cookie consent */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: 0 10px 40px rgb(0 0 0 / .18); max-width: 36rem; font-size: .95rem; }
.consent-text { margin: 0 0 .9rem; }
.consent-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.consent-btn { min-height: 44px; padding: .5rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; border: 2px solid var(--color-accent); background: transparent; color: var(--color-text); }
.consent-btn[data-choice="accept"] { background: var(--color-accent); color: var(--color-accent-contrast); }

/* Motion: only when JS and no reduced-motion preference */
.motion .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.motion .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Banner, mobile menu, pills, trust strip, sister companies, free list, footer columns */
.nav-toggle { min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--color-control-border); background: var(--color-surface); color: var(--color-text); font: inherit; cursor: pointer; }
.nav-toggle[hidden] { display: none; }
@media (min-width: 75rem) { .nav-toggle { display: none !important; } }
@media (max-width: 74.99rem) {
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem 1rem; background: var(--color-bg); border-bottom: 1px solid var(--color-line); }
  .js .nav.open { display: flex; }
  .js .nav a { min-height: 48px; }
  .js .nav .btn { margin-top: .5rem; justify-content: center; }
}
.h3 { font-size: 1.2rem; }
.footer-cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--color-line); }
.footer-h { font-family: var(--font-body); font-size: .9rem; font-weight: 600; color: var(--color-text); margin-bottom: .5rem; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.footer-list a { min-height: 32px; display: inline-flex; align-items: center; }
/* The cookie-settings button must look like the links around it (it rendered as an unreadable grey bar) and be a 44px tap target. */
.footer-list button { appearance: none; background: none; border: 0; margin: 0; padding: 0; font: inherit; color: inherit; text-align: left; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.footer-list button:hover { text-decoration-thickness: 2px; }

/* Visual elements: icons, text/image split, numbers band, image band, phases */

.mt-2 { margin-top: 2rem; }
.mt-15 { margin-top: 1.5rem; }

/* Without JavaScript the menu is a plain wrapped row under the logo; with JavaScript it collapses behind the toggle on small screens. */
.site-header .wrap { flex-wrap: wrap; }
@media (min-width: 75rem) { .site-header .wrap { flex-wrap: nowrap; } }
@media (max-width: 74.99rem) { html:not(.js) .nav { flex-basis: 100%; padding-bottom: .5rem; } }
/* The cookie banner takes the bottom of the screen, so the sticky button steps aside while it is open. */
body:has(.consent) .sticky-cta { display: none !important; }


.narrow table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0 0 1.2rem; font-size: .95rem; overflow-wrap: anywhere; }
@media (max-width: 40rem) { .narrow table { font-size: .78rem; } .narrow th, .narrow td { padding: .4rem .35rem; hyphens: auto; } }
.narrow th, .narrow td { text-align: left; vertical-align: top; padding: .55rem .7rem; border: 1px solid var(--color-line); }
.narrow th { background: var(--color-surface-alt); font-weight: 600; }





/* ===== Arcaio Bowling: "Åpningskvelden". Flat shapes, brand colours via tokens only. ===== */
.logo { display: inline-flex; align-items: center; min-height: 48px; padding: .25rem 0; }
.logo img { width: var(--logo-width); height: auto; aspect-ratio: 816.5 / 213; }
h1 { font-size: clamp(1.625rem, 7.2vw, 3.8125rem); line-height: 1.25; overflow-wrap: anywhere; }
.hero-grid > *, .split > * { min-width: 0; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2rem); line-height: 1.25; }
.measure { max-width: 70ch; }
.crumbs { font-size: .85rem; color: var(--color-muted); margin: 0 0 1rem; }
.crumbs a { color: inherit; }
.dark .crumbs, .dark-burgundy .crumbs { color: var(--color-on-dark-muted); }
.caption { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--color-muted); margin: 0 0 .9rem; }

/* Dark sections: midnatt or burgunder. Amber is allowed here. */
.dark { background: var(--color-dark); color: var(--color-on-dark); }
.dark-burgundy { background: var(--color-dark-2); color: var(--color-on-dark); }
.dark :focus-visible, .dark-burgundy :focus-visible { outline-color: var(--color-focus-on-dark); }
.dark .lead, .dark-burgundy .lead, .dark .caption, .dark-burgundy .caption { color: var(--color-on-dark-muted); }
.dark .btn-primary, .dark-burgundy .btn-primary { background: var(--color-amber); color: var(--color-on-amber); }
.dark a:not(.btn), .dark-burgundy a:not(.btn) { color: var(--color-amber); }
.dark .btn-quiet, .dark-burgundy .btn-quiet { color: var(--color-on-dark); border-color: var(--color-on-dark); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 7vw, 5.5rem) 0 0; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 3rem; } }
.hero h1 { color: var(--color-on-dark); font-size: clamp(1.625rem, 7.2vw, 3.25rem); }
@media (min-width: 48rem) { .hero h1, h1 { overflow-wrap: normal; } }
.hero .lead { font-size: 1.1875rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin-top: 1.5rem; }
.hero-art { width: 100%; max-width: 30rem; margin-inline: auto; }
.lane-bg { fill: var(--color-lane); }
.lane-edge { fill: var(--color-lane-edge); }
.lane-dot { fill: var(--color-on-dark-muted); opacity: .5; }
.pin { fill: var(--color-pin); }
.ball { fill: var(--color-amber); }
.ball-hole { fill: var(--color-dark-2); }
.ball-line { stroke: var(--color-amber); stroke-width: 2; stroke-dasharray: 2 8; fill: none; opacity: .6; }
.hero-foot { margin-top: clamp(2rem, 5vw, 3.5rem); height: 14px; background: var(--color-dark-2); }

/* Scroll-linked ball: rolls down the page edge. Only where the browser supports scroll-driven animation and motion is allowed. Decorative. */
.roll { display: none; }
@supports (animation-timeline: scroll()) {
  @media (min-width: 80rem) and (prefers-reduced-motion: no-preference) {
    .roll { display: block; position: fixed; z-index: 20; left: 14px; top: 90px; bottom: 24px; width: 26px; pointer-events: none; }
    .roll::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: var(--color-line); }
    .roll svg { position: absolute; left: 0; top: 0; width: 26px; height: 26px; animation: roll-down linear both; animation-timeline: scroll(root block); animation-range: 0 100%; }
    @keyframes roll-down { from { transform: translateY(0) rotate(0); } to { transform: translateY(calc(100vh - 150px)) rotate(900deg); } }
  }
}

/* Cards, journey, criteria */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); margin-top: 2rem; }
.card h3 { font-size: 1.5rem; line-height: 1.33; }
.card .tag { display: inline-block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--color-accent); margin-bottom: .6rem; }
.card a.more { font-weight: 600; }
.journey { list-style: none; counter-reset: j; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(13.5rem, 100%), 1fr)); }
.journey li { counter-increment: j; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 1.4rem; }
.journey li::before { content: counter(j); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--color-dark-2); color: var(--color-amber); font-weight: 700; margin-bottom: .8rem; }
.journey strong { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.33; margin-bottom: .3rem; }
.journey .feel { display: block; margin-top: .6rem; font-size: .9rem; color: var(--color-muted); }
.crit { list-style: none; counter-reset: c; padding: 0; margin: 1.5rem 0; display: grid; gap: .9rem; }
.crit li { counter-increment: c; display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; align-items: start; }
.crit li::before { content: counter(c); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--color-amber); color: var(--color-on-amber); font-weight: 700; }
.problem { border-left: 4px solid var(--color-accent); padding-left: 1.25rem; font-family: var(--font-display); font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.4; max-width: 34ch; }
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 48rem) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }

/* Image slots (TODO:IMG): brand shapes until approved photos arrive */
.imgslot { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--color-dark); aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--color-on-dark-muted); }
.imgslot svg { width: 22%; height: auto; margin-bottom: 1.5rem; }
.imgslot figcaption { position: absolute; inset: auto 0 0 0; padding: .6rem 1rem; font-size: .8rem; background: var(--color-dark-2); color: var(--color-on-dark); }
.imgslot.wide { aspect-ratio: 16 / 9; }
.imgslot.tall { aspect-ratio: 4 / 5; }

/* Selector: "Har dere plass til full lengde?" Works without JS (CSS reveal); JS pre-fills the form. */
.selector { border: 1px solid var(--color-line); background: var(--color-surface); border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0 0; }
.selector legend { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.33; padding: 0 .25rem; }
.sel-options { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); margin: 1rem 0; }
.sel-options label { display: flex; align-items: center; justify-content: center; position: relative; min-height: 48px; padding: .6rem 1rem; border: 1.5px solid var(--color-control-border); border-radius: 999px; cursor: pointer; font-weight: 600; background: var(--color-bg); }
.sel-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sel-options label:has(input:checked) { background: var(--color-accent); color: var(--color-accent-contrast); border-color: var(--color-accent); }
.sel-options label:has(input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.sel-result { display: none; margin-top: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius-sm); background: var(--color-accent-soft); }
.selector:has(#sel-ja:checked) [data-res="ja"], .selector:has(#sel-kanskje:checked) [data-res="kanskje"], .selector:has(#sel-nei:checked) [data-res="nei"] { display: block; }
.sel-result p { margin: 0 0 .6rem; }
.sel-result p:last-child { margin: 0; }

/* Form band */
.form-band .form-card { background: var(--color-surface); color: var(--color-text); }
.form-band .form-card :focus-visible { outline-color: var(--color-focus); }
.form-band .form-card a:not(.btn) { color: var(--color-accent); }
.form-band .form-card .btn-primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.form-band .form-card .btn-quiet { color: var(--color-text); border-color: var(--color-control-border); }
.form-band .alert-error { color: var(--color-danger); }
.form-band .alert-ok { color: var(--color-ok); }
.contact-lines { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .25rem; }
.sub-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.sub-hero h1 { color: var(--color-on-dark); max-width: 24ch; }
.prose h2 { margin-top: 2rem; }

/* Footer: burgunder with the seal */
.site-footer { background: var(--color-dark-2); color: var(--color-on-dark-muted); border-top: 0; }
.site-footer a, .site-footer button { color: var(--color-on-dark); }
.site-footer :focus-visible { outline-color: var(--color-focus-on-dark); }
.site-footer .footer-h { color: var(--color-amber); }
.site-footer .footer-cols { border-bottom-color: var(--color-lane-edge); }
.footer-logo img { width: var(--logo-width); height: auto; margin-bottom: 1rem; }
.seal { color: var(--color-amber); }
.sticky-cta .btn-primary { background: var(--color-accent); color: var(--color-accent-contrast); }

/* Photos */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); background: var(--color-dark); }
.photo figcaption { font-size: .85rem; color: var(--color-muted); margin-top: .5rem; }
.photos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); margin: 1.5rem 0; }
