@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Shantell Sans"; src: url("/fonts/shantell.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --enamel: #eef1f3;
  --enamel-hi: #f9fafb;
  --enamel-lo: #dfe4e8;
  --gasket: #c9cfd5;
  --ink: #1f2a44;
  --ink-soft: #46506a;
  --paper: #fffdf8;
  --grid-line: #c9dcef;
  --post: #ffe57a;
  --receipt: #fbfbf7;
  --red: #e4412e;
  --blue: #1f5fd1;
  --yellow: #f6b300;
  --green: #1f9d55;
  --orange: #f07a1a;
  --purple: #7a4bc4;
  --steel-1: #f4f6f8;
  --steel-2: #a7b0b9;
  --steel-3: #6f7984;
  --hand: "Shantell Sans", "Comic Sans MS", cursive;
  --text: "Schibsted Grotesk", system-ui, sans-serif;
  --shadow-note: 0 1px 1px rgb(31 42 68 / .08), 0 8px 18px -6px rgb(31 42 68 / .22);
  --shadow-lift: 0 2px 3px rgb(31 42 68 / .1), 0 22px 40px -12px rgb(31 42 68 / .35);
  --handle-w: clamp(22px, 3.2vw, 34px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  background-color: var(--enamel);
  background-image:
    radial-gradient(120% 60% at 30% 0%, rgb(255 255 255 / .75), transparent 60%),
    linear-gradient(90deg, var(--enamel-lo) 0%, var(--enamel-hi) 22%, var(--enamel) 55%, var(--enamel-lo) 100%);
  padding-right: var(--handle-w);
}
::selection { background: var(--post); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
html { scrollbar-color: var(--steel-2) var(--enamel-lo); }

/* The door handle: end caps plus a repeating bar, so it spans the door at any height. */
.handle {
  position: fixed; top: 14vh; bottom: 14vh; right: 4px; width: max(22px, var(--handle-w));
  background:
    url("/img/mag/handle-top.webp") top center / 100% auto no-repeat,
    url("/img/mag/handle-bot.webp") bottom center / 100% auto no-repeat,
    url("/img/mag/handle-mid.webp") center / 100% auto repeat-y;
  background-origin: content-box;
  filter: drop-shadow(-4px 6px 8px rgb(31 42 68 / .22));
  z-index: 5; pointer-events: none;
}

.door { max-width: 1240px; margin: 0 auto; padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 48px) 40px; }

/* Alphabet magnets */
.name { --h: min(104px, calc((100vw - 2 * clamp(16px, 4vw, 48px) - var(--handle-w)) / 9.9)); margin: 0; padding: 8px 0 0; display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 0 calc(var(--h) * .02); }
.name a { text-decoration: none; display: inline-flex; flex-wrap: wrap; gap: inherit; }
.mag {
  display: inline-block; position: relative; top: var(--y, 0);
  rotate: var(--r, 0deg);
  filter: drop-shadow(0 calc(var(--h) * .05) calc(var(--h) * .06) rgb(31 42 68 / .3));
  translate: var(--dx, 0) var(--dy, 0);
  cursor: grab; touch-action: none; user-select: none;
}
.mag img { display: block; height: var(--h); width: auto; pointer-events: none; }
.small-name { --h: min(52px, calc((100vw - 2 * clamp(16px, 4vw, 48px) - var(--handle-w)) / 9.9)); }

