/* image-luminescence — the interface is a dark room.
 * One viewport on desktop. No eyebrows. No borders except buttons and
 * the dropzone. No side rails, ever. Interactions get brighter, never
 * darker. */

:root {
  --void: #0a0a0f;
  --room: #14141c;
  --dim: #a3a1b8;
  --ink: #f1eff8;
  --disco: #e08dba;
  --disco-deep: #cb7aa3;
  --phosphor: #ffffff;
  --bloom-core: rgba(255, 255, 255, 0.85);
  --bloom-halo: rgba(224, 141, 186, 0.45);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 38%, rgba(224, 141, 186, 0.06), transparent 60%),
    var(--void);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
}

/* film grain over everything, beneath nothing */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

main {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 40px 26px;
  gap: 18px;
}

/* ---------- top bar: mark + wordmark ---------- */
header {
  display: flex;
  align-items: center;
  gap: 16px;
}
header svg { flex: 0 0 auto; }
h1 {
  font-family: var(--serif);
  font-weight: 620;
  font-size: 1.5rem;
  letter-spacing: 0.005em;
  margin: 0;
}
h1 .lumi {
  font-style: italic;
  color: var(--phosphor);
  text-shadow: 0 0 10px var(--bloom-core), 0 0 34px var(--bloom-halo);
}
.readout {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-left: auto;
  text-align: right;
}
.readout a { color: var(--disco); text-decoration: none; }
.readout a:hover { text-decoration: underline; }

/* ---------- the stage ---------- */
.stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  min-height: 0;
}

.lede {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.25;
  text-align: center;
  max-width: 26ch;
  margin: 0 auto;
  text-wrap: balance;
}
.sub { margin-left: auto; margin-right: auto; }
.lede em {
  font-style: italic;
  color: var(--phosphor);
  text-shadow: 0 0 12px var(--bloom-core), 0 0 40px var(--bloom-halo);
}
.sub {
  color: var(--dim);
  text-align: center;
  margin: -8px 0 0;
  font-size: 0.9rem;
}

#dropzone {
  width: min(560px, 100%);
  padding: 44px 24px;
  border: 1px dashed var(--dim);
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
#dropzone.hover,
#dropzone:hover,
#dropzone:focus-visible {
  border-color: var(--phosphor);
  box-shadow: 0 0 34px rgba(224, 141, 186, 0.16);
  outline: none;
}
#dropzone p { margin: 3px 0; }
#dropzone strong { color: var(--ink); font-weight: 700; }
#dropzone .small { color: var(--dim); font-size: 0.8rem; }

/* ---------- working state ---------- */
#workbench {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 0;
}
.compare {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
}
.compare figure { margin: 0; min-width: 0; }
.compare figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 7px;
}
.compare img {
  max-width: 100%;
  max-height: 44vh;
  border-radius: 10px;
  background: #fff;
  display: block;
}
.compare.compact img { max-height: 22vh; }
.compare.compact figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 0 1 200px;
}
.compare.compact figcaption {
  text-align: center;
  max-width: 100%;
  line-height: 1.5;
}
.compare.compact figcaption { margin-bottom: 0; }
.compare.compact { gap: 26px; align-items: end; }
#home-examples, #reveal-examples {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
#room-examples .compare:not(.compact) img { max-height: 30vh; }

.bench-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: end;
  justify-content: center;
  background: var(--room);
  border-radius: 14px;
  padding: 16px 22px;
}
.bench-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--dim);
  min-width: 190px;
}
.bench-row input[type="range"] { accent-color: var(--disco); }
.bench-row .val {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
}

button, .button {
  font: 700 0.95rem var(--sans);
  background: var(--phosphor);
  color: #14060e;
  border: 1px solid var(--phosphor);
  border-radius: 999px;
  padding: 11px 28px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 0 10px var(--bloom-core), 0 0 30px var(--bloom-halo);
  transition: box-shadow 0.18s ease;
}
button:hover, .button:hover,
button:focus-visible, .button:focus-visible {
  box-shadow: 0 0 16px var(--bloom-core), 0 0 60px 6px var(--bloom-halo);
  outline: none;
}
button:disabled { opacity: 0.65; cursor: wait; box-shadow: none; }

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--dim);
  box-shadow: none;
  font-weight: 400;
}
.ghost:hover, .ghost:focus-visible {
  border-color: var(--phosphor);
  box-shadow: 0 0 18px rgba(224, 141, 186, 0.22);
}

