/* Lej en Kok — design 2026 (canvas-implementering) */

:root {
  --ink: #24201d;
  --ink-deep: #171513;
  --paper: #f7f3eb;
  --paper-2: #e9e0d3;
  --tomato: #a54837;
  --tomato-deep: #7d3027;
  --mustard: #d2aa59;
  --blue: #38555c;
  --muted: #615a52;
  --line: rgba(36, 32, 29, .16);
  --line-paper: rgba(247, 243, 235, .16);
  --display: "Instrument Serif", Georgia, serif;
  --body: "Instrument Sans", Arial, sans-serif;
  --script: "Mrs Saint Delafield", cursive;
  --hand: "Caveat", cursive;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* Håndtegnet understregning (svungen streg, matcher wordmarkens) */
  --swash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8 C 30 2, 62 11, 117 4' stroke='%23d2aa59' stroke-width='3.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); line-height: 1.6; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.22; margin: 0; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); text-wrap: balance; }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
p { margin: 0; }
em { font-style: italic; }
.accent { font-style: italic; color: var(--tomato); }

.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 60; padding: .7rem 1rem; color: var(--paper); background: var(--ink-deep); }
.skip-link:focus { top: 1rem; }

.wrap { max-width: 1440px; margin: 0 auto; padding-left: clamp(1.25rem, 4vw, 3.5rem); padding-right: clamp(1.25rem, 4vw, 3.5rem); }
.pad { padding-top: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: clamp(3.5rem, 8vw, 6.5rem); }
.on-ink { background: var(--ink); color: var(--paper); }
.on-ink p { color: rgba(247, 243, 235, .88); }

/* Wordmark (ren tekst = vektor) */
.wm { font-family: var(--script); line-height: 1; color: var(--ink); text-decoration: none; display: inline-block; }
.wm.small { font-size: 2rem; }
.wm.footer { font-size: 2.625rem; color: var(--paper); }
.wm-hero { margin-bottom: 1.9rem; transform-origin: left top; will-change: transform, opacity; }
.wm-hero .wm-text { font-family: var(--script); font-size: clamp(5.5rem, 13.9vw, 13.75rem); line-height: .85; color: var(--ink); }
.wm-hero svg { display: block; width: 89%; max-width: 500px; height: auto; margin: -1.8vw 0 0 15%; }
.streg-link { display: inline-flex; align-items: center; gap: .75rem; font-size: .875rem; color: var(--tomato); text-decoration: none; }
.streg-link::before { content: ""; width: 34px; height: 2px; background: var(--tomato); }
.streg-link:hover { color: var(--tomato-deep); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; padding: .7rem clamp(1.25rem, 4vw, 3.5rem); background: transparent; border-bottom: 1px solid transparent; transition: background .3s ease, border-color .3s ease, box-shadow .3s ease; }
.site-header.wm-on { background: rgba(247, 243, 235, .92); backdrop-filter: blur(6px); border-bottom-color: var(--line); }
.no-anim .site-header { background: rgba(247, 243, 235, .92); border-bottom-color: var(--line); }
html:not(.js) .site-header { background: rgba(247, 243, 235, .92); border-bottom-color: var(--line); }
.site-nav { display: flex; align-items: center; gap: clamp(.9rem, 2.2vw, 2.1rem); font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--mustard); padding-bottom: 3px; }
.button { display: inline-block; padding: .9rem 1.6rem; background: var(--tomato); color: var(--paper) !important; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; transition: background .2s ease, transform .2s var(--ease); }
.button:hover { background: var(--tomato-deep); transform: translateY(-1px); }
.button-outline { background: transparent; border: 2px solid rgba(36, 32, 29, .35); color: var(--ink) !important; font-weight: 500; }
.button-outline:hover { background: rgba(36, 32, 29, .05); }
.menu-toggle { display: none; background: none; border: 2px solid var(--ink); color: var(--ink); padding: .5rem .9rem; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; cursor: pointer; }

