/* Presentation layer for the compact Home variant. Loaded after the base system. */
.compact-home main { display: flex; flex-direction: column; }
.compact-home .hero { order: 1; min-height: min(780px, 92vh); }
.compact-home .intro-system { order: 2; }
.compact-home .brand-section { order: 3; }
.compact-home .compact-trust { order: 4; }
.compact-home .buy-section { order: 5; }

.compact-home .product-os,
.compact-home .proof-story,
.compact-home .home-technical-resources,
.compact-home .reviews,
.compact-home .guides,
.compact-home .faq { display: none; }

.compact-home .hero-copy { max-width: 680px; }
.compact-home .hero-copy h1 { max-width: 660px; }
.compact-home .hero-copy .lead { max-width: 570px; }
.compact-home .hero-actions { gap: 10px; }
.compact-home .hero-side { align-self: end; max-width: 390px; }

.compact-home .hero-product-card {
  grid-template-columns: 112px minmax(0, 1fr);
  width: min(100%, 410px);
}

.compact-home .hero-product-card img {
  width: 112px;
  height: 96px;
  padding: 10px;
  object-fit: contain;
  object-position: center;
  background: #f7f4ed;
}

.compact-home .intro-system {
  padding-top: clamp(72px, 7vw, 108px);
  padding-bottom: clamp(72px, 7vw, 108px);
}

.compact-home .intro-system > .section-kicker { margin-bottom: 14px; }
.compact-home .intro-system .section-title-row { margin-bottom: 38px; }
.compact-home .intro-system .section-title-row h2 {
  max-width: 650px;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
}

.compact-home .quote-stage[data-quote-step="1"] {
  grid-template-columns: minmax(300px, 0.32fr) minmax(0, 1fr);
}

.compact-home .quote-stage { min-height: 520px; }

.compact-home .quote-stage[data-quote-step="1"] .quote-prompt,
.compact-home .quote-details .quote-prompt {
  min-height: 0;
  padding: 38px 34px;
  background:
    linear-gradient(125deg, rgba(255, 252, 239, 0.98), rgba(255, 248, 216, 0.94)),
    url("assets/protexa-aplicando-azotea.webp") center / cover;
}

.compact-home .quote-stage[data-quote-step="1"] .quote-prompt > span {
  margin-bottom: 42px;
}

.compact-home .finder-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-home .option-card,
.compact-home .option-card:nth-child(even),
.compact-home .option-card:nth-last-child(-n + 2) {
  min-height: 126px;
  padding: 24px 54px 24px 24px;
  border-right: 1px solid rgba(34, 31, 28, 0.1);
  border-bottom: 1px solid rgba(34, 31, 28, 0.1);
}

.compact-home .option-card:nth-child(even) { border-right: 0; }
.compact-home .option-card:nth-last-child(-n + 2) { border-bottom: 0; }
.compact-home .option-card small { max-width: 290px; }

.compact-home .option-card:focus { outline: none; }
.compact-home .option-card:focus-visible {
  z-index: 1;
  box-shadow: inset 0 0 0 2px rgba(34, 31, 28, 0.72), inset 3px 0 0 var(--yellow);
}

.compact-home .quote-preview {
  grid-template-columns: 180px minmax(0, 1fr);
  grid-template-rows: 140px;
  min-height: 140px;
}

.compact-home .quote-preview img {
  height: 140px;
}

.compact-home .quote-preview div {
  min-height: 140px;
  padding: 20px 24px;
}

