/* =========================================================
   Casseli Legal — lead capture form
   Professional pass: Inter font, deeper palette, more polish
   ========================================================= */

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

:root {
  --primary: #0a2d5e;
  --primary-700: #0b3b7a;
  --primary-100: #eef3fb;
  --primary-50: #f6f9fe;
  --accent-red: #d52b1e;
  --accent-blue: #0038a8;
  --success: #0a8f3a;
  --warn: #c0392b;
  --text: #0b1220;
  --text-muted: #5b6775;
  --text-subtle: #6b7280;
  --border: #e3e7ee;
  --border-strong: #cfd6e0;
  --bg-alt: #f8fafc;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.03);
  --shadow-md: 0 4px 12px rgba(16,24,40,.06), 0 2px 4px rgba(16,24,40,.04);
  --shadow-lg: 0 10px 30px rgba(16,24,40,.08), 0 4px 10px rgba(16,24,40,.04);
}

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--text);
  font: 400 16px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Top stripe — subtle Paraguay flag accent */
body::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(to right,
    var(--accent-red) 0 33.3%,
    #ffffff 33.3% 66.6%,
    var(--accent-blue) 66.6% 100%);
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= Header ================= */
.site-header {
  padding: 20px 0 10px;
  display: flex;
  justify-content: center;
}

.site-header .wrap {
  display: flex;
  justify-content: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 76px;
  width: auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .brand-logo { height: 92px; }
}

/* ================= Main / Hero ================= */
.main { padding-bottom: 56px; }

.intro {
  padding: 4px 0 24px;
  text-align: center;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
  margin: 14px 0 12px;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--text);
}

h1 .accent {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-700) 50%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: 0 auto;
  max-width: 480px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.5;
}

/* --- Referral badge (Carol + Manu) --- */
.referral {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
}

.referral-avatars {
  display: flex;
  flex-shrink: 0;
}

.referral-avatars img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(16,24,40,.1);
}

.referral-avatars img:nth-child(2) {
  margin-left: -14px;
}

.referral-text {
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.referral-text strong { color: var(--text); font-weight: 600; }

/* --- Trust row --- */
.trust-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trust-item::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

.d-none-sm { display: none; }
@media (min-width: 480px) { .d-none-sm { display: inline; } }

/* ================= Pillars ================= */
.pillars {
  display: grid;
  gap: 14px;
  margin: 8px 0 28px;
}

@media (min-width: 720px) {
  .pillars { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.pillar {
  background: var(--primary-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}

.pillar-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--primary-700);
  border: 1px solid var(--border);
}

.pillar h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.pillar p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ================= Section heading ================= */
.section-title {
  text-align: center;
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.section-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--primary-700);
  margin-bottom: 6px;
}

/* ================= Progress bar ================= */
.progress {
  height: 6px;
  background: #eef0f4;
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 18px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-700) 100%);
  transition: width .35s cubic-bezier(.2,.8,.2,1);
  border-radius: 999px;
}

/* ================= Card ================= */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: var(--shadow-md);
}

/* ================= Steps ================= */
.step { animation: fadeIn .25s ease-out; }
.step.hidden { display: none; }

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

.step-title {
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.step-sub {
  margin: -10px 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ================= Options (large buttons) ================= */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.options--stack { grid-template-columns: 1fr; }

.opt {
  appearance: none;
  background: #fff;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  padding: 14px 14px;
  min-height: 58px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, transform .05s, box-shadow .15s;
}

.opt:hover { border-color: var(--primary-700); box-shadow: 0 0 0 3px rgba(10,45,94,.06); }
.opt:focus-visible { outline: 3px solid rgba(11,59,122,.3); outline-offset: 1px; }
.opt:active { transform: scale(.98); }
.opt.selected {
  border-color: var(--primary-700);
  background: var(--primary-100);
  box-shadow: 0 0 0 3px rgba(10,45,94,.12);
}

.options:has(> :nth-child(5)) > :nth-child(5) {
  grid-column: span 2;
}
.options--stack:has(> :nth-child(5)) > :nth-child(5) {
  grid-column: span 1;
}

.other-field {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.other-field.hidden { display: none; }
.other-field input { flex: 1; }

/* ================= Form fields ================= */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field input,
.field select,
.other-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field select:focus,
.other-field input:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(11,59,122,.18);
  border-color: var(--primary-700);
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--text-subtle);
  font-size: 13px;
}

.field-hint.ok { color: var(--success); font-weight: 600; }
.field-hint.err { color: var(--warn); font-weight: 600; }

.phone-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
}

.phone-row select {
  min-width: 0;
  padding-left: 10px;
  padding-right: 8px;
}

/* ================= Consent ================= */
.consent {
  display: flex;
  gap: 10px;
  padding: 14px 0 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.consent input[type=checkbox] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary-700);
}

.consent a { color: var(--primary-700); font-weight: 500; }

/* ================= Buttons ================= */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  min-height: 54px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  letter-spacing: -0.005em;
}

.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid rgba(11,59,122,.3); outline-offset: 2px; }

.btn-primary {
  background: var(--primary-700);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10,45,94,.3), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-primary:hover { background: var(--primary); }
.btn-primary:disabled {
  background: #9aa3b2;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: 10px 12px;
  min-height: auto;
  font-weight: 500;
}
.btn-ghost:hover { background: #f3f4f6; color: var(--text); }

.btn-wa {
  background: #25d366;
  color: #fff;
  box-shadow: 0 1px 2px rgba(37,211,102,.3);
}
.btn-wa:hover { background: #1fb956; }

.btn-block { width: 100%; margin-top: 10px; }

/* ================= Back row ================= */
.back-row {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.submit-status {
  margin: 10px 0 0;
  font-size: 14px;
  min-height: 1.2em;
}
.submit-status.err { color: var(--warn); }
.submit-status.loading { color: var(--text-muted); }

/* ================= Honeypot & sr-only ================= */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.hidden { display: none !important; }

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ================= Success screen ================= */
.success {
  text-align: left;
}

.success-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.success-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-right: 6px;
  vertical-align: middle;
}

.success h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-block;
}

.consult-block {
  margin: 20px 0 18px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f8fafc, var(--primary-100));
  border: 1px solid #dbe3f3;
}

.consult-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--primary-700);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.consult-block p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}

.consult-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 15px;
}

.consult-block li { margin: 6px 0; }
.consult-block li strong { color: var(--success); }

/* ================= FAQ ================= */
.faq {
  margin: 36px 0 24px;
}

.faq .section-title { margin-bottom: 14px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 48px 16px 16px;
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  position: relative;
  line-height: 1.4;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  transition: transform .2s, background .2s;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--primary-700);
  color: #fff;
}

.faq-item summary:hover { background: var(--primary-50); }

.faq-item .faq-body {
  padding: 0 16px 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.faq-item .faq-body p { margin: 0; }

/* ================= Error screen ================= */
.error-screen .row { margin-top: 12px; }
.error-screen h2 { margin: 0 0 8px; font-size: 20px; }

/* ================= Footer ================= */
.site-footer {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  gap: 18px;
  text-align: left;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr auto; align-items: center; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.footer-brand strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary-700);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover { text-decoration: underline; }

.footer-legal {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-subtle);
}

/* ================= Responsive ================= */
@media (min-width: 640px) {
  h1 { font-size: 38px; }
  .section-title { font-size: 26px; }
  .step-title { font-size: 23px; }
  .card { padding: 32px 28px; }
  .lead { font-size: 18px; }
}

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