/* Near-black surfaces, zinc borders, orange accent, black-italic uppercase
   headings and small spaced-out monospace labels. */
:root {
  --base: #0a0a0a;
  --surface: #0e0e0e;
  --border: #27272a;
  --text: #f5f5f4;
  --muted: #71717a;
  --primary: #f97316;
  --error: #f87171;
  --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  min-height: 100vh;
}

::selection { background: var(--primary); color: var(--base); }

/* ---- Background video ---- */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.bg-shade {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(10, 10, 10, 0.15) 0%, rgba(10, 10, 10, 0.55) 100%);
  z-index: -1;
}
@media (prefers-reduced-motion: reduce) {
  .bg-video { display: none; }
  body { background: var(--base) url("background-poster.jpg") center / cover fixed no-repeat; }
}

/* ---- Panel ---- */
.panel {
  width: 100%;
  max-width: 560px;
  background: rgba(14, 14, 14, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: 4px;
  padding: 32px 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

h1 {
  margin: 0 0 10px;
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.05em;
}
.lead { margin: 0 0 28px; color: var(--muted); line-height: 1.55; font-size: 0.95rem; }
.req { color: var(--primary); }

fieldset {
  border: 0;
  border-top: 1px solid var(--border);
  padding: 18px 0 0;
  margin: 0 0 26px;
  min-width: 0;
}
legend {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 0 10px 0 8px;
  margin-left: -1px;
  border-left: 1px solid var(--primary);
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 6px;
}

input, textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px; /* prevents iOS zoom on focus */
  color: var(--text);
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: #52525b; }
input:hover, textarea:hover { border-color: #3f3f46; }
input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.6); cursor: pointer; }
textarea { resize: vertical; }
#code-input {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .panel { padding: 24px 18px; }
  body { padding: 24px 16px; }
  h1 { font-size: 1.6rem; }
}

button {
  width: 100%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--base);
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 14px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
button:hover { background: transparent; color: var(--primary); }
button:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }
button:disabled { opacity: 0.55; cursor: progress; }

.hint, .privacy { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.privacy { border-left: 1px solid var(--border); padding-left: 12px; }
.hint:empty { display: none; }
.error {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--error);
  margin: 12px 0 0;
}
.error:empty { display: none; }

.summary {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--base);
  border: 1px solid var(--border);
  border-left: 2px solid var(--primary);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 16px;
  line-height: 1.6;
  white-space: pre-line;
}
