/* seller-prequal-mhe · MHE canonical brand (v1.0)
 *
 * Follows /Users/megroberts/Desktop/Meg - Drop/Matthew Hoult Estates/
 *   next-phase-design-system/css/design-tokens.css (imported).
 *
 * Pattern for this page = "Private intake card":
 *   Paper ground · Sand card · mono index header · bottom-rule fields ·
 *   square corners · terracotta CTA · mono system voice.
 */

@import url("/assets/design-tokens.css");

/* ─── Fonts (self-hosted, license present in Desktop drop) ─── */
@font-face {
  font-family: "Maison Neue";
  src: url("/assets/fonts/MaisonNeue-Light.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Maison Neue";
  src: url("/assets/fonts/MaisonNeue-Book.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Maison Neue";
  src: url("/assets/fonts/MaisonNeue-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Maison Neue Mono";
  src: url("/assets/fonts/MaisonNeueMono.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ─── Base ─── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--mhe-paper);
  color: var(--mhe-ink);
  font-family: var(--mhe-font-sans);
  font-weight: var(--mhe-w-book);
  font-size: var(--mhe-fs-body);
  line-height: var(--mhe-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding: var(--mhe-s6) var(--mhe-margin-mobile) var(--mhe-s9);
}

@media (min-width: 900px) {
  body { padding: var(--mhe-s8) var(--mhe-margin-desktop) var(--mhe-s10); }
}

/* ─── Layout shell ─── */
.container {
  max-width: 720px;
  margin: 0 auto;
}

.header {
  margin-bottom: var(--mhe-s7);
}

.brand {
  font-family: var(--mhe-font-sans);
  font-weight: var(--mhe-w-book);
  font-size: var(--mhe-fs-body);
  color: var(--mhe-ink);
  letter-spacing: 0;
  margin: 0 0 var(--mhe-s1) 0;
}

.tagline {
  font-family: var(--mhe-font-mono);
  font-size: var(--mhe-fs-mono-label);
  color: var(--mhe-taupe);
  text-transform: uppercase;
  letter-spacing: var(--mhe-track-caps);
  margin: 0;
}

/* ─── Type ─── */
h1 {
  font-family: var(--mhe-font-sans);
  font-weight: var(--mhe-w-light);
  font-size: var(--mhe-fs-h2);
  line-height: var(--mhe-lh-heading);
  letter-spacing: var(--mhe-track-display);
  margin: var(--mhe-s5) 0 var(--mhe-s4);
  color: var(--mhe-ink);
  max-width: 22ch;
}

h2 {
  font-family: var(--mhe-font-sans);
  font-weight: var(--mhe-w-light);
  font-size: var(--mhe-fs-h3);
  line-height: var(--mhe-lh-heading);
  letter-spacing: -0.01em;
  margin: 0 0 var(--mhe-s3);
  color: var(--mhe-ink);
}

.section-intro {
  font-size: var(--mhe-fs-body);
  color: var(--mhe-taupe);
  line-height: var(--mhe-lh-body);
  margin: 0 0 var(--mhe-s6);
  max-width: 46ch;
}

.step-meta {
  font-family: var(--mhe-font-mono);
  font-size: var(--mhe-fs-mono-label);
  color: var(--mhe-taupe);
  text-transform: uppercase;
  letter-spacing: var(--mhe-track-caps);
  margin: 0 0 var(--mhe-s3);
}

/* ─── Intake card (Sand plate on Paper ground) ─── */
.intake {
  background: var(--mhe-sand);
  border: var(--mhe-rule);
  padding: var(--mhe-s6) var(--mhe-s5);
  border-radius: var(--mhe-radius-0);
}

@media (min-width: 640px) {
  .intake { padding: var(--mhe-s8) var(--mhe-s7); }
}

.intake-index {
  font-family: var(--mhe-font-mono);
  font-size: var(--mhe-fs-mono-label);
  color: var(--mhe-taupe);
  text-transform: uppercase;
  letter-spacing: var(--mhe-track-caps);
  display: flex;
  justify-content: space-between;
  gap: var(--mhe-s4);
  border-bottom: var(--mhe-rule);
  padding-bottom: var(--mhe-s3);
  margin-bottom: var(--mhe-s6);
}

/* ─── Sections (progressive disclosure) ─── */
section.step { display: none; }
section.step.active {
  display: block;
  animation: fadeIn var(--mhe-dur-reveal) var(--mhe-ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Progress index bar ─── */
.progress {
  display: flex;
  gap: var(--mhe-s2);
  margin-bottom: var(--mhe-s6);
}

.progress-dot {
  height: 2px;
  flex: 1;
  background: var(--mhe-hairline);
  transition: background var(--mhe-dur-ui) var(--mhe-ease);
}

.progress-dot.done { background: var(--mhe-ink); }
.progress-dot.current { background: var(--mhe-accent); }

/* ─── Fields (bottom-rule, no boxes) ─── */
.field {
  margin-bottom: var(--mhe-s6);
}

.field label,
.field > label,
fieldset > legend {
  display: block;
  font-family: var(--mhe-font-mono);
  font-size: var(--mhe-fs-mono-label);
  font-weight: var(--mhe-w-book);
  color: var(--mhe-taupe);
  text-transform: uppercase;
  letter-spacing: var(--mhe-track-caps);
  margin-bottom: var(--mhe-s3);
  transition: color var(--mhe-dur-ui) var(--mhe-ease);
}

.field:focus-within label { color: var(--mhe-accent-text); }

.field .hint {
  display: block;
  font-size: var(--mhe-fs-caption);
  color: var(--mhe-mute);
  margin-top: var(--mhe-s2);
  line-height: var(--mhe-lh-body);
}

.field .optional-tag {
  font-family: var(--mhe-font-mono);
  font-size: var(--mhe-fs-mono-label);
  color: var(--mhe-faint);
  text-transform: uppercase;
  letter-spacing: var(--mhe-track-caps);
  margin-left: var(--mhe-s2);
}

input[type=text],
input[type=email],
input[type=tel],
input[type=number],
input[type=date],
select,
textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--mhe-hairline);
  border-radius: 0;
  padding: var(--mhe-s3) 0;
  color: var(--mhe-ink);
  font-family: var(--mhe-font-sans);
  font-weight: var(--mhe-w-book);
  font-size: var(--mhe-fs-body);
  line-height: var(--mhe-lh-body);
  min-height: 44px;
  transition: border-color var(--mhe-dur-ui) var(--mhe-ease);
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--mhe-ink);
  padding-bottom: calc(var(--mhe-s3) - 1px);
}

input::placeholder,
textarea::placeholder {
  color: var(--mhe-faint);
  font-style: normal;
}

textarea {
  resize: vertical;
  min-height: 96px;
  padding-top: var(--mhe-s2);
}

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%235F564B' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: var(--mhe-s5);
}

/* ─── Choice rows (radio + checkbox as list items with square markers) ─── */
.choices {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: var(--mhe-rule);
}

.choice {
  display: flex;
  align-items: center;
  gap: var(--mhe-s3);
  padding: var(--mhe-s4) 0;
  cursor: pointer;
  border-bottom: var(--mhe-rule);
  transition: color var(--mhe-dur-ui) var(--mhe-ease);
  min-height: 44px;
}

.choice input[type=radio],
.choice input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--mhe-taupe);
  border-radius: 0;
  background: transparent;
  margin: 0;
  flex: none;
  cursor: pointer;
  position: relative;
  transition: border-color var(--mhe-dur-ui) var(--mhe-ease);
}

.choice input[type=radio] { border-radius: 50%; }

.choice input:checked {
  border-color: var(--mhe-accent);
  background: var(--mhe-accent);
}

.choice input[type=radio]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--mhe-on-accent);
  border-radius: 50%;
}

