:root {
  --paper: #ead7b4;
  --paper-deep: #d0b487;
  --ink: #302720;
  --muted-ink: rgba(48, 39, 32, 0.66);
  --accent: #6c5041;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
  cursor: none;
  background:
    radial-gradient(circle at 68% 24%, rgba(255, 245, 219, 0.5), transparent 30%),
    radial-gradient(circle at 18% 80%, rgba(114, 86, 55, 0.18), transparent 38%),
    linear-gradient(130deg, var(--paper), #dfc596 54%, var(--paper-deep));
  color: var(--ink);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Iowan Old Style", Georgia, serif;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 1;
  opacity: 0.23;
  background-image:
    linear-gradient(90deg, rgba(58, 43, 28, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(58, 43, 28, 0.1) 1px, transparent 1px),
    radial-gradient(circle, rgba(55, 39, 27, 0.22) 0 1px, transparent 1.4px);
  background-size: 31px 31px, 41px 41px, 5px 5px;
  mix-blend-mode: multiply;
}

body::after {
  z-index: 2;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(72, 45, 31, 0.18) 76%, rgba(45, 31, 24, 0.32)),
    linear-gradient(180deg, rgba(67, 45, 31, 0.18), transparent 18%, transparent 78%, rgba(55, 36, 26, 0.2));
}

#ink-flock {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100vw;
  height: 100vh;
}

.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding: clamp(22px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.masthead {
  max-width: min(620px, 82vw);
  color: rgba(43, 33, 27, 0.88);
  text-shadow: 0 1px 0 rgba(255, 247, 226, 0.34);
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(64, 45, 35, 0.62);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(4.5rem, 13vw, 10rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
}

.mode-switch {
  align-self: flex-start;
  display: flex;
  gap: 6px;
  width: min(100%, 330px);
  padding: 5px;
  border: 1px solid rgba(55, 38, 28, 0.24);
  border-radius: 8px;
  background: rgba(243, 226, 190, 0.6);
  box-shadow:
    0 18px 44px rgba(54, 35, 25, 0.12),
    inset 0 0 20px rgba(255, 249, 229, 0.22);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.mode-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(48, 36, 28, 0.7);
  cursor: none;
  font: 700 0.78rem/1 "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: 0;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.mode-button:hover,
.mode-button:focus-visible {
  color: var(--ink);
  background: rgba(255, 248, 226, 0.34);
  outline: none;
}

.mode-button.is-active {
  color: #fff8e8;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 246, 218, 0.24), transparent 42%),
    var(--accent);
  box-shadow:
    inset 0 0 14px rgba(35, 24, 18, 0.24),
    0 5px 14px rgba(64, 42, 30, 0.17);
}

@media (max-width: 640px) {
  .stage {
    padding: 18px;
  }

  .masthead {
    max-width: 94vw;
  }

  .mode-switch {
    align-self: stretch;
    width: 100%;
  }

  .mode-button {
    min-height: 42px;
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    cursor: auto;
  }

  .mode-button {
    cursor: pointer;
    transition: none;
  }
}
