/* The Aitkens Group - Buyer Intake. Brand: Warm Red #F04E37 (accent only), Sand #F6F0E9, near-black text, DM Sans. */
:root {
  --red: #F04E37;
  --red-dark: #B8321E;     /* darker red for small text, passes contrast on sand */
  --red-tint: #FDE7E2;
  --sand: #F6F0E9;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --body: #2B2B2B;
  --muted: #5A5550;
  --line: #CFC6BB;
  --radius: 14px;
  --font: 'DM Sans', Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sand); color: var(--body);
  font-family: var(--font); font-size: 20px; line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--red-dark); text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; max-width: 760px; width: 100%; margin: 0 auto;
}
.logo { height: 52px; width: auto; margin-left: auto; }
.back {
  font: 700 20px var(--font); color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 999px; padding: 10px 20px; min-height: 52px; cursor: pointer;
}
.back:hover { background: var(--ink); color: var(--white); }

/* Progress */
.progress { max-width: 760px; width: 100%; margin: 0 auto; padding: 0 16px; }
.progress-bar { height: 10px; background: #E6DDD2; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--red); width: 0; transition: width .3s ease; }
.progress-text { margin: 6px 0 0; font-size: 18px; color: var(--muted); font-weight: 500; }

/* Screens */
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; outline: none; }
.screen.enter { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen.enter { animation: none; } .progress-fill { transition: none; } }
h1 { color: var(--ink); font-size: 32px; line-height: 1.2; margin: 20px 0 10px; font-weight: 700; outline: none; letter-spacing: -0.01em; }
h2 { color: var(--ink); font-size: 24px; margin: 28px 0 10px; }
h3 { color: var(--ink); font-size: 20px; margin: 0; }
.lead { font-size: 21px; color: var(--body); margin: 0 0 18px; }
.hint { margin: -4px 0 10px; color: var(--muted); font-size: 18px; }
.muted { color: var(--muted); margin: 0; }

/* Welcome */
.hero { display: block; width: 100%; max-width: 420px; height: auto; max-height: 34vh; object-fit: contain; margin: 0 auto; background: var(--white); border-radius: 18px; }
.welcome h1 { font-size: 34px; }
.welcome-points { padding-left: 1.2em; margin: 0 0 24px; }
.welcome-points li { margin-bottom: 6px; }
.welcome-points li::marker { color: var(--red); }
.resume-note { background: var(--white); border-left: 6px solid var(--red); padding: 14px 16px; border-radius: 8px; font-weight: 500; }

