/* ============================================================
   Cleaning Works — "work order"
   Utilitarian, typographic, transparent. Paper ground, black ink,
   hard 1.5px rules, one accent, big numbers, monospace labels.
   No rounded corners, no shadows, no gradients, no images.

   Shared by /index.html (EN) and /da/index.html (DA). There is no
   build step, so this is the one copy of the design system — edit
   here, not in a page.
   ============================================================ */

/* ---- Tokens ---- */
:root {
  --paper:        #F3F1EB;
  --paper-raised: #FBFAF6;
  --ink:          #141414;
  --text-muted:   #3A3A36;
  --text-subtle:  #4A4A45;
  --rule-soft:    #D6D2C6;
  --on-ink:       #F3F1EB;
  --on-ink-muted: #D9D5CA;
  --on-ink-label: #BDB9AE;
  --accent:       #1F4BD8;
  --white:        #FFFFFF;

  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --rule: 1.5px solid var(--ink);

  /* Fluid between the two reference layouts: 390px and 1440px. */
  --pad:      clamp(20px, -2.29px + 5.71vw, 80px);   /* side padding 20 → 80 */
  --gap:      clamp(24px, 18.06px + 1.52vw, 40px);   /* column gap 24 → 40 */
  --section-y: clamp(56px, 35.2px + 5.33vw, 112px);  /* section padding 56 → 112 */

  --fs-h1:       clamp(52px, 32.69px + 4.95vw, 104px);
  --fs-h2:       clamp(37px, 27.71px + 2.38vw, 62px);
  --fs-h2-change: clamp(41px, 28px + 3.33vw, 76px);
  --fs-h2-huge:  clamp(62px, 22.63px + 10.1vw, 168px);
  --fs-price-big: clamp(84px, 66.17px + 4.57vw, 132px);
  --fs-price-card: clamp(32px, 29.03px + 0.76vw, 40px);
  --fs-body:     clamp(17px, 15.51px + 0.38vw, 21px);
  --fs-lead:     clamp(19px, 17.14px + 0.48vw, 24px);
  --fs-label:    clamp(12px, 11.26px + 0.19vw, 14px);
  --fs-emphasis: clamp(24px, 19.54px + 1.14vw, 36px);
  --fs-oneliner: clamp(20px, 17.77px + 0.57vw, 26px);
  --fs-email-xl: clamp(22px, 10.86px + 2.86vw, 52px);
}

/* Danish headlines run longer, so the hero steps down a size. */
html[lang='da'] {
  --fs-h1: clamp(46px, 28.91px + 4.38vw, 92px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  font-synthesis: none;
}

h1, h2, h3, p, ul, li, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Visually hidden, still announced. Used so a price split into
   "DKK" + "185" + "/ hour" reads as one natural phrase. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Skip link ---- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--mono);
  font-size: 14px;
  padding: 14px 20px;
  text-decoration: none;
}
.skip:focus {
  left: 0;
  color: var(--on-ink);
}

/* ---- Shell ---- */
.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

/* Grid and flex children default to min-width:auto, which lets a long
   Danish compound set a floor no media query can get under. */
.grid > *, .flex > * { min-width: 0; }

section { border-top: var(--rule); }
section[id] { scroll-margin-top: 96px; }

.sec-pad {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

/* ---- Type helpers ---- */
.label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

h1, h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: 0.95; }
h2 { font-size: var(--fs-h2); }

.body-copy p + p { margin-top: 1em; }
.lead { font-size: var(--fs-lead); line-height: 1.4; }

.vat {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}

/* ---- Arrow ---- */
.arrow {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: square;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 28px;
  border: var(--rule);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: var(--on-ink); }

.btn--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.btn--dark:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* Text-link CTA */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.cta:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Logo ---- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;           /* tap target — the mark itself is only 18px */
  text-decoration: none;
  color: var(--ink);
}
.logo__sq {
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--accent);
}
.logo__wm {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

/* ============================================================
   Header
   ============================================================ */
.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: var(--rule);
  background: var(--paper);
}
.hdr__in {
  display: flex;
  align-items: center;
  gap: var(--gap);
  height: 88px;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-right: auto;
}
.nav-main a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 0;
}
.nav-main a:hover { color: var(--accent); }

