:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #5b6662;
  --line: #d9e1dd;
  --surface: #f7faf8;
  --accent: #1c6b5a;
  --accent-dark: #13483d;
  --warm: #f0b35a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #eef7f3 0%, #fffaf1 100%);
}

.page-shell {
  min-height: 100vh;
  padding: 28px 20px 40px;
}

.brand-header {
  width: min(1120px, 100%);
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 225, 221, 0.9);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(31, 57, 49, 0.08);
}

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  background: white;
  border: 1px solid #e3e9e6;
}

.brand-mark img {
  display: block;
  max-width: 58px;
  max-height: 58px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 4px;
  flex: 1;
}

.firm-name {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1.15;
}

.authority-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.brand-link {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.brand-link:hover {
  text-decoration: underline;
}

.hero {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  padding: 20px 0;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4.6rem);
  line-height: 1.02;
  margin: 0 0 20px;
  letter-spacing: 0;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 620px;
}

.trust-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.5;
}

.lead-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(31, 57, 49, 0.12);
}

h2 {
  margin: 0 0 18px;
  font-size: 1.4rem;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
  color: #26312e;
  font-weight: 700;
  font-size: 0.94rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd7d2;
  border-radius: 6px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}

textarea {
  resize: vertical;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.consent {
  grid-template-columns: 18px 1fr;
  align-items: start;
  font-weight: 600;
  color: var(--muted);
}

.consent input {
  margin-top: 3px;
}

.disclaimer {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.trust-link-copy {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.trust-link-copy a {
  color: var(--accent-dark);
  font-weight: 750;
}

button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 14px 18px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

#form-result {
  min-height: 24px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.5;
}

#form-result.success {
  color: var(--accent-dark);
}

.lead-form.submitted {
  display: grid;
  align-content: center;
  min-height: 360px;
}

.confirmation p {
  color: var(--muted);
  line-height: 1.6;
}

#form-result h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.15rem;
}

#form-result p {
  margin: 0 0 10px;
}

.secondary-note {
  color: var(--muted);
  font-size: 0.9rem;
}

#form-result.error {
  color: #a33a22;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.constructoras-hero {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  gap: 42px;
  align-items: start;
}

.constructoras-copy {
  padding: 14px 0;
}

.constructoras-copy h1 {
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
}

.primary-whatsapp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin: 24px 0;
  padding: 14px 18px;
  border-radius: 6px;
  color: white;
  background: #18794e;
  box-shadow: 0 12px 30px rgba(24, 121, 78, 0.2);
  font-size: 1.05rem;
  font-weight: 850;
  text-decoration: none;
}

.primary-whatsapp-cta:hover {
  background: #105f3c;
}

.constructoras-trust-list {
  margin-top: 20px;
}

.urgency-note {
  margin: 24px 0 0;
  padding: 15px 16px;
  border-left: 4px solid var(--warm);
  color: #3e4643;
  background: #fffaf1;
  line-height: 1.55;
}

.testimonial-placeholder {
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px dashed #bcc8c3;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
}

.testimonial-placeholder p {
  margin: 0;
}

.optional-label {
  color: var(--muted);
  font-weight: 500;
}

#form-result .whatsapp-button {
  color: white;
}

#form-result a:not(.whatsapp-button) {
  color: var(--accent-dark);
  font-weight: 800;
}

.admin {
  background: #f6f8f7;
}

.admin main {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.admin.login main {
  width: min(420px, calc(100% - 32px));
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: center;
}

.admin-login,
.admin-warning,
.admin-error {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-login {
  padding: 28px;
  box-shadow: 0 18px 50px rgba(31, 57, 49, 0.1);
}

.admin-warning {
  margin-bottom: 18px;
  padding: 12px 14px;
  color: #6f3d00;
  background: #fff7df;
  border-color: #edd18b;
  font-weight: 750;
}

.admin-note {
  color: var(--muted);
  line-height: 1.6;
}

.admin code {
  background: #edf3f0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}

.admin-error {
  padding: 10px 12px;
  color: #a33a22;
  background: #fff1ec;
  border-color: #f0c7bb;
}

.admin-error-detail {
  margin-top: 6px;
}

.admin-error-detail summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 750;
}

.admin-error-detail pre {
  max-width: 360px;
  max-height: 220px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  color: #26312e;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--line);
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.9rem;
}

th {
  background: #edf3f0;
}

@media (max-width: 820px) {
  .page-shell {
    padding: 18px 14px 24px;
  }

  .brand-header {
    align-items: flex-start;
    gap: 13px;
    padding: 13px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
  }

  .brand-mark img {
    max-width: 44px;
    max-height: 44px;
  }

  .firm-name {
    font-size: 1.05rem;
  }

  .authority-line {
    font-size: 0.88rem;
  }

  .brand-link {
    margin-left: 71px;
  }

  .hero,
  .constructoras-hero,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .constructoras-hero {
    gap: 24px;
  }

  .constructoras-copy {
    padding-top: 4px;
  }

  .constructoras-copy h1 {
    font-size: 2.45rem;
    line-height: 1.05;
  }

  .constructoras-copy .lead {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .primary-whatsapp-cta {
    margin: 20px 0;
  }

  .lead-form {
    padding: 20px;
  }
}
