/* ============================================================
   El Captain — Homepage
   Hero · Problem · Why Us · Before/After · Trust · Showcase · CTA
   ============================================================ */

/* --- Hero -------------------------------------------------------- */

.hero {
  padding-block: calc(var(--nav-height) + var(--space-2xl)) var(--space-2xl);
}

.hero > .container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero__content h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink-primary);
  margin-block-end: var(--space-md);
}

.hero__content p {
  font-size: var(--text-lg);
  color: var(--ink-secondary);
  line-height: var(--leading-relaxed);
  margin-block-end: var(--space-lg);
  max-width: 48ch;
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

.hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .hero > .container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .hero__content h1 {
    font-size: var(--text-3xl);
  }
  .hero__image {
    max-width: 500px;
  }
}


/* --- Problem Section --------------------------------------------- */

.problem {
  padding-block: var(--space-section);
  background: var(--bg-muted);
}

.problem h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--ink-primary);
  margin-block-end: var(--space-xl);
  text-align: center;
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
  max-width: 900px;
  margin-inline: auto;
}

.problem__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.problem__item:hover {
  border-color: var(--color-error);
  box-shadow: 0 2px 12px rgba(185, 28, 28, 0.08);
}

.problem__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-error-bg);
  color: var(--color-error);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.problem__item span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-primary);
  line-height: var(--leading-snug);
}

@media (max-width: 900px) {
  .problem__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .problem__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* --- Why Us Section ---------------------------------------------- */

.why-us {
  padding-block: var(--space-section);
}

.why-us h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--ink-primary);
  margin-block-end: var(--space-xl);
  text-align: center;
}

.why-us__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.why-us__card {
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.why-us__card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.why-us__card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--color-accent-ghost);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  margin-block-end: var(--space-md);
}

.why-us__card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink-primary);
  margin-block-end: var(--space-xs);
}

.why-us__card p {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  line-height: var(--leading-relaxed);
  max-width: none;
}

@media (max-width: 900px) {
  .why-us__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .why-us__grid {
    grid-template-columns: 1fr;
  }
}


/* --- Before / After Section -------------------------------------- */

.before-after {
  padding-block: var(--space-section);
  background: var(--bg-muted);
}

.before-after h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--ink-primary);
  margin-block-end: var(--space-xl);
  text-align: center;
}

.before-after__table {
  max-width: 700px;
  margin-inline: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.before-after__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-primary);
}

.before-after__label {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  color: var(--ink-on-dark);
}

.before-after__label--before {
  background: rgba(185, 28, 28, 0.15);
}

.before-after__label--after {
  background: rgba(16, 135, 90, 0.15);
}

.before-after__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-block-start: 1px solid var(--border-subtle);
}

.before-after__cell {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  line-height: var(--leading-snug);
}

.before-after__cell--before {
  color: var(--color-error);
  background: rgba(185, 28, 28, 0.03);
}

.before-after__cell--after {
  color: var(--color-success);
  background: rgba(16, 135, 90, 0.03);
  font-weight: 600;
}

@media (max-width: 520px) {
  .before-after__cell,
  .before-after__label {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-xs);
  }
}


/* --- Trust Section ----------------------------------------------- */

.trust {
  padding-block: var(--space-section);
}

.trust h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--ink-primary);
  margin-block-end: var(--space-xl);
  text-align: center;
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 900px;
  margin-inline: auto;
}

.trust__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.trust__item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-sm);
}

.trust__item-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--color-accent-ghost);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.trust__item span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-primary);
  line-height: var(--leading-snug);
}

@media (max-width: 768px) {
  .trust__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .trust__grid {
    grid-template-columns: 1fr;
  }
}


/* --- Showcase ---------------------------------------------------- */

.showcase {
  padding-block: var(--space-section);
  background: var(--bg-muted);
}

.showcase h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--ink-primary);
  margin-block-end: var(--space-xl);
  text-align: center;
}

.showcase__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.showcase__grid figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.showcase__grid figure:hover {
  box-shadow: var(--shadow-md);
}

.showcase__grid img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase__grid figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-secondary);
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 600px) {
  .showcase__grid {
    grid-template-columns: 1fr;
  }
}


/* --- CTA --------------------------------------------------------- */

.cta {
  padding-block: var(--space-section);
  background: var(--color-primary);
  text-align: center;
}

.cta h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: #fff;
  margin-block-end: var(--space-sm);
}

.cta > .container > p {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  margin-block-end: var(--space-xl);
  max-width: none;
}

.cta__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Override primary button to white on dark CTA */
.cta .btn--primary {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
  box-shadow: none;
}

.cta .btn--primary:hover {
  background: var(--bg-muted);
  color: var(--color-primary);
}

/* Override secondary button on dark CTA */
.cta .btn--secondary {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.cta .btn--secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}


/* --- Footer (page-level overrides) ------------------------------- */

.footer {
  padding-block: 2.5rem 1.5rem;
  background: var(--bg-dark);
  color: var(--ink-on-dark);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-block-end: 2rem;
}

.footer__brand p {
  font-size: 0.8125rem;
  color: var(--ink-on-dark-muted);
  margin-block-start: 0.75rem;
  max-width: 30ch;
  line-height: 1.6;
}

.footer__grid h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-on-dark);
  margin-block-end: 0.75rem;
}

.footer__grid a {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-on-dark-muted);
  text-decoration: none;
  padding-block: 0.25rem;
  transition: color 150ms ease;
}

.footer__grid a:hover {
  color: #fff;
}

.footer__bottom {
  padding-block-start: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer__bottom span {
  font-size: 0.75rem;
  color: var(--ink-on-dark-muted);
}

@media (max-width: 600px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
