/*
  touch.io for-sale page.

  Two typefaces with two jobs: Besley (a Clarendon, the face of deeds and auction notices) sets
  the name; Atkinson Hyperlegible Next sets everything a visitor reads or fills in.
  Sizes and spacing are in rem and breakpoints in em, so the page reflows instead of scrolling
  sideways when a visitor enlarges text.
*/

@font-face {
  font-family: "Besley";
  src: url("/fonts/Besley-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/AtkinsonHyperlegibleNext-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --print: #000000;
  --muted: #454856;
  --ink: #2430c8;
  --ink-strong: #1a2296;
  --on-ink: #ffffff;
  --wash: #eef0fb;
  --rule: #c9ccd6;
  --edge: #5c6070;
  --stop: #b3001b;
  --go: #0a6b38;
  --display: "Besley", "Clarendon", Georgia, "Times New Roman", serif;
  --text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12142b;
    --print: #f4f4ef;
    --muted: #b9bccb;
    --ink: #a3aaff;
    --ink-strong: #c2c7ff;
    --on-ink: #12142b;
    --wash: #1c2046;
    --rule: #3a3f63;
    --edge: #9a9fb8;
    --stop: #ff8a9b;
    --go: #6fd9a0;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--print);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  /* A word wider than the screen (large text on a small phone) breaks instead of running off the edge. */
  overflow-wrap: break-word;
  overflow-x: clip;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink-strong);
}

:focus-visible {
  outline: 0.1875rem solid var(--ink);
  outline-offset: 0.1875rem;
  border-radius: 0.125rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 2;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border: 0.125rem solid var(--ink);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* ---- The name ------------------------------------------------------------------------ */

.masthead {
  margin-bottom: 2.5rem;
}

.wordmark {
  position: relative;
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 14vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* A ring spreads from wherever the name is pressed. Added by script; skipped when motion is reduced. */
.ripple {
  position: absolute;
  width: 4rem;
  height: 4rem;
  margin: -2rem 0 0 -2rem;
  border: 0.1875rem solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  animation: ripple 700ms ease-out forwards;
}

@keyframes ripple {
  from {
    transform: scale(0.15);
    opacity: 0.9;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripple {
    display: none;
  }
}

.lead {
  max-width: 34em;
  margin: 0 0 1.5rem;
  font-size: 1.375rem;
  line-height: 1.4;
}

.jump {
  display: inline-block;
}

/* ---- Two columns on wide screens ------------------------------------------------------ */

.columns {
  display: grid;
  gap: 2.5rem;
}

.columns > * {
  min-width: 0;
}

@media (min-width: 60em) {
  .page {
    padding: 3.5rem 2rem 4rem;
  }

  .columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }

  .masthead .jump {
    display: none;
  }
}

h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
}

.details section + section {
  margin-top: 2.5rem;
}

/* ---- Facts about the name ------------------------------------------------------------- */

.facts {
  margin: 0;
  border-top: 0.0625rem solid var(--rule);
}

.facts div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 0.0625rem solid var(--rule);
}

.facts dt {
  flex: 0 0 7.5rem;
  color: var(--muted);
}

.facts dd {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
}

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

.steps li {
  padding-left: 0.25rem;
}

.steps li + li {
  margin-top: 0.75rem;
}

.note {
  margin: 1rem 0 0;
  color: var(--muted);
}

/* ---- The offer form ------------------------------------------------------------------- */

.offer {
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--wash);
  border-top: 0.375rem solid var(--ink);
}

@media (min-width: 30em) {
  .offer {
    padding: 2rem 2rem 2.25rem;
  }
}

.offer p {
  margin: 0 0 1.25rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label,
.field .legend {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 700;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.hint {
  display: block;
  margin: -0.125rem 0 0.375rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  background: var(--paper);
  color: var(--print);
  border: 0.125rem solid var(--edge);
  border-radius: 0.25rem;
  font: inherit;
}

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

input:focus-visible,
textarea:focus-visible {
  outline-offset: 0.0625rem;
  border-color: var(--ink);
}

.money {
  display: flex;
  align-items: stretch;
  max-width: 16rem;
}

.money span {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--paper);
  border: 0.125rem solid var(--edge);
  border-right: 0;
  border-radius: 0.25rem 0 0 0.25rem;
  color: var(--muted);
}

.money input {
  min-width: 0;
  border-radius: 0 0.25rem 0.25rem 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.check input {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.125rem 0 0;
  accent-color: var(--ink);
}

.check label {
  min-width: 0;
}

.error {
  display: block;
  margin-top: 0.375rem;
  color: var(--stop);
  font-weight: 700;
}

[aria-invalid="true"] {
  border-color: var(--stop);
}

.summary {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 0.1875rem solid var(--stop);
}

.summary h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.summary ul {
  margin: 0;
  padding-left: 1.25rem;
}

.summary a {
  color: var(--stop);
  font-weight: 700;
}

.button {
  display: inline-block;
  min-height: 3rem;
  padding: 0.8125rem 1.5rem;
  background: var(--ink);
  color: var(--on-ink);
  border: 0;
  border-radius: 0.25rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}

.button:hover {
  background: var(--ink-strong);
  color: var(--on-ink);
}

.button[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.offer .button {
  width: 100%;
}

.offer .small {
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.sent {
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 0.1875rem solid var(--go);
}

.sent h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 1.375rem;
}

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

/* Hidden from people, present for programs that fill in every field. */
.trap {
  position: absolute;
  left: -200rem;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Footer and plain pages ----------------------------------------------------------- */

.footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 0.0625rem solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer p {
  margin: 0 0 0.5rem;
  max-width: 44em;
}

.plain {
  max-width: 44rem;
}

.plain h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
}

.plain h2 {
  margin-top: 2rem;
}

.home {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--print);
  text-decoration: none;
}