.compact-home .brand-section {
  position: relative;
  padding-top: clamp(72px, 7vw, 104px);
  padding-bottom: clamp(72px, 7vw, 104px);
  background-color: #eef0ed;
  background-image:
    linear-gradient(rgba(34, 31, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 31, 28, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.compact-home .brand-section::before {
  position: absolute;
  top: 0;
  right: max(24px, calc((100vw - 1400px) / 2));
  left: max(24px, calc((100vw - 1400px) / 2));
  height: 1px;
  content: "";
  background: rgba(34, 31, 28, 0.16);
}

.compact-brand-heading,
.compact-home .brand-story { position: relative; z-index: 1; }
.compact-brand-heading { margin-bottom: 38px; }
.compact-brand-heading h2 { max-width: 690px; }
.compact-home .brand-story { display: block; }
.compact-home .brand-chapters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.compact-home .brand-chapter,
.compact-home .brand-chapter + .brand-chapter {
  min-height: 0;
  padding: 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(34, 31, 28, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(34, 31, 28, 0.06), 0 20px 48px rgba(34, 31, 28, 0.08);
  opacity: 1;
  transition-property: transform, box-shadow;
  transition-duration: 260ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.compact-home .brand-chapter:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(34, 31, 28, 0.06), 0 28px 64px rgba(34, 31, 28, 0.12);
}

.compact-home .brand-mobile-visual {
  position: relative;
  display: block;
  width: 100%;
  height: 330px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 0;
  background: #fff8d8;
}

.compact-home .brand-mobile-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, rgba(255,255,255,.94), rgba(255,248,210,.66), rgba(248,192,0,.14));
}

.compact-home .brand-mobile-visual.diablo { border-top: 4px solid var(--diablo); }
.compact-home .brand-mobile-visual.greenmax { border-top: 4px solid var(--green); }
.compact-home .brand-mobile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 520ms cubic-bezier(0.2, 0, 0, 1);
}
.compact-home .brand-chapter:hover .brand-mobile-photo { transform: scale(1.025); }
.compact-home .brand-mobile-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 50%;
  max-height: 40%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.compact-home .brand-chapter > span,
.compact-home .brand-chapter > h2,
.compact-home .brand-chapter > p,
.compact-home .brand-chapter > .btn { margin-right: 34px; margin-left: 34px; }
.compact-home .brand-chapter > h2 { margin-bottom: 10px; font-size: clamp(2rem, 3vw, 3rem); }
.compact-home .brand-chapter > p { max-width: 540px; min-height: 48px; margin-bottom: 24px; }
.compact-home .brand-sticky { display: none; }

.compact-home .btn,
.compact-home .header-cta,
.compact-home .quote-next,
.compact-home .quote-controls button,
.compact-home .result-actions button {
  transition-property: transform, box-shadow, background-color, color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.compact-home .btn:hover,
.compact-home .header-cta:hover,
.compact-home .quote-next:hover,
.compact-home .quote-controls button:hover,
.compact-home .result-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(34, 31, 28, 0.16);
}

.compact-home .btn:active,
.compact-home .header-cta:active,
.compact-home .quote-next:active,
.compact-home .quote-controls button:active,
.compact-home .result-actions button:active {
  transform: scale(0.96);
}

.compact-trust {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  padding-top: clamp(72px, 7vw, 104px);
  padding-bottom: clamp(72px, 7vw, 104px);
  background: #fff;
}

.compact-trust-story,
.compact-tech-card { min-height: 440px; overflow: hidden; border-radius: 14px; }
.compact-trust-story {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 4vw, 56px);
  color: #fff;
  background: linear-gradient(120deg, rgba(19,18,16,.96), rgba(19,18,16,.72)), url("assets/fondo-industrial-protexa.webp") center / cover;
}

.compact-trust-story h2,
.compact-trust-story p { color: #fff; }
.compact-trust-story h2 { max-width: 560px; margin-top: auto; font-size: clamp(2rem, 3vw, 3.25rem); }
.compact-trust-story p { max-width: 560px; color: rgba(255,255,255,.68); }
.compact-trust-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
  border-top: 1px solid rgba(255,255,255,.18);
}

.compact-trust-metrics span {
  display: grid;
  gap: 5px;
  padding: 20px 16px 0 0;
  color: rgba(255,255,255,.58);
  font-size: 0.68rem;
}

.compact-trust-metrics strong {
  color: var(--yellow);
  font-family: Archivo, Manrope, sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.75rem);
}

.compact-tech-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  color: var(--black);
  background: #fff6bd;
}

.compact-tech-card img { width: 100%; height: 100%; object-fit: cover; }
.compact-tech-card > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 4vw, 52px);
}

