/* Frekvens Digital: shared styles (base, wordmark, buttons, menu, the placeholder under the hero, footer).
   Menu and buttons are ported from the Tid Bolig and Tegning sites. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--kalk);
  color: var(--tekst);
  font-family: var(--font);
  font-size: var(--str-tekst);
  font-weight: var(--vekt-tekst);
  line-height: var(--linjehoyde);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.hopp {
  position: fixed; left: var(--marg); top: 0.75rem; z-index: 200;
  padding: 0.7rem 1rem; background: var(--natt); color: var(--tekst-lys);
  transform: translateY(-160%); transition: transform 0.2s var(--mykt);
}
.hopp:focus { transform: none; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 3px; }

/* the label that tells Sverre which version this is */
.provemerke {
  position: fixed; z-index: 300; bottom: 6px; right: 6px;
  padding: 0.2rem 0.6rem; border-radius: 99px; background: rgba(16, 21, 29, 0.78); color: var(--tekst-lys);
  font: 500 0.66rem/1.4 var(--mono); letter-spacing: 0.02em; white-space: nowrap; pointer-events: none;
}

@media not all and (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .provemerke { bottom: auto; right: auto; top: 3px; left: 50%; transform: translateX(-50%); font-size: 0.6rem; }
}

/* ---------- the wordmark: the frekvens wave and the name ---------- */
.ordmerke { display: inline-flex; align-items: center; gap: 0.55em; text-decoration: none; color: var(--tekst); line-height: 1; }
/* the wave is drawn through <use>, so its paint is set on the svg and inherited into the symbol */
.ordmerke-boelge { width: 1.7em; height: 1em; flex: none; overflow: visible; fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ordmerke-navn { font-size: 1.22em; font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.ordmerke-navn span { font-weight: 300; color: var(--tekst-dempet); }

/* ---------- buttons ---------- */
.knapp {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0.85rem 1.5rem;
  border: 1px solid var(--natt); border-radius: var(--radius);
  background: var(--natt); color: var(--tekst-lys);
  font-size: 1rem; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  transition: background-color 0.25s var(--mykt), color 0.25s var(--mykt), border-color 0.25s var(--mykt);
}
.knapp:hover { background: var(--natt-2); border-color: var(--natt-2); }
.knapp-omriss { background: transparent; color: var(--tekst); border-color: var(--linje-sterk); }
.knapp-omriss:hover { background: var(--natt); color: var(--tekst-lys); border-color: var(--natt); }
.knapp-pil { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- menu ---------- */
.meny {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--meny-h);
  display: flex; align-items: center; gap: 1.25rem; padding: 0 var(--marg);
  color: var(--tekst);
  transition: background-color 0.35s var(--mykt), box-shadow 0.35s var(--mykt);
}
.meny.matt {
  background: var(--meny-matt);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--linje);
}
.meny-logo { flex: none; font-size: 1rem; }

.meny-lenker { display: none; align-items: center; gap: clamp(1rem, 1.8vw, 1.9rem); margin-left: auto; }
.meny-lenker a { text-decoration: none; font-size: 0.96rem; font-weight: 500; position: relative; padding: 0.4rem 0; white-space: nowrap; }
.meny-lenker a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.1rem; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--mykt);
}
.meny-lenker a:hover::after { transform: scaleX(1); }

.meny-hoyre { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; }
@media (min-width: 1180px) { .meny-lenker + .meny-hoyre { margin-left: clamp(0.5rem, 1.6vw, 1.5rem); } }
.meny-ring { display: none; align-items: center; gap: 0.45rem; text-decoration: none; font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.meny-ring svg { width: 17px; height: 17px; }
.meny-book { min-height: 42px; padding: 0.6rem 1.15rem; font-size: 0.95rem; }

.meny-knapp {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
}
.meny-knapp span { display: block; height: 1.5px; background: currentColor; transition: transform 0.3s var(--mykt), opacity 0.2s; }
.meny.apen .meny-knapp span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.meny.apen .meny-knapp span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

.mobilmeny {
  position: fixed; inset: 0; z-index: 90; padding: calc(var(--meny-h) + 2rem) var(--marg) 2rem;
  background: var(--kalk); display: flex; flex-direction: column; gap: 0.25rem;
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--mykt), visibility 0s linear 0.3s;
}
.mobilmeny.apen { opacity: 1; visibility: visible; transition: opacity 0.3s var(--mykt); }
.mobilmeny a { font-size: 1.9rem; font-weight: 300; letter-spacing: -0.02em; text-decoration: none; padding: 0.45rem 0; border-bottom: 1px solid var(--linje); }
.mobilmeny .mobilmeny-kontakt { margin-top: auto; display: grid; gap: 0.75rem; }
.mobilmeny .mobilmeny-kontakt a { font-size: 1.05rem; font-weight: 500; border: 0; }

@media (min-width: 1180px) {
  .meny-lenker { display: flex; }
  .meny-knapp, .mobilmeny { display: none; }
}
@media (min-width: 1320px) {
  .meny-ring { display: inline-flex; }
}
@media (max-width: 1179px) {
  .meny-book { display: none; }
}
