/* ————————————————————————————————————————————
   Let's Consciousness — site styles
   A pocket museum about the only mystery
   you've never once been outside of.
   ———————————————————————————————————————————— */

:root {
  --paper: #faf4e8;
  --paper-2: #f2e9d6;
  --ink: #2c2620;
  --ink-soft: #6f6456;
  --accent: #e4562e;
  --teal: #17696b;
  --gold: #d9a13b;
  --line: #d9cdb6;
  --shadow: rgba(60, 45, 20, 0.1);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #211c15;
    --paper-2: #2b251c;
    --ink: #f0e7d6;
    --ink-soft: #a89b87;
    --accent: #f0764b;
    --teal: #52a8a0;
    --gold: #e0b25c;
    --line: #3d352a;
    --shadow: rgba(0, 0, 0, 0.35);
  }
}

/* the red⇄teal swap, used by the qualia exhibit */
html.swapped {
  --accent: #17696b;
  --teal: #e4562e;
}
@media (prefers-color-scheme: dark) {
  html.swapped {
    --accent: #52a8a0;
    --teal: #f0764b;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.65;
  transition: background 0.6s ease;
}

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

.wrap-wide {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ————— header / nav ————— */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px dotted var(--line);
}

.site-head a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 1px;
}

.site-head a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.plaque {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  white-space: nowrap;
}

/* ————— type ————— */

.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.5rem 0 0.5rem;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.45rem;
  margin: 2.6rem 0 0.75rem;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 2rem;
}

.prose p { margin: 0 0 1.1rem; }

.prose em { color: var(--accent); font-style: italic; }

a { color: var(--teal); }

hr {
  border: none;
  border-top: 1px dotted var(--line);
  margin: 3rem 0;
}

/* ————— hero (lobby) ————— */

.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
}

.hero .word {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5rem);
  margin: 0.5rem 0 1rem;
}

.hero h1 .lets { font-style: italic; font-weight: 400; }
.hero h1 .con { color: var(--accent); }

.hero .tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--ink-soft);
  font-style: italic;
  max-width: 34rem;
  margin: 0 auto;
}

.starburst {
  display: inline-block;
  color: var(--gold);
  font-size: 1.6rem;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50% { transform: scale(1.25) rotate(18deg); opacity: 1; }
}

/* ————— exhibit cards (lobby grid) ————— */

.exhibits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
  padding: 2rem 0 1rem;
}

.card {
  display: block;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.2rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 0 var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* crooked frames on the museum wall */
.card:nth-child(3n + 1) { transform: rotate(-0.7deg); }
.card:nth-child(3n + 2) { transform: rotate(0.5deg); }
.card:nth-child(3n)     { transform: rotate(-0.3deg); }

.card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 8px 18px var(--shadow);
}

.card .num {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.card h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.3rem;
  line-height: 1.2;
}

.card p {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.card .tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.card .tag.hot { border-color: var(--accent); color: var(--accent); }

/* ————— interactive stage ————— */

.stage {
  position: relative;
  background: var(--paper-2);
  border: 2px dotted var(--line);
  border-radius: 16px;
  min-height: 260px;
  margin: 1.5rem 0 1rem;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.controls label { display: flex; align-items: center; gap: 0.5rem; }

input[type="range"] { accent-color: var(--accent); width: 11rem; }

.btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn:hover { background: var(--accent); transform: translateY(-1px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); background: transparent; }

.caption {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
  min-height: 1.4em;
  margin: 0.75rem 0 1.5rem;
}

.note {
  background: var(--paper-2);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.2rem;
  font-size: 0.95rem;
  margin: 1.5rem 0;
}

.instructions {
  padding-left: 1.4rem;
  margin: 1rem 0 1.5rem;
}
.instructions li { margin-bottom: 0.45rem; }

/* ————— the humility-o-meter ————— */

.hmeter {
  text-align: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.3rem;
  margin: 3rem auto;
  max-width: 26rem;
  box-shadow: 0 2px 0 var(--shadow);
}

.hmeter-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.hmeter svg { width: 100%; max-width: 15rem; height: auto; display: block; margin: 0 auto; }

.hmeter .dial { stroke: var(--line); }
.hmeter .tick { fill: var(--ink-soft); }
.hmeter .tick.lit { fill: var(--accent); }

.hmeter .needle {
  stroke: var(--accent);
  transform-box: view-box;
  transform-origin: 50% 90.9%;
  animation: needle-wobble 2.8s ease-in-out infinite;
}

@keyframes needle-wobble {
  0%, 100% { transform: rotate(calc(var(--angle) - 3deg)); }
  50%      { transform: rotate(calc(var(--angle) + 3deg)); }
}

.hmeter.mu .needle { animation: needle-spin 14s linear infinite; }

@keyframes needle-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hmeter .needle, .hmeter.mu .needle { animation: none; transform: rotate(var(--angle)); }
  .starburst { animation: none; }
}

.hmeter-reading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.4rem 0 0.2rem;
}

