/* ============ BRAND VARIABLES ============ */
:root {
  --navy: #204568;
  --navy-dark: #1a3957;
  --gold: #eeac55;
  --blush: #fff8eb;
  --blush-warm: #fde4ea;
  --coral: #e85c66;
  --coral-light: #ed7884;
  --white: #ffffff;
  --gray: #6b6b6b;
  --border-soft: #ffd1da;
  --radius: 1rem;
  --shadow-glow: 0 8px 32px hsla(356, 81%, 70%, 0.18);
  --shadow-soft: 0 4px 16px hsla(202, 33%, 24%, 0.08);
}

/* ============ RESET ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--blush);
  color: var(--navy);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('pattern-tile.jpg');
  background-size: 600px 300px;
  background-repeat: repeat;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.page-wrap,
.card {
  position: relative;
  z-index: 1;
}

/* ============ LAYOUT ============ */
.page-wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 880px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

/* ============ HEADER BAND ============ */
.card-header {
  background: var(--navy);
  padding: 56px 32px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('pattern-tile.jpg');
  background-size: 600px 300px;
  background-repeat: repeat;
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.brand-lockup {
  display: inline-block;
  position: relative;
  z-index: 1;
}

.lockup-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -1px;
}

.lockup-pattern {
  color: var(--white);
}

.lockup-pal {
  color: var(--coral-light);
  font-style: italic;
}

.lockup-rule {
  height: 1px;
  background: var(--gold);
  width: 200px;
  margin: 16px auto 12px;
  opacity: 0.7;
}

.lockup-tagline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}

/* ============ CARD BODY ============ */
.card-body {
  padding: 56px 48px 48px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ============ TYPOGRAPHY ============ */
h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--navy);
  text-align: center;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--navy);
  text-align: center;
}

h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  margin: 36px 0 14px;
  color: var(--navy);
}

p {
  margin-bottom: 16px;
}

.subhead {
  font-size: 17px;
  line-height: 1.6;
  margin: 0 auto 24px;
  max-width: 640px;
  color: var(--navy);
  text-align: center;
}

.micro {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 32px;
  text-align: center;
}

.hero-cta-wrap {
  text-align: center;
  margin-top: 24px;
}

/* ============ SOCIAL PROOF ============ */
.social-proof {
  margin: 40px auto 24px;
  max-width: 520px;
  background: #fdf5e2;
  border: 1px solid #f4cf85;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.social-proof-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(232, 92, 102, 0.12);
  color: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-proof p {
  margin: 0;
  font-size: 15px;
  color: var(--navy);
  line-height: 1.4;
}

.social-proof strong {
  font-weight: 700;
}

/* ============ TESTIMONIAL ROTATOR ============ */
.testimonial-rotator {
  max-width: 620px;
  margin: 0 auto 16px;
  position: relative;
}

.testimonial {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: none;
  margin: 0;
}

.testimonial.t-active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-soft);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}

.t-dot:hover {
  background: var(--coral-light);
}

.t-dot-active {
  background: var(--coral);
  transform: scale(1.2);
}

.testimonial blockquote {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--navy);
  margin: 0 0 16px 0;
  padding: 0;
  border: none;
  font-weight: 400;
}

