/* spiseri.dk - hverdagsretter. Rødternet dug, kogebogsregister, opskriftskort. */
@font-face {
  font-family: "Rokkitt";
  src: url("../fonts/rokkitt-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --papir: #f6efe1;
  --papir-lys: #fffbf3;
  --papir-mork: #ece1ca;
  --blaek: #2a1f17;
  --blaek-2: #5b4a3c;
  --tomat: #b0381f;
  --tomat-mork: #8c2a15;
  --salvie: #4f6a4a;
  --linje: #dccdb1;
  --linje-svag: #e8dcc5;
  --skrift-titel: "Rokkitt", "Rockwell", Georgia, serif;
  --skrift: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ramme: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--papir);
  color: var(--blaek);
  font-family: var(--skrift);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 450;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex: 1; }
::selection { background: var(--tomat); color: var(--papir-lys); }
:focus-visible { outline: 3px solid var(--tomat); outline-offset: 3px; border-radius: 2px; }
img, svg { display: block; max-width: 100%; }
a { color: var(--tomat-mork); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--tomat); text-decoration-thickness: 2px; }
h1, h2, h3 {
  font-family: var(--skrift-titel);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0 0 1em; text-wrap: pretty; }
strong { font-weight: 800; }

.ramme { width: 100%; max-width: var(--ramme); margin-inline: auto; padding-inline: var(--gutter); }
.smal { max-width: 46rem; }

/* Rødternet dug-kant øverst */
.dug {
  height: 18px;
  background-color: var(--papir-lys);
  background-image:
    linear-gradient(90deg, rgba(176, 56, 31, .55) 50%, transparent 50%),
    linear-gradient(rgba(176, 56, 31, .55) 50%, transparent 50%);
  background-size: 18px 18px;
}

/* Sidehoved */
.top { border-bottom: 1px solid var(--linje); }
.top-indre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.ordmaerke {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--blaek); text-decoration: none;
  font-family: var(--skrift-titel); font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: -0.02em;
}
.ordmaerke .skaal { width: 2rem; height: auto; color: var(--tomat); margin-top: -.15rem; }
.ordmaerke .tld { color: var(--tomat); }
.ordmaerke:hover { color: var(--blaek); }
.menu { display: flex; gap: clamp(.9rem, 3vw, 1.75rem); }
.menu a {
  color: var(--blaek); text-decoration: none; font-weight: 700; font-size: 1rem;
  padding-block: .35rem; border-bottom: 2px solid transparent;
}
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--tomat); color: var(--blaek); }

/* Forside: intro */
.intro { padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem); }
.intro h1 { font-size: clamp(2.6rem, 8.5vw, 5.6rem); max-width: 13ch; letter-spacing: -0.025em; }
.indledning { font-size: clamp(1.125rem, 2.2vw, 1.3rem); line-height: 1.55; color: var(--blaek-2); max-width: 38rem; margin-top: 1.25rem; }

/* Forside: kogebogsregister */
.register { padding-block: 1rem clamp(3rem, 8vw, 5rem); }
.register h2 { font-size: 1.4rem; color: var(--salvie); padding-bottom: .9rem; border-bottom: 2px solid var(--blaek); }
.register-liste { list-style: none; margin: 0; padding: 0; }
.register-liste li { border-bottom: 1px solid var(--linje); }
.register-liste a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: .75rem;
  row-gap: .3rem;
  padding-block: 1.35rem;
  color: var(--blaek);
  text-decoration: none;
}
.r-navn {
  font-family: var(--skrift-titel); font-weight: 800;
  font-size: clamp(1.65rem, 4.4vw, 2.6rem); line-height: 1.05; letter-spacing: -0.015em;
  transition: color .2s ease-out;
}
.r-prikker { border-bottom: 2px dotted var(--linje); transform: translateY(-.3em); min-width: 1.5rem; }
.r-meta { font-weight: 700; font-size: .95rem; color: var(--blaek-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.r-kort { grid-column: 1 / -1; color: var(--blaek-2); max-width: 40rem; }
.register-liste a:hover .r-navn { color: var(--tomat); }
.register-liste a:hover .r-prikker { border-bottom-color: var(--tomat); }

@media (max-width: 34rem) {
  .register-liste a { grid-template-columns: 1fr; }
  .r-prikker { display: none; }
  .r-meta { order: 3; font-size: .9rem; }
  .r-kort { order: 2; }
}

/* Forside: før du går i gang */
.foer { background: var(--papir-mork); padding-block: clamp(2.75rem, 7vw, 4.5rem); }
.foer-indre { display: grid; gap: 1.5rem 3rem; }
.foer h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); max-width: 10ch; }
.foer-tekst { max-width: 40rem; }
.foer-tekst p { margin-bottom: 1.1em; }
@media (min-width: 52rem) { .foer-indre { grid-template-columns: 1fr 1.6fr; } }