/* Fields */
.field { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.field > label, legend, .counter-label { display: block; font-weight: 700; color: var(--ink); margin: 0 0 8px; font-size: 20px; padding: 0; }
.req { color: var(--red-dark); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: 400 22px var(--font); color: var(--ink); background: var(--white);
  border: 2px solid #8C847B; border-radius: 10px; padding: 14px 16px; min-height: 60px;
}
.field.short input { max-width: 260px; }
textarea { min-height: 130px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M4 7l6 6 6-6' fill='none' stroke='%231A1A1A' stroke-width='2.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 48px;
}
input::placeholder, textarea::placeholder { color: #8A8178; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--red); outline-offset: 2px; border-color: var(--ink); }

/* Tap tiles (choices and checkboxes) */
.tiles { display: grid; gap: 10px; }
.tiles.cols { grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles.cols { grid-template-columns: 1fr 1fr; } }
.tile, .check {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; min-height: 64px; cursor: pointer; font-size: 21px; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.tile input, .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile:hover, .check:hover { border-color: var(--ink); }
.tile.on, .check.on { border-color: var(--red); background: var(--red-tint); box-shadow: inset 0 0 0 1px var(--red); }
.tile:focus-within, .check:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.mark {
  flex: 0 0 auto; width: 28px; height: 28px; border: 2px solid #8C847B; border-radius: 50%; background: var(--white);
  display: grid; place-items: center;
}
.tile input[type=checkbox] ~ .mark, .check .mark { border-radius: 7px; }
.tile.on .mark, .check.on .mark { background: var(--red); border-color: var(--red); }
.tile.on .mark::after, .check.on .mark::after {
  content: ''; width: 8px; height: 14px; border: solid var(--white); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px);
}
.check { align-items: flex-start; margin-bottom: 14px; font-size: 19px; }
.check .mark { margin-top: 2px; }

/* 1-10 scale */
.tiles.scale { grid-template-columns: repeat(5, 1fr); }
@media (min-width: 640px) { .tiles.scale { grid-template-columns: repeat(10, 1fr); } }
.tiles.scale .tile { justify-content: center; padding: 10px 0; font-weight: 700; font-size: 22px; }
.tiles.scale .mark { display: none; }
.tiles.scale .tile.on { background: var(--red); color: var(--white); }
.scale-labels { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 17px; margin-top: 8px; }

/* Counters */
.counter-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px 10px 16px; margin-bottom: 12px; }
.counter-field .counter-label { margin: 0; }
.counter { display: flex; align-items: center; gap: 10px; }
.counter output { min-width: 52px; text-align: center; font-size: 24px; font-weight: 700; color: var(--ink); }
.round {
  width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white);
  font: 700 28px/1 var(--font); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.round:hover:not([disabled]) { background: var(--ink); color: var(--white); }
.round[disabled] { opacity: .3; cursor: default; }
.round:focus-visible, .btn:focus-visible, .back:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* Buttons */
.actions { margin-top: 26px; }
.btn {
  display: block; width: 100%; font: 700 22px var(--font); border-radius: 999px; padding: 18px 24px; min-height: 64px;
  cursor: pointer; border: 2px solid var(--ink); text-align: center;
}
.btn.primary { background: var(--ink); color: var(--white); }
.btn.primary:hover { background: #000; }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); margin-top: 12px; }
.btn.small { display: inline-block; width: auto; font-size: 18px; padding: 8px 18px; min-height: 48px; background: var(--white); color: var(--ink); }
.btn.small:hover { background: var(--ink); color: var(--white); }
@media (min-width: 640px) { .btn.primary, .btn.ghost { max-width: 420px; } }
.skip-note { color: var(--muted); font-size: 18px; margin: 12px 0 0; }

/* Errors */
.error:empty { display: none; }
.error { background: var(--white); border: 2px solid var(--red-dark); border-left-width: 8px; color: var(--ink); padding: 14px 16px; border-radius: 10px; font-weight: 500; margin-top: 10px; }

/* Review */
.review-card { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); }
.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.review dl { margin: 0; }
.review dl > div { padding: 8px 0; border-top: 1px solid #EEE7DE; }
.review dt { font-size: 17px; color: var(--muted); }
.review dd { margin: 2px 0 0; font-size: 20px; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* Consent */
.privacy { background: var(--white); border-radius: var(--radius); padding: 6px 18px; margin-bottom: 18px; border: 1px solid var(--line); }
.privacy p { font-size: 19px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Thanks */
.big-check { width: 84px; height: 84px; border-radius: 50%; background: var(--red); color: var(--white); font-size: 48px; display: grid; place-items: center; margin: 24px 0 0; }
.next-steps { padding-left: 1.3em; }
.next-steps li { margin-bottom: 12px; }
.next-steps li::marker { color: var(--red-dark); font-weight: 700; }
.sig { font-weight: 700; color: var(--ink); margin-top: 24px; }

/* Footer */
.footer { text-align: center; color: var(--muted); font-size: 17px; padding: 20px 16px 28px; border-top: 1px solid #E6DDD2; }
.footer p { margin: 4px 0; }

@media (max-width: 420px) {
  body { font-size: 19px; }
  h1 { font-size: 28px; }
  .welcome h1 { font-size: 29px; }
  .logo { height: 42px; }
  .back { padding: 8px 14px; font-size: 18px; }
  .counter { gap: 6px; }
  .counter output { min-width: 40px; }
  .counter-field { padding-left: 14px; padding-right: 10px; }
}
