/* The neutral stylesheet of sites made by the website generator (lib/site_gen.php; inline in the wizard's preview, and copied by the
   site runner (lib/site_run.php) into a tenant as css/generated-site.css, which the core's generated pages link through api/own/site.json).
   Tokens only: the theme's custom properties (api/brand.php?css, lib/brand.php em_brand_css_from) and the --fri-* tokens that
   css/free-section.css expects. No colour is written here; phone first (one column, then wider from 40rem).
   Load order: theme tokens (+ the pairing's @font-face, api/own/css/<brand>.css), free-section.css, this file.
   Lys / Mørk are the surface and the deep brand colour. The theme's two optional settings (core lib/brand.php em_brand_scheme) are read
   with a fallback to exactly the old value, so a theme without them renders as before: --secondary / --on-secondary / --on-secondary-soft
   («Sekundærfarge»: the Lys bands, the light contact band and the footer) and --button / --on-button («Knapper bruker: Aksentfarge»: every button fill; with --button-edge on the dark band and --button-off / --on-button-off when disabled). The three LOOKS at the end (body[data-look="tydelig|lun|vid"], the same
   three the web shop has, css/shop-looks.css; the reference mock-ups are engine/looks-mock/) change only shapes, type and rhythm. */

.gs {
  --fri-ground: transparent;
  --fri-tint: var(--secondary, var(--surface));
  --fri-deep: var(--brand-deep);
  --fri-on-deep: var(--on-brand);
  --fri-radius: 0;
  --fri-panel-gap: 0;
  --fri-media-radius: var(--gs-radius); /* a picture's corners: the look's own shape (its buttons, fields, quotes); «Hjørner» in the block chooses otherwise */
  --fri-round: 1rem;                    /* «Hjørner: Avrundet» */
  --fri-side: 1.25rem;
  --fri-gap: 1.25rem;
  --fri-pad-s: 2rem;
  --fri-pad-m: 3.5rem;
  --fri-pad-l: 5rem;
  --fri-max-normal: 64rem;
  --fri-max-bred: 80rem;
  --fri-max-smal: 40rem;
  --fri-smal-place: auto;
  --fri-measure: 60ch;
  --gs-radius: 0.5rem;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 40rem) {
  .gs { --fri-side: 2rem; --fri-gap: 1.75rem; --fri-pad-m: 4.5rem; --fri-pad-l: 7rem; }
}
.gs *, .gs *::before, .gs *::after { box-sizing: border-box; }
.gs a:not(.gs-btn) { color: inherit; } /* not the buttons: a plain «.gs a» (0,1,1) would beat .gs-btn* (0,1,0) and paint their label in the surrounding text colour */

/* header: the name as a text logo and the page's anchors; wraps on a phone */
.gs-header {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding: 1rem var(--fri-side);
  background: var(--background); color: var(--ink); border-bottom: 1px solid var(--hairline);
}
.gs-logo { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.gs-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.gs-nav a { text-decoration: none; padding: 0.25rem 0; border-bottom: 1px solid transparent; }
.gs-nav a:hover, .gs-nav a:focus-visible { border-bottom-color: currentColor; }

/* the blocks of the free sections */
.gs-h2, .gs-h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; margin: 0; color: inherit; }
.gs-h2 { font-size: clamp(1.9rem, 6vw, 3rem); }
.gs-h3 { font-size: 1.3rem; }
.gs-p { margin: 0; color: var(--ink-soft); }
.fri--bg-mork .gs-p { color: inherit; }
/* a Lys band in the secondary colour: its own text colours (picked >= 4.5:1 on it); without a secondary colour the same values as before */
.gs .fri--bg-lys, .gs-contact--lys { color: var(--on-secondary, inherit); }
.fri--bg-lys .gs-p, .gs-contact--lys .gs-p { color: var(--on-secondary-soft, var(--ink-soft)); }
.gs-contact--lys .gs-note, .gs-contact--lys .gs-details span, .gs-contact--lys .gs-opt { color: var(--on-secondary-soft, var(--ink-muted)); }
.gs-text .gs-p { font-size: 1.0625rem; }

