/* AGMB new-client intake. Brand tokens from the firm's own site build. */

:root {
  --paper: #f4f0e7;
  --paper-2: #faf7f0;
  --mist: #ece6d8;
  --ink: #1c2530;
  --ink-soft: #4b5460;
  --blue: #1e479b;
  --blue-deep: #163a7d;
  --gold: #c09854;
  --maroon: #790000;
  --line: rgba(28,37,48,.12);
  --line-strong: rgba(28,37,48,.22);
  --radius: 3px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --measure: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Header */

.top {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 28px 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.crest { width: 44px; height: 44px; flex: none; }
.firm {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
}
.eyebrow {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}

/* Page */

main { max-width: var(--measure); margin: 0 auto; padding: 28px 0 40px; }

h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.lead { margin: 0 0 24px; font-size: 18px; max-width: 34em; }

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
}

/* Fields */

.field { margin: 0 0 18px; }

label, legend {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.help { margin: -2px 0 8px; font-size: 14px; color: var(--ink-soft); }
.count { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); text-align: right; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 12px;
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color .15s;
}
/* iOS draws an empty date box with no height of its own; appearance:none lets the min-height hold. */
input[type="date"] { max-width: 260px; -webkit-appearance: none; appearance: none; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
/* Phone: a narrow country select whose closed face shows the flag and code, the full country names inside. */
.phone { display: flex; gap: 8px; }
.cc-wrap { position: relative; display: flex; flex: 0 0 112px; margin: 0; }
.phone .cc { color: transparent; }
.phone .cc option { color: var(--ink); }
.cc-face { position: absolute; left: 13px; top: 0; line-height: 48px; font-size: 17px; color: var(--ink); pointer-events: none; }
.phone .cc:disabled + .cc-face { opacity: .5; }
.phone input { flex: 1; min-width: 0; }
textarea { min-height: 120px; resize: vertical; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231c2530' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.error {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--maroon);
}
.noscript {
  margin: 0 0 20px; padding: 12px 14px; font-weight: 500;
  color: var(--maroon); border: 1px solid var(--maroon); border-radius: var(--radius);
}
.form-error { margin: 0 0 14px; }
[aria-invalid="true"] { border-color: var(--maroon); box-shadow: inset 0 0 0 1px var(--maroon); }

/* Rows: one column on a phone, side by side from 560px */

.row { display: grid; grid-template-columns: 1fr; column-gap: 16px; }
.row-city { grid-template-columns: 1fr 1fr; }
.row-city .field-city { grid-column: 1 / -1; }

@media (min-width: 560px) {
  .card { padding: 30px 32px; }
  .row { grid-template-columns: 1fr 1fr; }
  .row-city { grid-template-columns: 2fr 1fr 1fr; }
  .row-city .field-city { grid-column: auto; }
}

/* Me or a company */

.choice { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 10px; }
.radio { position: relative; flex: 1 1 200px; }
.radio input {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0;
  accent-color: var(--blue);
}
.radio label {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px 10px 44px;
  font-weight: 400;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.radio input:checked + label { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

/* Address, and the optional questions */

.address, .more, .checks { border: 0; margin: 0 0 6px; padding: 0; min-width: 0; }
.abroad, .checks { margin-bottom: 18px; }

/* Someone else handles my paperwork */

.paperwork {
  margin: 4px 0 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.paperwork summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.paperwork summary::-webkit-details-marker { display: none; }
.paperwork summary::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
  transition: transform .15s;
}
.paperwork[open] summary::before { transform: rotate(45deg); }
.details-body { padding: 8px 14px 0; border-top: 1px solid var(--line); }

/* Honeypot: off screen, still in the DOM, never display:none. input.hp outranks the generic input rule above. */

input.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; min-height: 0; padding: 0; border: 0;
  overflow: hidden; opacity: 0; pointer-events: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .15s;
}
.btn:hover { background: var(--blue-deep); }
.btn:disabled { opacity: .72; cursor: default; }
@media (min-width: 560px) { .btn { width: auto; min-width: 220px; } }

.fine { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }

/* Sending, done, failed */

#sending { margin-top: 12px; padding: 14px 18px; }
#sending p { margin: 0; }

.state h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
}
.state p { margin: 0 0 14px; }
.state .btn { margin-top: 4px; }
.ref { font-size: 15px; }
.ref code {
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 14px;
  background: var(--mist);
  border-radius: var(--radius);
}

/* Uploads (shown only when the server says uploads are on) */

#uploads { margin-top: 8px; }
#uploads h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.25;
}
.drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  margin: 0;
  padding: 16px;
  font-weight: 500;
  text-align: center;
  background: #fff;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.over { border-color: var(--blue); background: var(--paper); }
.drop:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

#uploads .help { margin: 0 0 10px; }
#uploads .file-list + h3 { margin-top: 28px; }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; font-size: 15px; }
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
/* A long status ("One photo ID is enough…") wraps beside the name instead of squeezing it to one letter a line. */
.file-list .name { flex: 1 1 40%; min-width: 0; overflow-wrap: anywhere; }
.file-list .status { flex: 0 1 auto; max-width: 60%; font-weight: 500; text-align: right; }
.file-list .bad { color: var(--maroon); }

/* Footer */

.foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 18px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* The two-step labels and the second step's buttons. */
.step { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: center; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--paper); }
#file-list:empty { display: none; }
