/* Camada oficial do portal público RenovaEco — v18 */
:root {
  --ui-bg: #f2f6f3;
  --ui-surface: #ffffff;
  --ui-surface-muted: #f7faf8;
  --ui-border: #d8e2dc;
  --ui-text: #14221d;
  --ui-muted: #62736c;
  --ui-brand: #12695d;
  --ui-brand-strong: #0a5148;
  --ui-brand-soft: #e3f3ed;
  --ui-focus: rgba(18, 105, 93, .16);
  --ui-shadow: 0 1px 2px rgba(15, 48, 38, .04), 0 14px 34px rgba(15, 48, 38, .08);
  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-radius-lg: 18px;
}

html.tema-escuro {
  --ui-bg: #0c1512;
  --ui-surface: #14211d;
  --ui-surface-muted: #1a2b25;
  --ui-border: #304a41;
  --ui-text: #f4faf7;
  --ui-muted: #b1c2bb;
  --ui-brand: #55d6ae;
  --ui-brand-strong: #75e3c0;
  --ui-brand-soft: #183d33;
  --ui-focus: rgba(85, 214, 174, .2);
  --ui-shadow: 0 14px 34px rgba(0, 0, 0, .32);
}

@media (prefers-color-scheme: dark) {
  html.tema-sistema {
    --ui-bg: #0c1512;
    --ui-surface: #14211d;
    --ui-surface-muted: #1a2b25;
    --ui-border: #304a41;
    --ui-text: #f4faf7;
    --ui-muted: #b1c2bb;
    --ui-brand: #55d6ae;
    --ui-brand-strong: #75e3c0;
    --ui-brand-soft: #183d33;
    --ui-focus: rgba(85, 214, 174, .2);
    --ui-shadow: 0 14px 34px rgba(0, 0, 0, .32);
  }
}

html {
  min-width: 320px;
  background: var(--ui-bg);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 0, color-mix(in srgb, var(--ui-brand) 9%, transparent), transparent 30rem),
    var(--ui-bg);
  color: var(--ui-text);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4,
.campo label,
.benefit-item strong,
.timeline-card strong {
  color: var(--ui-text);
  letter-spacing: -.025em;
}

.topo {
  min-height: 72px;
  padding:
    max(12px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    12px
    max(20px, env(safe-area-inset-left));
  background: #075f55;
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 28px rgba(5,43,36,.16);
}

.topo .logo-marca-renovaeco {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: none;
}

.topo .marca strong {
  font-size: 16px;
  color: #fff;
}

.topo .marca span {
  color: rgba(255,255,255,.7);
}

.btn-tema-portal {
  width: 42px;
  height: 42px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-tema-portal:hover {
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.15);
}

.btn-tema-portal:active {
  transform: scale(.96);
}

.btn-tema-portal svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conteudo {
  max-width: 1120px;
  padding: clamp(28px, 5vw, 58px) 20px 64px;
}

.landing-container {
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: clamp(38px, 7vw, 80px);
  margin: 0;
  padding: 0;
}

.landing-info h1 {
  max-width: 620px;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.08;
  color: var(--ui-text);
}

.landing-desc {
  max-width: 620px;
  color: var(--ui-muted);
  font-size: 16px;
}

.landing-boasvindas,
.rotulo-secao {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--ui-brand) 28%, var(--ui-border));
  border-radius: 9px;
  background: var(--ui-brand-soft);
  color: var(--ui-brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.landing-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}

.benefit-item {
  gap: 12px;
}

.benefit-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  background: var(--ui-surface);
  color: var(--ui-brand);
  box-shadow: 0 4px 16px rgba(15,48,38,.05);
}

.benefit-icon svg,
.opcao-tipo .icone svg,
.suporte-rodape svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit-item p,
.landing-desc,
.cartao .subtitulo,
.timeline-card p {
  color: var(--ui-muted);
}

