/* Forsiden (/ og /en/) og 404-siden. Romsidene bruker style.css. */

:root {
  --bg: #f6f6f3;
  --ink: #0d0f0e;
  --ink-2: #3c423f;
  --muted: #676d6a;
  --line: rgba(13, 15, 14, .10);
  --card: rgba(255, 255, 255, .66);
  --toast: rgba(255, 255, 255, .88);
  --accent: #0f8a6a;
  --glow-1: rgba(16, 185, 129, .20);
  --glow-2: rgba(56, 189, 248, .13);
  --dots: rgba(13, 15, 14, .08);
  --btn: #0d0f0e;
  --btn-ink: #ffffff;
  --h1-fade: #58605c;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0b;
    --ink: #f3f5f4;
    --ink-2: #c3c9c6;
    --muted: #8b928f;
    --line: rgba(255, 255, 255, .09);
    --card: rgba(255, 255, 255, .035);
    --toast: rgba(24, 26, 25, .88);
    --accent: #34d399;
    --glow-1: rgba(52, 211, 153, .22);
    --glow-2: rgba(56, 189, 248, .12);
    --dots: rgba(255, 255, 255, .055);
    --btn: #f3f5f4;
    --btn-ink: #0a0b0b;
    --h1-fade: #8f9894;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(52, 211, 153, .3); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Bakgrunn: to myke lysflater og et prikkrutenett som toner ut nedover. */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48rem 30rem at 10% -10%, var(--glow-1), transparent 70%),
    radial-gradient(40rem 26rem at 100% -5%, var(--glow-2), transparent 70%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 25%, transparent 75%);
}

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Topplinje */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: max(20px, env(safe-area-inset-top));
}
.mono {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--btn); color: var(--btn-ink);
  font-size: .82rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none;
}
.lang {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lang a {
  min-width: 42px; padding: 6px 12px; border-radius: 999px; text-align: center;
  color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--btn); color: var(--btn-ink); }

/* Hovedflate */
.hero {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 56px; padding-bottom: 64px;
}
/* Går over to linjer på mobil. Radius 18 px gir pilleform på én linje og
   avrundet boks på to, og prikken står på høyde med første linje. */
.eyebrow {
  align-self: flex-start;
  display: inline-flex; align-items: flex-start; gap: 9px;
  margin: 0; padding: 7px 14px 7px 12px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); color: var(--ink-2);
  font-size: .82rem; font-weight: 500; line-height: 1.4;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  margin-top: calc((1.4em - 7px) / 2);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .18);
}
h1 {
  margin: 20px 0 0; padding: .04em 0 .1em;
  font-size: clamp(3.1rem, 14vw, 5.75rem); line-height: .95;
  font-weight: 700; letter-spacing: -.045em;
  color: var(--ink);
}
h1 span { display: block; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 {
    background: linear-gradient(180deg, var(--ink) 35%, var(--h1-fade) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}
.lead {
  margin: 18px 0 0; max-width: 32rem;
  color: var(--ink-2);
  font-size: clamp(1.15rem, 2.8vw, 1.4rem); line-height: 1.45; letter-spacing: -.01em;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: .95rem; font-weight: 600; text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform .2s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { opacity: .9; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--muted); }

/* Faktafelt: liste på mobil, 2 x 2 fra 640 px, fire kolonner fra 1040 px. */
.facts {
  list-style: none; margin: 52px 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); overflow: hidden;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.facts li { display: flex; flex-direction: column; gap: 2px; padding: 15px 20px; }
.facts li + li { border-top: 1px solid var(--line); }
.facts b { font-size: 1.08rem; font-weight: 650; letter-spacing: -.015em; }
.facts span { color: var(--muted); font-size: .9rem; }
@media (min-width: 640px) {
  .facts { display: grid; grid-template-columns: repeat(2, 1fr); }
  .facts li { gap: 6px; padding: 22px 24px; }
  .facts li + li { border-top: 0; }
  .facts li:nth-child(even) { border-left: 1px solid var(--line); }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts b { font-size: 1.4rem; }
}
/* Fra 1040 px er kolonnene brede nok til «Officers’ Magazine» på én linje. */
@media (min-width: 1040px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .facts li:nth-child(n+3) { border-top: 0; }
  .facts li + li { border-left: 1px solid var(--line); }
  .facts b { font-size: 1.3rem; }
}

/* Bunn */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding-top: 22px; padding-bottom: max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem;
}
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Hint til besøkende med ikke-nordisk nettleserspråk. Styres av lang.js. */
.langhint {
  position: fixed; z-index: 10; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  width: max-content; max-width: calc(100% - 32px);
  padding: 6px 6px 6px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--toast);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: .88rem;
}
.langhint[hidden] { display: none; }
.langhint a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.langhint a svg { width: 15px; height: 15px; }
.langhint .x {
  width: 32px; height: 32px; flex: none; padding: 0;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.langhint .x:hover { background: var(--line); color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: opp .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero > :nth-child(2) { animation-delay: .06s; }
  .hero > :nth-child(3) { animation-delay: .12s; }
  .hero > :nth-child(4) { animation-delay: .18s; }
  .hero > :nth-child(5) { animation-delay: .24s; }
  .langhint:not([hidden]) { animation: inn .5s .6s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes opp { from { opacity: 0; transform: translateY(12px); } }
  @keyframes inn { from { opacity: 0; transform: translate(-50%, 12px); } }
}