/* Mobile drawer */
.mobile-nav { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; gap: 1.1rem; padding: 5rem 2rem 2rem; background: var(--ink-deep); color: var(--paper); transform: translateX(100%); transition: transform .3s var(--ease); }
.mobile-nav.is-open { transform: none; }
.mobile-nav a { font-family: var(--display); font-size: 1.8rem; text-decoration: none; }
.mobile-close { position: absolute; top: 1.2rem; right: 1.4rem; background: none; border: 2px solid currentColor; color: inherit; padding: .5rem .9rem; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .mobile-nav { transition: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: 7fr 5fr; align-items: stretch; min-height: calc(100vh - 74px); min-height: calc(100svh - 74px); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 1.75rem; padding: clamp(3rem, 6vw, 5.5rem) clamp(1.5rem, 4vw, 4rem) clamp(3.5rem, 7vw, 6rem) clamp(1.25rem, 4vw, 3.5rem); }
.hero-sub { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; margin-top: .35rem; }
.hero-lead { font-size: 1.1rem; max-width: 32rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.hero-note { display: flex; align-items: center; gap: .8rem; font-size: .85rem; color: var(--muted); font-weight: 500; }
.hero-note::before { content: ""; width: 30px; height: 2px; background: var(--mustard); }
.hero-media { position: relative; min-height: clamp(340px, 44vw, 640px); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .label { position: absolute; left: 1.4rem; bottom: 1.4rem; background: var(--paper); color: var(--ink); padding: .7rem 1.1rem; font-size: .8rem; font-weight: 500; }

/* Kort-grid: featured + to */
.kort-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.4rem, 3vw, 2rem); }
.kort { background: var(--ink-deep); border: 1px solid var(--line-paper); display: flex; flex-direction: column; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.kort:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0, 0, 0, .3); }
.kort img { width: 100%; height: clamp(180px, 20vw, 280px); object-fit: cover; }
.kort h3 { font-size: 1.5rem; }
.kort .krop { padding: 1.6rem 1.7rem 1.9rem; display: flex; flex-direction: column; gap: .7rem; }
.kort .krop p { font-size: .95rem; line-height: 1.6; color: rgba(247, 243, 235, .88); }
.kort.featured { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kort.featured img { height: 100%; min-height: 280px; }
.kort.featured .krop { justify-content: center; padding: 2.4rem 2.6rem; }
.kort.featured h3 { font-size: 1.875rem; }

/* Split-sektioner */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split .copy { display: flex; flex-direction: column; gap: 1.3rem; }
.split .copy p { max-width: 50ch; font-size: 1.03rem; line-height: 1.65; }
.split img.foto { width: 100%; height: clamp(320px, 40vw, 560px); object-fit: cover; }
.split img.foto.h440 { height: clamp(300px, 30.5vw, 440px); }
.h1-lg { font-size: clamp(2.5rem, 5.2vw, 4.7rem); }
.h2-lg { font-size: clamp(1.9rem, 3.6vw, 3.25rem); }
.hero-lige { grid-template-columns: 1fr 1fr; }
.hand { font-family: var(--hand); font-size: clamp(1.5rem, 2.4vw, 2.125rem); color: var(--tomato); }
.copy p.hand, .split .copy p.hand { font-size: clamp(1.5rem, 2.4vw, 2.125rem); }
.on-ink .hand, .on-blue .hand { color: var(--mustard); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.6rem, 4vw, 3rem); }
.steps > div { border-top: 2px solid var(--mustard); padding-top: 1.3rem; display: flex; flex-direction: column; gap: .7rem; }
.steps h3 { font-size: 1.625rem; }
.steps p { font-size: .97rem; line-height: 1.6; color: rgba(247, 243, 235, .88); }

