/* ============================================================
   ResidencialLink — site de vendas
   Mesmo layout do site do Arquivme (produtos irmãos da Afulink).
   Direção: "etiqueta de encomenda" — papelão kraft, etiqueta branca
   e o verde do aviso entregue. A etiqueta kraft é o elemento
   estrutural repetido (no Arquivme é a aba de pasta).
   ============================================================ */

:root {
  --ink: #13241f;
  --ink-soft: #4c5f58;
  --bg: #f4f6f3;
  --paper: #ffffff;
  --line: #dbe2dc;
  --primary: #0f7a5a;
  --primary-dark: #0b6148;
  --kraft: #c99b5e;
  --kraft-light: #f2e4cc;
  --success: #1a7f5a;
  --danger: #b4443a;

  --on-dark: #b5c4bd;
  --on-dark-soft: #86988f;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 6px;
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-paper { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-paper:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Etiqueta kraft: o elemento estrutural repetido ---------- */
.tag-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--kraft);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 7px 22px 9px 14px;
  border-radius: 8px 8px 0 0;
}
/* o furo da etiqueta */
.tag-tab::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 1px rgba(19, 36, 31, 0.25);
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
}
.brand img { width: 30px; height: 30px; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--primary); }
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); display: block; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  max-width: 14ch;
  letter-spacing: -0.01em;
}
.hero p.lede {
  font-size: 1.14rem;
  max-width: 46ch;
  margin-bottom: 1.6em;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-note { font-size: 0.86rem; color: var(--ink-soft); }

/* Ilustração: duas caixas de papelão, a etiqueta da encomenda e o aviso
   que chega no celular do morador — CSS puro, sem imagem. */
.parcel-stack {
  position: relative;
  height: 380px;
  animation: stack-settle 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes stack-settle {
  from { opacity: 0; transform: translateY(18px) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
.parcel {
  position: absolute;
  left: 50%;
  width: 300px;
  border-radius: 6px;
  box-shadow: 0 18px 34px rgba(19, 36, 31, 0.14);
}
/* fita adesiva no meio da caixa */
.parcel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  margin-left: -22px;
  background: rgba(255, 255, 255, 0.28);
}
.parcel.p1 { top: 150px; height: 170px; background: var(--kraft); transform: translateX(-66%) rotate(-6deg); z-index: 1; }
.parcel.p2 { top: 84px; height: 170px; background: var(--kraft-light); border: 1px solid #e3d0ad; transform: translateX(-52%) rotate(3deg); z-index: 2; }
.parcel.p2::after { background: rgba(201, 155, 94, 0.22); }

.label-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 300px;
  transform: translateX(-46%) rotate(-2deg);
  z-index: 3;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(19, 36, 31, 0.14);
  padding: 18px 20px 16px;
}
.label-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding-bottom: 10px;
  border-bottom: 1.5px dashed var(--line);
  margin-bottom: 12px;
}
.label-unit { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.label-meta { font-size: 0.84rem; color: var(--ink-soft); margin: 2px 0 12px; }
.label-barcode {
  height: 26px;
  margin-bottom: 12px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 6px, transparent 6px 8px,
    var(--ink) 8px 11px, transparent 11px 13px,
    var(--ink) 13px 14px, transparent 14px 18px);
  opacity: 0.82;
}
.label-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  background: #e2f3ea;
  padding: 3px 10px;
  border-radius: 999px;
}

.notice {
  position: absolute;
  left: 50%;
  top: 236px;
  width: 250px;
  transform: translateX(-12%);
  z-index: 4;
  background: #e7f6dc;
  border: 1px solid #cfe6c0;
  border-radius: 12px 12px 12px 3px;
  box-shadow: 0 14px 28px rgba(19, 36, 31, 0.16);
  padding: 12px 14px 9px;
}
.notice-from { font-size: 0.74rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 3px; }
.notice-text { font-size: 0.88rem; line-height: 1.4; color: var(--ink); }
.notice-time { display: block; text-align: right; font-size: 0.7rem; color: var(--ink-soft); margin-top: 3px; }

/* ---------- Seção genérica ---------- */
section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }

