/* RACK keeps the app's own colours (tailwind.config.js in workout_buddy):
   bg #0C0C0C, surface #1F1F1F, amber #F97316. It is not styled like stianmelhus.no on purpose. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: block;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: block;
}

:root {
  color-scheme: dark;
  --bg: #0c0c0c;
  --surface: #1f1f1f;
  --line: #34312d;
  --text: #edeae4;
  --dim: #a39d93;
  --amber: #f97316;

  --sans: "Familjen Grotesk", "Arial Narrow", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.5;
  hyphens: auto;
  -webkit-hyphens: auto;
}

h1, h2, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }

a { color: var(--amber); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.top, main, footer {
  width: calc(100% - 2 * var(--gutter));
  max-width: 76rem;
  margin: 0 auto;
}

/* ---------- Top ---------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.08em;
}
.brand img { display: block; border-radius: 9px; }
.status {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--dim);
  text-align: right;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 7rem);
}

h1 {
  font-weight: 700;
  font-size: clamp(2.75rem, 9vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  hyphens: manual;
  max-width: 11ch;
}

.lede {
  max-width: 31rem;
  margin-top: clamp(1.5rem, 3.5vw, 2.5rem);
  font-size: 1.3125rem;
  line-height: 1.45;
  color: var(--text);
}

.log {
  align-self: end;
  border-top: 2px solid var(--amber);
  background: var(--surface);
  padding: 1.25rem 1.25rem 1.4rem;
  max-width: 27rem;
}
.log figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dim);
  margin-bottom: 1rem;
}
.log li { padding: 0.55rem 0; }
.log .said {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.0625rem;
}
.log .said::before { content: "› "; content: "› " / ""; color: var(--amber); }
/* Text for screen readers only. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.log .set {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem 5rem;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.9rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  font-weight: 700;
}
.log .set .num { font-weight: 500; font-size: 1rem; text-align: right; color: var(--dim); }
.log .set .num:last-child { color: var(--text); }
.log-note { margin-top: 0.4rem; font-size: 1rem; color: var(--dim); }

@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 4rem; }
  .log { justify-self: end; width: 100%; }
}

/* ---------- Sections ---------- */

section + section { border-top: 1px solid var(--line); }

h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.points, .plain-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 3rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.points p, .plain-facts p { margin-top: 0.75rem; color: var(--dim); max-width: 30rem; }
.plain-facts p + p { margin-top: 0.9rem; }

@media (min-width: 62rem) {
  .points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plain-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}

.tracks { padding: clamp(3rem, 8vw, 6rem) 0; }
.tracks ul {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.25rem;
  font-size: clamp(1.375rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--dim);
}
.tracks li:nth-child(odd) { color: var(--text); }

.try { padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 8rem); }
.try p { margin-top: 0.9rem; max-width: 32rem; }
.try p + p { color: var(--dim); }

/* ---------- Footer ---------- */

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--dim);
}

/* ---------- Privacy policy (personvern.html) ---------- */

.brand a { display: flex; align-items: center; gap: inherit; color: inherit; text-decoration: none; }
.policy { max-width: 46rem; padding: clamp(2rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5rem); hyphens: manual; -webkit-hyphens: manual; }
.policy h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
.policy h2 { margin-top: 2.75rem; }
.policy h3 { margin: 1.75rem 0 0; font-size: 1.1875rem; font-weight: 700; }
.policy p { margin-top: 0.8rem; }
.policy .last-updated { color: var(--dim); font-family: var(--mono); font-size: 0.875rem; font-weight: 400; }
.policy ul, .policy ol { margin-top: 0.8rem; padding-left: 1.3rem; }
.policy ul { list-style: disc; }
.policy ol { list-style: decimal; }
.policy li + li { margin-top: 0.4rem; }
.policy li::marker { color: var(--amber); }
.policy .important, .policy .contact-info {
  margin-top: 1.25rem; padding: 1.1rem 1.25rem; background: var(--surface); border-left: 3px solid var(--amber);
}
.policy .scroll { margin-top: 1.25rem; overflow-x: auto; }
.policy table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 1rem; }
.policy th, .policy td { padding: 0.7rem 0.9rem 0.7rem 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.policy thead th { border-top: 0; color: var(--dim); font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; }
.policy tbody th { font-weight: inherit; }
.policy .scroll a:focus-visible { outline-offset: 0; }
.policy .important h2 { margin: 0; font-size: inherit; letter-spacing: 0; line-height: inherit; }
.policy .scope { margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--dim); font-size: 1rem; }
