/* nissehue.dk - mønsterpapir, filt-rød og granblæk */
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --papir: #f1e7d3;
  --papir-2: #e8dbc1;
  --tern: rgba(120, 96, 52, 0.11);
  --blaek: #21362b;
  --blaek-2: #475a4d;
  --roed: #a8261d;
  --roed-2: #851b14;
  --hvid: #fbf7ee;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ramme: 72rem;
  --kant: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--papir);
  background-image:
    linear-gradient(var(--tern) 1px, transparent 1px),
    linear-gradient(90deg, var(--tern) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--blaek);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}
::selection { background: var(--roed); color: var(--hvid); }
img, svg { display: block; max-width: 100%; }
a { color: var(--roed-2); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--roed); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--roed); outline-offset: 3px; border-radius: 2px; }

.ramme { width: 100%; max-width: var(--ramme); margin: 0 auto; padding: 0 var(--kant); }
.spring { position: absolute; left: -999px; top: 0; background: var(--blaek); color: var(--hvid); padding: 0.6rem 1rem; z-index: 10; }
.spring:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(3.1rem, 8vw, 5.25rem); }
h1 em { font-weight: 500; font-style: italic; color: var(--roed); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); }
p { margin: 0 0 1rem; }
.ingress { font-size: clamp(1.125rem, 2.1vw, 1.3rem); line-height: 1.55; color: var(--blaek-2); max-width: 38em; }

/* Top */
.top { border-bottom: 1.5px dashed rgba(33, 54, 43, 0.35); background: rgba(241, 231, 211, 0.85); }
.top-ramme { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.ordmaerke { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--blaek); text-decoration: none; font: 700 1.6rem/1 var(--serif); letter-spacing: -0.01em; }
.ordmaerke:hover { color: var(--blaek); }
.ordmaerke em { font-style: normal; color: var(--roed); }
.ordmaerke-hue { width: 2.1rem; height: 2.1rem; flex: none; }
.menu { display: flex; flex-wrap: wrap; gap: 0.15rem 1.15rem; font-size: 0.98rem; font-weight: 600; }
.menu a { color: var(--blaek); text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--roed); }
.menu a[aria-current="page"] { border-bottom-color: var(--roed); }

/* Knapper */
.knap { display: inline-flex; align-items: center; min-height: 3rem; padding: 0.7rem 1.4rem; border-radius: 999px; background: var(--roed); color: var(--hvid); font-weight: 700; text-decoration: none; box-shadow: 0 2px 0 var(--roed-2), 0 8px 18px -10px rgba(133, 27, 20, 0.7); transition: background-color 0.15s ease, transform 0.15s ease; border: 0; font-family: var(--sans); font-size: 1rem; cursor: pointer; }
.knap:hover { background: var(--roed-2); color: var(--hvid); transform: translateY(-1px); }
.knap:active { transform: translateY(1px); }
.knap-lille { min-height: 2.6rem; padding: 0.5rem 1.1rem; }
.knap-link { font-weight: 700; color: var(--blaek); text-decoration-color: var(--roed); }

/* Forside: helt */
.helt { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); }
.helt-ramme { display: grid; gap: 2.5rem; align-items: center; }
.helt h1 { max-width: 11ch; margin-bottom: 1.4rem; }
.helt-knapper { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.8rem; }
.helt-moenster { margin: 0 auto; width: min(100%, 15rem); }
.helt-moenster svg { width: 100%; height: auto; overflow: visible; }
.m-stof { fill: var(--roed); }
.m-klip { fill: none; stroke: var(--blaek); stroke-width: 1.5; stroke-dasharray: 7 5; }
.m-maal { stroke: var(--blaek); stroke-width: 1.2; }
.m-tal { font: 400 12px var(--mono); fill: var(--blaek); }
.m-traad { stroke: var(--hvid); stroke-width: 1.5; }
.m-traad-pil { fill: none; stroke: var(--hvid); stroke-width: 1.5; }
.m-note { font: italic 500 20px var(--serif); fill: var(--hvid); }
@media (min-width: 860px) {
  .helt-ramme { grid-template-columns: 1.25fr 0.75fr; gap: 4rem; }
  .helt-moenster { width: 100%; }
}