.gs-btn {
  display: inline-block; padding: 0.8rem 1.5rem; border-radius: 999px; border: 1px solid var(--button, var(--brand-deep));
  background: var(--button, var(--brand-deep)); color: var(--on-button, var(--on-brand)); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.gs-btn:hover, .gs-btn:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--background); }
.gs-btn--light { background: var(--button, var(--on-brand)); border-color: var(--button, var(--on-brand)); color: var(--on-button, var(--brand-deep)); }
.gs-btn--light:hover, .gs-btn--light:focus-visible { background: transparent; border-color: currentColor; color: var(--on-brand); }
.gs-btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
/* an accent that stands < 3:1 off the dark band gets an edge there in the band's text colour (--button-edge, core lib/brand.php em_brand_scheme_button) */
.gs-btn--light:not(:hover):not(:focus-visible):not([disabled]) { border-color: var(--button-edge, var(--button, var(--on-brand))); }
.fri--bg-mork .gs-btn:not(.gs-btn--light):not(.gs-btn--ghost):not(:hover):not(:focus-visible):not([disabled]) { border-color: var(--button-edge, var(--button, var(--brand-deep))); }
/* disabled: faded. An accent theme's filled button instead shows its own quiet colours at full strength (--button-off / --on-button-off: the raised
   ground and a label >= 3:1 on it); «opacity: var(--button-off, …)» gets a colour then, which is no number, so the opacity falls back to 1 (CSS:
   invalid at computed-value time). Every fallback below is the value the button has without them, hovered or not. */
.gs-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.gs-btn:not(.gs-btn--ghost)[disabled] { opacity: var(--button-off, 0.55); }
.gs-btn:not(.gs-btn--ghost):not(.gs-btn--light)[disabled]:not(:hover):not(:focus-visible) { background: var(--button-off, var(--button, var(--brand-deep))); border-color: var(--button-off, var(--button, var(--brand-deep))); color: var(--on-button-off, var(--on-button, var(--on-brand))); }
.gs-btn:not(.gs-btn--ghost):not(.gs-btn--light)[disabled]:is(:hover, :focus-visible) { background: var(--button-off, var(--ink)); border-color: var(--button-off, var(--ink)); color: var(--on-button-off, var(--background)); }
.gs-btn--light[disabled]:not(:hover):not(:focus-visible) { background: var(--button-off, var(--button, var(--on-brand))); border-color: var(--button-off, var(--button, var(--on-brand))); color: var(--on-button-off, var(--on-button, var(--brand-deep))); }
.gs-btn--light[disabled]:is(:hover, :focus-visible) { background: var(--button-off, transparent); border-color: var(--button-off, currentColor); color: var(--on-button-off, var(--on-brand)); }
.gs-btn:focus-visible, .gs-nav a:focus-visible, .gs-logo:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.gs-quote { margin: 0; padding: 1.5rem; border-radius: var(--gs-radius); background: var(--surface-card); color: var(--ink); border: 1px solid var(--hairline); }
.gs-quote__text { margin: 0; font-size: 1.125rem; }
.gs-quote__by { margin-top: 1rem; color: var(--ink-muted); }
.gs-film { border-radius: var(--gs-radius); overflow: hidden; }

