/* ønskesedler.dk - papir, blæk og et tema-farvet gavemærke */
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/young-serif-latin.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/atkinson-next.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bund: #ebe5d8;
  --papir: #fffcf6;
  --blaek: #241f1b;
  --blaek-2: #5a5048;
  --linje: #ddd2c1;
  --linje-2: #b9ab97;
  --maerke: #1d5a3c;
  --maerke-2: #b1352c;
  --tone: #e3eadf;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 10px;
}
[data-tema="foedselsdag"] { --bund: #f3e6d4; --maerke: #ad3f1b; --maerke-2: #e0a526; --tone: #f8e2cf; }
[data-tema="bryllup"] { --bund: #ebe8e1; --maerke: #665436; --maerke-2: #8ea78a; --tone: #e9e6dc; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bund);
  color: var(--blaek);
  font: 400 1.0625rem/1.6 var(--sans);
  transition: background-color .35s ease-out;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
::selection { background: var(--maerke); color: var(--papir); }
input, textarea, button { font: inherit; color: inherit; }
input, textarea { caret-color: var(--maerke); }
a { color: var(--maerke); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--maerke); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; }
svg { display: block; }
[hidden] { display: none !important; }

.ramme { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.smal { width: min(100% - 2rem, 42rem); }
.spring { position: absolute; left: -999px; top: .5rem; background: var(--blaek); color: var(--papir); padding: .5rem .8rem; border-radius: 6px; z-index: 5; }
.spring:focus { left: .5rem; }

/* Top */
.top { padding: 1.1rem 0 .9rem; }
.top-ramme { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; }
.ordmaerke { display: block; color: inherit; text-decoration: none; }
.ordmaerke-svg { height: 38px; width: auto; overflow: visible; }
.menu { display: flex; flex-wrap: wrap; gap: .2rem .3rem; margin-left: -.55rem; }
.menu a { color: var(--blaek); text-decoration: none; padding: .45rem .55rem; border-radius: 8px; font-size: .98rem; }
.menu a:hover { background: color-mix(in srgb, var(--papir) 60%, transparent); }
@media (max-width: 420px) { .menu { gap: 0; margin-left: -.4rem; } .menu a { padding: .4rem .4rem; font-size: .92rem; } }
.menu a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--maerke); text-decoration-thickness: 2px; text-underline-offset: .35em; }

