/* StudioThree — Contact (New projects form, centered over the home background video).
   Loads after styles.css and reuses its tokens, .bg-video, .page-shell, .topbar and .reveal. */

:root {
  --danger: #ff9b9b;
}

/* ---------- Centered layout ---------- */
.contact-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 0 8px;
}

.contact-card {
  width: min(640px, 100%);
  padding: 40px 40px 30px;
  border: 1px solid var(--chip-border);
  border-radius: 28px;
  background: rgba(10, 10, 12, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.contact-card h1 {
  margin: 0 0 30px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-align: center;
}

/* ---------- Fields ---------- */
#leadForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > label,
.field > legend {
  padding: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field > legend {
  margin-bottom: 11px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--field-bg);
  padding: 13px 18px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field textarea {
  border-radius: 20px;
  min-height: 140px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field input:hover,
.field textarea:hover {
  border-color: #f4f1f540;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff17;
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-color: var(--danger);
}

/* ---------- Chips (services / source) ---------- */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.2;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chip:hover span {
  color: var(--text);
  border-color: #f4f1f54d;
}

.chip input:checked + span {
  color: var(--text);
  border-color: var(--accent);
  background: #b7a1e029;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chips.is-invalid > legend {
  color: var(--danger);
}

.chips.is-invalid .chip span {
  border-color: #ff9b9b66;
}

/* ---------- Submit ---------- */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
  border: none;
  border-radius: 999px;
  background: var(--text);
  color: #0b0b0b;
  padding: 9px 9px 9px 24px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.submit-btn:hover {
  opacity: 0.9;
}

.submit-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.submit-btn .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7deec;
}

.submit-btn .arrow svg {
  width: 15px;
  height: 15px;
}

.form-error {
  margin: -6px 0 0;
  min-height: 1.1em;
  font-size: 0.84rem;
  text-align: center;
  color: var(--danger);
}

.form-error:empty {
  display: none;
}

.form-fineprint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
  color: var(--muted-2);
}

/* ---------- Responsive ---------- */

/* Phones */
@media (max-width: 600px) {
  .contact-main { padding: 28px 0 4px; }

  .contact-card {
    padding: 28px 20px 24px;
    border-radius: 22px;
  }

  .contact-card h1 { margin-bottom: 24px; }

  .field-row { grid-template-columns: 1fr; gap: 20px; }

  .chip span { padding: 8px 14px; font-size: 0.85rem; }
}

/* Small phones */
@media (max-width: 380px) {
  .contact-card { padding: 24px 16px 20px; }
}
