/*
 * Hickory Chair · Trade Application form
 *
 * Layered on top of the trade.html landing page (showroom map + resources).
 * The page sets up brand tokens inline; this stylesheet supplies form-only
 * surfaces and a confirmation card so trade-signup.js can render outcomes.
 */

:root {
  --t-ink:#14110d;
  --t-ink-soft:#2c2620;
  --t-muted:#786d5f;
  --t-muted-soft:#a89e8d;
  --t-line:rgba(20,17,13,0.10);
  --t-line-soft:rgba(20,17,13,0.06);
  --t-paper:#fbf8f1;
  --t-canvas:#f1ece2;
  --t-soft:#ece6d9;
  --t-gold:#97774a;
  --t-gold-deep:#6f5634;
  --t-serif:"Cormorant Garamond","Garamond","Times New Roman",serif;
  --t-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;
}

.t-apply {
  margin: 36px 18px 24px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  background: white;
  border: 1px solid var(--t-line-soft);
  border-radius: 8px;
  padding: 28px 24px 24px;
  box-shadow: 0 12px 40px rgba(28, 22, 14, 0.04);
}

.t-apply .eyebrow {
  font-family: var(--t-sans);
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--t-gold-deep);
  font-weight: 600;
  margin: 0 0 8px;
}

.t-apply h2 {
  margin: 0 0 6px;
  font-family: var(--t-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--t-ink);
}

.t-apply .lead {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--t-muted);
}

.t-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}
@media (max-width: 560px) {
  .t-form { grid-template-columns: 1fr; }
}

.t-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.t-field--full { grid-column: 1 / -1; }

.t-field label {
  font-family: var(--t-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--t-muted);
}

.t-field input[type="text"],
.t-field input[type="email"],
.t-field input[type="tel"],
.t-field input[type="url"],
.t-field select,
.t-field textarea {
  font-family: var(--t-sans);
  font-size: 14px;
  color: var(--t-ink);
  background: var(--t-paper);
  border: 1px solid var(--t-line);
  border-radius: 4px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}
/* iOS focus-zoom prevention — see consult-modal.css for why this is 16px. */
@media (max-width: 720px) {
  .t-field input[type="text"],
  .t-field input[type="email"],
  .t-field input[type="tel"],
  .t-field input[type="url"],
  .t-field select,
  .t-field textarea {
    font-size: 16px;
    padding: 12px 14px;
    min-height: 44px;
  }
}
.t-field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}
.t-field input:focus,
.t-field select:focus,
.t-field textarea:focus {
  border-color: var(--t-gold);
  box-shadow: 0 0 0 3px rgba(151, 119, 74, 0.12);
}
.t-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--t-muted) 50%),
                    linear-gradient(135deg, var(--t-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.t-field .file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--t-muted);
}
.t-field .file-row input[type="file"] {
  display: none;
}
.t-field .file-row .file-btn {
  background: var(--t-canvas);
  border: 1px solid var(--t-line);
  color: var(--t-ink);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.t-field .file-row .file-name {
  font-style: italic;
  color: var(--t-muted-soft);
}

.t-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.t-submit {
  background: var(--t-ink);
  color: white;
  border: 0;
  padding: 14px 26px;
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}
.t-submit:hover { background: var(--t-gold-deep); }
.t-submit:active { transform: translateY(1px); }
.t-submit[disabled] {
  background: var(--t-muted-soft);
  cursor: wait;
}
.t-fineprint {
  font-size: 11px;
  color: var(--t-muted);
  letter-spacing: 0.04em;
  flex: 1 1 200px;
  line-height: 1.5;
}

.t-error {
  grid-column: 1 / -1;
  background: rgba(151, 60, 60, 0.08);
  border: 1px solid rgba(151, 60, 60, 0.25);
  color: #6e2a2a;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin: 4px 0 0;
}
.t-error[hidden] { display: none; }

/* Confirmation card */
.t-confirm {
  margin: 36px 18px 24px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  background: white;
  border: 1px solid var(--t-line-soft);
  border-left: 4px solid var(--t-gold);
  border-radius: 6px;
  padding: 32px 28px;
  box-shadow: 0 12px 40px rgba(28, 22, 14, 0.05);
}
.t-confirm[hidden] { display: none; }
.t-confirm .eyebrow {
  font-family: var(--t-sans);
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--t-gold-deep);
  font-weight: 600;
  margin: 0 0 10px;
}
.t-confirm h3 {
  margin: 0 0 14px;
  font-family: var(--t-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--t-ink);
}
.t-confirm .id-row {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--t-canvas);
  display: inline-block;
  padding: 6px 12px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  color: var(--t-ink-soft);
  margin: 0 0 16px;
}
.t-confirm p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--t-ink-soft);
}
.t-confirm .meta {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 16px;
  margin: 18px 0 22px;
  font-size: 13px;
  color: var(--t-muted);
}
.t-confirm .meta dt { font-weight: 600; color: var(--t-ink-soft); letter-spacing: 0.04em; text-transform: uppercase; font-size: 10px; align-self: center; }
.t-confirm .meta dd { margin: 0; color: var(--t-ink); }
.t-confirm .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.t-confirm .actions button {
  background: var(--t-paper);
  border: 1px solid var(--t-line);
  color: var(--t-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 3px;
  cursor: pointer;
}
.t-confirm .actions button.primary {
  background: var(--t-ink);
  color: white;
  border-color: var(--t-ink);
}

@media print {
  body { background: white !important; }
  .t-topbar, .t-hero, .t-section, .t-footer, .t-modal, .hc-tabbar { display: none !important; }
  .t-confirm { box-shadow: none; border-left-width: 6px; max-width: 100%; margin: 0; }
}
