/* ==========================================================
   Durable Human Coaching — brand styles
   Palette + type per DHG Brand Guide (Color Palette / Typography)
   ========================================================== */

:root {
  /* Brand palette */
  --black: #202020;
  --taupe: #6A615B;
  --cream: #EDE8E4;
  --sand: #DACEC1;
  --white: #FAF9F7;
  --red: #9E0508;
  --red-hover: #85040A;
  --bg: var(--white);       /* page background */
  --surface: var(--cream);  /* cards / callouts that sit on the background */

  /* Type */
  --font-display: "Anton", "Impact", sans-serif;
  --font-heading: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

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

/* ---------- Header ---------- */
.site-header {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
}

.logo img {
  width: auto;
  height: 96px;
}

@media (max-width: 480px) {
  .logo img { height: 76px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 36px;
  border: 0;
  border-radius: var(--radius);
  background: var(--red);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover { background: var(--red-hover); }
.btn:active { transform: translateY(1px); }

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn[disabled]:hover { background: var(--red); }

.btn .arrow { transition: transform 0.2s ease; }
.btn:not([disabled]):hover .arrow { transform: translateX(4px); }

/* ---------- Page 1: Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
}

/* Background media slot — drop an <img> or <video> in .hero-media later */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Line-drawing figure behind the hero copy (15% opacity) */
.hero-figure {
  position: absolute;
  z-index: 0;
  top: -3%;
  left: 23%;
  height: 125%;
  width: auto;
  max-width: none;
  opacity: 0.15;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 640px) {
  .hero-figure {
    top: 8vw;
    left: -9%;
    width: 165%;
    height: auto;
  }
}

.hero > *:not(.hero-media):not(.hero-figure) { position: relative; z-index: 1; }

.hero .site-header { padding-bottom: 0; }

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 21px var(--gutter) 80px;
}

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 400; /* Anton ships a single heavy weight */
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--black);
}

.hero .subhead {
  margin: 28px 0 40px;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--taupe);
}

.hero .btn { align-self: flex-start; white-space: nowrap; }

@media (max-width: 480px) {
  .hero .btn { align-self: stretch; padding: 0 20px; }
}

.hero-note {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: var(--taupe);
}

/* ---------- Page 2: Quiz ---------- */
.quiz-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px var(--gutter) 40px;
}

main:has(.quiz-wrap) {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 24px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--taupe);
  cursor: pointer;
}
.back-btn:hover { color: var(--black); }
.back-btn[hidden] { display: inline-flex; visibility: hidden; }

.step-count {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe);
}

.question {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.question legend,
.question .q-label {
  display: block;
  padding: 0;
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  line-height: 1.25;
  color: var(--black);
}

.q-hint {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--taupe);
}
.q-hint:empty { margin-bottom: 18px; }

.options {
  display: grid;
  gap: 12px;
}

.option { position: relative; }

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option label {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 14px 18px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: transparent;
  font-size: 1.0625rem;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.option label:hover { background: rgba(218, 206, 193, 0.45); }

.option .letter {
  flex: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 1.9em;
}

.option input:checked + label { background: var(--sand); }

.option input:focus-visible + label {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.option input:disabled + label {
  opacity: 0.4;
  cursor: not-allowed;
}
.option input:disabled + label:hover { background: transparent; }

/* Text inputs share the option-box look */
.text-input {
  width: 100%;
  min-height: 60px;
  padding: 14px 18px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--black);
  transition: background-color 0.15s ease;
}
.text-input::placeholder { color: var(--taupe); opacity: 0.8; }
.text-input:focus { outline: none; background: var(--surface); }
.text-input:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.text-input[aria-invalid="true"] { border-color: var(--red); }

.field-error {
  min-height: 1.5em;
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--red);
}

.submit-error { text-align: center; margin-top: 12px; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* SMS consent */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--taupe);
}
.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--red);
  cursor: pointer;
}
.consent label { cursor: pointer; }
.consent a { color: var(--black); }

.quiz-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.quiz-actions .btn { min-width: 220px; }

.progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}
.progress-track {
  flex: 1;
  height: 12px;
  border: 2px solid var(--black);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--red);
  transition: width 0.35s ease;
}
.progress-pct {
  min-width: 3.2em;
  text-align: right;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* Step transition */
.step-enter { animation: stepIn 0.3s ease both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Page 3: Thank you ---------- */
.thanks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
  align-items: start;
  grid-template-areas:
    "head"
    "calendar"
    "steps";
}

.thanks-head { grid-area: head; }
.thanks .calendar-card { grid-area: calendar; }
.thanks .next-steps { grid-area: steps; }

.thanks h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  line-height: 0.98;
  text-transform: uppercase;
}

.thanks .lead {
  margin: 20px 0 0;
  font-size: 1.15rem;
  color: var(--taupe);
}

.next-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.next-steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}
.next-steps .num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}
.next-steps h2 {
  margin: 0 0 2px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}
.next-steps p {
  margin: 0;
  font-size: 0.975rem;
  color: var(--taupe);
}

.calendar-card {
  width: 100%;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.calendar-card iframe {
  display: block;
  width: 100%;
  min-height: 640px; /* form_embed.js resizes it to fit */
  border: 0;
}
@media (min-width: 900px) {
  .thanks {
    grid-template-columns: 5fr 7fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "head     calendar"
      "steps    calendar";
    column-gap: 64px;
    row-gap: 32px;
    padding-top: 48px;
  }
}

/* ---------- Legal pages ---------- */
.legal {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--gutter) 80px;
}
.legal h1 {
  margin: 16px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
}
.legal .effective {
  margin: 0 0 40px;
  font-size: 0.95rem;
  color: var(--taupe);
}
.legal h2 {
  margin: 44px 0 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
}
.legal h3 {
  margin: 28px 0 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}
.legal p,
.legal li { color: #3a3633; }
.legal ul { padding-left: 1.25em; }
.legal li { margin-bottom: 6px; }
.legal .callout {
  margin: 20px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--red);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.legal .callout p { margin: 0; color: var(--black); }
.legal address { font-style: normal; }

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  border-top: 1px solid rgba(106, 97, 91, 0.25);
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  font-size: 0.875rem;
  color: var(--taupe);
}
.site-footer nav {
  display: flex;
  gap: 24px;
}
.site-footer a {
  text-decoration: none;
  color: var(--taupe);
}
.site-footer a:hover {
  color: var(--black);
  text-decoration: underline;
}

/* Hero footer sits on top of future background media */
.hero .site-footer { border-top-color: rgba(106, 97, 91, 0.2); }

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