/* EDC Video Intake, v0.1 */

:root {
  --ink: #1a1a1a;
  --paper: #fafafa;
  --accent: #e63946;
  --accent-dark: #c1121f;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  font-size: 16px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.hero {
  text-align: center;
  padding: 24px 0 40px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 18px;
  color: var(--muted);
}

.step {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.step.active { display: block; }

.step-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.step h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.step h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

label {
  display: block;
  margin-bottom: 18px;
}

label > span {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

label small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

input[type="text"], input[type="email"], input[type="url"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

button {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  transition: all 0.15s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.primary {
  background: var(--accent);
  color: white;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

button.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--border);
}

button.secondary:hover {
  background: #f3f4f6;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.video-wrap {
  background: black;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.video-wrap video, .record-stage video, #playback-stage video {
  width: 100%;
  display: block;
  max-height: 480px;
  background: black;
}

.record-intro {
  color: var(--muted);
  margin-bottom: 20px;
}

.record-stage {
  position: relative;
  background: black;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

#record-preview {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.record-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(0,0,0,0.85);
  color: white;
}

.timer {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px;
  font-weight: 600;
}

.timer.recording {
  color: #ff4444;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.record-btn {
  background: var(--accent);
  color: white;
}

.record-btn.stop {
  background: white;
  color: var(--ink);
}

.hidden { display: none !important; }

#playback-stage {
  margin-top: 24px;
}

.playback-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.playback-actions button { flex: 1; min-width: 140px; }

#upload-progress {
  margin-top: 24px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

#progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  color: #991b1b;
}

.error p { margin-bottom: 8px; }
.error p:last-child { margin-bottom: 0; }
.error a { color: #991b1b; }
.error .fallback { font-size: 14px; color: var(--muted); }

#section-thanks {
  text-align: center;
  padding: 48px 32px;
}

#section-thanks h2 {
  font-size: 32px;
  color: var(--success);
  margin-bottom: 12px;
}

#section-thanks p {
  font-size: 18px;
  margin-bottom: 12px;
}

.subtle {
  color: var(--muted);
  font-size: 15px !important;
}

footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

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

@media (max-width: 600px) {
  .step { padding: 20px; }
  .hero h1 { font-size: 26px; }
  .subtitle { font-size: 16px; }
  #record-preview { height: 280px; }
}