/* Forside: veje */
.veje { padding: clamp(2rem, 5vw, 4rem) 0; }
.veje h2 { margin-bottom: 1.5rem; }
.vej-liste { list-style: none; margin: 0; padding: 0; border-bottom: 1.5px dashed rgba(33, 54, 43, 0.35); }
.vej-liste li { border-top: 1.5px dashed rgba(33, 54, 43, 0.35); }
.vej-liste a { display: grid; gap: 0.35rem; padding: 1.4rem 2.5rem 1.4rem 0; color: var(--blaek); text-decoration: none; position: relative; }
.vej-liste a::after { content: ""; position: absolute; right: 0.25rem; top: 50%; width: 0.75rem; height: 0.75rem; border-top: 2px solid var(--roed); border-right: 2px solid var(--roed); transform: translateY(-50%) rotate(45deg); transition: right 0.2s ease; }
.vej-liste a:hover::after { right: 0; }
.vej-navn { font: 700 clamp(1.55rem, 3vw, 2rem)/1.1 var(--serif); }
.vej-liste a:hover .vej-navn { color: var(--roed); }
.vej-tekst { color: var(--blaek-2); max-width: 40em; }
@media (min-width: 860px) {
  .vej-liste a { grid-template-columns: 22rem 1fr; gap: 2rem; align-items: baseline; padding: 1.7rem 3.5rem 1.7rem 0; }
}

.citat { background: var(--roed); color: var(--hvid); padding: clamp(2.5rem, 6vw, 4.5rem) 0; margin-top: clamp(1rem, 4vw, 3rem); }
.citat p { font: italic 500 clamp(1.45rem, 3.3vw, 2.2rem)/1.3 var(--serif); max-width: 32em; margin: 0; }

