/* ==========================================================
   MEA Truck Hire – Credit Account Application
   To rebrand: change the colours in :root below.
   ========================================================== */
:root {
  --header-bg: #ffffff;      /* header bar colour */
  --header-text: #1a1a1a;    /* text colour used on top of the header */
  --dark: #1a1a1a;           /* page background + buttons */
  --card: #ffffff;
  --text: #333333;
  --muted: #6b6b6b;
  --line: #d6d6d6;
  --accent: #e2231a;         /* red, matched to the MEA logo's chevron */
  --error: #c0392b;
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--dark);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

/* ---------- Header ---------- */
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--line); }
.site-header__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header img { display: block; height: 60px; width: auto; max-width: 60vw; }
.site-header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--header-text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-header__phone:hover, .site-header__phone:focus-visible { color: var(--accent); }
.site-header__phone svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Layout ---------- */
main { flex: 1; padding: 40px 16px 56px; }
.card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  padding: 44px 48px 52px;
}
h1 { margin: 0 0 20px; font-size: 2.2rem; line-height: 1.15; }
h2 { font-size: 1.1rem; margin: 32px 0 12px; }
p { margin: 0 0 16px; }
ul { padding-left: 22px; margin: 0 0 24px; }
li { margin-bottom: 6px; }
a { color: inherit; }
.center { text-align: center; }
.small { font-size: 0.9rem; color: var(--muted); }

.site-footer {
  text-align: center;
  padding: 18px;
  background: #f6f6f6;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  background: var(--dark);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 44px;
  border-radius: 6px;
  text-decoration: none;
}
.btn:hover, .btn:focus-visible { background: #000; }
.btn--ghost { background: transparent; color: var(--text); border: 2px solid var(--line); padding: 14px 32px; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: #f2f2f2; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- Progress bar ---------- */
.progress {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0 0 32px;
}
.progress li {
  flex: 1;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border-top: 4px solid var(--line);
  padding-top: 8px;
}
.progress li.is-done { border-top-color: var(--accent); }
.progress li.is-active { color: var(--text); border-top-color: var(--accent); }

/* ---------- Form ---------- */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.step[hidden] { display: none; }
.step > legend { font-size: 1.6rem; font-weight: 700; padding: 0; margin-bottom: 8px; }
.step > .hint { margin-bottom: 22px; color: var(--muted); }
.subhead { grid-column: 1 / -1; margin: 14px 0 -4px; font-size: 1.05rem; font-weight: 700; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 0.95rem; }
.req::after { content: " *"; color: var(--accent); }

input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
input[readonly] { background: #f4f4f4; color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--dark);
}
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--error); }

.check { flex-direction: row; align-items: flex-start; gap: 10px; }
.check input { width: auto; margin-top: 5px; flex: none; }
.check label { font-weight: 400; }

.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.form-nav .spacer { flex: 1; }

/* Honeypot field for spam bots – must stay off-screen, not display:none */
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  .card { padding: 28px 20px 36px; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.8rem; }
  .site-header img { height: 46px; }
  .progress li { font-size: 0; padding-top: 0; height: 4px; }
  .progress li.is-active { font-size: 0; }
  .btn { padding: 14px 28px; }
}
