@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --berry: #3B0D24;
  --berry-lift: #5A1A3A;
  --compact: #2A0819;
  --powder: #F6DCDD;
  --blush: #E7A7A5;
  --muted: #C99AAA;
  --champagne: #E8C987;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(90% 70% at 30% 35%, var(--berry-lift) 0%, transparent 70%),
    var(--berry);
  color: var(--powder);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fint korn over hele siden, som pudder i luften */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: var(--noise);
  opacity: 0.07;
  mix-blend-mode: overlay;
}

#paint, #sparkle {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#paint { z-index: 0; touch-action: none; transition: opacity 0.5s ease; }
#paint.wiping { opacity: 0; }
#sparkle { z-index: 1; pointer-events: none; }

/* Indholdet ligger over lærredet, men lader penslen male igennem */
.top, .stage, .foot {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.compact, .compact * { pointer-events: auto; }

.wrap {
  width: min(100% - 3rem, 80rem);
  margin-inline: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}
.brand:focus-visible { outline: 2px solid var(--powder); outline-offset: 6px; border-radius: 4px; }

.mark {
  width: 3.4rem;
  height: auto;
  transform-origin: 50% 60%;
  animation: pout 0.9s cubic-bezier(.3, 1.7, .5, 1) 0.2s both;
}
.brand:hover .mark { animation: kiss 0.6s cubic-bezier(.3, 1.7, .5, 1); }
@keyframes pout { from { transform: scale(0.4) rotate(-8deg); opacity: 0; } }
@keyframes kiss { 40% { transform: scale(0.86, 1.12); } }

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--powder);
}
.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--champagne);
  box-shadow: 0 0 0 0 rgba(232, 201, 135, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 0.6rem rgba(232, 201, 135, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 201, 135, 0); }
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: end;
  column-gap: clamp(2rem, 5vw, 5rem);
  row-gap: clamp(1.5rem, 4vh, 3rem);
  padding-block: clamp(1rem, 5vh, 4rem) clamp(1.5rem, 4vh, 3rem);
}
.stage h1 { grid-column: 1 / -1; }

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.3rem, 12vw, 11.5rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-shadow: 0 0.02em 0.25em rgba(43, 6, 24, 0.55);
}
h1 .line { display: block; white-space: nowrap; }
h1 .line + .line { padding-left: 0.55em; }

.lede {
  margin: 0;
  max-width: 31rem;
  color: var(--muted);
  text-shadow: 0 1px 12px rgba(43, 6, 24, 0.8);
}

/* Pudderdåsen ---------------------------------------------------- */

.compact {
  justify-self: end;
  width: min(100%, 23rem);
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 2rem;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.07), transparent 40%),
    var(--compact);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 0 0 1px rgba(232, 201, 135, 0.18),
    0 30px 60px -20px rgba(10, 0, 5, 0.7);
}

.compact-title {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--powder);
}

.pans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.pan {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.35), transparent 45%),
    radial-gradient(circle at 60% 70%, rgba(0,0,0,0.18), transparent 60%),
    var(--noise),
    var(--c);
  background-blend-mode: normal, normal, soft-light, normal;
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.45),
    0 0 0 4px #1C0410,
    0 0 0 5px rgba(232, 201, 135, 0.15);
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1), box-shadow 0.2s ease;
}
.pan[data-shimmer]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 40%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 65% 30%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 68%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 25% 70%, #fff 0 0.8px, transparent 1.3px),
    radial-gradient(circle at 75% 55%, #fff 0 0.8px, transparent 1.3px);
  animation: glint 2.2s ease-in-out infinite alternate;
}
@keyframes glint { from { opacity: 0.35; } to { opacity: 1; } }

.pan:hover { transform: scale(1.06); }
.pan[aria-checked="true"] {
  transform: scale(1.08);
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.45),
    0 0 0 4px #1C0410,
    0 0 0 6px var(--champagne);
}
.pan:focus-visible {
  outline: 2px solid var(--powder);
  outline-offset: 8px;
}

.compact-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.4rem;
  gap: 1rem;
}

.shade-name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.2;
}

.wipe {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--powder);
  background: transparent;
  border: 1.5px solid rgba(246, 220, 221, 0.35);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.wipe:hover { border-color: var(--powder); background: rgba(246, 220, 221, 0.08); }
.wipe:focus-visible { outline: 2px solid var(--powder); outline-offset: 3px; }

.foot {
  padding-block: 1.5rem 1.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Penslens markør ------------------------------------------------ */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 4;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 1.5px solid var(--c, var(--powder));
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(0,0,0,0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.15s ease, height 0.15s ease, margin 0.15s ease;
}
.cursor.on { opacity: 1; }
.cursor.down { width: 30px; height: 30px; margin: -15px 0 0 -15px; }

@media (pointer: fine) {
  body.painting-ready { cursor: none; }
  body.painting-ready .compact { cursor: auto; }
}

/* Intro: ét samlet øjeblik ved indlæsning ------------------------ */

.line, .lede, .compact {
  opacity: 0;
  transform: translateY(0.4em);
  animation: rise 1s cubic-bezier(.2, .8, .2, 1) forwards;
}
.line:nth-child(2) { animation-delay: 0.12s; }
.lede { animation-delay: 0.3s; }
.compact { animation-delay: 1.6s; transform: translateY(1.5rem); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .line, .lede, .compact { animation: none; opacity: 1; transform: none; }
  .status::before, .pan[data-shimmer]::after, .mark, .brand:hover .mark { animation: none; }
  #paint { transition: none; }
}

/* Mobil ---------------------------------------------------------- */

@media (max-width: 56rem) {
  .stage {
    grid-template-columns: 1fr;
    align-items: start;
    align-content: space-between;
    padding-top: clamp(1rem, 5vh, 3rem);
  }
  .compact { justify-self: stretch; width: 100%; }
  .stage h1 { grid-column: auto; }
}

@media (pointer: coarse) {
  /* Så man kan scrolle ved at trække i teksten og male på resten */
  .copy, .top, .foot { pointer-events: auto; }
}