.choice input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  inset: 2px 4px;
  border-right: 2px solid var(--mhe-on-accent);
  border-bottom: 2px solid var(--mhe-on-accent);
  transform: rotate(45deg) translate(-1px, -1px);
  transform-origin: center;
}

.choice .choice-body {
  font-family: var(--mhe-font-sans);
  font-weight: var(--mhe-w-book);
  font-size: var(--mhe-fs-body);
  color: var(--mhe-ink);
  line-height: var(--mhe-lh-body);
}

.choice:hover { color: var(--mhe-accent-text); }
.choice:has(input:checked) { color: var(--mhe-accent-text); }

/* ─── Actions row ─── */
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--mhe-s4);
  margin-top: var(--mhe-s8);
  padding-top: var(--mhe-s5);
  border-top: var(--mhe-rule);
}

button {
  font-family: var(--mhe-font-sans);
  font-weight: var(--mhe-w-book);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--mhe-dur-ui) var(--mhe-ease),
              color var(--mhe-dur-ui) var(--mhe-ease),
              border-color var(--mhe-dur-ui) var(--mhe-ease),
              transform var(--mhe-dur-tap) var(--mhe-ease);
}

button:focus-visible {
  outline: var(--mhe-focus-ring);
  outline-offset: 2px;
}

button.primary {
  background: var(--mhe-accent);
  color: var(--mhe-on-accent);
  border-color: var(--mhe-accent);
}

button.primary:hover { background: var(--mhe-accent-text); border-color: var(--mhe-accent-text); }
button.primary:active { transform: translateY(1px); }

button.primary:disabled {
  background: var(--mhe-taupe);
  border-color: var(--mhe-taupe);
  color: var(--mhe-on-accent);
  opacity: 0.4;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  color: var(--mhe-ink);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

button.secondary:hover { color: var(--mhe-accent-text); }
button.secondary:focus-visible { outline-offset: 4px; }

/* ─── Privacy note (mono, quiet, monoline) ─── */
.privacy-note {
  font-family: var(--mhe-font-mono);
  font-size: var(--mhe-fs-legal);
  color: var(--mhe-taupe);
  line-height: var(--mhe-lh-mono);
  margin: var(--mhe-s7) 0 0;
  padding-top: var(--mhe-s4);
  border-top: var(--mhe-rule);
  letter-spacing: 0.02em;
}

/* ─── Success / promoted pages ─── */
.centered-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.centered-page .card {
  max-width: 560px;
  padding: var(--mhe-s9) var(--mhe-s6);
}

.icon-badge {
  font-family: var(--mhe-font-mono);
  font-size: var(--mhe-fs-mono-label);
  color: var(--mhe-positive);
  text-transform: uppercase;
  letter-spacing: var(--mhe-track-caps);
  margin-bottom: var(--mhe-s5);
  display: inline-block;
}

/* ─── Responsive ─── */
@media (max-width: 520px) {
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions button { width: 100%; }
  h1 { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  section.step.active { animation: none; }
}