.pil-link { font-weight: 800; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: .1rem; }
.pil-link::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); }
.knap {
  display: inline-block; background: var(--tomat); color: var(--papir-lys); text-decoration: none;
  font-weight: 800; padding: .8rem 1.4rem; border-radius: 6px; transition: background-color .2s ease-out;
}
.knap:hover { background: var(--tomat-mork); color: var(--papir-lys); }

/* Opskriftsside */
.opskrift { padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem); }
.spor { margin-bottom: 1rem; font-weight: 700; font-size: .95rem; }
.spor a { color: var(--salvie); text-decoration: none; }
.spor a::before { content: ""; display: inline-block; width: .45em; height: .45em; margin-right: .45em; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg) translateY(-.1em); }
.spor a:hover { text-decoration: underline; }
.opskrift h1 { font-size: clamp(2.5rem, 7.5vw, 4.8rem); letter-spacing: -0.025em; max-width: 16ch; }
.fakta { display: flex; flex-wrap: wrap; gap: .6rem 2.25rem; margin: 1.75rem 0 0; padding: 1rem 0; border-block: 1px solid var(--linje); }
.fakta div { display: flex; gap: .5rem; align-items: baseline; }
.fakta dt { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--salvie); }
.fakta dd { margin: 0; font-weight: 700; }

.opskrift-gitter { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 56rem) {
  .opskrift-gitter { grid-template-columns: minmax(19rem, 1fr) 1.7fr; gap: 4rem; align-items: start; }
  .kort-ingr { position: sticky; top: 1.5rem; }
}

/* Ingredienskortet: et linjeret opskriftskort */
.kort-ingr {
  background: var(--papir-lys);
  border: 1px solid var(--linje);
  border-radius: 4px;
  padding: 1.5rem 1.4rem 1.25rem;
  box-shadow: 0 1px 1px rgba(42, 31, 23, .05), 0 10px 24px -14px rgba(42, 31, 23, .3);
  position: relative;
}
.kort-ingr::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; border-radius: 4px 4px 0 0;
  background-image:
    linear-gradient(90deg, rgba(176, 56, 31, .6) 50%, transparent 50%),
    linear-gradient(rgba(176, 56, 31, .6) 50%, transparent 50%);
  background-size: 8px 8px;
}
.kort-ingr h2 { font-size: 1.75rem; margin-top: .25rem; }
.hjaelp { font-size: .9rem; color: var(--blaek-2); margin: .35rem 0 0; }
.kort-ingr h3 { font-family: var(--skrift); font-weight: 800; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--tomat-mork); margin: 1.4rem 0 .2rem; }
.kort-ingr ul { list-style: none; margin: 0; padding: 0; }
.kort-ingr li { display: flex; gap: .7rem; align-items: flex-start; border-bottom: 1px solid var(--linje-svag); }
.kort-ingr li:last-child { border-bottom: 0; }
.kort-ingr input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 1.15rem; height: 1.15rem; margin: .62rem 0 0;
  border: 2px solid var(--blaek-2); border-radius: 3px; background: var(--papir-lys);
  cursor: pointer; display: grid; place-content: center;
}
.kort-ingr input::after {
  content: ""; width: .32rem; height: .6rem; border: solid var(--papir-lys); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px) scale(0); transition: transform .15s ease-out;
}
.kort-ingr input:checked { background: var(--salvie); border-color: var(--salvie); }
.kort-ingr input:checked::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.kort-ingr label { flex: 1; padding-block: .45rem; cursor: pointer; line-height: 1.45; }
.kort-ingr input:checked + label { color: var(--blaek-2); text-decoration: line-through; text-decoration-color: var(--salvie); }

