/* AutomationRFQ: one screen, no scroll. System fonts only, no third-party requests. */
:root {
  --bg: #f5f3ef;
  --grid: rgba(20, 22, 26, 0.045);
  --ink: #14161a;
  --ink-2: #4a4e57;
  --ink-3: #80858f;
  --line: #e3e0d9;
  --card: #ffffff;
  --field: #f8f7f4;
  --accent: #d9541e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(217, 84, 30, 0.08);
  --ok: #1f7a4d;
  --err: #b42318;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04), 0 12px 40px -12px rgba(20, 22, 26, 0.14);
  --r: 18px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --grid: rgba(255, 255, 255, 0.035);
    --ink: #f2f1ee;
    --ink-2: #b4b7be;
    --ink-3: #7d818a;
    --line: #2a2c31;
    --card: #18191c;
    --field: #1f2024;
    --accent: #ef6a33;
    --accent-soft: rgba(239, 106, 51, 0.12);
    --ok: #4cc38a;
    --err: #ff8a7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 48px -16px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 15px/1.45 var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  max-width: 1180px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 28px max(16px, env(safe-area-inset-bottom));
}

.bar { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.01em; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; }
.mark::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 7px; border: 2px solid #fff; border-bottom: 0; border-radius: 2px 2px 0 0; }
.bar-note { font-size: 13px; color: var(--ink-3); }

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: 8px 0;
}

/* ---------- pitch ---------- */
h1 {
  font-family: var(--display);
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}
.sub { font-size: clamp(16px, 1.45vw, 19px); color: var(--ink-2); margin: 0 0 28px; max-width: 34ch; text-wrap: pretty; }
.flow { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.flow li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 15px; }
.flow span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px;
  font-size: 12px; font-weight: 650; color: var(--accent); background: var(--accent-soft);
}
.fee-line {
  display: inline-block; margin: 0; padding: 8px 14px; border-radius: 999px;
  font-size: 13.5px; color: var(--ink); background: var(--card); border: 1px solid var(--line);
}

/* ---------- card ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex; flex-direction: column;
  max-height: calc(100dvh - 120px);
}
.banner { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 13.5px; }
form { display: flex; flex-direction: column; min-height: 0; }

/* step 1: drop zone */
.drop {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 10px; min-height: 340px; padding: 32px 24px;
  border: 1.5px dashed color-mix(in srgb, var(--ink-3) 55%, transparent);
  border-radius: 14px; background: var(--field);
  cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
  color: var(--ink); font-size: 15px; font-weight: 400;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 3px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon { color: var(--accent); display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); margin-bottom: 6px; }
.drop-title { font-size: 19px; font-weight: 650; letter-spacing: -0.015em; }
.drop-cta {
  display: inline-block; margin-top: 4px; padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px;
}
.drop-hint { font-size: 12.5px; color: var(--ink-3); max-width: 30ch; }
.only-coarse { display: none; }
@media (pointer: coarse) { .only-fine { display: none; } .only-coarse { display: inline; } }

/* step 2: details */
.details { display: none; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; padding: 2px; margin: -2px; }
.card[data-step="details"] .drop { display: none; }
.card[data-step="details"] .details { display: flex; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.file-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 12px; background: var(--field); border: 1px solid var(--line); font-size: 13.5px;
}
.file-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--ok); flex: none; }
.file-info { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.link { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 4px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
label, legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; min-height: 40px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: none; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
[aria-invalid="true"] { border-color: var(--err) !important; }
::placeholder { color: var(--ink-3); }

.seg-wrap { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 7px 8px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.note { margin: 0; padding: 9px 11px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; line-height: 1.4; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.check.subtle { font-size: 12.5px; color: var(--ink-3); }

.btn {
  margin-top: 4px; width: 100%; min-height: 48px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 16px; font-weight: 650;
  cursor: pointer; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }

.progress { display: flex; flex-direction: column; gap: 6px; }
.progress-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.progress progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--field); }
.progress progress::-webkit-progress-bar { background: var(--field); }
.progress progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .2s; }
.progress progress::-moz-progress-bar { background: var(--accent); }
.progress p { margin: 0; font-size: 12.5px; color: var(--ink-3); }

.err { margin: 0; min-height: 0; font-size: 12px; color: var(--err); }
.err:empty { display: none; }
.err.center { text-align: center; margin-top: 8px; }
#form-status:empty { display: none; }
#form-status { font-size: 13px; }
#form-status.error { color: var(--err); }

.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 16px; outline: none; }
.done[hidden] { display: none; }
.done-check { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.done h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -0.02em; }
.done p { margin: 0; color: var(--ink-2); max-width: 36ch; }
.done .ref { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }

.privacy { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.privacy a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }

/* ---------- small screens: stack, compress the pitch so everything still fits ---------- */
@media (max-width: 860px) {
  .shell { padding-left: 16px; padding-right: 16px; }
  .bar { height: 36px; }
  .bar-note { display: none; }
  .stage { grid-template-columns: 1fr; align-content: start; gap: 16px; padding-top: 4px; }
  h1 { font-size: clamp(28px, 8.4vw, 40px); margin-bottom: 10px; }
  .sub { font-size: 15.5px; margin-bottom: 12px; }
  .flow { display: none; }
  .fee-line { display: block; font-size: 13px; padding: 0; border: 0; background: none; color: var(--ink-2); }
  .fee-line::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 99px; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
  .card { padding: 14px; max-height: none; }
  .drop { min-height: max(220px, 42dvh); }
  /* once a video is picked, give the screen to the form */
  body:has(.card[data-step="details"]) .pitch .sub,
  body:has(.card[data-step="details"]) .pitch .fee-line { display: none; }
  body:has(.card[data-step="details"]) h1 { font-size: 22px; margin: 0; }
}
@media (max-width: 860px) and (max-height: 760px) {
  body:has(.card[data-step="details"]) .bar { display: none; }
  .details { gap: 7px; }
  .file-chip { padding: 7px 10px; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { min-height: 36px; padding: 7px 10px; font-size: 16px; }
  label, legend { font-size: 12px; }
  .seg span { padding: 5px 8px; }
  .check { font-size: 12px; }
  .btn { min-height: 44px; }
  .privacy { margin-top: 8px; }
}
/* Last resort for very short screens: the card scrolls inside itself; the page never does. */
@media (max-width: 860px) {
  body:has(.card[data-step="details"]) .shell { height: 100dvh; overflow: hidden; }
  body:has(.card[data-step="details"]) .stage { min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  body:has(.card[data-step="details"]) .card { min-height: 0; overflow: hidden; }
}
@media (max-height: 760px) and (min-width: 861px) {
  h1 { font-size: clamp(32px, 4vw, 48px); }
  .flow { gap: 6px; margin-bottom: 18px; }
  .drop { min-height: 280px; }
  .card { padding: 18px; }
  .details { gap: 8px; }
  .privacy { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