/* the fixed contact section: form (not working in the preview) and the contact facts */
.gs-contact { padding: var(--fri-pad-m) var(--fri-side); background: var(--background); }
.gs-contact--lys { background: var(--secondary, var(--surface)); }
.gs-contact__in { max-width: var(--fri-max-normal); margin-inline: auto; display: grid; gap: 1rem; }
.gs-contact__cols { display: grid; gap: 2rem; margin-top: 1rem; }
@media (min-width: 40rem) { .gs-contact__cols { grid-template-columns: 3fr 2fr; align-items: start; } }
.gs-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; min-width: 0; }
.gs-form label { display: grid; gap: 0.35rem; font-weight: 600; }
.gs-form input, .gs-form textarea, .gs-form select {
  width: 100%; font: inherit; font-weight: 400; padding: 0.7rem 0.8rem; border-radius: var(--gs-radius);
  border: 1px solid var(--ghost); background: var(--surface-card); color: var(--ink);
}
.gs-form fieldset[disabled] input, .gs-form fieldset[disabled] textarea { opacity: 0.7; }
.gs-form .gs-btn { justify-self: start; }
.gs-note { margin: 0.75rem 0 0; color: var(--ink-muted); font-size: 0.9375rem; }
.gs-details { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; overflow-wrap: anywhere; }
.gs-details span { display: block; color: var(--ink-muted); font-size: 0.875rem; }

/* the footer: the deep brand colour; with a «Sekundærfarge» the secondary and its own text colour (the one place every page has, as the shop's
   footer), with a line on top where a band in the secondary ends right above it (Tydelig, Vid; Lun's panels have air between them) */
.gs-foot { padding: 2.5rem var(--fri-side); background: var(--secondary, var(--brand-deep)); color: var(--on-secondary, var(--on-brand)); display: grid; gap: 1rem; }
.gs:not([data-look="lun"]) :is(.gs-contact--lys, main:has(> :is(.fri--bg-lys, .gs-contact--lys):last-child)) + .gs-foot { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--on-secondary, transparent) 25%, var(--secondary, transparent)); }
.gs-foot > * { max-width: var(--fri-max-normal); width: 100%; margin-inline: auto; }
.gs-foot .gs-details span { color: inherit; }
.gs-foot__name { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; }
.gs-foot__org { margin: 0; font-size: 0.9375rem; }

/* ---------------- the real site (core lib/site_gen_render.php): skip link, header row, the form's answers, the footer menu ---------------- */
.gs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gs a.gs-skip:not(.gs-btn) { position: absolute; left: 0.75rem; top: -4rem; z-index: 10; padding: 0.75rem 1rem; background: var(--brand-deep); color: var(--on-brand); }
.gs-skip:focus { top: 0.75rem; }
.gs-header:has(.gs-header__in) { display: block; }
.gs-header__in { width: 100%; max-width: var(--fri-max-normal); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; }
.gs-header__in .gs-logo { display: inline-flex; align-items: center; min-height: 44px; }
.gs-header__in .gs-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.gs-nav a[aria-current] { border-bottom-color: currentColor; }
main h1.gs-h2 { font-size: clamp(2.2rem, 7vw, 3.75rem); }
.gs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gs-opt { font-weight: 400; color: var(--ink-muted); }
.gs-form input, .gs-form textarea, .gs-form select, .gs-form .gs-btn { min-height: 44px; }
/* the owner's form (core lib/site_gen_render.php em_sg_field_html): a box with its text beside it (own «Avkrysning», the consent), the whole row
   a 44 px target; the privacy link under the consent */
.gs-form label.gs-check { display: flex; align-items: flex-start; gap: 0.65rem; min-height: 44px; padding-block: 0.55rem; font-weight: 400; cursor: pointer; }
.gs .gs-form .gs-check input[type="checkbox"] { flex: none; width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0.15rem 0 0; padding: 0; border-radius: 0; background: none; accent-color: var(--button, var(--brand-deep)); }
.gs-form .gs-consent-link { margin: 0; }
.gs-form .gs-consent-link a { display: inline-flex; align-items: center; min-height: 44px; }
.gs-form [aria-invalid="true"] { border-color: var(--ink); }
.gs-msgs { display: grid; }
.gs-msg { display: none; margin: 0; padding: 0.75rem 1rem; border-radius: var(--gs-radius); border: 1px solid var(--hairline); background: var(--surface-card); color: var(--ink); }
.gs-msg:target, .gs-msg.is-on { display: block; }
.gs-msg--feil { border-color: var(--ink); }
.gs-foot__in { display: grid; gap: 1rem; }
.gs-foot__nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.gs-foot__nav a { display: inline-flex; align-items: center; min-height: 44px; }
.gs-film iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
@media (prefers-reduced-motion: no-preference) { .gs-btn, .gs-nav a { transition: background-color 0.15s, border-color 0.15s, color 0.15s; } }