/* Undersider */
.side { padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.side-top { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.side-top h1 { margin-bottom: 1.1rem; max-width: 14ch; }
.tekst { max-width: 40rem; }
.tekst-bred { max-width: 42rem; }
.tekst h2 { margin: 2.6rem 0 0.8rem; }
.tekst h2:first-child { margin-top: 0; }
.videre { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }

.hue-fig { margin: 2.5rem 0 0.5rem; }
.hue-fig svg { width: 100%; height: auto; }
.t-lin { stroke: var(--blaek); stroke-width: 1.5; stroke-dasharray: 6 5; opacity: 0.5; }
.t-hue path { fill: var(--roed); }
.t-hue-graa path { fill: var(--roed-2); }
.t-hue rect, .t-hue circle { fill: var(--hvid); stroke: var(--blaek); stroke-width: 2; }

/* Værksted: formular + resultat */
.vaerksted { display: grid; gap: 1.5rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 900px) { .vaerksted { grid-template-columns: minmax(18rem, 0.8fr) 1.2fr; gap: 2.5rem; align-items: start; } .vaerksted > .maal { position: sticky; top: 1.5rem; } }
.maal, .resultat { background: var(--hvid); border: 1.5px solid var(--blaek); border-radius: 10px; padding: clamp(1.2rem, 3vw, 1.8rem); box-shadow: 0 10px 30px -22px rgba(33, 54, 43, 0.6); }
.maal h2, .resultat h2 { font-size: 1.7rem; margin-bottom: 1.1rem; }
.felt { margin-bottom: 1.1rem; }
.felt > label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.felt-input { display: flex; align-items: center; gap: 0.6rem; }
.felt-input span { color: var(--blaek-2); }
.felt-par { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: end; }
input[type="number"], select {
  font: 400 1.0625rem/1.2 var(--mono); color: var(--blaek); background: var(--papir);
  border: 1.5px solid var(--blaek); border-radius: 6px; padding: 0.6rem 0.7rem; width: 7rem; min-height: 2.9rem;
}
select { width: auto; font-family: var(--sans); }
input:disabled { opacity: 0.45; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--roed); margin: 0; flex: none; }
.vaelg { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; margin-bottom: 0.6rem; cursor: pointer; }
.felt-kant .felt-input { padding-left: 1.85rem; }
.skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hjaelp { font-size: 0.92rem; color: var(--blaek-2); margin: 0.4rem 0 0; line-height: 1.5; }
.fejl { background: #f6dcd6; color: var(--roed-2); border-radius: 6px; padding: 0.7rem 0.9rem; font-size: 0.95rem; }
[hidden] { display: none !important; }

.tegning { padding: 0.5rem; background: var(--papir); background-image: linear-gradient(var(--tern) 1px, transparent 1px), linear-gradient(90deg, var(--tern) 1px, transparent 1px); background-size: 16px 16px; border-radius: 6px; padding: 0.75rem; margin-bottom: 1.2rem; }
.laegning { width: 100%; height: auto; max-height: 34rem; margin: 0 auto; }
.l-stof { fill: var(--roed); stroke: var(--hvid); }
.l-sy { fill: none; stroke: var(--hvid); opacity: 0.85; }
.l-maal line { stroke: var(--blaek); }
.l-tal { font-family: var(--mono); fill: var(--blaek); }
.l-note { font-family: var(--serif); font-style: italic; font-weight: 500; fill: var(--hvid); }
.l-note-lys { fill: var(--blaek-2); }
.l-kant { fill: var(--hvid); stroke: var(--blaek); }
.l-fold { stroke: var(--blaek); opacity: 0.6; }

.tal-liste { margin: 0 0 0.9rem; display: grid; gap: 0; }
.tal-liste > div { display: grid; grid-template-columns: minmax(8.5rem, 0.8fr) 1.2fr; gap: 0.2rem 1rem; padding: 0.6rem 0; border-top: 1px dashed rgba(33, 54, 43, 0.3); }
.tal-liste dt { font-weight: 700; }
.tal-liste dd { margin: 0; }
.tal-liste dd { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .tal-liste > div { grid-template-columns: 1fr; } }
.note { font-size: 0.92rem; color: var(--blaek-2); margin: 0; }

/* Lister */
.tjek { list-style: none; padding: 0; margin: 0 0 1rem; }
.tjek li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; }
.tjek li::before { content: ""; position: absolute; left: 0.1rem; top: 0.45em; width: 0.8rem; height: 0.8rem; background: var(--roed); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.trin { list-style: none; counter-reset: trin; padding: 0; margin: 0 0 1.4rem; }
.trin > li { counter-increment: trin; position: relative; padding-left: 2.8rem; margin-bottom: 1.05rem; }
.trin > li::before { content: counter(trin); position: absolute; left: 0; top: -0.2rem; font: 700 1.9rem/1 var(--serif); color: var(--roed); }
.trin-tal strong { font-family: var(--mono); font-weight: 400; background: var(--papir); padding: 0.05rem 0.35rem; border-radius: 4px; font-variant-numeric: tabular-nums; }
.opskrift .trin { margin: 0; }

/* Julehygge */
.ideer { display: grid; gap: 0 3rem; }
@media (min-width: 760px) { .ideer { grid-template-columns: 1fr 1fr; } }
.ide { border-top: 1.5px dashed rgba(33, 54, 43, 0.35); padding: 1.5rem 0 0.6rem; }
.ide h2 { font-size: clamp(1.5rem, 2.8vw, 1.9rem); margin-bottom: 0.6rem; }
.ide p { color: var(--blaek-2); }

/* Bund */
.bund { border-top: 1.5px dashed rgba(33, 54, 43, 0.35); padding: 1.6rem 0 2.2rem; font-size: 0.95rem; }
.bund-ramme { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.bund p { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.bund a { color: var(--blaek); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.felt-par + .hjaelp { margin: -0.4rem 0 1.1rem; }
