/*
 * kanakuni.spongebong.dev
 *
 * Dark, but a dream instead of a terminal: violet-black ground, cotton-candy pink, blue and
 * lavender drifting as soft light behind glassy surfaces. Sans carries the voice; mono does the
 * labelling. No webfonts, no dependencies.
 */
:root {
  color-scheme: dark;
  --bg: #120e1a;
  --fg: #f2edf7;
  --muted: #b3a8c9;
  --pink: #f9b8dd;
  --blue: #9fd4ff;
  --lavender: #cdb4f6;
  --surface: rgba(255, 255, 255, 0.045);
  --edge: rgba(255, 255, 255, 0.09);
  --mono: ui-monospace, 'JetBrains Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

::selection {
  background: rgba(249, 184, 221, 0.25);
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

a {
  color: var(--pink);
  text-decoration-color: rgba(249, 184, 221, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--pink);
}

/* --- dream blobs --------------------------------------------------------- */

.dream {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Cursor parallax lands here rather than on each blob, because the blobs' own
     keyframes own their transform. One layer of translation composes cleanly. */
  transform: translate3d(calc(var(--par-x, 0) * 16px), calc(var(--par-y, 0) * 12px), 0);
  will-change: transform;
}

.blob {
  position: absolute;
  width: 44vmax;
  height: 44vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: var(--blob-alpha, 0.22);
}

.blob-a {
  top: -18vmax;
  left: -12vmax;
  background: radial-gradient(circle, var(--pink), transparent 65%);
  animation: wander-a var(--drift-time, 46s) ease-in-out infinite alternate;
}

.blob-b {
  top: 20vh;
  right: -18vmax;
  background: radial-gradient(circle, var(--blue), transparent 65%);
  animation: wander-b calc(var(--drift-time, 46s) * 1.26) ease-in-out infinite alternate;
}

.blob-c {
  bottom: -22vmax;
  left: 10vmax;
  background: radial-gradient(circle, var(--lavender), transparent 65%);
  animation: wander-c calc(var(--drift-time, 46s) * 1.13) ease-in-out infinite alternate;
}

@keyframes wander-a {
  to { transform: translate(14vw, 10vh) scale(1.15); }
}

@keyframes wander-b {
  to { transform: translate(-10vw, -6vh) scale(0.9); }
}

@keyframes wander-c {
  to { transform: translate(8vw, -12vh) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none;
  }
}

/* The page-settings switch in the panel pauses everything ambient at once. */
html[data-motion='off'] .blob,
html[data-motion='off'] .status::before {
  animation-play-state: paused;
}

/* --- header --------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: 700 0.78rem var(--mono);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--fg);
}

.brand-gem {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--pink), var(--blue));
}

nav {
  display: flex;
  gap: 1.3rem;
  flex-wrap: wrap;
}

nav a {
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.2rem 0;
}

/* The four sections exist in the plan but not on disk yet; dimmed until they do. */
nav a:not(:hover):not(:focus-visible) {
  opacity: 0.55;
}

/* --- hero ------------------------------------------------------------------ */

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero {
  text-align: center;
  padding: 4.5rem 0 3rem;
}

.eyebrow {
  margin: 0 0 1rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 600 0.68rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  background: var(--surface);
}

.status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  animation: breathe 2.8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .status::before {
    animation: none;
    opacity: 0.85;
  }
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(3rem, 9vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(105deg, var(--pink) 15%, var(--lavender) 50%, var(--blue) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 36rem;
  margin: 0 auto 1.1rem;
  font-size: 1.06rem;
  color: var(--muted);
}

.strong-lead {
  color: var(--fg);
  font-weight: 600;
  font-size: 1.14rem;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 2.2rem 0 0;
  padding: 0;
}

.chips li {
  font: 500 0.74rem var(--mono);
  letter-spacing: 0.08em;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--fg);
}

.chips li:nth-child(3n + 1) {
  border-color: rgba(249, 184, 221, 0.35);
  color: var(--pink);
}

.chips li:nth-child(3n + 2) {
  border-color: rgba(159, 212, 255, 0.35);
  color: var(--blue);
}

.chips li:nth-child(3n) {
  border-color: rgba(205, 180, 246, 0.35);
  color: var(--lavender);
}

/* --- sections ---------------------------------------------------------------- */

section:not(.hero) {
  margin-top: 1rem;
  padding: 1.7rem 1.7rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 18px;
  backdrop-filter: blur(6px);
}

section:not(.hero) p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  max-width: 38rem;
}

section:not(.hero) p:last-child {
  margin-bottom: 0;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* --- footer -------------------------------------------------------------------- */

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 44rem;
  margin: 3.5rem auto 0;
  padding: 1.4rem 1.25rem 1.8rem;
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
}

/* --- page-settings panel ---------------------------------------------------
 * A working miniature of the product's argument: switches that visibly change the
 * thing in front of you. Hidden entirely without JavaScript. */

.panel-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--edge);
  background: var(--surface);
  backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 10;
}

/* The launcher is the gem from the wordmark, so the affordance reads as this site's. */
.panel-fab::before {
  content: '';
  position: absolute;
  inset: 50%;
  width: 15px;
  height: 15px;
  translate: -50% -50%;
  border-radius: 5px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--pink), var(--blue));
  transition: transform 0.35s ease;
}

.panel-fab:hover::before {
  transform: rotate(225deg);
}

@media (prefers-reduced-motion: reduce) {
  .panel-fab::before {
    transition: none;
  }
}

.panel {
  position: fixed;
  right: 1.1rem;
  bottom: 4.6rem;
  z-index: 11;
  width: min(300px, calc(100vw - 2rem));
  padding: 1rem 1.1rem 0.9rem;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: rgba(22, 16, 32, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.panel[hidden] {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.panel-title {
  margin: 0;
  font: 700 0.72rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--fg);
}

.panel-close {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  border-radius: 6px;
}

.panel-close:hover,
.panel-close:focus-visible {
  color: var(--fg);
  background: var(--surface);
}

.control {
  display: block;
  margin: 0 0 0.85rem;
  padding: 0;
  border: none;
}

.control legend,
.control > span {
  display: block;
  font: 500 0.66rem var(--mono);
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
  padding: 0;
}

.segment {
  display: flex;
  gap: 0.3rem;
}

.segment label {
  flex: 1;
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment span {
  display: block;
  text-align: center;
  font: 500 0.68rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--muted);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 0.34rem 0;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.segment input:checked + span {
  color: var(--pink);
  border-color: rgba(249, 184, 221, 0.5);
  background: rgba(249, 184, 221, 0.09);
}

.segment input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.control.slider {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
}

.control.slider > span {
  margin-bottom: 0;
}

input[type='range'] {
  accent-color: var(--pink);
  width: 100%;
}

.control.toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.control.toggle input {
  accent-color: var(--pink);
  width: 15px;
  height: 15px;
}

.control.toggle span {
  margin-bottom: 0;
}

.panel-note {
  margin: 0.9rem -1.1rem 0;
  padding: 0.7rem 1.1rem 0.95rem;
  border-top: 1px solid var(--edge);
  font: 400 0.7rem/1.5 var(--mono);
  letter-spacing: 0.03em;
  color: var(--muted);
}