/* ---------- footer ---------- */
footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
}
footer p { margin: 0; }
.foot-note {
  color: var(--dim);
  font-size: 0.78rem;
  max-width: 62ch;
}
.foot-note strong { color: var(--ink); }
.foot-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  white-space: nowrap;
}

[hidden] { display: none !important; }

/* ---------- rooms ---------- */
.room { display: none; }
.room.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 0;
}
.room.entering { animation: room-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes room-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

header a { color: inherit; text-decoration: none; }
nav [data-room] { color: var(--dim); transition: color 0.15s ease, text-shadow 0.15s ease; }
nav [data-room]:hover { color: var(--ink); text-decoration: none; }
nav [data-room].here {
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--bloom-halo);
}
nav .ext { color: var(--disco); }
nav .brew { color: var(--ink); }

/* reveal room */
.reveal-drops { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.dropzone-mini {
  padding: 22px 30px;
  border: 1px dashed var(--dim);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  min-width: 220px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.dropzone-mini.hover, .dropzone-mini:hover, .dropzone-mini:focus-visible {
  border-color: var(--phosphor);
  box-shadow: 0 0 26px rgba(224, 141, 186, 0.14);
  outline: none;
}
.dropzone-mini p { margin: 2px 0; }
.dropzone-mini .small { color: var(--dim); font-size: 0.78rem; }
.bench-row select {
  background: var(--void);
  color: var(--ink);
  border: 1px solid var(--dim);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
#reveal-result { margin: 0; }
#reveal-result img { max-height: 30vh; border-radius: 10px; background: #fff; display: block; }
#reveal-result figcaption {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 7px;
}

/* how it works */
.beats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 940px;
}
.beat {
  background: var(--room);
  border-radius: 14px;
  padding: 20px;
}
.beat p { margin: 14px 0 0; font-size: 0.85rem; color: var(--dim); }
.beat strong { color: var(--ink); display: block; margin-bottom: 4px; }
.beat-visual {
  height: 110px;
  border-radius: 10px;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.beat-visual img { height: 90px; border-radius: 6px; }
.beat-visual.stencil {
  background:
    radial-gradient(circle 26px at 50% 46%, rgba(255,255,255,0.95), rgba(255,255,255,0.12) 70%, transparent 75%),
    #000;
}
.beat-visual.result span {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 14px var(--bloom-core), 0 0 48px 8px var(--bloom-halo);
}
.room.entering .beat { animation: room-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.room.entering .beat:nth-child(2) { animation-delay: 0.08s; }
.room.entering .beat:nth-child(3) { animation-delay: 0.16s; }

/* docs */
.docs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 940px;
  width: 100%;
}
.doc-card {
  background: var(--room);
  border-radius: 14px;
  padding: 20px 22px;
  min-width: 0;
}
.doc-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--disco);
  margin: 0 0 8px;
}
.doc-title + .doc-title, .doc-body + .doc-title { margin-top: 16px; }
.doc-body { margin: 0; font-size: 0.85rem; color: var(--dim); }
.doc-body a { color: var(--disco); }
.doc-card pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.75;
  color: var(--ink);
  overflow-x: auto;
}
.doc-card pre .c { color: var(--dim); }

.curve-strip {
  display: flex;
  gap: 26px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 940px;
}
.curve-strip svg { flex: 0 0 auto; }
.curve-note { text-align: left; max-width: 46ch; margin: 0; }
.curve-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  fill: #a3a1b8;
}

@media (max-width: 900px) {
  .beats, .docs-grid { grid-template-columns: 1fr; }
}

/* one viewport on desktop; phones scroll naturally */
@media (min-width: 900px) and (min-height: 620px) {
  html, body { overflow: hidden; scrollbar-gutter: auto; }
  main { height: 100dvh; }
}
@media (max-width: 700px) {
  main { padding: 22px 20px; }
  .compare { flex-direction: column; align-items: center; }
  .compare img { max-height: 36vh; }
  .readout { display: none; }
  footer { flex-direction: column; gap: 8px; }
  .foot-meta { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