/* Bund */
.bund { margin-top: 5rem; border-top: 1px solid var(--linje-2); padding: 1.4rem 0 2rem; font-size: .95rem; color: var(--blaek-2); }
.bund-ramme { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.bund p { margin: 0; font-family: var(--serif); color: var(--blaek); }
.bund a { color: var(--blaek-2); }

/* Knapper */
.knap { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem; border-radius: var(--r); border: 1px solid transparent; cursor: pointer; font-weight: 600; text-decoration: none; line-height: 1.2; transition: background-color .15s ease-out, transform .1s ease-out; }
.knap:active { transform: translateY(1px); }
.knap svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.knap-fyldt { background: var(--maerke); color: var(--papir); }
.knap-fyldt:hover { background: color-mix(in srgb, var(--maerke) 86%, #000); text-decoration: none; }
.knap-let { background: transparent; border-color: var(--linje-2); color: var(--blaek); }
.knap-let:hover { background: color-mix(in srgb, var(--papir) 70%, transparent); }
.knap:disabled { opacity: .45; cursor: not-allowed; }
.knap[data-bekraeft="1"] { border-color: #9b2a20; color: #9b2a20; background: #fbeae6; }

/* Værktøj */
.intro { padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); max-width: 44rem; }
.intro h1 { font-size: clamp(2.3rem, 6.5vw, 4.1rem); letter-spacing: -.02em; margin-bottom: .9rem; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.2rem); color: var(--blaek-2); max-width: 40rem; }
.besked { background: var(--papir); padding: 1rem; border-radius: var(--r); }

.arbejdsflade { display: grid; gap: 2.5rem; }
.panel { max-width: 34rem; }
@media (min-width: 900px) {
  .arbejdsflade { grid-template-columns: minmax(300px, 350px) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .panel { position: sticky; top: 1rem; }
}

.panel-titel { font-size: 1.45rem; margin-bottom: 1rem; }
.tema-valg { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.tema-valg legend, .felt label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; padding: 0; }
.valgfri { font-weight: 400; color: var(--blaek-2); margin-left: .25rem; }
.tema-knapper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.tema-chip { position: relative; display: block; cursor: pointer; }
.tema-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tema-chip span { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .3rem .6rem; border-radius: var(--r); border: 1px solid var(--linje-2); background: color-mix(in srgb, var(--papir) 55%, transparent); font-size: .92rem; text-align: center; transition: background-color .2s ease-out, color .2s ease-out, border-color .2s ease-out; }
.tema-chip svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.tema-chip:hover span { border-color: var(--maerke); }
.tema-chip input:checked + span { background: var(--maerke); border-color: var(--maerke); color: var(--papir); }
.tema-chip input:focus-visible + span { outline: 2px solid var(--maerke); outline-offset: 3px; }

.felt { margin-bottom: 1rem; }
.felt input, .felt textarea { display: block; width: 100%; padding: .65rem .8rem; border: 1px solid var(--linje-2); border-radius: var(--r); background: var(--papir); min-height: 46px; }
.felt textarea { resize: vertical; min-height: 4.5rem; line-height: 1.45; }
.felt input::placeholder, .felt textarea::placeholder { color: #857a6f; opacity: 1; }
.felt input:focus, .felt textarea:focus { outline: 2px solid var(--maerke); outline-offset: 1px; border-color: var(--maerke); }
.felt [aria-invalid="true"] { border-color: #9b2a20; }

.oenske-form { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--linje-2); }
.oenske-form h3 { font-size: 1.25rem; margin-bottom: .9rem; }
.fejl { color: #8f2419; background: #fbeae6; padding: .55rem .75rem; border-radius: 8px; font-size: .95rem; }
.form-knapper { display: flex; gap: .5rem; flex-wrap: wrap; }

.seddel-omraade { min-width: 0; }
.seddel-handlinger { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }

.seddel {
  position: relative;
  background: var(--papir);
  border-radius: 4px;
  padding: 1.1rem clamp(1.1rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
  box-shadow: 0 1px 2px rgba(70, 50, 25, .08), 0 22px 44px -24px rgba(70, 50, 25, .38);
  min-height: 24rem;
}
.pynt { color: var(--maerke); margin: 0 calc(-1 * clamp(.3rem, 2vw, 1.5rem)); }
.pynt svg { width: 100%; height: 58px; display: none; }
[data-tema="jul"] .pynt-jul, [data-tema="foedselsdag"] .pynt-foedselsdag, [data-tema="bryllup"] .pynt-bryllup { display: block; }
html:not([data-tema]) .pynt-jul { display: block; }
.kugler line { stroke: currentColor; stroke-width: 1.2; }
.kugler circle { fill: var(--maerke); }
.kugler .a2, .flag .a2 { fill: var(--maerke-2); }
.flag path { fill: var(--maerke); }
.blade path { fill: none; stroke: var(--maerke-2); stroke-width: 1.4; }
.blade ellipse { fill: var(--maerke-2); }
.ring2 { stroke: var(--maerke-2); }

.seddel-hoved { text-align: center; padding: .6rem 0 1.4rem; border-bottom: 2px solid var(--blaek); }
.seddel-titel { font-size: clamp(1.9rem, 4.6vw, 2.8rem); overflow-wrap: anywhere; }
.seddel-fra { margin: .5rem 0 0; color: var(--blaek-2); overflow-wrap: anywhere; }

.liste { list-style: none; margin: 0; padding: 0; counter-reset: oenske; }
.oenske { counter-increment: oenske; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: .4rem; padding: 1rem 0 .9rem; border-bottom: 1px solid var(--linje); transition: background-color .9s ease-out; }
.oenske::before { content: counter(oenske); font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; color: var(--maerke); }
.oenske.ny { background: var(--tone); transition: none; }
.oenske.redigeres { background: var(--tone); }
.oenske-tekst { min-width: 0; }
.oenske-navn { font-size: 1.15rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; color: var(--blaek); }
a.oenske-navn { color: var(--blaek); text-decoration-color: var(--maerke); text-decoration-thickness: 1.5px; }
a.oenske-navn:hover { color: var(--maerke); }
.oenske-note { margin: .25rem 0 0; color: var(--blaek-2); overflow-wrap: anywhere; white-space: pre-line; }
.oenske-url { margin: .2rem 0 0; font-size: .85rem; color: var(--blaek-2); overflow-wrap: anywhere; }
.oenske-knapper { grid-column: 2; display: flex; gap: .15rem; margin-top: .5rem; margin-left: -.5rem; }
@media (min-width: 560px) {
  .oenske { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
  .oenske-knapper { grid-column: 3; margin: -.3rem -.5rem 0 0; align-self: start; }
}
.ikon-knap { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 8px; color: var(--blaek-2); cursor: pointer; }
.ikon-knap svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ikon-knap:hover:not(:disabled) { background: var(--tone); color: var(--blaek); }
.ikon-knap[data-handling="slet"]:hover { color: #9b2a20; background: #fbeae6; }
.ikon-knap:disabled { opacity: .3; cursor: default; }
.tom { text-align: center; color: var(--blaek-2); padding: 3.5rem 1rem 1rem; margin: 0; }
.gemt-note { font-size: .92rem; color: var(--blaek-2); margin-top: 1rem; }

/* Kort råd under værktøjet */
.kort-raad { margin-top: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--linje-2); padding-top: 2rem; }
.kort-raad h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.4rem; max-width: 30rem; }
.raad-liste { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1.2rem 2.5rem; }
@media (min-width: 760px) { .raad-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.raad-liste li { max-width: 36ch; }
.raad-liste strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; margin-bottom: .2rem; }
.pil-link { font-weight: 600; }
.pil-link::after { content: " \2192"; }

/* Tekstsider */
.tekstside { padding-top: clamp(1.5rem, 5vw, 3.5rem); }
.tekstside h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -.02em; margin-bottom: 1rem; }
.tekstside h2 { font-size: clamp(1.35rem, 2.6vw, 1.65rem); margin: 2.4rem 0 .6rem; }
.tekstside .lead { margin-bottom: 1.5rem; }
.tekstside ul { padding-left: 1.2rem; margin: 0 0 1em; }
.tekstside li { margin-bottom: .35rem; }
.trin { list-style: none; padding: 0; margin: 2rem 0 1rem; counter-reset: trin; }
.trin li { counter-increment: trin; display: grid; grid-template-columns: 3rem minmax(0, 1fr); padding: 1.2rem 0; border-top: 1px solid var(--linje-2); margin: 0; }
.trin li:last-child { border-bottom: 1px solid var(--linje-2); }
.trin li::before { content: counter(trin); grid-row: span 2; font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--maerke); }
.trin h2 { margin: 0 0 .3rem; font-size: 1.3rem; }
.trin p { margin: 0; }
.cta { margin-top: 2.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Udskrift: kun sedlen */
@media print {
  @page { margin: 16mm 14mm; }
  html, body { background: #fff; }
  body { display: block; font-size: 12pt; }
  .oenske.ny, .oenske.redigeres { background: none; }
  .top, .bund, .intro, .panel, .seddel-handlinger, .gemt-note, .kort-raad, .oenske-knapper, .spring, noscript, .cta { display: none !important; }
  .ramme { width: 100%; }
  .arbejdsflade { display: block; }
  .seddel { box-shadow: none; padding: 0; min-height: 0; border-radius: 0; }
  .pynt, .oenske::before, .seddel-hoved { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .oenske { break-inside: avoid; grid-template-columns: 2.4rem minmax(0, 1fr); }
  a.oenske-navn { text-decoration: none; color: #000; }
  .oenske-url { color: #333; }
  .tom { display: none; }
}