/* Trin */
.trin h2 { font-size: 1.75rem; margin-bottom: 1.25rem; }
.trin ol { list-style: none; counter-reset: trin; margin: 0; padding: 0; }
.trin ol li {
  counter-increment: trin;
  display: grid; grid-template-columns: 2.4rem 1fr; gap: .25rem .75rem;
  padding-block: 1.1rem; border-top: 1px solid var(--linje); max-width: 40rem;
}
.trin ol li::before {
  content: counter(trin);
  font-family: var(--skrift-titel); font-weight: 800; font-size: 2.4rem; line-height: .9;
  color: var(--tomat); font-variant-numeric: tabular-nums;
}
.raad-titel { margin-top: 2.75rem; }
.raad { margin: 0; padding: 0; list-style: none; max-width: 40rem; }
.raad li { position: relative; padding: 0 0 .9rem 1.6rem; }
.raad li::before { content: ""; position: absolute; left: .15rem; top: .55em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--salvie); }

.flere { margin-top: clamp(3rem, 7vw, 4.5rem); padding-top: 1.75rem; border-top: 2px solid var(--blaek); }
.flere h2 { font-size: 1.4rem; color: var(--salvie); margin-bottom: 1rem; }
.flere ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.flere a {
  display: inline-block; padding: .55rem 1rem; border: 1px solid var(--linje); border-radius: 999px;
  background: var(--papir-lys); color: var(--blaek); text-decoration: none; font-weight: 700;
  transition: border-color .2s ease-out, color .2s ease-out;
}
.flere a:hover { border-color: var(--tomat); color: var(--tomat-mork); }

/* Tekstsider */
.tekstside { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5rem); }
.tekstside h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); letter-spacing: -0.025em; }
.tekstside .indledning { margin-bottom: 2.25rem; }
.tekstside h2 { font-size: clamp(1.5rem, 3.5vw, 1.9rem); margin: 2.5rem 0 .75rem; }
.tekstside ul { padding-left: 1.2rem; margin: 0 0 1em; }
.tekstside li { margin-bottom: .4rem; }
.tekstside li::marker { color: var(--tomat); }
.maal { width: 100%; border-collapse: collapse; margin: .5rem 0 1.25rem; background: var(--papir-lys); border: 1px solid var(--linje); font-variant-numeric: tabular-nums; }
.maal th, .maal td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--linje-svag); vertical-align: top; }
.maal th { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--salvie); font-weight: 800; border-bottom: 2px solid var(--linje); }
.maal td:first-child { font-weight: 800; white-space: nowrap; }

/* Sidefod */
.bund { border-top: 1px solid var(--linje); background: var(--papir-mork); }
.bund-indre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: 1.5rem; }
.bund-navn { margin: 0; font-family: var(--skrift-titel); font-weight: 800; font-size: 1.2rem; }
.bund a { color: var(--blaek); font-weight: 700; }

/* Print: kun selve opskriften */
@media print {
  .dug, .top, .bund, .flere, .hjaelp, .spor { display: none; }
  body { background: #fff; font-size: 11pt; }
  .kort-ingr { box-shadow: none; position: static; }
  .kort-ingr::before { display: none; }
  .opskrift-gitter { grid-template-columns: 1fr 1.6fr; gap: 2rem; }
  .kort-ingr input { border-color: #000; }
}
