/* maker / also works. Tokens from alsoworks-website/BRAND_MANUAL.md (marketing context, light). */
:root {
  --surface: #faf9f7;
  --beige: #f5f1ea;
  --beige-deep: #ede7db;
  --white: #ffffff;
  --ink: #1a1410;
  --charcoal: #2d2926;
  --stone: #6a635a;
  --warm-gray: #ccc5b9;
  --sage: #4e7a5a;
  --sage-dark: #3a5c43;
  --sage-ink: #3a5c43;
  --sage-light: #a8c4ae;
  --sage-muted: rgba(78, 122, 90, 0.08);
  --sage-border: rgba(78, 122, 90, 0.18);
  --clay: #a0522d;
  --card-border: rgba(26, 20, 16, 0.08);
  --font-display: "DM Serif Display", Georgia, serif;
  --font-head: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --font-body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--surface); color: var(--charcoal); font: 300 15px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--sage-ink); }
:focus-visible { outline: 2px solid var(--sage-ink); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header and footer */
.site { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 18px var(--gutter); max-width: 1200px; margin: 0 auto; }
.wordmark { font-family: var(--font-head); font-size: 24px; color: var(--ink); text-decoration: none; letter-spacing: 0.02em; }
.wm-maker { font-weight: 600; letter-spacing: -0.01em; }
.wm-slash { color: var(--sage); margin: 0 0.25em; font-weight: 400; }
.wm-also { font-style: italic; font-weight: 300; letter-spacing: 0.04em; }
.wm-works { font-weight: 600; letter-spacing: -0.01em; }
.nav { font-size: 14px; color: var(--stone); text-decoration: none; }
.nav:hover { color: var(--charcoal); }
.site-foot { max-width: 1200px; margin: 0 auto; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 56px var(--gutter); color: var(--stone); font-size: 13px; border-top: 1px solid var(--card-border); }
.site-foot .wm-also, .site-foot .wm-works { font-family: var(--font-head); font-size: 16px; color: var(--charcoal); }

main { max-width: 1200px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 48px var(--gutter); }

/* catalog */
.hero { padding-block: 40px 28px; max-width: 70ch; }
.label { margin: 0 0 10px; font: 400 11px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); }
h1 { margin: 0; font: 400 clamp(36px, 6vw, 56px)/1.06 var(--font-display); letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.lead { margin: 14px 0 0; font-size: 16px; font-weight: 400; line-height: 1.7; color: var(--charcoal); max-width: 62ch; }
.toolbar { position: sticky; top: 0; z-index: 5; background: var(--surface); padding-block: 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--card-border); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button, .steps button { font: 400 13px/1 var(--font-body); background: var(--white); color: var(--charcoal); border: 1px solid var(--card-border); border-radius: 999px; padding: 8px 13px; cursor: pointer; }
.chips button:hover, .steps button:hover { border-color: var(--sage-border); }
.chips button[aria-pressed="true"], .steps button[aria-pressed="true"] { background: var(--sage); color: #fff; border-color: var(--sage); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.search input { font: 400 14px var(--font-body); width: min(320px, 70vw); padding: 9px 12px; border: 1px solid var(--warm-gray); border-radius: 8px; background: var(--white); color: var(--charcoal); }
.search input::placeholder { color: var(--stone); }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--charcoal); cursor: pointer; }
.check input { accent-color: var(--sage); }
.count { font-size: 13px; color: var(--stone); margin-left: auto; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding-top: 18px; }
.card { min-width: 0; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.card:hover { border-color: var(--sage-border); transform: translateY(-1px); }
.card-img { position: relative; display: block; aspect-ratio: 4 / 3; min-height: 0; overflow: hidden; background: var(--beige); }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 13px; }
.card-group { font: 400 10px/1.2 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); }
.card-name { font: 600 19px/1.2 var(--font-head); color: var(--ink); letter-spacing: -0.01em; }
.card-sure { align-self: flex-start; margin-top: 2px; font-size: 11px; color: var(--stone); border: 1px solid var(--card-border); border-radius: 999px; padding: 1px 8px; }
.card-sure[data-s="bekræftet"] { color: var(--sage-ink); border-color: var(--sage-border); background: var(--sage-muted); }
.empty { color: var(--stone); }

/* viewer */
.viewer-head { display: flex; flex-direction: column; gap: 6px; padding-block: 18px 16px; }
.viewer-head h1 { font-size: clamp(30px, 4.5vw, 44px); }
.all { align-self: flex-start; font-size: 13px; text-decoration: none; color: var(--sage-ink); }
.all::before { content: "← "; }
.stage { position: relative; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 50% 35%, #fbf9f5 0%, var(--beige) 55%, var(--beige-deep) 100%); border: 1px solid var(--card-border); }
canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.photo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.photo { overflow: hidden; }
.photo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 10px 30px rgba(26, 20, 16, 0.12); }
.corner { position: absolute; font-size: 12px; color: var(--stone); pointer-events: none; }
.bl { bottom: 12px; left: 16px; }
.br { bottom: 12px; right: 16px; color: var(--charcoal); }
.back { position: absolute; top: 14px; left: 14px; display: none; font: 400 13px var(--font-body); background: var(--white); color: var(--charcoal); border: 1px solid var(--card-border); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.back[data-on] { display: block; }
.panel { position: absolute; top: 14px; right: 14px; width: min(350px, 44%); max-height: calc(100% - 28px); overflow: auto; background: rgba(255, 255, 255, 0.94); color: var(--charcoal); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px 18px; font-size: 13.5px; line-height: 1.6; backdrop-filter: blur(8px); }
.panel h2 { margin: 0 0 4px; font: 600 22px/1.2 var(--font-head); color: var(--ink); }
.panel h3 { margin: 12px 0 2px; font: 400 10px/1.2 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); }
.panel p { margin: 0; }
.panel ul { margin: 0; padding-left: 16px; }
.panel li b { font-weight: 500; font-size: 10px; letter-spacing: 0.06em; color: var(--sage-ink); }
.panel .fault { color: var(--clay); }
.panel .meta { color: var(--stone); font-size: 12.5px; }
.bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 14px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.info { margin-top: 14px; min-height: 4.8em; max-width: 70ch; }
.info h2 { margin: 0; font: 600 22px/1.2 var(--font-head); color: var(--ink); }
.info p { margin: 2px 0 0; }
.info .fault { color: var(--clay); }
.info .meta { color: var(--stone); font-size: 13px; }

@media (max-width: 640px) {
  .stage { aspect-ratio: auto; }
  canvas, .photo { height: min(112vw, 520px); }
  .photo { position: static; }
  .panel { position: static; width: auto; max-height: none; border: 0; border-top: 1px solid var(--card-border); border-radius: 0; backdrop-filter: none; }
  .corner { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-name { font-size: 16px; }
  .count { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* used only when rendering catalogue thumbnails */
.thumbs .panel, .thumbs .corner, .thumbs .back { display: none !important; }
