/* Radio Silence: the server-rendered pages (landing, sign in, register, consent, help, errors).
   Same room as the window on your settlement: charcoal, bone, one amber lamp. The title is HTML
   laid over the painted valley, and under it a tuning scale whose needle finds the station once
   when the page opens. Everything else stays quiet. */

:root {
  color-scheme: dark;
  --charcoal: #1d2124;
  --soot: #24292c;
  --soot-2: #2b3135;
  --slate: #4a5560;
  --slate-light: #8da0ad;
  --bone: #d8d2c0;
  --bone-dim: #aaa697;
  --bone-faint: #7b796f;
  --amber: #e0a050;
  --amber-hot: #eeb468;
  --amber-glow: rgba(224, 160, 80, 0.55);
  --moss-light: #9aa883;
  --rust: #8c4a2f;
  --rust-light: #cf8a66;
  --line: rgba(216, 210, 192, 0.12);
  --line-2: rgba(216, 210, 192, 0.24);
  --plate: "DIN Condensed", "DINCondensed-Bold", "Bahnschrift Condensed", "Bahnschrift", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", sans-serif;
  --text: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --code: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 3px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--charcoal);
  color: var(--bone);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--amber);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--amber-hot);
}

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

img.is-missing {
  display: none;
}

/* ---- buttons and fields -------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.42rem 1.3rem 0.18rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 400 1.1875rem/1 var(--plate);
  letter-spacing: 0.035em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn-lamp {
  background: var(--amber);
  color: var(--charcoal);
  box-shadow: inset 0 0 0 1px rgba(255, 228, 184, 0.25), 0 6px 22px rgba(224, 160, 80, 0.22);
}

.btn-lamp:hover {
  background: var(--amber-hot);
  color: var(--charcoal);
}

.btn-plain {
  background: rgba(29, 33, 36, 0.45);
  color: var(--bone);
  border-color: rgba(216, 210, 192, 0.45);
}

.btn-plain:hover {
  color: var(--bone);
  border-color: var(--bone);
}

.btn-quiet {
  background: transparent;
  color: var(--bone-dim);
  border-color: var(--line-2);
}

.btn-quiet:hover {
  color: var(--bone);
  border-color: rgba(216, 210, 192, 0.5);
}

.btn-quiet.is-done {
  color: var(--moss-light);
  border-color: rgba(154, 168, 131, 0.6);
}

.btn-wide {
  width: 100%;
  margin-top: 0.4rem;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.form {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field-label {
  color: var(--bone-dim);
  font: 400 1.0625rem/1.1 var(--plate);
  letter-spacing: 0.035em;
}

.field-note {
  margin: -0.45rem 0 0;
  color: var(--bone-dim);
  font-size: 0.875rem;
  font-style: italic;
  line-height: 1.4;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--soot-2);
  color: var(--bone);
  font: 400 1.0625rem/1.2 var(--text);
}

.input:focus {
  border-color: rgba(224, 160, 80, 0.7);
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.6rem 0.85rem;
  border-left: 2px solid var(--rust-light);
  background: rgba(140, 74, 47, 0.14);
  color: var(--bone);
}

/* ---- the masthead and footer --------------------------------------------------------------- */

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
  color: var(--bone-dim);
  text-decoration: none;
}

.mark:hover {
  color: var(--bone);
}

.mark-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.mark-name {
  padding-top: 0.15em;
  font: 400 1rem/1 var(--plate);
  letter-spacing: 0.3em;
}

.foot {
  margin-top: auto;
  padding: 1.5rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  font: 400 1rem/1 var(--plate);
  letter-spacing: 0.04em;
}

.foot a {
  color: var(--bone-faint);
  text-decoration: none;
}

.foot a:hover {
  color: var(--bone);
}

/* ---- landing ------------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 74vh;
  min-height: 74svh;
  overflow: hidden;
  background: radial-gradient(60% 45% at 50% 22%, rgba(224, 160, 80, 0.16), transparent 70%), radial-gradient(120% 80% at 70% 70%, #3a3d31, transparent 62%), linear-gradient(180deg, #22282b, var(--charcoal));
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 84% 55%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 23, 26, 0.55) 0%, rgba(20, 23, 26, 0.12) 34%, rgba(29, 33, 36, 0) 52%, rgba(29, 33, 36, 0.72) 82%, var(--charcoal) 100%);
}

.hero-title {
  position: relative;
  padding: clamp(4.5rem, 14vh, 9rem) 1rem 0;
  text-align: center;
}

.title {
  margin: 0;
  padding-left: 0.3em; /* the tracking after the last letter, so the word sits centred */
  color: var(--bone);
  font: 400 clamp(2.6rem, 11vw, 7rem)/0.9 var(--plate);
  letter-spacing: 0.3em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6), 0 0 60px rgba(224, 160, 80, 0.14);
}

