/* =========================================================
   Lodger Films — Start a Project
   The framed dark card IS the request console: a narrow
   intro / "what happens next" column on the left, the form
   on a light sheet on the right. Tokens + header/footer
   come from landing.css.
   ========================================================= */

/* Netlify honeypot — off-screen but present in the DOM so FormData(form) still
   includes it; hidden from layout, assistive tech (aria-hidden) and autofill. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- the framed dark card (holds everything) ---------- */
.intro {
  position: relative;
  flex: 1 1 auto;
  border-radius: var(--frame-radius);
  overflow: hidden;
  background: #0b0b0c;
  isolation: isolate;
}
.intro-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 70% at 22% -6%, #2a2a2e 0%, #161618 46%, #0b0b0c 78%);
}

/* layout: narrow intro column + wide form sheet */
.request-layout {
  position: relative; z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.66fr 1.34fr;
  gap: clamp(2rem, 4.5vw, 5rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: start;
}

/* ---------- intro column (on dark) ---------- */
.intro-side { position: sticky; top: 2.5rem; color: #fff; }
.intro-side .eyebrow { color: rgba(255,255,255,0.5); }
.intro-title {
  font-weight: 300;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 1.1rem 0 0;
  max-width: 13ch;
}
.intro-title .accent {
  font-weight: 700; letter-spacing: -0.01em;
  background: var(--silver); background-size: 250% 100%; background-position: 120% 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: silver-sweep 5s linear infinite;
}
.intro-lead {
  margin: 1.5rem 0 0; max-width: 36ch;
  font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.7);
}

.aside-steps { margin: 2.5rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.aside-steps li {
  position: relative; padding: 1.25rem 0 1.25rem 2.75rem;
  border-top: 1px solid rgba(255,255,255,0.13); counter-increment: step;
}
.aside-steps li:last-child { border-bottom: 1px solid rgba(255,255,255,0.13); }
.aside-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1.25rem;
  font-size: 13px; color: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums;
}
.aside-steps h4 { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; margin: 0; color: #fff; }
.aside-steps p { font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,0.6); margin: 0.35rem 0 0; max-width: 28ch; }

.aside-contact { margin-top: 2.25rem; }
.aside-contact .k { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin: 0 0 0.6rem; }
.aside-contact a { display: inline-block; font-size: 15px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.28); padding-bottom: 1px; transition: border-color 0.25s ease; }
.aside-contact a:hover { border-color: #fff; }

/* ---------- the light form sheet ---------- */
.form-sheet {
  background: var(--paper);
  border-radius: 26px;
  padding: clamp(1.75rem, 3vw, 3rem);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

/* ---------- form ---------- */
.project-form { display: flex; flex-direction: column; }
.field-group { border: 0; margin: 0; padding: 0; }
.field-group + .field-group { margin-top: clamp(2.25rem, 3.5vw, 3rem); padding-top: clamp(2.25rem, 3.5vw, 3rem); border-top: 1px solid var(--line-soft); }
.group-legend {
  display: flex; align-items: baseline; gap: 0.75rem;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-2); margin: 0 0 1.5rem; padding: 0;
}
.group-legend .gnum { font-variant-numeric: tabular-nums; color: var(--ink); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 2.5vw, 2.25rem); align-items: start; }
.row-2 .field + .field { margin-top: 0; }
.row-2 + .field { margin-top: 1.6rem; }