.testimonial figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.testimonial-role {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.instructions {
  font-size: 15px;
  color: var(--gray);
  margin: 0 auto 40px;
  max-width: 560px;
  font-style: italic;
  text-align: center;
}

/* ============ BUTTONS ============ */
.btn-primary {
  display: inline-block;
  background: var(--coral);
  color: var(--white);
  border: none;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 14px hsla(356, 81%, 65%, 0.35);
}

.btn-primary:hover {
  background: var(--coral-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px hsla(356, 81%, 65%, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.cta-btn {
  margin: 28px 0;
  font-size: 18px;
  padding: 18px 40px;
}

/* ============ FORM ============ */
fieldset {
  border: none;
  margin: 0 0 32px 0;
  padding: 28px;
  background: var(--blush);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  display: block;
}

legend {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  padding: 0;
  margin: 0 0 18px 0;
  color: var(--navy);
  line-height: 1.35;
  float: left;
  width: 100%;
}

fieldset > label {
  clear: both;
}

.qnum {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-right: 10px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

label {
  display: block;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  font-size: 14.5px;
  line-height: 1.5;
}

label:hover {
  border-color: var(--coral-light);
  background: #fffaf3;
}

label:has(input:checked) {
  border-color: var(--coral);
  background: #fff5f6;
  box-shadow: 0 2px 8px hsla(356, 81%, 70%, 0.15);
}

input[type="radio"],
input[type="checkbox"] {
  margin-right: 10px;
  accent-color: var(--coral);
}

/* ============ REPORT ============ */
.report-title {
  text-align: center;
  margin-bottom: 28px;
  font-size: 36px;
}

.grade-block {
  text-align: center;
  background: var(--blush);
  padding: 44px 24px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  border: 1px solid var(--border-soft);
}

.grade-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.grade-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 120px;
  font-weight: 500;
  color: var(--coral);
  line-height: 1;
  margin-bottom: 18px;
  font-style: italic;
}

.grade-headline {
  font-size: 17px;
  color: var(--navy);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 500;
  line-height: 1.55;
}

hr {
  border: none;
  height: 1px;
  background: var(--border-soft);
  margin: 36px 0;
}

.cost-display {
  font-size: 22px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.cost-money,
.cost-hours {
  color: var(--coral);
  font-weight: 700;
}

.cost-collections {
  font-size: 16px;
  color: var(--navy);
}

#doingWell {
  padding-left: 0;
  list-style: none;
}

#doingWell li {
  background: var(--blush);
  padding: 18px 22px;
  margin-bottom: 12px;
  border-radius: 12px;
  border-left: 4px solid var(--gold);
  font-size: 15px;
  line-height: 1.6;
}

#leaking > div {
  background: var(--blush);
  padding: 18px 22px;
  margin-bottom: 12px;
  border-radius: 12px;
  border-left: 4px solid var(--coral);
  font-size: 15px;
  line-height: 1.6;
}

#almost > div {
  background: var(--blush);
  padding: 18px 22px;
  margin-bottom: 12px;
  border-radius: 12px;
  border-left: 4px solid var(--navy);
  font-size: 15px;
  line-height: 1.6;
}

.seven-functions {
  padding-left: 24px;
}

.seven-functions li {
  margin-bottom: 14px;
  line-height: 1.6;
}

.kicker {
  font-size: 17px;
  font-weight: 500;
  background: var(--blush);
  padding: 22px;
  border-radius: var(--radius);
  border-left: 4px solid var(--navy);
  margin-top: 20px;
  line-height: 1.6;
}

.closing {
  font-style: italic;
  color: var(--gray);
  margin-top: 16px;
  text-align: center;
}

.signature {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  margin-top: 28px;
  line-height: 1.4;
  text-align: center;
  font-style: italic;
}

.signature::after {
  content: '';
}

/* ============ KIT FORM ============ */
.kit-block {
  background: var(--blush);
  padding: 36px 28px;
  border-radius: var(--radius);
  margin-top: 28px;
  text-align: center;
  border: 1px solid var(--border-soft);
}

.kit-block h3 {
  margin-top: 0;
  text-align: center;
}

.kit-block p {
  max-width: 520px;
  margin: 0 auto 20px;
}

.kit-fallback {
  max-width: 420px;
  margin: 0 auto;
}

.kit-fallback input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  background: var(--white);
}

.kit-fallback input:focus {
  outline: 2px solid var(--coral);
  outline-offset: -1px;
}

/* ============ CUSTOM AUDIT FORM ============ */
.audit-form-wrap {
  max-width: 460px;
  margin: 0 auto;
}

.audit-email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audit-form-field input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  background: var(--white);
  color: var(--navy);
  transition: border-color 0.15s ease;
}

.audit-form-field input:focus {
  border-color: var(--coral);
  outline: none;
}

.audit-form-error {
  color: var(--coral);
  font-size: 13px;
  min-height: 18px;
  text-align: left;
}

.audit-form-error:empty {
  display: none;
}

#auditSubmitBtn {
  margin-top: 4px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#auditSubmitBtn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

#auditSubmitBtn.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ SUCCESS STATE ============ */
.audit-success {
  text-align: center;
  padding: 32px 24px;
  background: var(--blush);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  max-width: 460px;
  margin: 0 auto;
}

.success-icon {
  color: var(--coral);
  margin-bottom: 12px;
  display: inline-flex;
}

.audit-success h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  margin: 0 0 10px;
  color: var(--navy);
}

.audit-success p {
  font-size: 15px;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.55;
}

.audit-success p:last-child {
  margin-bottom: 0;
}

.success-spam-hint {
  font-size: 13px !important;
  color: var(--gray) !important;
  font-style: italic;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  margin-top: 14px !important;
}

/* ============ FOOTER ============ */
footer {
  text-align: center;
  padding: 32px 16px 16px;
  font-size: 12px;
  color: var(--gray);
  font-family: 'Montserrat', sans-serif;
}

footer .footer-mark {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 14px;
}

/* ============ MOBILE ============ */
@media (max-width: 720px) {
  .page-wrap {
    padding: 16px 12px;
  }

  .card {
    border-radius: 18px;
  }

  .card-header {
    padding: 40px 20px 36px;
  }

  .card-body {
    padding: 36px 22px 28px;
  }

  .lockup-wordmark {
    font-size: 42px;
  }

  .lockup-rule {
    width: 160px;
  }

  .lockup-tagline {
    font-size: 10px;
    letter-spacing: 2px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  h3 {
    font-size: 20px;
  }

  .subhead {
    font-size: 16px;
  }

  fieldset {
    padding: 20px;
  }

  legend {
    font-size: 17px;
  }

  label {
    font-size: 14px;
    padding: 12px 14px;
  }

  .grade-letter {
    font-size: 88px;
  }

  .cost-display {
    font-size: 18px;
  }

  .social-proof {
    padding: 14px 18px;
    gap: 12px;
  }

  .social-proof p {
    font-size: 14px;
  }

  .testimonial {
    padding: 22px 22px;
  }

  .testimonial blockquote {
    font-size: 15px;
  }
}