/* the tuning scale: minor ticks, a major tick every fifth, and the needle that finds the station */
.tuner {
  position: relative;
  width: min(34rem, 80vw);
  height: 20px;
  margin: 1.2rem auto 0;
  background:
    repeating-linear-gradient(90deg, rgba(216, 210, 192, 0.55) 0 1px, transparent 1px 40px) 0 100% / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, rgba(216, 210, 192, 0.28) 0 1px, transparent 1px 8px) 0 100% / 100% 6px no-repeat;
  border-bottom: 1px solid rgba(216, 210, 192, 0.35);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tuner-track {
  position: absolute;
  inset: 0;
  transform: translateX(62%);
  animation: tune 2.8s cubic-bezier(0.3, 0.75, 0.25, 1) 0.45s both;
}

.tuner-needle {
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 2px;
  height: 32px;
  border-radius: 1px;
  background: var(--amber);
  box-shadow: 0 0 10px 2px var(--amber-glow), 0 0 30px 8px rgba(224, 160, 80, 0.18);
}

@keyframes tune {
  0% {
    transform: translateX(6%);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  46% {
    transform: translateX(78%);
  }
  68% {
    transform: translateX(55%);
  }
  84% {
    transform: translateX(64.5%);
  }
  100% {
    transform: translateX(62%);
  }
}

.pitch {
  position: relative;
  width: 100%;
  max-width: 36rem;
  margin: -4.5rem auto 0;
  padding: 0 1.25rem 2.5rem;
}

.pitch-copy {
  margin: 0 0 1rem;
}

.pitch-lede {
  font-size: 1.1875rem;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.6rem 0 0;
}

.signed-in {
  margin: 1rem 0 0;
  color: var(--bone-dim);
  font-size: 0.9375rem;
  font-style: italic;
}

.help-line {
  margin: 1.4rem 0 0;
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .hero {
    min-height: 82vh;
  }

  .hero-art {
    object-position: 60% 60%;
  }

  .pitch {
    margin-top: -7rem;
  }
}

/* ---- sign in, register, consent, errors ---------------------------------------------------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
}

.auth-art {
  position: relative;
  height: 30vh;
  min-height: 190px;
  overflow: hidden;
  background: radial-gradient(55% 70% at 30% 45%, rgba(224, 160, 80, 0.22), transparent 72%), var(--charcoal);
}

.auth-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 33, 36, 0) 40%, var(--charcoal) 100%);
}

.auth-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 26% 42%;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 27rem;
  margin: -2.5rem auto 0;
  padding: 0 1.25rem 2rem;
}

.auth-plain .auth-card {
  margin-top: 0;
  padding-top: 15vh;
}

.auth-title {
  margin: 0 0 1.2rem;
  padding-top: 0.1em;
  font: 400 2.25rem/0.98 var(--plate);
  letter-spacing: 0.02em;
}

.auth-who,
.auth-message {
  margin: -0.4rem 0 1.25rem;
}

.auth-alt {
  margin: 1.3rem 0 0;
  color: var(--bone-dim);
  font-size: 0.9375rem;
}

.can {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.can li {
  position: relative;
  padding-left: 1.6rem;
}

.can li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.can-yes::before {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber-glow);
}

.can-no::before {
  border: 1.5px solid var(--bone-dim);
}

.can strong {
  font-weight: 600;
}

.consent {
  display: flex;
  gap: 0.6rem;
}

.consent .btn {
  flex: 1;
}

.not-you {
  margin: 0;
}

@media (min-width: 900px) {
  .auth {
    grid-template-columns: minmax(0, 1.15fr) minmax(24rem, 1fr);
  }

  .auth-plain {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-art {
    height: auto;
    min-height: 100vh;
  }

  .auth-art::after {
    background: linear-gradient(90deg, rgba(29, 33, 36, 0) 55%, var(--charcoal) 100%);
  }

  .auth-card {
    align-self: center;
    margin: 0 auto;
    padding: 3rem 2rem;
  }

  .auth-page .foot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(40rem, 46%);
  }

  .auth-page.error-page .foot {
    position: static;
    width: auto;
  }
}

/* ---- help ---------------------------------------------------------------------------------- */

.doc {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

.doc-title {
  margin: 0 0 0.7rem;
  padding-top: 0.1em;
  font: 400 clamp(2.4rem, 8vw, 3.25rem)/0.95 var(--plate);
  letter-spacing: 0.02em;
}

.doc-lede {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

.url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.url {
  flex: 1 1 15rem;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--soot-2);
  font: 400 0.9375rem/1.35 var(--code);
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.doc-sec {
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}

.doc-h {
  margin: 0 0 0.5rem;
  padding-top: 0.1em;
  color: var(--amber);
  font: 400 1.5rem/1 var(--plate);
  letter-spacing: 0.03em;
}

.doc-sec p {
  margin: 0 0 0.75rem;
}

.steps {
  margin: 0;
  padding-left: 1.4rem;
}

.steps li {
  margin: 0.35rem 0;
  padding-left: 0.2rem;
}

.steps li::marker {
  color: var(--bone-dim);
  font-family: var(--plate);
}

.steps strong {
  font-weight: 600;
}

.doc-actions {
  margin-top: 2rem;
}

/* ---- reduced motion ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
