@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('assets/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-weight: 600; font-display: swap; src: url('assets/fonts/oswald-latin-600-normal.woff2') format('woff2'); }

/* The style of Quiet Leeuwarden's own print work: white and lilac, plum brush strokes,
   pink circles. Only the tree keeps a dark stage, because its light is additive. */
:root {
  --plum: #94478A;
  --plum-deep: #6E2F66;
  --plum-soft: #B5679F;
  --lilac: #E9D3E6;
  --lilac-soft: #F7EEF5;
  --pink: #F3B6CB;
  --ink: #1F1A1E;
  --muted: #5E5560;
  --line: #DCC6D8;
  --white: #FFFFFF;
  --stage: #2B1330;
  --gold: #D6B36A;
  --gold-text: #8A6514;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --header: 76px;
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cpath fill='%2394478A' d='M5 6Q60 2 120 5T240 3Q280 2 296 6L293 13L298 20L294 27L297 34Q250 38 180 35T60 37Q20 38 3 34L6 27L1 20L5 13Z'/%3E%3Cpath fill='%2394478A' fill-opacity='.5' d='M14 3Q110 0 210 2L208 4Q110 3 16 5ZM30 37Q130 40 250 37L248 39Q130 41 32 39Z'/%3E%3C/svg%3E");
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23B5679F' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M8 40A28 28 0 0 1 40 8'/%3E%3Cpath d='M20 44A16 16 0 0 1 44 20'/%3E%3C/g%3E%3C/svg%3E");
  --ticks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%23B5679F' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M4 26l9 3M10 10l7 9M26 4l-2 11'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  overflow-x: hidden;
}

header {
  position: relative;
  z-index: 2;
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--plum);
  text-decoration: none;
}

.brand-mark { width: 46px; height: 46px; flex: none; }

.brand-text { display: grid; line-height: 1; color: var(--ink); }
.brand-text strong { font: 600 30px/1 var(--display); letter-spacing: .02em; }
.brand-text span { margin-top: 3px; font-size: 13px; font-weight: 600; }

header nav { display: flex; gap: 8px; }

header nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--plum-deep);
  text-decoration: none;
  transition: background-color .2s;
}

header nav a:hover { background: var(--lilac-soft); }

main { position: relative; }

.hero {
  position: relative;
  height: calc(100svh - var(--header));
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  gap: clamp(16px, 2vw, 32px);
  padding: 0 var(--gutter) 24px;
}

/* The soft lilac wash behind the introduction, like the blobs on Quiet's flyers. */
.hero::before {
  content: '';
  position: absolute;
  left: -14vw;
  bottom: -6vh;
  width: 52vw;
  height: 70%;
  background: var(--lilac-soft);
  border-radius: 58% 42% 52% 48% / 46% 58% 42% 54%;
  pointer-events: none;
}

.intro {
  align-self: center;
  padding: 24px 0;
  position: relative;
  z-index: 1;
}

.intro::before {
  content: '';
  position: absolute;
  right: 4%;
  top: 0;
  width: 56px;
  height: 56px;
  background: var(--waves) center / contain no-repeat;
  transform: rotate(10deg);
}

/* A label on a painted plum stroke. */
.brush-label {
  display: inline-block;
  padding: 8px 22px 9px;
  background: var(--brush) center / 100% 100% no-repeat;
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  transform: rotate(-2deg);
}

.eyebrow {
  display: block;
  margin-top: 14px;
  color: var(--plum);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  font: 400 clamp(32px, 3.7vw, 58px)/1.08 var(--sans);
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 14px 0 20px;
  overflow-wrap: break-word;
}

.sentence { display: block; }
.sentence + .sentence { color: var(--plum); }

.intro > p {
  font-size: 16px;
  line-height: 1.7;
  max-width: 44ch;
  margin: 0;
  color: var(--ink);
}

.intro > .blob-text {
  padding: 20px 24px;
  background: var(--lilac);
  border-radius: 28px 40px 32px 44px;
}

