/* Duefront waitlist — mobile-first, tokens only, near-black on white, one cool accent. */
:root {
  --ink: #101418;
  --ink-soft: #3a424b;
  --muted: #626b76;
  --line: #dfe3e8;
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --accent: #0b6e8f;
  --accent-ink: #ffffff;
  --accent-soft: #e6f2f7;
  --focus: #0b6e8f;
  --error: #8f1d1d;
  --radius: 8px;
  --gutter: 16px;
  --measure: 40rem;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}

html:has(dialog[open]),
body:has(dialog[open]) {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

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

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-note {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Hero */
.hero {
  padding-top: 24px;
  padding-bottom: 40px;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.lede {
  margin: 0 0 16px;
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.mandatory {
  margin: 0 0 32px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
}

/* Form */
.join {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.join label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.join-row {
  display: grid;
  gap: 10px;
}

.join input[type="email"] {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #b6bdc5;
  border-radius: 6px;
}

.join input[type="email"]:focus {
  border-color: var(--accent);
}

.join input[aria-invalid="true"] {
  border-color: var(--error);
}

.join button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.join button:hover {
  filter: brightness(1.08);
}

.join button:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* Honeypot: off-screen for people, present for naive bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.form-status {
  margin: 0;
  min-height: 1.5em;
  font-size: 0.9375rem;
}

.form-status.is-success {
  color: var(--accent);
  font-weight: 500;
}

.form-status.is-info {
  color: var(--ink-soft);
  font-weight: 500;
}

.form-status.is-pending {
  color: var(--muted);
}

.form-status.is-error {
  color: var(--error);
  font-weight: 500;
}

/* Sections */
.block {
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
}

.points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.points li {
  padding-left: 16px;
  border-left: 3px solid var(--accent-soft);
  color: var(--ink-soft);
}

.points strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.body-text {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  margin-top: 24px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
}

.site-footer .mandatory {
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.footer-line {
  margin: 0 0 4px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.footer-copy {
  color: var(--muted);
}

/* Wider screens */
@media (min-width: 640px) {
  .join-row {
    grid-template-columns: 1fr auto;
  }

  .join button {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .site-header {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .block {
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

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

/* Preview dialog (screenshot / design review only; not linked from the page) */
dialog.preview {
  width: min(38rem, calc(100% - 2 * var(--gutter)));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
}

dialog.preview::backdrop {
  background: rgba(16, 20, 24, 0.45);
}

dialog.preview .preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

dialog.preview h2 {
  margin: 0;
  font-size: 1.125rem;
}

dialog.preview .preview-close {
  min-width: 44px;
  min-height: 44px;
  font: inherit;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.preview-card {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.preview-card .badge {
  justify-self: start;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.preview-card .project {
  margin: 0;
  font-weight: 600;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.metrics div {
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metrics dt {
  font-size: 0.75rem;
  color: var(--muted);
}

.metrics dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.delta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.delta-table th,
.delta-table td {
  padding: 6px 4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.delta-table td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

.delta-table .move-down {
  color: var(--ink);
}

.preview-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
