/* NUI Capital site styles.
   Black theme. Home is one full-screen hero (licensed Envato gold particle image) with the logo
   overlaid at the top and a small centred footer bar at the bottom. Legal pages use the same
   header and footer, light text on black and a serif reading column. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --panel: #0d0d0d;
  --sun: #ffc641;       /* the gold of the NUI logo: links and accents */
  --text: #ececec;
  --muted: #a3a3a3;     /* secondary text on black (contrast 8:1) */
  --rule: #262626;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --reading: "Newsreader", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--black); color: var(--text); font-family: var(--display); font-size: 17px; line-height: 1.55;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--sun); color: #000; padding: 8px 14px; border-radius: 6px; font-weight: 600; z-index: 10; }
.skip:focus { left: 16px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

/* header: logo only */
.site-head .wrap { padding-block: 22px; }
.mark { display: inline-block; line-height: 0; }
.mark img { height: 34px; width: auto; display: block; }

/* footer bar: three centred links */
.site-foot { border-top: 1px solid var(--rule); font-size: 14px; }
.site-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; padding: 14px 24px 4px; }
.site-foot .copyright { margin: 0; padding: 0 24px max(14px, env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 12px; color: #8a8a8a; }
.site-foot a { color: var(--muted); text-decoration: none; padding: 4px 2px; }
.site-foot a:hover { color: var(--sun); }

/* home: the image fills the whole screen; header and footer sit over it */
body.home { background-color: var(--black);
  background-image: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.5) 38%, rgba(0,0,0,0) 68%),
                    url("hero.jpg");
  background-image: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.5) 38%, rgba(0,0,0,0) 68%),
                    image-set(url("hero.webp") type("image/webp"), url("hero.jpg") type("image/jpeg"));
  background-size: cover; background-position: right center; background-repeat: no-repeat; }
body.home main { display: flex; align-items: center; }
body.home .site-foot { border-top: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0)); }
body.home .site-foot a { color: #cfcfcf; }
body.home .site-foot .copyright { color: #9a9a9a; }
body.home .site-foot a:hover { color: var(--sun); }
.hero { width: 100%; }
.hero .wrap { padding-block: 24px 48px; }
.hero h1 { font-size: clamp(44px, 7.2vw, 104px); line-height: .94; letter-spacing: -0.045em; font-weight: 700; margin: 0; max-width: 10ch; text-wrap: balance; color: #fff; }
.hero p { color: #d6d6d6; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; max-width: 40ch; margin: 28px 0 0; text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.hero p.note { color: #8a8a8a; font-size: clamp(12.5px, 0.95vw, 14px); margin-top: 14px; max-width: 52ch; }
@media (max-width: 700px) {
  body.home { background-image: linear-gradient(0deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.7) 100%), url("hero-mobile.jpg");
    background-image: linear-gradient(0deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.7) 100%),
                      image-set(url("hero-mobile.webp") type("image/webp"), url("hero-mobile.jpg") type("image/jpeg"));
    background-position: 62% center; }
  body.home main { align-items: flex-start; }
  .hero .wrap { padding-block: clamp(40px, 12vh, 120px) 32px; }
  .hero p.note { color: #909090; }  /* #8a8a8a measures 4.43:1 over the phone image; this passes 4.5:1 */
}

.btn { display: inline-block; font: inherit; font-weight: 600; font-size: 16px; background: var(--sun); color: #000; border: 0; padding: 13px 26px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #ffd36b; }

/* legal pages */
.legal .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px 72px; padding-block: 40px 96px; }
.legal header { grid-column: 1 / -1; border-bottom: 1px solid var(--rule); padding-bottom: 28px; }
.legal h1 { font-size: clamp(38px, 5.5vw, 64px); letter-spacing: -0.035em; line-height: 1; margin: 0; font-weight: 700; color: #fff; }
.legal .meta { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; counter-reset: t; }
.toc li { counter-increment: t; display: grid; grid-template-columns: 2.2ch 1fr; gap: 6px; }
.toc li::before { content: counter(t); color: var(--sun); opacity: .8; font-variant-numeric: tabular-nums; text-align: right; }
.toc.plain li { grid-template-columns: 1fr; }
.toc.plain li::before { content: none; }
.toc a { text-decoration: none; color: #d4d4d4; }
.toc a:hover { color: var(--sun); text-decoration: underline; }
.prose { font-family: var(--reading); font-size: 19px; line-height: 1.68; max-width: 66ch; min-width: 0; color: #e2e2e2; }
.prose p, .prose ul { margin: 0 0 1em; }
.prose a { color: var(--sun); text-underline-offset: 3px; }
.prose strong { color: #fff; }
.prose h2 { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 2.2em 0 .6em; display: flex; gap: 14px; scroll-margin-top: 24px; color: #fff; }
.prose h2 .n { color: var(--sun); font-variant-numeric: tabular-nums; min-width: 2ch; }
.prose ol.alpha { list-style: lower-alpha; padding-left: 1.6em; }
.prose li { margin-bottom: .45em; }

/* 404 */
.message .wrap { padding-block: clamp(64px, 12vw, 140px); }
.message h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.04em; line-height: 1; margin: 0; color: #fff; }
.message p { color: var(--muted); font-size: 19px; margin: 22px 0 32px; max-width: 46ch; }

@media (max-width: 820px) {
  .legal .wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc ol { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .toc ol { grid-template-columns: 1fr; }
}