.intro > .phase-note {
  margin-top: 16px;
  padding: 12px 18px;
  border-left: 4px solid var(--plum);
  background: var(--white);
  border-radius: 0 16px 16px 0;
}

.countdown {
  margin-top: 20px;
  display: grid;
  gap: 2px;
  font-size: 14px;
  color: var(--muted);
}

.countdown strong {
  font: 600 26px/1.3 var(--sans);
  color: var(--plum);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button, a { -webkit-tap-highlight-color: rgba(148, 71, 138, .18); }

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
}

.cta, .route h3 a {
  display: inline-block;
  padding: 14px 28px 15px;
  background: var(--brush) center / 100% 100% no-repeat;
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s;
}

.cta { margin-top: 26px; }
.cta:hover, .route h3 a[href]:hover { transform: rotate(-1.5deg) scale(1.03); }

/* The tree's own night: its glow is additive, so it needs a dark stage to show. */
.tree-stage {
  min-height: 0;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 42%, #4A2147, var(--stage) 72%);
  border-radius: 40px 56px 40px 56px;
  color: var(--white);
}

.halo {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(96%, 880px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 179, 106, .16), rgba(243, 182, 203, .06) 42%, transparent 68%);
  pointer-events: none;
}

.canvas-wrap {
  position: relative;
  min-height: 0;
  min-width: 0;
}

/* Absolute so the drawing buffer's size can never feed back into the grid track. */
#tree {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Only while zoomed in does the tree reach the canvas edges; fade them there. */
.canvas-wrap.is-zoomed {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 24px, #000 calc(100% - 24px), transparent), linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 24px, #000 calc(100% - 24px), transparent), linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-composite: intersect;
}

#tree.can-place { cursor: pointer; }
#tree.is-dragging { cursor: grabbing; }
#tree:focus-visible { outline: 3px solid var(--pink); outline-offset: -6px; }

/* Floats at the far edge of the stage, where the tree's silhouette leaves room. */
.stage-bar {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group { display: flex; flex-direction: column; gap: 6px; }

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  transition: border-color .2s, background-color .2s;
}

.icon-button:hover { border-color: var(--pink); background: rgba(243, 182, 203, .16); }
.icon-button:focus-visible { outline-color: var(--pink); }

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Reserved height: a changing message must not resize the canvas and re-frame the tree. */
.tree-status {
  margin: 0;
  min-height: 44px;
  padding: 6px 24px 12px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, .82);
}

.rest-scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(80%, 460px);
  max-height: 86%;
  transform: translate(-50%, -50%);
}

.is-stored .canvas-wrap, .is-stored .stage-bar, .is-stored .tree-status { display: none; }
.no-webgl .canvas-wrap, .no-webgl .stage-bar { display: none; }

.band {
  position: relative;
  padding: clamp(56px, 9vh, 96px) var(--gutter);
}

.band-alt {
  background: var(--lilac-soft);
  border-radius: 64px 64px 0 0;
}

.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
}

h2 {
  font: 400 clamp(28px, 3.4vw, 46px)/1.12 var(--sans);
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--plum);
  margin: 16px 0;
  overflow-wrap: break-word;
}

h2::after {
  content: '';
  display: inline-block;
  width: .7em;
  height: .7em;
  margin-left: .2em;
  vertical-align: top;
  background: var(--ticks) center / contain no-repeat;
}

/* The tilted round sticker from the flyers. */
.badge {
  margin: 0 0 12px;
  padding: 22px 26px;
  max-width: 220px;
  background: var(--lilac);
  border-radius: 48% 52% 46% 54% / 52% 44% 56% 48%;
  color: var(--plum-deep);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-8deg);
}

.band-lead { max-width: 62ch; margin: 0 0 28px; font-size: 16px; line-height: 1.7; color: var(--muted); }

.muted { color: var(--muted); font-size: 15px; }
.small { font-size: 14px; line-height: 1.6; }

.search { max-width: 520px; }

label { display: block; margin: 18px 0 8px; font-size: 15px; font-weight: 600; }

input:not([type="radio"]), textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  transition: border-color .2s;
}

