/* Rewind Bench: coming-soon page and survey
   Look: a projection booth after hours. Warm dark, marquee gold,
   film-leader cream, typewritten labels on masking tape. */

@font-face {
  font-family: "RB Display";
  src: url("/fonts/rb-display-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RB Type";
  src: url("/fonts/rb-type-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --booth: #110f0d;
  --panel: #1a1714;
  --panel-raised: #211d19;
  --panel-picked: #2b2316;
  --well: #0c0a09;
  --line: #3a332c;
  --line-soft: #2a2520;
  --cream: #efe6d2;
  --cream-dim: #b8ad9a;
  --cream-faint: #8e8475;
  --amber: #f0b33a; /* now gold; the name is left over from the first version */
  --amber-deep: #b8811c;
  --ink-on-amber: #1b1309;
  --tally: #e0604e;
  --focus: #ffdd8a;

  --font-display: "RB Display", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-type: "RB Type", "Courier New", Courier, monospace;
  --font-body: "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 4px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--booth);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Projector glow from the top of the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -18%, rgba(240, 179, 58, .20), rgba(240, 179, 58, .05) 45%, transparent 70%),
    radial-gradient(60% 50% at 50% 120%, rgba(224, 96, 78, .06), transparent 70%);
}

/* Film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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 .92 0 0 0 0 .8 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--amber);
  text-underline-offset: .18em;
}

a:hover {
  color: var(--focus);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .015em;
  line-height: 1;
  margin: 0;
}

h2 {
  font-size: clamp(1.7rem, 5.2vw, 2.3rem);
}

p {
  margin: 0 0 1rem;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: .6rem .9rem;
  background: var(--amber);
  color: var(--ink-on-amber);
  font-family: var(--font-type);
  text-decoration: none;
}

.skip:focus {
  top: var(--gutter);
}

/* ---------- Header and footer ---------- */

.site-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--cream);
  text-decoration: none;
}

.brand:hover {
  color: var(--cream);
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--amber);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1;
  padding-top: 2px;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-footer {
  max-width: 960px;
  margin: 3.5rem auto 0;
  padding: 1.5rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line-soft);
  color: var(--cream-dim);
  font-family: var(--font-type);
  font-size: .875rem;
  letter-spacing: .04em;
}

.site-footer p {
  margin: 0 0 .35rem;
}

/* ---------- Shared pieces ---------- */

.tape {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: .38rem .8rem .32rem;
  background: var(--cream);
  color: #1d1711;
  font-family: var(--font-type);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.2;
  transform: rotate(-1.4deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .35);
  clip-path: polygon(0 8%, 3% 0, 50% 4%, 97% 0, 100% 10%, 99% 55%, 100% 92%, 96% 100%, 50% 95%, 3% 100%, 0 90%, 1% 45%);
}

.panel {
  position: relative;
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 4.5vw, 2.1rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0) 40%), var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.panel h2 {
  margin-bottom: .9rem;
}

.leader {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--cream-dim);
  background:
    linear-gradient(var(--line), var(--line)) center / 2px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) center / 100% 2px no-repeat,
    var(--well);
  box-shadow: inset 0 0 0 6px var(--well), inset 0 0 0 8px var(--line);
}

.leader span {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--cream);
  text-shadow: 0 0 2px var(--well), 0 0 6px var(--well);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .8rem 1.25rem .7rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-type);
  font-size: .95rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.15;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--amber);
  color: var(--ink-on-amber);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2) inset;
}

.btn-primary:hover {
  background: #f6c353;
  color: var(--ink-on-amber);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--cream-dim);
  color: var(--cream);
}

.btn[disabled],
.btn[aria-busy="true"] {
  opacity: .6;
  cursor: progress;
}

.text-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-type);
  font-size: .85rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ---------- Landing ---------- */

.hero {
  padding: clamp(2.25rem, 8vw, 3.5rem) 0 clamp(2.75rem, 8vw, 4.5rem);
}

.hero-title {
  max-width: 8.9em;
  margin-bottom: 1.2rem;
  font-size: clamp(2.5rem, 13vw, 5.2rem);
  line-height: .93;
  letter-spacing: .005em;
  text-wrap: balance;
}

.lede {
  max-width: 41rem;
  font-size: clamp(1.08rem, 2.6vw, 1.25rem);
  color: var(--cream-dim);
  margin-bottom: 1.6rem;
}

.lede p {
  margin-bottom: .9rem;
}