/* Language switch — bordered box, two cells, active cell inked. */
.lang {
  display: flex;
  border: var(--rule);
  flex: none;
}
.lang > * {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 44px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
}
.lang > span[aria-current] {
  background: var(--ink);
  color: var(--on-ink);
}
.lang > a { position: relative; }
.lang > a:hover { background: var(--rule-soft); }

/* The switch cell is 52×44 on desktop but 44×36 on mobile, per the
   component spec — shorter than the 44px tap minimum. This extends the
   hit area vertically without changing the box that is drawn. */
.lang > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
}

.mail-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: var(--rule);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.mail-btn:hover { background: var(--ink); color: var(--on-ink); }

/* Mobile-only pieces, hidden on desktop */
.menu { display: none; }

/* ============================================================
   01 Hero
   ============================================================ */
.hero { border-top: 0; }
.hero__in { align-items: end; }
.hero__main { grid-column: 1 / span 7; }
.hero__aside { grid-column: 9 / span 4; }

.hero h1 { margin: 18px 0 0; }
.hero__sub {
  margin-top: 24px;
  font-size: var(--fs-lead);
  line-height: 1.4;
  max-width: 34ch;
}
.hero__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

/* Rate card */
.rate {
  background: var(--paper-raised);
  border: var(--rule);
}
.rate__hd,
.rate__ft {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.rate__hd { border-bottom: var(--rule); }
.rate__ft { border-top: 1px solid var(--rule-soft); text-transform: none; letter-spacing: 0.04em; }

.rate__row { padding: 20px; }
.rate__row + .rate__row { border-top: 1px solid var(--rule-soft); }
.rate__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.rate__name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.rate__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
}
.rate__cur {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}
.rate__num {
  font-size: var(--fs-price-card);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.rate__line {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* ============================================================
   02 How it works
   ============================================================ */
.how__head { align-items: start; }
.how__title { grid-column: 1 / span 7; }
.how__title h2 { margin-top: 18px; }
.how__lines {
  grid-column: 9 / span 4;
  align-self: end;
}
.how__lines p + p { margin-top: 0.8em; }

.how__blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(40px, 26px + 3.6vw, 78px);
}
.how__blocks > * { min-width: 0; }

.tier__name {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.tier__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tier__cur {
  font-family: var(--mono);
  font-size: clamp(14px, 12.5px + 0.38vw, 18px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}
.tier__num {
  font-size: var(--fs-price-big);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  line-height: 0.85;
  color: var(--ink);
}
.tier__unit {
  font-size: var(--fs-oneliner);
  font-weight: 400;
  color: var(--text-subtle);
}
.tier__rule {
  height: 0;
  border-top: var(--rule);
  margin: 24px 0;
}
.tier__headline {
  font-size: var(--fs-oneliner);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.tier__body { margin-top: 16px; }

.how__vat { margin-top: 32px; }

/* ============================================================
   03/04 and 06/07 — the two-column split row
   ============================================================ */
/* The border sits on a full-width .row so it spans the viewport like
   every other section divider; .wrap.split holds the centred content. */
.row { border-top: var(--rule); }
.row--nobord { border-top: 0; }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.split > * { min-width: 0; }
.split__col { border-top: 0; padding: var(--section-y) var(--gap); }
.split__col:first-child { padding-left: 0; }
.split__col:last-child { padding-right: 0; border-left: var(--rule); }

/* The About/Careers row follows the dark section, so it carries no top border. */
.split--nobord { border-top: 0; }

.split__col h2 { margin: 18px 0 24px; }

/* Small price table */
.ptable { margin: 32px 0 0; border-top: 1px solid var(--rule-soft); }
.ptable li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.ptable__q { font-size: 17px; line-height: 1.4; }
.ptable__p {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
}

.split__foot { margin-top: 28px; }
.split__foot .vat { display: block; margin-top: 14px; }

.emphasis {
  margin-top: 1em;
  font-size: var(--fs-emphasis);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ============================================================
   05 When things change — dark
   ============================================================ */
.change {
  background: var(--ink);
  color: var(--on-ink-muted);
  border-top: 0;
}
.change .label { color: var(--on-ink-label); }
.change h2 { color: var(--on-ink); font-size: var(--fs-h2-change); }
.change__title { grid-column: 1 / span 6; }
.change__title h2 { margin-top: 18px; }
.change__body { grid-column: 8 / span 5; }
.change__body p + p { margin-top: 1em; }

.change__closer {
  display: inline;
  font-size: var(--fs-emphasis);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--white);
  border-bottom: 5px solid var(--accent);
}
.change__closer-wrap { margin-top: 1.2em; }

/* ============================================================
   08 Contact
   ============================================================ */
.contact {
  background: var(--paper-raised);
}
.contact h2 {
  font-size: var(--fs-h2-huge);
  font-stretch: 118%;
  line-height: 0.88;
  margin: 18px 0 clamp(40px, 26px + 3.6vw, 78px);
}
.contact__lines { grid-column: 1 / span 4; }
.contact__lines p + p { margin-top: 0.6em; }
/* Seven columns: at 52px "info@cleaningworks.dk" measures ~690px, so
   anything narrower breaks it mid-word. Measured, not estimated. */
.contact__act {
  grid-column: 6 / -1;
  align-self: start;
}

/* The 4px rule is a text-decoration rather than a border so it stays
   welded to the text while the padding grows the tap target to 44px. */
.mail-xl {
  display: inline-block;
  padding: 11px 0;
  font-size: var(--fs-email-xl);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 0.26em;   /* clears the descender on "g" */
  overflow-wrap: break-word;
  max-width: 100%;
}
.mail-xl:hover { color: var(--ink); }

.contact__act .btn { margin-top: 32px; }

/* ============================================================
   Footer
   ============================================================ */
.ftr {
  background: var(--ink);
  color: var(--on-ink-muted);
  border-top: 0;
  padding-top: clamp(48px, 36px + 3.1vw, 80px);
  padding-bottom: clamp(48px, 36px + 3.1vw, 80px);
}
.ftr__in {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.ftr__in > * { min-width: 0; }

.ftr__brand { grid-column: 1 / span 4; }
.ftr__nav   { grid-column: 6 / span 3; }
.ftr__meta  { grid-column: 10 / span 3; }

.ftr .logo { color: var(--on-ink); }
.ftr__mail {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 0;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--on-ink-muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.ftr__mail:hover { color: var(--white); }

.ftr__nav a {
  display: block;
  font-size: 16px;
  color: var(--on-ink-muted);
  text-decoration: none;
  padding: 10px 0;
}
.ftr__nav a:hover { color: var(--white); }

.ftr__meta p {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--on-ink-label);
}

/* ============================================================
   Responsive
   ============================================================ */

/* The header email button is the first thing to go — it needs ~175px
   of its own and the nav has priority. Email stays in the contact
   section and the footer at every width.
   Measured, not guessed: at 1280px the full row needs ~1158px and only
   1138px is available, so the cut-off sits above that. */
@media (max-width: 1359px) {
  .mail-btn { display: none; }
}

@media (max-width: 1359px) and (min-width: 1024px) {
  .nav-main { gap: 16px; }
  .nav-main a { font-size: 15px; }
}

/* ---- Mobile header: nav collapses into a <details> panel ---- */
@media (max-width: 1023px) {
  .hdr__in { height: 64px; gap: 16px; }
  .logo__sq { width: 14px; height: 14px; }
  .logo__wm { font-size: 16px; }

  .nav-main { display: none; }

  .lang { margin-left: auto; }
  .lang > * { width: 44px; height: 36px; font-size: 12px; }

  .menu { display: block; flex: none; }
  .menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: var(--rule);
    cursor: pointer;
    list-style: none;
  }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu > summary::marker { content: ''; }
  .menu__icon {
    width: 20px;
    height: 14px;
    stroke: var(--ink);
    stroke-width: 1.5px;
    fill: none;
  }
  .menu[open] > summary { background: var(--ink); }
  .menu[open] .menu__icon { stroke: var(--on-ink); }

  .menu__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--paper);
    border-bottom: var(--rule);
    padding: 8px var(--pad) 24px;
  }
  .menu__panel a {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule-soft);
  }
  .menu__panel .menu__mail {
    font-family: var(--mono);
    font-size: 15px;
    border-bottom: 0;
    color: var(--accent);
  }

  section[id] { scroll-margin-top: 72px; }
}

/* ---- Stack the multi-column layouts ---- */
@media (max-width: 959px) {
  /* Hero: label, H1, subline, rate card, then buttons. */
  .hero__main, .hero__aside,
  .how__title, .how__lines,
  .change__title, .change__body,
  .contact__lines, .contact__act {
    grid-column: 1 / -1;
  }
  .hero__in { align-items: start; }
  .hero__btns {
    display: none; /* moved below the rate card on mobile */
  }
  .hero__btns--mobile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 32px;
  }
  .hero__btns--mobile .btn { width: 100%; min-height: 54px; }

  .how__lines { margin-top: 28px; }
  .how__blocks { grid-template-columns: minmax(0, 1fr); }
  .how__blocks > * + * { padding-top: 40px; border-top: var(--rule); }

  .split { grid-template-columns: minmax(0, 1fr); }
  .split__col { padding-left: 0; padding-right: 0; }
  .split__col:last-child {
    border-left: 0;
    border-top: var(--rule);
    padding-top: var(--section-y);
  }

  .change__body { margin-top: 32px; }
  .contact__act { margin-top: 40px; }
  .contact__act .btn { width: 100%; min-height: 54px; }

  .ftr__brand, .ftr__nav, .ftr__meta { grid-column: 1 / -1; }
  .ftr__nav {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gap);
  }
  .ftr__meta { margin-top: 36px; }
}

