:root {
  --fg: #17181c;
  --muted: #5d6472;
  --bg: #ffffff;
  --band: #f7f8fb;
  --panel: #ffffff;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --success: #15803d;
  --danger: #b42318;
  --line: #e4e7ee;
  --soft: #eef2ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main,
.hero,
section {
  max-width: 960px;
  margin-inline: auto;
  padding-inline: 20px;
}

.hero {
  padding-block: 52px 26px;
}

.badge {
  display: inline-block;
  max-width: 100%;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

h1 {
  max-width: 840px;
  margin: 14px 0 12px;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.1;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  line-height: 1.2;
}

h3 {
  margin: 0;
  font-size: 1.1rem;
}

a {
  color: var(--accent-dark);
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--soft);
  font-size: 0.95em;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}

.cta-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--fg);
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-dark);
}

.btn-ghost {
  background: #ffffff;
}

.trust,
.note,
.fallback,
.hp,
.field-status,
.form-status,
.result-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.converter-section {
  padding-block: 30px;
}

.section-heading {
  max-width: 780px;
}

.converter-form,
.result-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.converter-form {
  display: grid;
  gap: 16px;
}

.upload-panel {
  display: grid;
  gap: 10px;
}

.file-drop {
  display: grid;
  gap: 4px;
  min-height: 116px;
  padding: 18px;
  border: 1px dashed #9aa7bd;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.file-drop-title {
  font-weight: 750;
}

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

input[type="file"] {
  width: 100%;
  max-width: 100%;
}

.image-preview {
  width: min(100%, 360px);
  max-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
}

.field-grid,
form {
  display: grid;
  gap: 10px;
}

form label {
  font-weight: 650;
}

form input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.form-status {
  min-height: 1.5em;
  margin: 0;
}

.form-status[data-tone="success"] {
  color: var(--success);
}

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

.form-status[data-tone="loading"] {
  color: var(--accent-dark);
}

.result-panel {
  background: var(--panel);
}

.result-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.splat-preview {
  display: grid;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.preview-canvas {
  width: 100%;
  min-height: 420px;
}

.preview-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.preview-empty {
  align-self: center;
  justify-self: center;
  max-width: 34ch;
  margin: 0;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.prose {
  padding-block: 26px;
}

.prose p,
.prose li,
.prose dd {
  max-width: 76ch;
}

.specs {
  padding-left: 1.2em;
}

dt {
  margin-top: 18px;
  font-weight: 750;
}

dd {
  margin: 6px 0 0;
  color: var(--muted);
}

.waitlist {
  padding-bottom: 52px;
}

.waitlist form {
  max-width: 430px;
}

.hp {
  position: absolute;
  left: -9999px;
}

#waitlist-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
}

:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  main,
  .hero,
  section {
    padding-inline: 16px;
  }

  .hero {
    padding-block: 34px 18px;
  }

  .cta-row,
  .action-row,
  .btn {
    width: 100%;
  }

  .converter-form,
  .result-panel {
    padding: 14px;
  }

  .splat-preview,
  .preview-canvas {
    min-height: 320px;
  }
}