.hmeter-note {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

/* meter legend on the lobby page */
.meter-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 1rem 0 0;
}
.meter-scale span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.meter-scale span:last-child { border-color: var(--accent); color: var(--accent); }

/* ————— answer cards (details/summary) ————— */

details.answer {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  margin: 0.7rem 0;
}

details.answer summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
}

details.answer summary::marker { color: var(--accent); }

details.answer p { margin: 0.7rem 0 0.3rem; font-size: 0.98rem; }

details.answer .who {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ————— quiz ————— */

.quiz-q { font-size: 1.35rem; font-weight: 700; margin: 0 0 1rem; }

.quiz-opts { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }

.quiz-opts button {
  font-family: var(--serif);
  font-size: 1.02rem;
  text-align: left;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.quiz-opts button:hover { border-color: var(--accent); transform: translateX(3px); }

.quiz-opts button:disabled { cursor: default; opacity: 0.45; transform: none; }

.quiz-opts button.selected,
.quiz-opts button.selected:disabled {
  border-color: var(--accent);
  background: var(--paper-2);
  opacity: 1;
  transform: translateX(3px);
  font-weight: 700;
}

.quiz-verdict {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.stamp {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 3px solid var(--accent);
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  transform: rotate(-4deg);
  margin: 1rem 0;
}

/* ————— the postcard (share widget) ————— */

.postcard {
  max-width: 34rem;
  margin: 3.5rem auto 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.3rem 1.2rem;
  text-align: left;
  box-shadow: 0 2px 0 var(--shadow);
  position: relative;
}

.postcard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 0.6rem;
  margin-bottom: 0.75rem;
}

.postcard-head .from {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.5;
}

.postcard-stamp {
  flex: none;
  width: 2.6rem;
  height: 2.9rem;
  border: 2px dotted var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
  transform: rotate(2deg);
}

.postcard-stamp small {
  font-family: var(--sans);
  font-size: 0.42rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 0.18rem;
}

.postcard-msg {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 0.9rem;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.share-btn {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.share-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.share-btn.primary {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.share-btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.mastodon-ask {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  width: 100%;
}
.mastodon-ask input {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.8rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  min-width: 0;
}
.mastodon-ask input:focus { outline: none; border-color: var(--accent); }

/* ————— footer ————— */

footer {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 4rem 1.5rem 2.5rem;
  line-height: 1.8;
}

footer .fleuron { color: var(--gold); font-size: 1.1rem; }

footer .dedication {
  max-width: 34rem;
  margin: 1.3rem auto 0;
  padding-top: 1rem;
  border-top: 1px dotted var(--line);
  font-size: 0.8rem;
  line-height: 1.6;
}

footer .dedication a { color: var(--ink-soft); }
footer .dedication a:hover { color: var(--accent); }
footer .dedication em { font-style: italic; }

footer .support {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  font-size: 0.8rem;
  line-height: 1.6;
}

footer .support a { color: var(--teal); text-decoration: none; border-bottom: 1px dotted var(--line); }
footer .support a:hover { color: var(--accent); border-bottom-color: var(--accent); }

footer .btc {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12rem 0.45rem;
  margin-top: 0.2rem;
  word-break: break-all;
  border-bottom: 1px solid var(--line);
}
footer .support a.btc:hover { color: var(--accent); border-color: var(--accent); }

/* ————— the hat (exit-room donation card) ————— */

.hat {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.6rem 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 0 var(--shadow);
  text-align: center;
}

.hat h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.hat p { margin: 0 auto 1rem; max-width: 32rem; font-size: 1rem; }

.hat-ways {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.4rem;
}

.hat-way {
  flex: 1 1 13rem;
  max-width: 16rem;
}

.hat-way .label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

.hat-way img.qr {
  width: 100%;
  max-width: 11rem;
  height: auto;
  image-rendering: pixelated;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto 0.5rem;
}

.btc-full {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--ink-soft);
  word-break: break-all;
  text-decoration: none;
  margin-top: 0.3rem;
}
.btc-full:hover { color: var(--accent); }

.kofi {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--accent);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.2s ease;
}
.kofi:hover { transform: translateY(-2px); filter: brightness(1.08); color: var(--paper); }

/* ————— small screens ————— */

@media (max-width: 600px) {
  .site-head { font-size: 0.78rem; padding: 0.8rem 1rem; }
  .hero { padding-top: 3rem; }
}