input:not([type="radio"]):focus, textarea:focus { border-color: var(--plum); }

textarea { resize: vertical; }

.wish-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.wish-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 120px;
  padding: 22px 22px 22px 64px;
  display: block;
  text-align: left;
  background: var(--lilac-soft);
  border: 2px solid transparent;
  border-radius: 24px;
  transition: border-color .2s, transform .2s;
}

/* A small bauble in a pink circle, like the icons on the flyers. */
.wish-card::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, var(--white) 0 3px, transparent 4px), var(--pink);
}

.wish-card:hover { border-color: var(--plum-soft); transform: translateY(-2px); }
.wish-card.is-fulfilled { border-color: var(--gold); background: #FBF5E6; }
.wish-card.is-fulfilled::before { background: radial-gradient(circle at 38% 36%, var(--white) 0 3px, transparent 4px), var(--gold); box-shadow: 0 0 14px rgba(214, 179, 106, .8); }

.wish-card small { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--plum); }
.wish-card.is-fulfilled small { color: var(--gold-text); }
.wish-card strong { font-size: 18px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }

.routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 32px 0 28px;
}

.route {
  padding: 8px clamp(16px, 2.4vw, 36px) 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.route + .route { border-left: 2px solid var(--line); }

.route-icon {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lilac);
}

.route-icon.is-pink { background: var(--pink); }

.route-icon svg, .story-icon {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-icon svg.bunting { width: 88px; height: 60px; }

/* The heading itself is the link to Quiet's donation page. */
.route h3 {
  margin: -18px 0 14px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.route h3 a { padding: 8px 24px 9px; font-size: inherit; }

.route p { margin: 0 0 20px; font-size: 15px; line-height: 1.6; }

progress {
  width: 100%;
  height: 14px;
  margin-top: auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--lilac);
  overflow: hidden;
}

progress::-webkit-progress-bar { background: var(--lilac); }
progress::-webkit-progress-value { background: var(--plum); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--plum); border-radius: 999px; }

.route .peak-text { margin: 10px 0 0; font-weight: 600; color: var(--plum); }

/* The plum block at the foot of the flyer. */
.story {
  margin: 0 var(--gutter) clamp(40px, 6vh, 64px);
  padding: clamp(48px, 8vh, 88px) clamp(20px, 6vw, 96px);
  background: var(--plum);
  color: var(--white);
  border-radius: 48px 80px 48px 80px;
  text-align: center;
}

.story h2, .story p { max-width: 760px; margin-left: auto; margin-right: auto; }
.story h2 { color: var(--white); }
.story h2::after { display: none; }
.story .sentence + .sentence { color: var(--pink); }
.story .eyebrow { color: var(--pink); }
.story p { font-size: 17px; line-height: 1.8; }
.story-icon { stroke: var(--white); margin-bottom: 8px; }
.story :focus-visible { outline-color: var(--white); }

footer {
  position: relative;
  padding: 32px var(--gutter) 40px;
  background: linear-gradient(to bottom, var(--white), var(--lilac-soft));
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
  color: var(--muted);
}

footer p { margin: 0 0 6px; }
footer a { color: var(--plum); font-weight: 600; text-underline-offset: 4px; }

.tagline {
  color: var(--plum);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .01em;
}

.tagline span { margin: 0 .3em; }

.wish-dialog {
  width: min(calc(100% - 32px), 560px);
  max-height: calc(100svh - 32px);
  padding: 40px 36px 32px;
  background: var(--white);
  color: var(--ink);
  border: 0;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(43, 19, 48, .35);
  overflow: auto;
}

.wish-dialog::backdrop { background: rgba(43, 19, 48, .7); }

.wish-dialog .eyebrow { margin-top: 0; }
.wish-dialog h2 { font-size: clamp(24px, 6vw, 32px); text-transform: none; color: var(--ink); font-weight: 600; }
.wish-dialog h2::after { display: none; }
.wish-dialog h2:focus { outline: none; }
.wish-dialog p { line-height: 1.7; font-size: 16px; overflow-wrap: anywhere; }
.wish-dialog .small { font-size: 14px; }

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  background: var(--lilac-soft);
  border: 0;
  border-radius: 50%;
  color: var(--plum-deep);
  font-size: 26px;
  line-height: 1;
}