/* Desktop keeps the mobile button block out of the flow. */
@media (min-width: 960px) {
  .hero__btns--mobile { display: none; }
}

/* ---- Narrow phones ----
   The language cells stay at the specified 44×36 here; the wordmark
   gives up the room instead, because it is the only elastic item. */
@media (max-width: 479px) {
  .hdr__in { gap: 12px; }
  .logo { gap: 8px; }
  .logo__wm { font-size: 13px; }
  .btn { padding: 0 20px; font-size: 16px; }
  .ptable li { flex-direction: column; gap: 6px; }
  .ptable__p { align-self: flex-start; }
}

/* ---- Narrow phones: two header step-downs ----
   The header must fit the wordmark, the language switch and the menu
   button on one line. The wordmark is the only elastic part, so it is
   what steps down. `white-space: normal` is a safety valve: if a font
   renders wider than measured it wraps instead of overflowing.
   Both thresholds were set from sweep failures, not from arithmetic —
   360px overflowed 3px on the 480px styling, 320px overflowed 19px. */
@media (max-width: 374px) {
  .hdr__in { gap: 9px; }
  .logo { min-width: 0; gap: 9px; }
  .logo__wm { font-size: 12px; white-space: normal; line-height: 1.15; }
  .lang > * { width: 40px; height: 34px; font-size: 11px; }
}

@media (max-width: 359px) {
  .hdr__in { gap: 8px; }
  .logo { gap: 8px; }
  .logo__wm { font-size: 11px; }
  .lang > * { width: 36px; height: 32px; }
  .menu > summary { width: 40px; }
  /* "Kun personale" + the price no longer share a line at this width. */
  .rate__top { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---- Print ---- */
@media print {
  .hdr, .menu, .lang { display: none; }
  body { background: var(--white); }
}