/* underline-style fields */
.field { display: flex; flex-direction: column; }
.field + .field { margin-top: 1.6rem; }
.field label { font-size: 13px; letter-spacing: 0.02em; color: var(--muted); margin-bottom: 0.6rem; }
.field label .req { color: var(--ink); }
.field .opt { color: var(--muted-2); letter-spacing: 0.01em; }
.field input,
.field textarea {
  font-family: inherit; font-size: 18px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 0.55rem 0; width: 100%; transition: border-color 0.3s ease; resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field textarea { line-height: 1.55; min-height: 4.5rem; }
.field .count { align-self: flex-end; margin-top: 0.5rem; font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* calendar field revealed by the "Exact date" pill */
#deadline-field { margin-top: 1.6rem; animation: deadline-in 0.35s var(--ease); }
#deadline-field[hidden] { display: none; }
@keyframes deadline-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- project type cards ---------- */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.6rem, 1.2vw, 0.85rem); }
.type-card {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--line); border-radius: 16px;
  padding: 1.2rem 1.2rem 1.05rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.type-card:hover { border-color: rgba(0,0,0,0.28); transform: translateY(-2px); }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card .tnum { font-size: 13px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.type-card .tc-title { display: block; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; margin: 1.4rem 0 0.35rem; }
.type-card .tc-desc { display: block; font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 0; }
.type-card .tick {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.type-card .tick svg { width: 11px; height: 11px; color: #fff; opacity: 0; transform: scale(0.6); transition: opacity 0.25s ease, transform 0.25s ease; }
.type-card.selected { border-color: var(--ink); background: #fafafa; }
.type-card.selected .tick { background: var(--ink); border-color: var(--ink); }
.type-card.selected .tick svg { opacity: 1; transform: scale(1); }

/* ---------- timeline pills ---------- */
.pill-set { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  position: relative; font-family: inherit; font-size: 14px; letter-spacing: 0.01em;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.6rem 1.2rem; cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:hover { color: var(--ink); border-color: rgba(0,0,0,0.25); }
.pill.selected { color: #fff; background: var(--ink); border-color: var(--ink); }

/* ---------- reference links ---------- */
.ref-list { display: flex; flex-direction: column; gap: 1.1rem; }
.ref-row { display: flex; align-items: center; gap: 0.75rem; }
.ref-row input { flex: 1 1 auto; }
.ref-remove {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  cursor: pointer; display: grid; place-items: center;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.ref-row:only-child .ref-remove { visibility: hidden; }
.ref-remove:hover { color: var(--ink); border-color: rgba(0,0,0,0.25); background: #fafafa; }
.ref-remove svg { width: 12px; height: 12px; }
.add-ref {
  align-self: flex-start; margin-top: 1.25rem;
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: transparent; border: 0; cursor: pointer; font-family: inherit;
  font-size: 14px; color: var(--ink); padding: 0;
}
.add-ref .plus { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color 0.25s ease, background 0.25s ease; }
.add-ref:hover .plus { border-color: var(--ink); background: var(--ink); color: #fff; }
.add-ref .plus svg { width: 12px; height: 12px; }

/* ---------- file dropzone ---------- */
/* The .dropzone is a <label> wrapping a hidden <input type="file">, so a tap
   already opens the native file/photo picker — no JS shim needed. These rules
   only make it an obvious, comfortably-sized tap target. */
.dropzone {
  position: relative; display: block; width: 100%;
  min-height: 44px; box-sizing: border-box;
  border: 1px dashed rgba(0,0,0,0.22); border-radius: 18px;
  padding: clamp(1.75rem, 3.5vw, 2.75rem); text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: rgba(0,0,0,0.06);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--ink); background: #fafafa; }
.dropzone input[type="file"] { display: none; }
/* Touch devices have no drag-and-drop: lead with the tap affordance.
   The "or browse" tail is hidden via .dz-drag-hint so the label reads
   "Tap to add files". Desktop (hover+fine pointer) keeps the drag copy. */
.dz-touch-hint { display: none; }
@media (hover: none), (pointer: coarse) {
  .dz-drag-hint { display: none; }
  .dz-touch-hint { display: inline; }
}
.dz-icon { width: 46px; height: 46px; margin: 0 auto 1rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.dz-icon svg { width: 19px; height: 19px; }
.dz-title { display: block; font-size: 16px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.dz-title u { text-underline-offset: 3px; }
.dz-hint { display: block; font-size: 13px; color: var(--muted); margin: 0.4rem 0 0; }
.file-list { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.file-item { display: flex; align-items: center; gap: 0.85rem; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.85rem; text-align: left; }
.file-item .fi-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; color: var(--muted); }
.file-item .fi-ico svg { width: 14px; height: 14px; }
.file-item .fi-meta { flex: 1 1 auto; min-width: 0; }
.file-item .fi-name { font-size: 14px; color: var(--ink); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .fi-size { font-size: 12px; color: var(--muted-2); margin: 0.15rem 0 0; }
.file-item .fi-del { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted-2); cursor: pointer; display: grid; place-items: center; transition: color 0.2s ease, background 0.2s ease; }
.file-item .fi-del:hover { color: var(--ink); background: var(--soft); }
.file-item .fi-del svg { width: 11px; height: 11px; }

/* ---------- submit row ---------- */
.form-foot {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  padding-top: 1.75rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.form-foot .note { font-size: 13px; color: var(--muted); margin: 0; max-width: 32ch; line-height: 1.5; }
.submit-btn {
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  padding: 1rem 1.9rem; border-radius: 999px; border: 0; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 0.75rem;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, background 0.3s ease;
}
.submit-btn:hover { transform: translateY(-2px); background: #1c1c1f; box-shadow: 0 16px 38px rgba(0,0,0,0.26); }
.submit-btn .arr { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.14); display: grid; place-items: center; transition: transform 0.35s var(--ease); }
.submit-btn .arr svg { width: 13px; height: 13px; }
.submit-btn:hover .arr { transform: translateX(3px); }

/* ---------- success state ---------- */
.form-success { display: none; text-align: center; padding: clamp(1.5rem, 4vw, 3rem) 0; }
.form-success.show { display: block; }
.success-mark { width: 64px; height: 64px; margin: 0 auto 2rem; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.success-mark svg { width: 26px; height: 26px; }
.form-success h2 { font-weight: 300; letter-spacing: -0.025em; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; margin: 0; }
.form-success p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 1.25rem auto 0; max-width: 42ch; }
.form-success .recap { margin-top: 2.5rem; text-align: left; border-top: 1px solid var(--line); max-width: 480px; margin-left: auto; margin-right: auto; }
.recap-row { display: flex; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.recap-row .rk { flex: 0 0 32%; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.recap-row .rv { flex: 1 1 auto; font-size: 15px; color: var(--ink); }

/* ---------- error state (mirrors the success slot: same toggle, mark sizing,
   tokens and clamp() scale). Rendered as a SIBLING of #form-success by the JS so
   the filled form + file chip stay visible; nothing typed is lost. ---------- */
.form-error { display: none; text-align: center; padding: clamp(1.5rem, 4vw, 3rem) 0; }
.form-error.show { display: block; }
.error-mark { width: 64px; height: 64px; margin: 0 auto 2rem; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.error-mark svg { width: 26px; height: 26px; }
.form-error h2 { font-weight: 300; letter-spacing: -0.025em; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; margin: 0; }
.form-error p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 1.25rem auto 0; max-width: 42ch; }
.error-actions { margin: 2rem 0 0; display: flex; align-items: center; justify-content: center; gap: 1rem 1.25rem; flex-wrap: wrap; }
.error-retry {
  background: var(--ink); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s ease;
}
.error-retry:hover { transform: translateY(-2px); background: #1c1c1f; }
.error-or { font-size: 14px; color: var(--muted); }
.error-or a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: border-color 0.25s ease; }
.error-or a:hover { border-bottom-color: var(--ink); }

/* inline dropzone rejection (oversize / disallowed type) — small, AT-announced */
.dz-error { margin: 0.85rem 0 0; font-size: 13px; line-height: 1.5; color: #c0392b; }

/* ---------- reveals ---------- */
.sp-reveal { opacity: 0; transform: translateY(24px); }
.sp-reveal.in { opacity: 1; transform: translateY(0); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .sp-reveal { opacity: 1 !important; transform: none !important; }
  .intro-title .accent { animation: none; background-position: 50% 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .request-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .intro-side { position: static; }
  .aside-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
  .aside-steps li:nth-last-child(2) { border-bottom: 1px solid rgba(255,255,255,0.13); }
}
@media (max-width: 640px) {
  .row-2 { grid-template-columns: 1fr; gap: 1.6rem; }
  .type-grid { grid-template-columns: 1fr; }
  .aside-steps { grid-template-columns: 1fr; }
  .aside-steps li:nth-last-child(2) { border-bottom: 0; }
  .form-foot { flex-direction: column; align-items: stretch; }
  .submit-btn { justify-content: center; }
}
/* 320px audit (D-14): at the narrowest phones the form-sheet inner width is
   ~200px, so trim the request-layout/sheet gutters and keep every control and
   long string inside the frame. Surgical — extends the blocks above. */
@media (max-width: 400px) {
  .request-layout { padding: clamp(2rem, 5vw, 2.5rem) 1rem; }
  .form-sheet { padding: 1.25rem; }
  .intro-title { font-size: clamp(30px, 9vw, 40px); max-width: none; }
  .type-card { padding: 1rem 1rem 0.9rem; }
  .pill { padding: 0.6rem 1rem; }            /* keeps ~44px tap height, wraps */
  .ref-row { gap: 0.5rem; }
  .add-ref .plus, .ref-remove { min-width: 34px; min-height: 34px; }
  .field input, .field textarea { font-size: 16px; }  /* 16px avoids iOS zoom */
  .form-foot .note { max-width: none; }
}