/* Mad-lib + formular */
.on-blue { background: var(--blue); color: var(--paper); }
.on-blue p { color: rgba(247, 243, 235, .88); }
.madlib { font-family: var(--display); font-size: clamp(1.875rem, 3.6vw, 3.25rem); line-height: 1.25; }
.madlib .hul { font-style: italic; padding: 0 .18em .12em; background: var(--swash) no-repeat bottom left / 100% 8px; cursor: pointer; }
/* Stregen "tegner sig" ind under ordene, når sektionen reveales */
.reveal .madlib .hul { background-size: 0% 8px; transition: background-size .6s var(--ease); }
.reveal.is-visible .madlib .hul { background-size: 100% 8px; }
.reveal.is-visible .madlib .hul:nth-of-type(1) { transition-delay: .45s; }
.reveal.is-visible .madlib .hul:nth-of-type(2) { transition-delay: .7s; }
.reveal.is-visible .madlib .hul:nth-of-type(3) { transition-delay: .95s; }
.no-anim .madlib .hul { background-size: 100% 8px !important; transition: none; }
@media (prefers-reduced-motion: reduce) { .madlib .hul { background-size: 100% 8px !important; transition: none; } }
.proces { display: flex; flex-direction: column; gap: .5rem; font-size: .95rem; color: rgba(247, 243, 235, .85); }
.inquiry { display: flex; flex-direction: column; gap: 1rem; background: var(--paper); color: var(--ink); padding: clamp(1.5rem, 3.2vw, 2.6rem); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field label { display: flex; flex-direction: column; gap: .4rem; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field input, .field textarea { border: 1px solid rgba(36, 32, 29, .3); padding: .85rem .9rem; font-size: 1rem; background: #fff; color: var(--ink); letter-spacing: normal; text-transform: none; font-weight: 400; }
.field textarea { min-height: 6.2rem; resize: vertical; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.form-feedback { font-size: .95rem; color: var(--tomato-deep); min-height: 1.4em; }
.form-efter { text-align: center; font-size: .85rem; color: var(--muted); }

/* CTA-bånd */
.ctaband { background: var(--blue); color: var(--paper); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem; padding: clamp(2.2rem, 5vw, 3.4rem) clamp(1.25rem, 4vw, 3.5rem); }
.ctaband h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
.ctaband .side { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.ctaband .note { font-size: .92rem; max-width: 20rem; line-height: 1.5; color: rgba(247, 243, 235, .85); }

/* Footer */
.site-footer { background: var(--ink-deep); color: var(--paper); padding: clamp(2.8rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3.5rem) 2.2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.8rem, 4vw, 3rem); align-items: start; }
.site-footer .kol { font-size: .9rem; line-height: 2.05; color: rgba(247, 243, 235, .85); }
.site-footer .kol .t { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mustard); margin-bottom: .5rem; }
.site-footer .kol a { text-decoration: none; }
.site-footer .kol a:hover { text-decoration: underline; }
.site-footer .om { font-size: .95rem; line-height: 1.6; color: rgba(247, 243, 235, .7); max-width: 300px; margin-top: .9rem; }
.some { display: flex; align-items: center; gap: .9rem; margin-top: 1rem; }
.some a { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid rgba(247, 243, 235, .35); transition: border-color .2s ease, transform .2s var(--ease); }
.some a:hover { border-color: var(--mustard); transform: translateY(-2px); }
.some .txt { font-size: .85rem; color: rgba(247, 243, 235, .7); }
.footer-bund { margin-top: clamp(1.8rem, 4vw, 2.6rem); padding-top: 1.3rem; border-top: 1px solid var(--line-paper); font-size: .78rem; color: rgba(247, 243, 235, .5); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.no-anim .reveal { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Kortene fjedrer ind ("Tre måder at få Niels ud") */
.kort.reveal { transform: translateY(34px); transition-timing-function: cubic-bezier(.34, 1.4, .64, 1); }
.kort.reveal.is-visible { transform: none; }

/* Ken Burns: fotos glider på plads sammen med reveal */
.kort.reveal img { transform: scale(1.06); transition: transform 1.2s var(--ease); }
.kort.reveal.is-visible img { transform: none; }
img.foto.reveal { transform: translateY(22px) scale(1.05); }
img.foto.reveal.is-visible { transform: none; }
.no-anim .kort img, .no-anim img.foto { transform: none !important; transition: none; }
@media (prefers-reduced-motion: reduce) { .kort img, img.foto { transform: none !important; transition: none; } }

/* Hero-swashen tegner sig selv ved load */
.wm-hero svg path { stroke-dasharray: 640; stroke-dashoffset: 640; animation: lekDraw 1s var(--ease) .35s forwards; }
@keyframes lekDraw { to { stroke-dashoffset: 0; } }
.no-anim .wm-hero svg path { stroke-dashoffset: 0; animation: none; }
@media (prefers-reduced-motion: reduce) { .wm-hero svg path { stroke-dashoffset: 0; animation: none; } }

/* Nav-wordmark der tager over ved scroll: skriften "afsløres" venstre mod højre */
.js .site-header .wm.small { opacity: 0; clip-path: inset(-20% 100% -20% 0); transition: opacity .2s ease, clip-path .55s var(--ease); }
.js .site-header.wm-on .wm.small { opacity: 1; clip-path: inset(-20% -8% -20% 0); }
.no-anim .site-header .wm.small { opacity: 1; clip-path: none; }
@media (prefers-reduced-motion: reduce) { .js .site-header .wm.small { opacity: 1; clip-path: none; transition: none; } }

/* Responsivt */
@media (max-width: 980px) {
  .site-nav { display: none; }
  .only-desktop { display: none !important; }
  /* Header: serif-brand + CTA + burger */
  .header-cta { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; padding: .5rem .9rem; font-size: .75rem; font-weight: 500; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; border: 0; min-width: 44px; min-height: 44px; padding: .4rem .3rem; }
  .burger { display: flex; flex-direction: column; gap: 5px; }
  .burger span { display: block; width: 24px; height: 2px; background: var(--ink); }
  .burger span:last-child { width: 16px; }
  /* Hero: wordmark -> billede -> underrubrik -> knapper -> note */
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .hero-copy { display: contents; }
  .wm-hero { order: 1; padding: 1.6rem 1.25rem 0; margin-bottom: 0; }
  .wm-hero .wm-text { font-size: clamp(5.5rem, 26.7vw, 6.5rem); }
  .wm-hero svg { width: 68%; max-width: 262px; margin: -.7rem 0 0 17%; }
  .hero-media { order: 2; min-height: 300px; margin-top: 1.25rem; }
  .hero-media img { object-position: 30% center; }
  .hero-media .label { display: none; }
  .hero-sub { order: 3; padding: 1.5rem 1.25rem 0; font-size: 1.625rem; line-height: 1.25; }
  .hero-actions { order: 4; padding: 1rem 1.25rem 0; flex-direction: column; align-items: stretch; gap: .75rem; }
  .hero-actions .button, .hero-actions .button-outline { text-align: center; }
  .hero-note { order: 5; padding: .75rem 1.25rem 2.25rem; }
  /* Typografi */
  .kort h3, .kort.featured h3 { font-size: 1.25rem; }
  .kort img, .kort.featured img { height: 190px; min-height: 0; }
  .madlib { font-size: 1.875rem; line-height: 1.35; }
  .hand { font-size: 1.625rem; }
  .wm.footer { font-size: 2.125rem; }
  .kort-grid { grid-template-columns: 1fr; }
  .kort.featured { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .split, .form-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .ctaband { flex-direction: column; align-items: flex-start; }
  /* Footer: wordmark -> kontakt -> social -> bund */
  .footer-grid { display: flex; flex-direction: column; gap: 1.1rem; }
  .footer-grid > div:first-child { display: contents; }
  .wm.footer { order: 1; }
  .site-footer .kol { order: 2; font-size: .8125rem; line-height: 2; }
  .some { order: 3; margin-top: .4rem; }
  .footer-bund { font-size: .6875rem; }
}

/* Vis/skjul-mønster: skjul kun — elementerne beholder deres egen display */
@media (min-width: 981px) { .only-mobile { display: none !important; } }