.cartao,
.timeline-card {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.cartao {
  padding: clamp(22px, 3vw, 30px);
}

.cartao:hover {
  transform: none;
  box-shadow: var(--ui-shadow);
}

.landing-choice .cartao {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.landing-choice .cartao h2 {
  margin: 14px 0 8px;
  color: var(--ui-text);
  font-size: 24px;
}

.landing-choice .cartao .subtitulo {
  margin-bottom: 22px;
  color: var(--ui-muted);
}

.opcoes-tipo.opcoes-tipo-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opcao-tipo.opcao-tipo-cta {
  width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-muted);
  box-shadow: none;
  animation: none;
}

.opcao-tipo.opcao-tipo-cta:hover {
  transform: translateY(-1px);
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
  box-shadow: 0 8px 22px rgba(15,48,38,.09);
}

.opcao-tipo .icone {
  width: 42px;
  height: 42px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  border-radius: 11px;
  background: var(--ui-brand-soft);
  color: var(--ui-brand);
}

.opcao-tipo-conteudo {
  min-width: 0;
  flex: 1;
}

.opcao-tipo-conteudo strong {
  margin: 0 0 3px;
  color: var(--ui-text);
  font-size: 16px;
}

.opcao-tipo-conteudo span {
  display: block;
  color: var(--ui-muted);
  font-size: 12px;
}

.opcao-tipo-seta {
  color: var(--ui-brand);
}

.landing-choice .opcoes-tipo-hint {
  margin-top: 16px;
  color: var(--ui-muted);
  font-weight: 500;
}

.landing-timeline-section {
  margin-top: 68px;
}

.landing-timeline-section h2 {
  color: var(--ui-text);
}

.landing-timeline {
  gap: 14px;
}

.timeline-card {
  min-height: 176px;
  padding: 20px;
}

.timeline-num {
  border-radius: 9px;
}

.suporte-rodape {
  margin-top: 30px;
}

.suporte-rodape a {
  min-height: 44px;
  padding: 9px 14px;
  gap: 8px;
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  background: var(--ui-surface);
  color: var(--ui-brand);
  text-decoration: none;
}

.campo input[type="text"],
.campo input[type="email"],
.campo input[type="tel"],
.campo input[type="date"],
.campo input[type="number"],
.campo input[type="password"],
.campo input[type="search"],
.campo select,
.campo textarea {
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  background: var(--ui-surface);
  color: var(--ui-text);
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--ui-brand);
  background: var(--ui-surface);
  box-shadow: 0 0 0 4px var(--ui-focus);
}

.upload-area {
  border: 1.5px dashed color-mix(in srgb, var(--ui-brand) 50%, var(--ui-border));
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-muted);
}

.upload-area:hover,
.upload-area:focus-within {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
}

.upload-area .icone-anexo {
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  display: block;
  background: var(--ui-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.4 11.6 12 21a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 1 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.4 11.6 12 21a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 1 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.selo-seguranca {
  border-color: var(--ui-border);
  background: var(--ui-surface-muted);
  color: var(--ui-muted);
}

.selo-seguranca-icone {
  width: 18px;
  height: 18px;
  background: var(--ui-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;
}

.btn {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 11px;
}

.btn-primario {
  background: var(--ui-brand);
  box-shadow: none;
}

.btn-primario:hover {
  background: var(--ui-brand-strong);
  box-shadow: 0 8px 22px rgba(15,48,38,.15);
}

.btn-secundario {
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-brand);
}

.sucesso .icone-grande img {
  display: block;
  margin: 0 auto;
  border-radius: 16px;
}

*:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .conteudo {
    padding: 26px 16px calc(48px + env(safe-area-inset-bottom));
  }

  .landing-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .landing-container,
  .landing-info,
  .landing-choice,
  .landing-choice .cartao,
  .opcoes-tipo,
  .opcao-tipo,
  .opcao-tipo-conteudo {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .landing-desc,
  .benefit-item p,
  .opcao-tipo-conteudo span,
  .opcoes-tipo-hint {
    overflow-wrap: anywhere;
  }

  .landing-info h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .landing-benefits {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .landing-choice {
    order: -1;
  }
}

@media (max-width: 520px) {
  .topo {
    min-height: 66px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .topo .logo-marca-renovaeco {
    width: 36px;
    height: 36px;
  }

  .topo .marca span {
    font-size: 11px;
  }

  .conteudo {
    padding: 20px 14px calc(40px + env(safe-area-inset-bottom));
  }

  .cartao {
    padding: 20px;
    border-radius: 16px;
  }

  .landing-choice .cartao h2 {
    font-size: 21px;
  }

  .opcao-tipo.opcao-tipo-cta {
    min-height: 76px;
    padding: 13px;
  }

  .landing-info h1 {
    font-size: 32px;
  }

  .landing-timeline-section {
    margin-top: 42px;
  }

  .landing-timeline-section h2 {
    font-size: 21px;
    text-align: left;
  }

  .timeline-card {
    min-height: 0;
  }

  .acoes {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 18px -14px -14px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--ui-border);
    background: color-mix(in srgb, var(--ui-bg) 92%, transparent);
    backdrop-filter: blur(12px);
  }

  .acoes .btn {
    flex: 1;
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
