/* ferrum.dk - "valset stål og glød": grafit, kold stålgrå og glødende orange. Big Shoulders (display), Chivo (tekst), Chivo Mono (mål og tal). */
@font-face { font-family: "Big Shoulders"; src: url("/assets/fonts/big-shoulders-display-vf.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Chivo"; src: url("/assets/fonts/chivo.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Chivo Mono"; src: url("/assets/fonts/chivo-mono.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }

:root {
  --grafit: #17191b;
  --grafit-2: #23272a;
  --staal: #e9eae7;
  --staal-2: #dcdedb;
  --flade: #f6f6f3;
  --blaek: #1a1d20;
  --daempet: #4c5257;
  --streg: #c3c7c4;
  --rust: #9b3a12;
  --glo: #e8601f;
  --glo-lys: #ffb070;
  --paa-moerk: #e6e3dc;
  --paa-moerk-2: #aeb2b0;
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --tekst: "Chivo", system-ui, sans-serif;
  --mono: "Chivo Mono", ui-monospace, monospace;
  --ramme: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--staal); color: var(--blaek);
  font-family: var(--tekst); font-size: 1.0625rem; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--glo); color: var(--grafit); }
img, svg { max-width: 100%; }
a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--glo); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: .005em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw + .4rem, 5.25rem); line-height: 1.12; padding-top: .08em; text-transform: uppercase; overflow-wrap: break-word; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); margin-top: 2.6rem; margin-bottom: .7rem; }
h3 { font-size: 1.45rem; margin-bottom: .35rem; }
p { margin: 0 0 1rem; }
sub { font-size: .7em; }

.ramme { max-width: var(--ramme); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .ramme { padding: 0 32px; } }

.spring { position: absolute; left: -999px; top: 0; background: var(--glo); color: var(--grafit); padding: .6rem 1rem; z-index: 10; }
.spring:focus { left: 1rem; }