.js .mag { animation: snap .62s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 55ms); }
@keyframes snap {
  0% { transform: translateY(-26px) scale(1.14); }
  70% { transform: translateY(2px) scale(.98); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .js .mag { animation: none; } }

/* Board layout */
.board {
  display: grid; gap: clamp(22px, 3vw, 40px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start; margin-top: clamp(30px, 3vw, 40px);
}
.board > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .board { grid-auto-flow: row dense; row-gap: 26px; }
  .intro { grid-column: 1 / span 7; grid-row: 1; z-index: 1; }
  .husk { grid-column: 8 / span 5; grid-row: 1; margin-top: 18px; }
  .photo-a { grid-column: 1 / span 3; grid-row: 2; margin-top: -34px; z-index: 2; }
  .receipt-wrap { grid-column: 4 / span 4; grid-row: 2 / span 2; }
  .shops { grid-column: 8 / span 5; grid-row: 2; margin-top: -46px; z-index: 2; }
  .photo-b { grid-column: 1 / span 3; grid-row: 3; margin-top: -10px; }
  .cluster { grid-column: 8 / span 5; grid-row: 3; margin-top: -10px; }
  .help { margin-right: -8px; }
}

/* Draggable objects */
[data-drag] { position: relative; translate: var(--dx, 0) var(--dy, 0); rotate: var(--tilt, 0deg); transition: rotate .5s cubic-bezier(.16, 1, .3, 1), box-shadow .25s ease; }
[data-drag].dragging { transition: none; z-index: 6; }
[data-drag].dragging > :not(.pin) { box-shadow: var(--shadow-lift); }
.dragging .pin { cursor: grabbing; }

/* Round magnets that hold notes */
.pin {
  position: absolute; top: -16px; left: calc(50% - 18px); width: 36px; height: 36px;
  background: var(--pin) center / contain no-repeat;
  filter: drop-shadow(0 4px 4px rgb(31 42 68 / .3));
  z-index: 3; cursor: grab; touch-action: none;
}
.intro > .pin { left: 28px; }
.photo-a > .pin { left: auto; right: 18px; }
.shops > .pin { left: 22px; top: -14px; }
.husk > .pin { left: 62%; }

.note { background: var(--paper); box-shadow: var(--shadow-note); padding: clamp(22px, 3vw, 34px); }
.note h2, .note h3 { margin: 0 0 .5em; line-height: 1.15; text-wrap: balance; }

.intro { --tilt: -.6deg; }
.intro h1 { font: 600 clamp(1.9rem, 4.4vw, 3.1rem)/1.08 var(--hand); margin: 0 0 .45em; letter-spacing: -.01em; text-wrap: balance; }
.intro p { max-width: 58ch; margin: 0 0 1em; font-size: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 1.4em; }
.btn {
  display: inline-flex; align-items: center; gap: .5em; min-height: 46px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 2px 3px rgb(31 42 68 / .25), 0 8px 16px -8px rgb(31 42 68 / .6);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

/* Husk list on a squared notepad page */
.husk {
  --tilt: 1.4deg;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px 10px;
  padding-top: 40px;
}
.husk::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: radial-gradient(circle at 11px 6px, var(--enamel) 4px, transparent 4.5px) 0 0 / 22px 12px repeat-x; }
.husk h2 { font: 700 2rem/1 var(--hand); color: var(--red); }
.husk ul { list-style: none; margin: 0; padding: 0; font: 500 1.28rem/1.35 var(--hand); }
.husk li { margin: 0 0 .55em; }
.husk button {
  all: unset; cursor: pointer; display: inline-flex; gap: .55em; align-items: baseline; border-radius: 4px;
  background: linear-gradient(var(--red), var(--red)) 0 58% / 0 2.5px no-repeat;
  transition: background-size .45s cubic-bezier(.2, .8, .2, 1), color .3s;
}
.husk button::before {
  content: ""; flex: none; width: .78em; height: .78em; border: 2px solid var(--ink); border-radius: 3px; translate: 0 .1em;
  transition: background .2s;
}
.husk button[aria-pressed="true"] { background-size: 100% 2.5px; color: var(--ink-soft); }
.husk button[aria-pressed="true"]::before { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 85% no-repeat; border-color: var(--green); }
.husk button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.husk .small { font: 400 .95rem/1.45 var(--text); color: var(--ink-soft); margin: 1.2em 0 0; }

/* Instant photos */
.photo { background: #fff; padding: 12px 12px 14px; box-shadow: var(--shadow-note); margin: 0; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.photo figcaption { font: 500 1.05rem/1.25 var(--hand); padding: 12px 4px 0; }
.photo-a { --tilt: -2.2deg; }
.photo-b { --tilt: 2deg; }
@media (max-width: 899px) { .photo { max-width: 330px; } .photo-b { justify-self: end; } }

/* Receipt: how we earn money */
.receipt-wrap { --tilt: .8deg; }
.receipt {
  background: var(--receipt); padding: 30px 26px 34px;
  box-shadow: var(--shadow-note);
  mask: radial-gradient(7px at 50% 100%, transparent 98%, #000) 0 100% / 14px 51% repeat-x, linear-gradient(#000, #000) top / 100% 51% no-repeat;
  -webkit-mask: radial-gradient(7px at 50% 100%, transparent 98%, #000) 0 100% / 14px 51% repeat-x, linear-gradient(#000, #000) top / 100% 51% no-repeat;
}
.receipt h2 { font: 800 1.15rem/1.2 var(--text); text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.receipt .rule { border: 0; border-top: 2px dashed var(--steel-2); margin: 16px 0; }
.receipt ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.receipt li { counter-increment: s; display: grid; grid-template-columns: 1.6em 1fr; gap: .3em; margin: 0 0 .8em; }
.receipt li::before { content: counter(s) "."; font-weight: 800; }
.total { font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; font-weight: 800; font-size: 1.2rem; }
.receipt .fine { font-size: .9rem; color: var(--ink-soft); margin: .8em 0 0; }

/* Shops note: a yellow sticky note */
.shops { --tilt: -1.2deg; background: var(--post); }
.shops h2 { font: 700 1.6rem/1.1 var(--hand); }
.shop { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .7em; padding: .6em 0; border-top: 1.5px solid rgb(31 42 68 / .18); }
.shop:last-of-type { border-bottom: 1.5px solid rgb(31 42 68 / .18); }
.shop a { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.shop a:hover { color: var(--blue); }
.shop .what { flex: 1 1 12em; }
.tag { font: 700 .72rem/1 var(--text); text-transform: uppercase; letter-spacing: .06em; padding: .38em .55em; border-radius: 4px; background: var(--ink); color: var(--post); }
.shops .small { font-size: .95rem; margin: 1em 0 0; }

/* Business card */
.cluster { --tilt: -1deg; position: relative; padding-bottom: 8px; }
.card {
  position: relative; z-index: 1; width: min(100%, 400px); aspect-ratio: 1.6; padding: 24px 26px;
  background: #fff; border-radius: 4px; box-shadow: var(--shadow-note);
  display: flex; flex-direction: column; justify-content: center;
}
.card h2 { font: 800 1.45rem/1.1 var(--text); margin: 0 0 6px; }
.card p { margin: 0; }
.card .meta { color: var(--ink-soft); }
.card a { margin-top: 8px; display: inline-block; }
.pin-shared { left: 34px; top: -20px; }
.help {
  --tilt: 3deg; position: relative; z-index: 2; background: #dceeff; rotate: 3deg;
  width: min(92%, 330px); margin: -26px 0 0 auto; padding: 22px 22px 20px; font-size: .97rem;
}
.help h2 { font: 700 1.25rem/1.15 var(--hand); }
.help p { margin: 0; }

.foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--gasket); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .95rem; color: var(--ink-soft); }
.foot a { color: var(--ink-soft); }

/* Legal sheets */
.sheet { --tilt: 0deg; background: var(--paper); box-shadow: var(--shadow-note); padding: clamp(26px, 5vw, 64px); max-width: 780px; margin: 34px auto 0; position: relative; }
.sheet .pin { left: 12%; }
.sheet .pin + .pin { left: 88%; }
.sheet h1 { font: 700 clamp(1.8rem, 4vw, 2.5rem)/1.1 var(--hand); margin: 0 0 .3em; }
.sheet h2 { font: 800 1.2rem/1.25 var(--text); margin: 1.8em 0 .5em; }
.sheet p, .sheet li { max-width: 68ch; }
.sheet .updated { color: var(--ink-soft); font-size: .95rem; }
.sheet table { border-collapse: collapse; width: 100%; font-size: .97rem; margin: .6em 0; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: .55em .7em .55em 0; border-bottom: 1px solid var(--gasket); }
.sheet th { font-weight: 700; }
@media (max-width: 600px) { .sheet table, .sheet thead, .sheet tbody, .sheet tr, .sheet th, .sheet td { display: block; } .sheet thead { display: none; } .sheet td { border: 0; padding: .1em 0; } .sheet tr { border-bottom: 1px solid var(--gasket); padding: .5em 0; } .sheet td:first-child { font-weight: 700; } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 899px) { .help { margin-top: -14px; } .pin-shared { left: auto; right: 34px; } }