.lede p:last-child {
  margin-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.done-note {
  display: inline-block;
  padding: .7rem 1rem;
  border: 1px dashed var(--amber-deep);
  border-radius: var(--radius);
  color: var(--amber);
  font-family: var(--font-type);
  font-size: .9rem;
}

.fine {
  margin: 0;
  color: var(--cream-faint);
  font-size: .9rem;
}

/* Once someone has taken the survey, the note about anonymity isn't needed. */
.done-note:not([hidden]) + .fine {
  display: none;
}

/* The rewind bench section sits on the page itself, not in a box,
   so the page doesn't read as a stack of identical cards. */
.bench {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: clamp(2.75rem, 8vw, 4.5rem) 0 clamp(1.5rem, 5vw, 2.5rem);
  border-top: 1px solid var(--line-soft);
}

.bench h2 {
  margin-bottom: .9rem;
}

.bench p {
  max-width: 34rem;
  color: var(--cream-dim);
}

.bench p:last-child {
  margin-bottom: 0;
}

.bench-art {
  width: 100%;
  max-width: 480px;
}

.art-wood { fill: #3b3128; }
.art-metal { fill: #5b524a; }
.art-film { fill: none; stroke: var(--amber-deep); stroke-width: 9; stroke-linecap: square; }
.art-sprockets { fill: none; stroke: var(--booth); stroke-width: 3; stroke-dasharray: 3 6; }
.art-wound { fill: #6e4614; }
.art-reel { fill: none; stroke: var(--cream-dim); stroke-width: 2.5; }
.art-hole { fill: none; stroke: var(--cream-faint); stroke-width: 1.5; }
.art-hub { fill: var(--booth); stroke: var(--cream); stroke-width: 2; }
.art-crank { fill: none; stroke: var(--cream); stroke-width: 3; stroke-linecap: round; }
.art-knob { fill: var(--amber); }

@media (min-width: 720px) {
  .bench {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

.early p:not(.form-msg) {
  color: var(--cream-dim);
}

.field-label {
  display: block;
  margin-bottom: .45rem;
  font-family: var(--font-type);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* Phone: email, checkbox, button. Wider screens: email and button side by side. */
.early-grid {
  display: grid;
  gap: .8rem;
  grid-template-areas:
    "email"
    "check"
    "button";
}

.early-grid input[type="email"] {
  grid-area: email;
}

.early-grid .check {
  grid-area: check;
}

.early-grid .btn {
  grid-area: button;
}

@media (min-width: 600px) {
  .early-grid {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "email button"
      "check check";
  }
}

/* ---------- Form controls ---------- */

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  transition: border-color .15s;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--cream-faint);
  opacity: 1;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--amber);
  outline: 2px solid rgba(255, 221, 138, .35);
  outline-offset: 1px;
}

.check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  cursor: pointer;
  color: var(--cream-dim);
}

.check input,
.opt input,
.seg-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.mark {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--cream-faint);
  background: transparent;
  transition: background-color .12s, border-color .12s, box-shadow .12s;
}

.mark-radio {
  border-radius: 50%;
}

.mark-checkbox {
  border-radius: 3px;
}

input:checked + .mark {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: inset 0 0 0 3px var(--well);
}

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

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-msg {
  min-height: 1.4em;
  margin: .9rem 0 0;
  color: var(--amber);
  font-size: .95rem;
}

.form-msg:empty {
  min-height: 0;
  margin: 0;
}

.form-error {
  color: #ff8f7d;
}

/* ---------- Survey ---------- */

#view-survey {
  max-width: 740px;
  margin: 0 auto;
  padding-top: 1.75rem;
}

.reelbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.75rem;
  color: var(--cream-dim);
}

.reel {
  flex: none;
  width: 26px;
  height: 26px;
  transform: rotate(var(--turn, 0deg));
  transition: transform .8s var(--ease);
}

.reelbar-track {
  position: relative;
  flex: 1;
  height: 10px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px) top / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px) bottom / 100% 2px no-repeat,
    var(--well);
  overflow: hidden;
}

.reelbar-fill {
  height: 100%;
  width: 4%;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber));
  box-shadow: 0 0 12px rgba(240, 179, 58, .55);
  transition: width .6s var(--ease);
}

.page-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.page-head .tape {
  margin-bottom: .75rem;
}

.page-head h2 {
  font-size: clamp(1.9rem, 6.5vw, 2.7rem);
}

.page-head h2:focus {
  outline: none;
}

.page-intro {
  margin: .8rem 0 0;
  color: var(--cream-dim);
}