/* Top */
.top { background: var(--grafit); color: var(--paa-moerk); border-bottom: 1px solid #000; }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .8rem; padding-bottom: .8rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: .6rem; color: var(--paa-moerk); text-decoration: none; }
.ordmaerke-felt {
  display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem;
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--grafit);
  background: linear-gradient(160deg, var(--glo-lys), var(--glo)); border-radius: 3px;
}
.ordmaerke-navn { font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: .08em; text-transform: uppercase; }
.menu { display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; }
.menu a { color: var(--paa-moerk-2); text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--paa-moerk); }
.menu a[aria-current="page"] { color: #fff; border-bottom-color: var(--glo); }

/* Knapper */
.knapper { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.knap {
  display: inline-block; padding: .8rem 1.3rem; border-radius: 3px; text-decoration: none;
  font-weight: 700; background: var(--glo); color: var(--grafit); border: 2px solid var(--glo);
  transition: background-color .2s ease-out, color .2s ease-out;
}
.knap:hover { background: var(--glo-lys); border-color: var(--glo-lys); }
.knap-lys { background: transparent; color: inherit; border-color: currentColor; }
.knap-lys:hover { background: rgba(255,255,255,.08); border-color: currentColor; }
.tekstside .knap-lys:hover { background: var(--staal-2); }
.pil { font-weight: 700; text-decoration: none; }
.pil::after { content: ""; display: inline-block; width: .55em; height: .55em; margin-left: .45em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg) translateY(-.1em); }
.pil:hover { text-decoration: underline; }

/* Forside: helt */
.helt {
  background:
    radial-gradient(60rem 26rem at 85% 110%, rgba(232,96,31,.28), transparent 60%),
    linear-gradient(180deg, var(--grafit) 0%, #1d2023 100%);
  color: var(--paa-moerk);
  border-bottom: 4px solid var(--glo);
}
.helt-ind { display: grid; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 3.5rem; align-items: center; }
@media (min-width: 860px) { .helt-ind { grid-template-columns: 1.35fr 1fr; padding-top: 5rem; padding-bottom: 5rem; } }
.helt h1 { color: #fff; max-width: 13ch; }
.indledning { font-size: 1.2rem; line-height: 1.55; max-width: 38rem; margin-top: 1.1rem; }
.helt .indledning { color: var(--paa-moerk); }
.helt-felt { justify-self: center; width: min(72%, 19rem); }
@media (min-width: 860px) { .helt-felt { width: min(100%, 19rem); } }

/* Grundstoffelt */
.felt { display: block; width: 100%; height: auto; }
.felt-flade { fill: #2a2e31; }
.felt-kant { fill: none; stroke: var(--glo); stroke-width: 3; }
.felt-nr { font-family: var(--mono); font-size: 34px; fill: var(--glo-lys); }
.felt-lille { font-family: var(--mono); font-size: 17px; fill: var(--paa-moerk-2); }
.felt-sym { font-family: var(--display); font-weight: 800; font-size: 170px; fill: #fff; }
.felt-navn { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: 6px; fill: var(--paa-moerk); }
.felt-masse { font-family: var(--tekst); font-size: 22px; fill: var(--paa-moerk-2); }
.felt-stor { filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }

/* Sektioner */
.sektion { padding: 3.5rem 0; }
.sektion > .ramme > h2:first-child, .to-spalter h2 { margin-top: 0; }
.sektion-lys { background: var(--flade); border-top: 1px solid var(--streg); border-bottom: 1px solid var(--streg); }
.to-spalter { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .to-spalter { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.to-spalter p { max-width: 65ch; }

.tal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 1.5rem 0 1rem; border-top: 2px solid var(--blaek); }
@media (min-width: 760px) { .tal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tal div { padding: 1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--streg); }
.tal dt { font-size: .9rem; color: var(--daempet); }
.tal dd { margin: .2rem 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.note { font-size: .95rem; color: var(--daempet); max-width: 65ch; }

.genveje { display: grid; gap: 0; border-top: 2px solid var(--blaek); }
.sektion-genveje { padding-top: 1rem; }
@media (min-width: 760px) { .genveje { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; } }
.genvej { display: grid; gap: .3rem; padding: 1.25rem 0 1.4rem; color: var(--blaek); text-decoration: none; border-bottom: 1px solid var(--streg); }
.genvej-titel { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; }
.genvej:hover .genvej-titel { color: var(--rust); }
.genvej > span:last-child { color: var(--daempet); max-width: 48ch; }
.genvej-glo .genvej-titel::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .4em; border-radius: 50%; background: var(--glo); vertical-align: .15em; }

/* Tekstsider */
.tekstside { padding-bottom: 4rem; }
.side-top { padding: 3rem 0 1.5rem; border-bottom: 2px solid var(--blaek); margin-bottom: 1rem; }
.side-top h1 { max-width: 18ch; }
.artikel { max-width: 46rem; }
.artikel p, .artikel li { max-width: 68ch; }
.med-side { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
.med-side > * { min-width: 0; }
@media (min-width: 960px) { .med-side { grid-template-columns: minmax(0, 46rem) 16rem; justify-content: space-between; gap: 4rem; } .side-boks { position: sticky; top: 1.5rem; align-self: start; margin-top: 2.6rem; } }
.side-boks .felt { max-width: 14rem; }
.side-boks p { font-size: .95rem; color: var(--daempet); margin-top: 1rem; }

.punkter { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.punkter li { margin-bottom: .55rem; padding-left: .2rem; }
.punkter li::marker { color: var(--rust); }
.formler { font-variant-numeric: tabular-nums; }

/* Tabeller: én linje pr. celle, sidelæns rul i rammen, fast første kolonne på mobil */
.tabel-wrap { overflow-x: auto; margin: 1.2rem 0 1.5rem; border-top: 2px solid var(--blaek); -webkit-overflow-scrolling: touch; }
.datatabel { border-collapse: collapse; width: 100%; font-size: .97rem; }
.datatabel th, .datatabel td { text-align: left; padding: .6rem 1rem .6rem 0; border-bottom: 1px solid var(--streg); white-space: nowrap; vertical-align: top; }
.datatabel thead th { font-size: .85rem; color: var(--daempet); font-weight: 600; }
.datatabel tbody th { font-weight: 700; }
@media (max-width: 700px) {
  .datatabel tbody th { position: sticky; left: 0; background: var(--staal); padding-right: 1rem; }
}

/* Anløbe- og glødefarver */
.anlob, .glod { display: grid; grid-template-columns: repeat(5, 1fr); margin: 1.2rem 0 1.4rem; border-radius: 3px; overflow: hidden; }
.anlob span, .glod span {
  display: flex; align-items: flex-end; min-height: 4.5rem; padding: .5rem; font-size: .8rem; line-height: 1.2;
  background: var(--c); color: #fff; hyphens: manual;
}
.anlob span:nth-child(-n+2) { color: var(--grafit); }
.glod { background: var(--grafit); }
.glod span { background: radial-gradient(ellipse at 50% 120%, var(--c), transparent 75%), var(--grafit); color: var(--paa-moerk); }
.glod span:nth-child(n+4) { color: var(--grafit); background: radial-gradient(ellipse at 50% 120%, var(--c) 30%, color-mix(in srgb, var(--c) 70%, var(--grafit)) 100%); }

@media (max-width: 480px) { .anlob span, .glod span { font-size: .72rem; padding: .4rem .35rem; } }

/* Rust: metoder */
.metoder { display: grid; gap: 0 2.5rem; margin: 1rem 0 1.5rem; border-top: 2px solid var(--blaek); }
@media (min-width: 700px) { .metoder { grid-template-columns: 1fr 1fr; } }
.metoder section { padding: 1.1rem 0 .4rem; border-bottom: 1px solid var(--streg); }
.metoder p { font-size: 1rem; }

/* Historie: tidslinje */
.tidslinje { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.tidslinje li { position: relative; padding: 0 0 .8rem 2rem; border-left: 2px solid var(--streg); margin-left: .45rem; }
.tidslinje li::before { content: ""; position: absolute; left: -.5rem; top: 2.95rem; width: .85rem; height: .85rem; border-radius: 50%; background: var(--grafit); box-shadow: 0 0 0 3px var(--staal); }
.tidslinje li:last-child::before { background: var(--glo); }
.tidslinje h2 { margin-top: 2.4rem; }
.tidslinje p { max-width: 68ch; }

/* Vægtberegner */
.beregner { margin: 1.5rem 0 3rem; }
.valg { border: 0; padding: 0; margin: 0 0 1.25rem; }
.valg legend { font-weight: 700; margin-bottom: .5rem; }
.faner { display: flex; flex-wrap: wrap; gap: .5rem; }
.faner label { position: relative; }
.faner input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.faner span { display: inline-block; padding: .55rem 1rem; border: 2px solid var(--blaek); border-radius: 3px; font-weight: 600; background: var(--flade); transition: background-color .15s ease-out, color .15s ease-out; }
.faner input:checked + span { background: var(--blaek); color: #fff; }
.faner input:focus-visible + span { outline: 3px solid var(--glo); outline-offset: 3px; }
.faner label:hover input:not(:checked) + span { background: var(--staal-2); }

.beregner-ind { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .beregner-ind { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; align-items: start; } }
.felter { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.beregner-ind > * { min-width: 0; }
.felt-in { display: grid; gap: .3rem; min-width: 0; grid-template-columns: minmax(0, 1fr); font-weight: 600; font-size: .95rem; }
.input-enhed { display: flex; align-items: stretch; border: 2px solid var(--blaek); border-radius: 3px; background: #fff; }
.input-enhed:focus-within { outline: 3px solid var(--glo); outline-offset: 2px; }
.input-enhed input { flex: 1; min-width: 0; border: 0; padding: .65rem .7rem; font: 500 1.1rem var(--mono); color: var(--blaek); background: transparent; outline: none; }
.input-enhed > span { display: grid; place-items: center; padding: 0 .7rem; font: 400 .9rem var(--mono); color: var(--daempet); background: var(--staal-2); }
select { width: 100%; padding: .7rem .6rem; border: 2px solid var(--blaek); border-radius: 3px; font: 500 1rem var(--tekst); background: #fff; color: var(--blaek); }
select:focus-visible { outline: 3px solid var(--glo); outline-offset: 2px; }
.felt-in:has(select) { grid-column: 1 / -1; }

.resultat { background: var(--grafit); color: var(--paa-moerk); border-radius: 4px; padding: 1.5rem 1.5rem 1.2rem; box-shadow: 0 14px 30px -14px rgba(0,0,0,.5); }
.res-lbl { margin: 0; font-size: .95rem; color: var(--paa-moerk-2); }
.res-tal { margin: .1rem 0 1rem; font-family: var(--display); font-weight: 800; font-size: clamp(3.2rem, 9vw, 4.75rem); line-height: 1; color: #fff; }
.res-enh { font-size: .45em; color: var(--glo-lys); }
.res-detaljer { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; padding-top: 1rem; border-top: 1px solid #3a3f43; }
.res-detaljer dt { font-size: .85rem; color: var(--paa-moerk-2); }
.res-detaljer dd { margin: .15rem 0 0; font: 500 1.1rem var(--mono); }
.res-fejl { margin: 1rem 0 0; color: var(--glo-lys); font-weight: 600; }
.tegning { margin-top: 1rem; }
.tegning svg { display: block; width: 100%; max-width: 15rem; height: auto; margin: 0 auto; }
.t-flade { fill: #4a5155; stroke: #8c9396; stroke-width: 1.5; }
.t-side { fill: #33393c; stroke: #8c9396; stroke-width: 1.5; }
.t-hul { fill: var(--grafit); stroke: #8c9396; stroke-width: 1.5; }

/* Bund */
.bund { background: var(--grafit); color: var(--paa-moerk-2); padding: 2.25rem 0 2.5rem; }
.bund-ind { display: grid; gap: 1rem; }
@media (min-width: 760px) { .bund-ind { grid-template-columns: auto 1fr; align-items: baseline; gap: 2rem; } .bund nav { justify-self: end; } }
.bund-navn { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .06em; color: var(--paa-moerk); }
.bund-navn span { display: block; font-family: var(--tekst); font-weight: 400; font-size: .9rem; letter-spacing: 0; color: var(--paa-moerk-2); }
.bund nav { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.bund a { color: var(--paa-moerk-2); text-decoration: none; font-size: .95rem; }
.bund a:hover { color: #fff; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
