/* slop.graphics, the public pages. Whites and greys only: no accent colour,
   no outlines, no lines, no labels above headings. Small type, wide spacing.
   Separation is fill, space and soft shadow. Every control is 36px. */

:root {
  --page: #f7f7f7;
  --paper: #ffffff;
  --panel: #ececec;
  --fill: #eeeeee;
  --fill-strong: #e2e2e2;
  --ink: #161616;
  --ink-2: #636363; /* 4.9:1 on the grey panels, 6:1 on white */
  --ink-3: #8f8f8f; /* not for reading: states that are still to come */
  --placeholder: #747474; /* 4.6:1 on white */

  --frost-fill: rgba(236, 236, 236, 0.72);
  --frost-blur: blur(22px) saturate(1.5);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px -8px rgba(0, 0, 0, 0.1);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px -2px rgba(0, 0, 0, 0.1);
  --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.05), 0 18px 44px -14px rgba(0, 0, 0, 0.22);
  --shadow-window: 0 1px 2px rgba(0, 0, 0, 0.05), 0 30px 70px -30px rgba(0, 0, 0, 0.28);
  --focus: 0 0 0 3px rgba(0, 0, 0, 0.16);

  --control: 36px;
  --column: 1040px;
  --gutter: 24px;
  --rhythm: 104px;
  --spring: cubic-bezier(0.3, 1.45, 0.45, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --frost-fill: #ececec;
    --frost-blur: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --frost-fill: rgba(232, 232, 232, 0.96);
    --ink-2: #4a4a4a;
    --ink-3: #6b6b6b;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --rhythm: 72px;
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

h1,
h2 {
  font-weight: 560;
  text-wrap: balance;
}

h1 {
  font-size: clamp(32px, 4.1vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 14px;
  font-weight: 600;
}

p,
dd,
li {
  text-wrap: pretty;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  outline: 0;
}

button {
  touch-action: manipulation;
}

:focus-visible {
  box-shadow: var(--focus);
}

.quiet {
  color: var(--ink-2);
}

.wrap {
  width: min(var(--column), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  padding-top: var(--rhythm);
}

/* ── Controls ─────────────────────────────────────────────── */

.button,
.round {
  height: var(--control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--fill);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
  transition: transform 0.12s var(--out), background-color 0.15s var(--out);
}

.button {
  padding: 0 16px;
}

.round {
  width: var(--control);
  padding: 0;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.plain {
  background: transparent;
}

.button:active,
.round:active,
.pressable:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover,
  .round:hover {
    background: var(--fill-strong);
  }
  .button.primary:hover {
    background: #303030;
  }
  .button.plain:hover {
    background: var(--fill);
  }
}

.switch {
  height: var(--control);
  padding: 3px;
  display: inline-flex;
  border-radius: 999px;
  background: var(--fill);
}

.switch button {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s var(--out), color 0.15s var(--out);
}

.switch button:active {
  transform: scale(0.97);
}

.switch button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
}

.switch button:disabled {
  color: var(--ink-3);
  cursor: default;
}

.frost {
  background: var(--frost-fill);
  -webkit-backdrop-filter: var(--frost-blur);
  backdrop-filter: var(--frost-blur);
}

/* The paste field: the address and its button are one white pill. */
.paste {
  height: var(--control);
  display: flex;
  align-items: center;
  width: min(420px, 100%);
  padding: 3px 3px 3px 16px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  transition: box-shadow 0.2s var(--out);
}

.paste:focus-within {
  box-shadow: var(--shadow-lift), var(--focus);
}

.paste input {
  flex: 1;
  min-width: 0;
  height: 30px;
  background: transparent;
  font-size: 16px; /* under 16px iOS zooms the page on focus */
  letter-spacing: -0.01em;
  box-shadow: none;
}

.paste input::placeholder {
  color: var(--placeholder);
}

.paste button {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s var(--out), opacity 0.2s var(--out);
}

.paste button:active {
  transform: scale(0.97);
}

.paste.busy button {
  opacity: 0.5;
  pointer-events: none;
}

.paste-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

/* Five steps, filled up to the score. */
.meter {
  display: inline-flex;
  gap: 3px;
  flex: none;
}

.meter i {
  width: 12px;
  height: 6px;
  border-radius: 3px;
  background: var(--fill-strong);
  transition: background-color 0.35s var(--out);
}

.meter i.on {
  background: var(--ink);
}

/* ── Top row ──────────────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px max(var(--gutter), 12px + 12px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--control);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 15px;
  text-decoration: none;
  margin-right: auto;
}

.wordmark i {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--ink);
  display: grid;
  place-items: center;
}

.wordmark i::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

@media (max-width: 720px) {
  .top .optional {
    display: none;
  }
}

/* ── Footer ───────────────────────────────────────────────── */

.foot {
  margin-top: var(--rhythm);
  padding: 0 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--ink-2);
}

.foot .wordmark {
  color: var(--ink);
}

.foot a:not(.wordmark) {
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .foot a:not(.wordmark):hover {
    color: var(--ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