/* ---------- Problema ---------- */
.problem { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem .container { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.problem .section-head { margin-bottom: 28px; }
.problem-list { list-style: none; margin: 0; padding: 0; }
.problem-list li {
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--ink-soft);
}
.problem-list li:last-child { border-bottom: none; }
.problem-list li::before {
  content: '✕';
  position: absolute;
  left: 0;
  top: 15px;
  color: var(--danger);
  font-weight: 700;
  font-size: 0.85rem;
}
.problem-answer {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 30px;
}
.problem-answer p { margin-bottom: 0.6em; }
.problem-answer p:last-child { margin-bottom: 0; }
.problem-answer strong { color: var(--ink); }

/* ---------- Funcionalidades (agrupadas por etiqueta) ---------- */
.feature-group { margin-bottom: 40px; }
.feature-group:last-child { margin-bottom: 0; }
.feature-group-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 10px 10px 10px;
  padding: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px 32px;
}
.feature-item h3 { font-size: 1.02rem; font-family: var(--sans); font-weight: 600; margin-bottom: 6px; }
.feature-item p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- Como funciona ---------- */
.how { background: var(--ink); color: #fff; }
.how .section-head h2 { color: #fff; }
.how .section-head p { color: var(--on-dark); }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; counter-reset: step; }
.how-step { position: relative; padding-top: 52px; }
.how-step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
}
.how-step h3 { color: #fff; font-family: var(--sans); font-size: 1.05rem; }
.how-step p { color: var(--on-dark); font-size: 0.92rem; }

/* ---------- Notificação em massa ---------- */
.notify { background: var(--paper); border-bottom: 1px solid var(--line); }
.notify .container { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.notify .section-head { margin-bottom: 28px; }
.notify-points { margin: 0; }
.notify-points div { padding: 14px 0; border-top: 1px solid var(--line); }
.notify-points dt { font-weight: 600; margin-bottom: 2px; }
.notify-points dd { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

.report { margin: 0; }
.report-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.report-head { padding: 22px 24px 16px; border-bottom: 1.5px dashed var(--line); }
.report-head h3 { font-size: 1.15rem; margin-bottom: 4px; }
.report-head p { font-size: 0.88rem; margin: 0; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.report-table th, .report-table td { padding: 11px 24px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.report-table td { text-align: right; color: var(--ink-soft); white-space: nowrap; }
.status { font-weight: 600; }
.status::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: currentColor; }
.status-ok { color: var(--success); }
.status-fail { color: var(--danger); }
.report-token {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 24px;
  background: var(--paper);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.token-code {
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--kraft-light);
  padding: 5px 10px;
  border-radius: 4px;
}
.report figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Contratação ---------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
  max-width: 820px;
}
.plan { display: flex; flex-direction: column; }
.plan .tag-tab { align-self: flex-start; }
.plan-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0 10px 10px 10px;
  padding: 28px;
}
.plan-for { font-size: 0.92rem; margin-bottom: 18px; }
.plan-price { margin: 0 0 20px; color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
.plan-value { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1; }
.plan-period { font-size: 0.92rem; color: var(--ink-soft); }
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-list li {
  padding: 9px 0 9px 26px;
  border-top: 1px solid var(--line);
  position: relative;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.plan-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.plans-cta { margin-top: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.plans-cta p { margin: 0; font-size: 0.92rem; }

/* ---------- FAQ ---------- */
.faq { background: var(--paper); border-top: 1px solid var(--line); }
.faq .container { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.faq .section-head { margin-bottom: 0; position: sticky; top: 100px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 0;
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
/* caixinha cuja tampa levanta quando a pergunta abre */
.faq-list summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 20px;
  height: 14px;
  margin-top: -5px;
  background: var(--kraft-light);
  border: 1.5px solid var(--kraft);
  border-radius: 2px;
}
.faq-list summary::before {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 20px;
  height: 5px;
  margin-top: -10px;
  background: var(--kraft);
  border-radius: 2px 2px 0 0;
  transform-origin: right bottom;
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::before { transform: rotate(28deg); }
.faq-list summary:hover { color: var(--primary); }
.faq-list details p { margin: -4px 0 22px; font-size: 0.96rem; }
.faq-list summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Contato ---------- */
.contact .container { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact .section-head { margin-bottom: 32px; }
.contact-info-item { margin-bottom: 26px; }
.contact-info-item h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; color: var(--ink-soft); }
.contact-info-item a, .contact-info-item span { font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.contact-info-item a:hover { color: var(--primary); }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 32px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--bg);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.form-row textarea { resize: vertical; min-height: 110px; }
.form-submit { width: 100%; justify-content: center; }
.form-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 14px; margin-bottom: 0; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); padding: 52px 0 28px; }
.site-footer .container { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
.footer-about { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.footer-brand img { width: 28px; height: 28px; }
.reg { font-family: var(--sans); font-size: 0.6em; font-weight: 500; line-height: 0; margin-left: 1px; vertical-align: super; }

/* Selo "um produto Afulink": o logo fica num quadro branco porque o "a" é preto
   e o fundo do rodapé é escuro. */
.footer-maker { display: inline-flex; align-items: center; gap: 12px; color: var(--on-dark); font-size: 0.9rem; text-decoration: none; }
.footer-maker strong { color: #fff; font-weight: 600; }
.footer-maker:hover { color: #fff; }
.afulink-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; background: #fff; border-radius: var(--radius); }
.afulink-mark img { width: 24px; height: 24px; }

.footer-links { display: flex; gap: 34px; flex-wrap: wrap; }
.footer-links div h4 { font-family: var(--sans); font-size: 0.85rem; color: #fff; margin: 6px 0 10px; }
.footer-links a { display: block; color: var(--on-dark); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; }
.footer-links a:hover { color: #fff; }
.footer-links a small { display: block; font-size: 0.78rem; color: var(--on-dark-soft); margin-top: 1px; }
.footer-links a:has(small) { margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .main-nav { gap: 18px; }
}
@media (max-width: 880px) {
  .hero .container, .problem .container, .notify .container, .contact .container, .faq .container { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 64px; }
  .parcel-stack { width: 100%; max-width: 340px; margin: 0 auto; }
  .how-steps { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .faq .container { gap: 28px; }
  .faq .section-head { position: static; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 24px 18px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 0; width: 100%; }
  .site-header .container { position: relative; }
}
@media (max-width: 640px) {
  .plan-grid { grid-template-columns: 1fr; }
  .report-table th, .report-table td { padding: 11px 16px; }
  .report-head, .report-token { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 480px) {
  .parcel.p1 { transform: translateX(-58%) rotate(-6deg); }
  .notice { transform: translateX(-24%); }
}
@media (max-width: 400px) {
  .parcel, .label-card { width: 270px; }
  .notice { width: 220px; }
}

/* ---------- Efeitos ao rolar a página ----------
   Só esconde os elementos quando o JS está ativo (classe .js-reveal no <html>),
   então sem JS o site continua aparecendo normal. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* Grupos de funcionalidades: a etiqueta aparece primeiro, o conteúdo "sai" dela */
.js-reveal .feature-group.reveal { transform: none; }
.js-reveal .feature-group.reveal .feature-group-body {
  transform-origin: top left;
  transform: scaleY(0.92);
  opacity: 0;
  transition: opacity 0.5s ease 0.15s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}
.js-reveal .feature-group.reveal.is-visible .feature-group-body { transform: none; opacity: 1; }

/* Passos do "Como funciona": o número entra crescendo de leve */
.js-reveal .how-step.reveal::before { transform: scale(0.6); transition: transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1); transition-delay: inherit; }
.js-reveal .how-step.reveal.is-visible::before { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal,
  .js-reveal .feature-group.reveal .feature-group-body,
  .js-reveal .how-step.reveal::before { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Foco visível (acessibilidade) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
