/* OneThing site. One stylesheet for every page; no external requests. */

:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #111114;
  --elevated: #18181c;
  --text: #f5f5f5;
  --text-body: #d4d4d8;
  --text-2: #a1a1aa;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #ff8a5b;
  --accent-soft: rgba(255, 138, 91, 0.16);
  --success: #86d6a0;
  --danger: #f58b8b;
  --primary: #f5f5f5;
  --on-primary: #09090b;
  --font: "Geist", "Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 32px);
  --radius: 16px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fafaf9;
    --surface: #ffffff;
    --elevated: #f2f2f0;
    --text: #0c0c0e;
    --text-body: #27272a;
    --text-2: #52525b;
    --border: rgba(9, 9, 11, 0.07);
    --border-strong: rgba(9, 9, 11, 0.14);
    --accent: #de5a31;
    --accent-soft: rgba(222, 90, 49, 0.12);
    --success: #2f8a52;
    --danger: #c8423f;
    --primary: #111114;
    --on-primary: #fafaf9;
  }
}

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

[hidden] {
  display: none !important;
}

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(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-soft);
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease, color 150ms ease;
}

a:hover {
  text-decoration-color: var(--accent);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
  font-weight: 600;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--text-2);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

main {
  flex: 1;
}

/* Landing */

.hero {
  padding-block: clamp(56px, 14vh, 128px) clamp(40px, 8vh, 72px);
}

.hero-dot {
  display: block;
  width: 14px;
  height: 14px;
  margin-bottom: 36px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: breathe 4.8s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-soft);
  }
  50% {
    box-shadow: 0 0 0 14px var(--accent-soft);
  }
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.625rem, 10vw, 4.75rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
  color: var(--text-2);
}

.loop {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.loop li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  padding-block: 18px;
  border-top: 1px solid var(--border);
  font-size: 1.0625rem;
}

.loop li:last-child {
  border-bottom: 1px solid var(--border);
}

.loop li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.85rem;
  color: var(--text-2);
}

.loop strong {
  font-weight: 600;
}

.loop span {
  color: var(--text-2);
}

.promise {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 40px 0 clamp(56px, 10vh, 96px);
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  color: var(--text-body);
}

.promise .dot {
  width: 6px;
  height: 6px;
}

@media (max-width: 480px) {
  .promise {
    align-items: flex-start;
    border-radius: 14px;
  }

  .promise .dot {
    margin-top: 9px;
  }
}

/* Documents */

.doc {
  padding-block: clamp(32px, 8vh, 72px) 72px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.meta {
  margin: 0 0 32px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.lede {
  margin: 0 0 32px;
  font-size: 1.125rem;
  color: var(--text-body);
}

.doc h2 {
  margin: 48px 0 12px;
  font-size: 1.1875rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.doc p,
.doc li {
  color: var(--text-body);
}

.doc p {
  margin: 0 0 16px;
}

.doc ul,
.doc ol {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

.doc li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.doc li::marker {
  color: var(--text-2);
}

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.summary {
  margin: 0 0 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.summary h2 {
  margin-top: 0;
  font-size: 1rem;
}

.summary ul {
  margin-bottom: 0;
}

/* Support: questions */

.faq {
  margin: 0 0 56px;
  border-bottom: 1px solid var(--border);
}

.faq details {
  border-top: 1px solid var(--border);
}

.faq summary {
  position: relative;
  padding: 18px 40px 18px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--text-2);
  border-bottom: 1.5px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 200ms ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq .answer {
  padding-bottom: 12px;
}

/* Support: form */

.card {
  padding: clamp(20px, 5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.card h2 {
  margin-top: 0;
}

fieldset {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend,
.label {
  display: block;
  padding: 0;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.choice input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  padding: 14px 16px;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font: inherit;
  line-height: 1.5;
}

textarea::placeholder {
  color: var(--text-2);
  opacity: 0.8;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hint {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 20px;
  font-size: 0.875rem;
  color: var(--text-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.button {
  appearance: none;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
}

.button:hover {
  opacity: 0.9;
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  opacity: 0.5;
  cursor: progress;
}

.status {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.status[data-kind="error"] {
  color: var(--danger);
}

.sent {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sent .dot {
  margin-top: 9px;
}

.sent p {
  margin: 0;
}

.sent strong {
  display: block;
  color: var(--text);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px 36px;
  font-size: 0.875rem;
  color: var(--text-2);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer a {
  color: var(--text-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* 404 */

.missing {
  padding-block: clamp(64px, 16vh, 140px);
}

.missing h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 7vw, 2.75rem);
  letter-spacing: -0.03em;
  font-weight: 600;
}

.missing p {
  color: var(--text-2);
}

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