.compact-tech-card span {
  margin-bottom: 16px;
  color: rgba(34,31,28,.52);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compact-tech-card h2 { font-size: clamp(1.8rem, 2.6vw, 2.75rem); }
.compact-tech-card p { color: rgba(34,31,28,.64); }
.compact-tech-card > div > strong {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: auto;
  font-size: 0.78rem;
}

.compact-tech-card svg { width: 16px; height: 16px; }
.compact-home .buy-section { min-height: 620px; }

@media (max-width: 960px) {
  .compact-home .brand-chapters,
  .compact-trust { grid-template-columns: 1fr; }
  .compact-home .quote-stage[data-quote-step="1"] {
    grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr);
  }
  .compact-home .finder-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-home .option-card,
  .compact-home .option-card:nth-child(even),
  .compact-home .option-card:nth-last-child(-n + 2),
  .compact-home .option-card:nth-last-child(-n + 3) {
    min-height: 112px;
    border-right: 1px solid rgba(34, 31, 28, 0.1);
    border-bottom: 1px solid rgba(34, 31, 28, 0.1);
  }
  .compact-home .option-card:nth-child(even) { border-right: 0; }
  .compact-home .option-card:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 720px) {
  .compact-home .hero { min-height: 760px; }
  .compact-home .hero-side { max-width: none; }
  .compact-home .intro-system .section-title-row { margin-bottom: 28px; }
  .compact-home .hero-product-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .compact-home .hero-product-card img {
    width: 88px;
    height: 82px;
    padding: 8px;
  }
  .compact-home .quote-stage[data-quote-step="1"] { grid-template-columns: 1fr; }
  .compact-home .quote-stage[data-quote-step="1"] .quote-prompt,
  .compact-home .quote-details .quote-prompt { min-height: 0; padding: 30px 24px; }
  .compact-home .finder-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-home .option-card,
  .compact-home .option-card:nth-child(even),
  .compact-home .option-card:nth-last-child(-n + 2),
  .compact-home .option-card:nth-last-child(-n + 3) {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 106px;
    padding: 16px 14px;
    border-right: 1px solid rgba(34, 31, 28, 0.1);
    border-bottom: 1px solid rgba(34, 31, 28, 0.1);
  }
  .compact-home .option-card:nth-child(even) { border-right: 0; }
  .compact-home .option-card:nth-last-child(-n + 2) { border-bottom: 0; }
  .compact-home .option-card small { display: none; }
  .compact-home .option-card::after { top: 14px; right: 14px; }
  .compact-home .quote-preview {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: minmax(156px, auto);
    min-height: 156px;
  }
  .compact-home .quote-preview img { height: 100%; min-height: 156px; }
  .compact-home .quote-preview div { min-height: 156px; padding: 18px; }
  .compact-home .quote-stage { min-height: 0; }
  .compact-home .brand-mobile-visual { height: 270px; }
  .compact-trust { padding-right: 20px; padding-left: 20px; }
  .compact-trust-story,
  .compact-tech-card { min-height: 0; }
  .compact-trust-metrics { grid-template-columns: 1fr; }
  .compact-tech-card { grid-template-columns: 1fr; }
  .compact-tech-card img { height: 230px; }
  .compact-tech-card > div > strong { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .compact-home .brand-chapter,
  .compact-home .brand-mobile-photo,
  .compact-home .btn,
  .compact-home .header-cta,
  .compact-home .quote-next,
  .compact-home .quote-controls button,
  .compact-home .result-actions button {
    transition-duration: 0.01ms;
  }
}

@media (max-width: 360px) {
  .compact-home .finder-options { grid-template-columns: 1fr; }
  .compact-home .option-card,
  .compact-home .option-card:nth-child(even),
  .compact-home .option-card:nth-last-child(-n + 2) {
    min-height: 88px;
    border-right: 0;
    border-bottom: 1px solid rgba(34, 31, 28, 0.1);
  }
  .compact-home .option-card:last-child { border-bottom: 0; }
}