.questions {
  display: grid;
  gap: 2.1rem;
}

.q {
  min-width: 0;
}

.q fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.q legend,
.q-label {
  display: block;
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 .8rem;
  font-size: 1.12rem;
  font-weight: 650;
  line-height: 1.4;
  color: var(--cream);
}

.q legend + *,
.q-label + * {
  clear: both;
}

.q-hint {
  margin: -.35rem 0 .8rem;
  color: var(--cream-faint);
  font-size: .92rem;
}

.tag-optional {
  margin-left: .45rem;
  font-family: var(--font-type);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cream-faint);
  white-space: nowrap;
}

.tag-required {
  color: var(--tally);
}

.opts {
  display: grid;
  gap: .5rem;
}

.opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .85rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.opt:hover {
  border-color: var(--line);
  background: var(--panel-raised);
}

.opt .mark {
  margin-top: .12rem;
}

.opt:has(input:checked) {
  border-color: var(--amber-deep);
  background: var(--panel-picked);
}

.opt:has(input:disabled) {
  opacity: .42;
  cursor: not-allowed;
}

.opt-label {
  line-height: 1.4;
}

.specify {
  margin-top: .6rem;
}

/* Scale and grid answers */

.seg {
  display: grid;
  gap: .4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seg-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seg-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .seg-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.seg-opt {
  position: relative;
  display: block;
  cursor: pointer;
}

.seg-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  min-height: 3rem;
  height: 100%;
  padding: .5rem .45rem;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--cream-dim);
  font-size: .86rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color .12s, border-color .12s, color .12s;
}

.seg-opt:hover .seg-face {
  border-color: var(--line);
  color: var(--cream);
}

.seg-opt input:checked + .seg-face {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink-on-amber);
  font-weight: 600;
}

.seg-opt input:focus-visible + .seg-face {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.seg-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .45rem;
  color: var(--cream-faint);
  font-size: .82rem;
}

.grid-title {
  margin-bottom: 1.1rem;
  font-size: clamp(1.35rem, 4.4vw, 1.65rem);
  color: var(--amber);
}

.q .grid-row {
  min-width: 0;
  margin: 0 0 1.25rem;
  padding: 0 0 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
}

.q .grid-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.q .grid-row legend {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: .65rem;
}

/* Navigation */

.nav {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

.nav [data-next] {
  margin-left: auto;
}

/* ---------- Thank you ---------- */

.finale {
  max-width: 640px;
  margin: 2.5rem auto 0;
  text-align: center;
}

.finale h2 {
  margin-bottom: 1rem;
}

.finale h2:focus {
  outline: none;
}

.finale p:not(.tape) {
  color: var(--cream-dim);
}

/* The logo reel on the thank-you screen turns backwards, like it's rewinding. */
.reel-big {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  color: var(--amber);
  animation: rewind 9s linear infinite;
}

@keyframes rewind {
  to { transform: rotate(-360deg); }
}

.preview-note {
  color: var(--tally) !important;
  font-family: var(--font-type);
  font-size: .85rem;
}

.share {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}

.share-row input {
  flex: 1 1 14rem;
  font-family: var(--font-type);
  font-size: .9rem;
  text-align: center;
}

.noscript {
  text-align: center;
}

/* ---------- Privacy page ---------- */

.doc {
  max-width: 680px;
  padding: clamp(2.25rem, 8vw, 3.5rem) 0 0;
}

.doc h1 {
  margin-bottom: .6rem;
  font-size: clamp(2.6rem, 10vw, 3.8rem);
}

.doc h2 {
  margin: 2.2rem 0 .7rem;
  font-size: clamp(1.35rem, 4.4vw, 1.65rem);
  color: var(--amber);
}

.doc p,
.doc li {
  color: var(--cream-dim);
}

.doc strong {
  color: var(--cream);
  font-weight: 650;
}

.doc ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.doc li {
  margin-bottom: .7rem;
}

.doc .updated {
  margin-bottom: 1.4rem;
  font-family: var(--font-type);
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--cream-faint);
}

/* The privacy line under the early access form */
.early p.fine {
  margin-top: 1rem;
  color: var(--cream-faint);
}

/* ---------- Small screens ---------- */

@media (max-width: 520px) {
  .actions .btn,
  .finale .btn-primary {
    width: 100%;
  }

  .page-head .leader {
    width: 48px;
    height: 48px;
  }

  .page-head .leader span {
    font-size: 1.55rem;
  }

  .seg-face {
    min-height: 2.75rem;
    font-size: .8rem;
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