/* ---------------- look «Tydelig»: plain and service-first (the shop's default look) ---------------- */
.gs[data-look="tydelig"] { --gs-radius: 0.5rem; }
.gs[data-look="tydelig"] .gs-header { position: sticky; top: 0; z-index: 5; }
.gs[data-look="tydelig"] .gs-logo { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; }
.gs[data-look="tydelig"] .gs-nav { gap: 0.25rem 1.75rem; font-weight: 500; }
.gs[data-look="tydelig"] .gs-h2, .gs[data-look="tydelig"] .gs-h3 { font-weight: 700; letter-spacing: -0.02em; }
.gs[data-look="tydelig"] .gs-btn { border-radius: var(--gs-radius); padding: 0.85rem 1.6rem; }

/* ---------------- look «Lun»: warm boutique: the name centred in the serif, soft panels, pill buttons ---------------- */
.gs[data-look="lun"] { --gs-radius: 1.25rem; --fri-radius: 1.5rem; --fri-panel-gap: 0.75rem; --fri-round: 1.25rem; font-size: 1.0625rem; }
.gs[data-look="lun"] .gs-header__in { flex-direction: column; justify-content: center; text-align: center; padding-block: 0.75rem 0.25rem; }
.gs[data-look="lun"] .gs-logo { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); line-height: 1.1; letter-spacing: 0.01em; }
.gs[data-look="lun"] .gs-nav { justify-content: center; gap: 0.25rem 2rem; font-family: var(--font-serif); font-size: 1.0625rem; }
.gs[data-look="lun"] .gs-h2, .gs[data-look="lun"] .gs-h3 { font-weight: 400; letter-spacing: -0.01em; }
.gs[data-look="lun"] .fri--bg-lys, .gs[data-look="lun"] .fri--bg-mork { margin-inline: var(--fri-panel-gap); }
.gs[data-look="lun"] .gs-btn { border-radius: 999px; padding: 0.85rem 1.9rem; font-weight: 500; letter-spacing: 0.01em; }
.gs[data-look="lun"] .gs-quote { border: 0; background: var(--surface); text-align: center; }
.gs[data-look="lun"] .gs-contact--lys { margin-inline: var(--fri-panel-gap); border-radius: var(--fri-radius); }
.gs[data-look="lun"] .gs-form input, .gs[data-look="lun"] .gs-form textarea, .gs[data-look="lun"] .gs-form select { border-radius: 1rem; }
.gs[data-look="lun"] .gs-foot { margin: var(--fri-panel-gap); border-radius: var(--fri-radius); text-align: center; }
.gs[data-look="lun"] .gs-foot .gs-details, .gs[data-look="lun"] .gs-foot__nav { justify-content: center; justify-items: center; }
.gs[data-look="lun"] .gs-foot__name { font-weight: 400; font-size: 1.75rem; }