.primary {
  display: block;
  margin: 24px 0 16px;
  min-height: 52px;
  padding: 12px 28px;
  background: var(--plum);
  color: var(--white);
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color .2s;
}

.primary:hover { background: var(--plum-deep); }
.primary:disabled { opacity: .6; cursor: progress; }

.fulfilled-note, .attention-note {
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 600;
}

.fulfilled-note { background: #FBF5E6; color: var(--gold-text); }
.attention-note { background: var(--lilac-soft); color: var(--plum-deep); }

fieldset { margin: 18px 0 0; padding: 0; border: 0; }
legend { padding: 0; font-size: 15px; font-weight: 600; }
.choice { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 15px; font-weight: 400; }
.choice input { width: 20px; height: 20px; accent-color: var(--plum); }

.error {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #FCE8EE;
  color: #8A1F3D;
  font-size: 15px;
}

/* Out of sight rather than display:none, which simple form bots skip. */
.website-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Phones and narrow tablets: the tree's canvas captures one-finger gestures, so the
   text and the bar below it stay free for scrolling on to the rest of the page. */
@media (max-width: 800px) {
  :root { --header: 64px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-text strong { font-size: 24px; }
  .brand-text span { font-size: 11px; }
  header nav { gap: 0; }
  header nav a { padding: 10px; font-size: 13px; }
  header nav a[href="#verhaal"] { display: none; }

  .hero {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 8px;
  }

  .hero::before { left: -30vw; top: 0; bottom: auto; width: 110vw; height: 40%; }
  .intro { padding: 8px 0; }
  .intro::before { display: none; }
  .brush-label { font-size: 13px; }
  .eyebrow { font-size: 11px; margin-top: 10px; }
  h1 { font-size: clamp(24px, 7.4vw, 38px); margin: 8px 0 12px; }
  .intro > p { font-size: 14px; line-height: 1.6; max-width: none; }
  .intro > .blob-text { padding: 14px 18px; }
  .intro .cta { display: none; }
  .countdown { margin-top: 10px; }
  .countdown strong { font-size: 20px; }

  .tree-stage { height: 72svh; min-height: 420px; grid-template-rows: minmax(0, 1fr) auto auto; border-radius: 28px 36px 28px 36px; }
  .is-stored .tree-stage { height: 56svh; min-height: 320px; }
  .stage-bar {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: space-between;
    padding: 4px 16px;
  }
  .control-group { flex-direction: row; gap: 4px; }

  .band-alt { border-radius: 36px 36px 0 0; }
  .badge { font-size: 16px; padding: 16px 20px; max-width: 170px; }
  .routes { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .route + .route { border-left: 0; }
  .route-icon { width: 104px; height: 104px; }
  .route-icon svg { width: 52px; height: 52px; }
  .story { border-radius: 32px 48px 32px 48px; }
  .tagline { font-size: 18px; }
  .wish-dialog { padding: 36px 20px 24px; border-radius: 24px; }
}

/* Phones held sideways: too shallow to stack, so the controls move beside the tree. */
@media (max-height: 520px) and (min-width: 560px) {
  :root { --header: 52px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-text strong { font-size: 20px; }
  .hero { height: calc(100svh - var(--header)); min-height: 300px; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); padding-bottom: 8px; }
  .intro { padding: 4px 0; }
  .intro::before, .intro .eyebrow { display: none; }
  .intro > p, .intro .cta { display: none; }
  h1 { font-size: 22px; margin: 6px 0; }
  .tree-stage { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr); border-radius: 24px; }
  .stage-bar { position: static; transform: none; flex-direction: column; justify-content: center; gap: 12px; padding: 4px 8px; }
  .control-group { flex-direction: column; gap: 4px; }
  .icon-button { width: 40px; height: 40px; }
  .tree-status { display: none; }
}

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