/* ---------------- look «Vid»: wide and quiet: small uppercase name, a tall first band, square shapes, a lot of air ---------------- */
.gs[data-look="vid"] { --gs-radius: 2px; --fri-max-normal: 80rem; --fri-max-bred: 96rem; --fri-pad-m: 5rem; --fri-pad-l: 7rem; --fri-media-radius: 0; --fri-round: 0.75rem; }
@media (min-width: 40rem) { .gs[data-look="vid"] { --fri-pad-m: 7rem; --fri-pad-l: 10rem; --fri-side: 2.5rem; } }
.gs[data-look="vid"] .gs-header { border-bottom: 0; }
.gs[data-look="vid"] .gs-logo { font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.gs[data-look="vid"] .gs-nav { gap: 0.25rem 2.25rem; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.gs[data-look="vid"] .gs-h2, .gs[data-look="vid"] .gs-h3 { font-weight: 400; letter-spacing: -0.02em; }
.gs[data-look="vid"] main > .fri--bg-mork:first-child { min-height: min(78vh, 46rem); display: flex; align-items: flex-end; }
.gs[data-look="vid"] main > .fri--bg-mork:first-child .fri__in { width: 100%; }
.gs[data-look="vid"] main h1.gs-h2 { font-size: clamp(2.6rem, 1rem + 6vw, 5.5rem); line-height: 1.02; }
.gs[data-look="vid"] .gs-btn { border-radius: var(--gs-radius); padding: 0.95rem 2rem; font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.gs[data-look="vid"] .gs-quote { border: 0; border-top: 2px solid var(--ink); border-radius: 0; background: transparent; padding-inline: 0; }
.gs[data-look="vid"] .gs-form input, .gs[data-look="vid"] .gs-form textarea, .gs[data-look="vid"] .gs-form select { border-radius: 0; border-width: 0 0 1px; background: transparent; padding-inline: 0; }
.gs[data-look="vid"] .gs-form .gs-check input[type="checkbox"] { border-width: 1px; }
.gs[data-look="vid"] .gs-foot__name { font-family: var(--font-sans); font-size: 0.9375rem; letter-spacing: 0.16em; text-transform: uppercase; }
.gs-notfound { max-width: 40rem; margin: 0 auto; padding: 4rem 1.25rem 5rem; }
/* ---------------- «Topplinje» (Nettsiden → Innstillinger; lib/site_gen_render.php EM_SG_BARS): the owner's header layout; nothing chosen = the look's own header above.
   Placed last so each one wins over the look's header rules. A phone (under 40rem) wraps: name and menu stack, the menu wraps in its own rows; 44 px targets are the menu's and the name's own. ---------------- */
.gs .gs-header__in.gs-bar-venstre-hoyre { flex-direction: row; justify-content: space-between; text-align: start; padding-block: 0; }
.gs .gs-header__in.gs-bar-venstre-hoyre .gs-nav { justify-content: flex-end; }
.gs .gs-header__in.gs-bar-midt-under { flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: 0; }
.gs .gs-header__in.gs-bar-midt-under .gs-nav { justify-content: center; }
/* the menu comes first in the page (keyboard order = picture order), the name at the right end */
.gs .gs-header__in.gs-bar-hoyre-venstre { flex-direction: row; justify-content: space-between; text-align: end; padding-block: 0; }
.gs .gs-header__in.gs-bar-hoyre-venstre .gs-nav { justify-content: flex-start; text-align: start; }
.gs .gs-header__in.gs-bar-hoyre-venstre .gs-logo { margin-inline-start: auto; }
.gs .gs-header__in.gs-bar-venstre-midt { flex-direction: row; justify-content: flex-start; text-align: start; padding-block: 0; }
/* the menu takes the room beside the name and centres in it; with no room (a long name, many entries, a phone) it wraps under the name, still centred */
.gs .gs-header__in.gs-bar-venstre-midt .gs-nav { flex: 1 1 20rem; justify-content: center; }
.gs .gs-header__in.gs-bar-venstre-midt .gs-logo { max-width: 100%; }
@media (max-width: 39.99rem) {
  .gs .gs-header__in.gs-bar-venstre-midt, .gs .gs-header__in.gs-bar-venstre-hoyre { flex-direction: column; align-items: flex-start; }
  .gs .gs-header__in.gs-bar-venstre-midt .gs-nav { flex: 0 0 auto; justify-content: center; align-self: stretch; }
  .gs .gs-header__in.gs-bar-venstre-hoyre .gs-nav { justify-content: flex-start; }
  .gs .gs-header__in.gs-bar-hoyre-venstre { flex-direction: column; align-items: stretch; }
  .gs .gs-header__in.gs-bar-hoyre-venstre .gs-logo { align-self: flex-end; }
}
