/* ==========================================================================
   Kapta · Autarquias
   Componentes da landing sobre a base kapta.css (paleta e ritmo de kapta.pt).
   Tipografia Manrope, como na landing imin-viva (app-identity.css).
   ========================================================================== */

@font-face {
  font-family: Manrope;
  src: url("../fonts/Manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root { --font-display: Manrope, system-ui, sans-serif; --font-body: Manrope, system-ui, sans-serif; }
::selection { background: #f8d5d7; color: var(--ink); }
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -.045em; }
.btn { font-weight: 600; }

/* ---------- Marca: Kapta | Autarquias ---------- */
.brand__label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}
.mobile-menu .brand__label,
.footer__brand .brand__label { color: var(--paper); }
.footer__brand .brand__label { font-size: 1.2rem; }

/* ---------- Hero ---------- */
.law-badge { display: flex; align-items: center; gap: 14px; }
.law-badge__mark {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 1rem; letter-spacing: .02em;
}
.law-badge span:last-child { font-size: .85rem; line-height: 1.55; color: var(--muted); }
.law-badge strong { color: var(--ink); font-weight: 600; }

/* Painel escuro com fotografia em vez de imagem recortada */
.showcase--photo { align-items: stretch; }
.showcase--photo .showcase__visual { padding: 0; align-items: stretch; }
.showcase--photo .showcase__visual img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: 38% 50%;
  filter: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24%);
}
/* Os dois cartões ficam lado a lado quando cabem; senão o segundo desce (o rótulo nunca sai do cartão) */
.showcase--photo .showcase__chips { display: flex; flex-wrap: wrap; gap: 12px; }
.showcase--photo .showcase__chips .stat { flex: 1 1 auto; gap: 10px; padding: 14px 16px; }
.showcase--photo .stat__value { font-size: 2rem; }
.showcase--photo .stat__label { white-space: nowrap; font-size: .8rem; }

/* Rótulos pequenos em fundo claro: #aaa não tem contraste suficiente */
.trust .eyebrow--sm,
.press .eyebrow--sm,
.contact-list .eyebrow--sm { color: var(--muted); }

/* ---------- Entidades ---------- */
.trust { padding-top: clamp(40px, 5vw, 64px); }
.trust__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 16px 48px;
  align-items: center;
}
/* ---------- Soluções ---------- */
.row__body { display: grid; gap: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: .8rem;
  line-height: 1.2;
}

/* ---------- Casos ---------- */
.case__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: end;
}
.case__title { display: grid; gap: 20px; }
.case__lead { font-size: 1.125rem; line-height: 1.6; color: #bdbdbd; max-width: 640px; }
.case__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.case__meta { margin: 0; border-top: 1px solid var(--line-dark); }
.case__meta div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-dark);
}
.case__meta dt { font-size: .9rem; color: var(--muted-2); }
.case__meta dd { margin: 0; font-size: .95rem; line-height: 1.5; }
.case__meta a { text-decoration: underline; text-underline-offset: 3px; }

.case__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(48px, 6vw, 80px);
}
.case__stats p { display: grid; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line-dark); }
.case__stats p span:last-child { color: #bdbdbd; max-width: 360px; line-height: 1.5; }
.case__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.6rem, 8vw, 6.5rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.case__gallery {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.case__fig,
.bento__fig {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0d0d0d;
}
.case__fig { aspect-ratio: 3 / 2; }
.case__fig--main { grid-row: span 2; aspect-ratio: auto; }
.case__fig img,
.bento__fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.case__fig:hover img,
.bento__fig:hover img { transform: scale(1.03); }
.case__fig figcaption,
.bento__fig figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(22, 22, 22, .66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--paper);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
}

.case__features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(48px, 6vw, 72px);
}
.case__features--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case__features li {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
}
.case__features h3 { font-size: 1.3rem; line-height: 1.25; }
.case__features p { color: #bdbdbd; line-height: 1.6; }
.case__more { margin-top: 44px; }

/* Caso em fundo claro */
.case--light .case__lead,
.case--light .case__stats p span:last-child,
.case--light .case__features p { color: var(--muted); }
.case--light .case__meta,
.case--light .case__meta div,
.case--light .case__stats p,
.case--light .case__features li { border-color: var(--line); }
.case--light .case__meta dt { color: var(--muted); }

/* Galeria em mosaico (Ferragudo) */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.bento__fig { grid-column: span 4; aspect-ratio: 4 / 3; background: var(--paper-2); }
.bento__fig--site { grid-column: span 8; aspect-ratio: 3 / 2; }
.bento__fig--tall { grid-row: span 2; aspect-ratio: auto; }
.bento__fig--half { grid-column: span 6; aspect-ratio: 3 / 2; }

.press {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: clamp(48px, 6vw, 72px);
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.press__list { display: flex; flex-wrap: wrap; gap: 8px; }
.press__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.press__list svg { width: 11px; height: 11px; }
.press__list a:hover { border-color: var(--ink); }
.press .arrow-link { margin-left: auto; }

/* Mais projetos: continua o caso Ferragudo, sem novo espaço de secção */
.more { padding-top: 0; }
.more__head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px 48px;
  align-items: baseline;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.more__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 4vw, 48px);
}
.more__card { display: grid; gap: 18px; align-content: start; }
.more__card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.more__body { display: grid; gap: 8px; }
.more__tipo {
  justify-self: start;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  line-height: 1.2;
}
.more__body h3 { font-size: 1.3rem; line-height: 1.25; margin-top: 4px; }
.more__body p { color: var(--muted); line-height: 1.6; }
.more__cta { justify-self: start; margin-top: 6px; font-weight: 600; }

/* ---------- Porquê a Kapta ---------- */
.section--paper { background: var(--paper-2); }
.why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
}
.why__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.why__card .pill { justify-self: start; margin-bottom: 18px; padding: 8px 16px; font-size: .9rem; }
.why__card h3 { font-size: 1.45rem; line-height: 1.2; }
.why__card p { color: var(--muted); line-height: 1.6; }
.why__card:first-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.why__card:first-child::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px; height: 420px; right: -200px; top: -220px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(229, 85, 92, .45), rgba(229, 85, 92, 0));
  filter: blur(30px);
}
.why__card:first-child .pill { border-color: var(--line-dark); }
.why__card:first-child p { color: #bdbdbd; }

/* ---------- Diagnóstico rápido ---------- */
.check {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--paper);
}
.check::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 760px; height: 760px; left: -320px; bottom: -420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(229, 85, 92, .38), rgba(229, 85, 92, 0));
  filter: blur(40px);
}
.check__head { display: grid; gap: 20px; align-content: start; }
.check__head p { color: #bdbdbd; line-height: 1.6; }
.check .eyebrow { color: var(--muted-2); }
.check__progress {
  height: 4px;
  margin-top: 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}
.check__progress i {
  display: block;
  width: var(--progresso, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--paper);
  transition: width .4s var(--ease);
}
.check__head .check__count { font-size: .9rem; color: var(--muted-2); }

.check__list { border-top: 1px solid var(--line-dark); }
.check__list > li { border-bottom: 1px solid var(--line-dark); }
.check__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.check__qtext { display: flex; gap: 14px; align-items: baseline; line-height: 1.45; }
.check__n { flex: none; width: 18px; font-size: .85rem; color: var(--muted-2); }
.check__opts {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
}
.check__opts label { position: relative; z-index: 1; cursor: pointer; }
.check__opts input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.check__opts span {
  display: block;
  min-width: 56px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.check__opts label:hover span { background: rgba(255, 255, 255, .08); }
.check__opts::before {
  content: "";
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 999px;
  background: var(--paper);
  opacity: 0;
  transform: scale(.6);
  transition: transform .45s var(--spring), opacity .25s var(--ease), background-color .3s var(--ease);
}
.check__opts:has(input:checked)::before { opacity: 1; transform: none; }
.check__opts:has(input[value="nao"]:checked)::before { transform: translateX(calc(100% + 4px)); background: var(--red); }
.check__opts label:has(input:checked):hover span { background: transparent; }
.check__opts input:checked + span { color: var(--ink); }
.check__opts input[value="nao"]:checked + span { color: #fff; }
.check__n { transition: color .3s var(--ease); }
.check__q:has(input:checked) .check__n { color: var(--paper); }
.check__opts input:focus-visible + span { outline: 2px solid var(--paper); outline-offset: 2px; }

.check__result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: rgba(255, 255, 255, .06);
}
.check__result[hidden] { display: none; }
.check__score {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
  white-space: nowrap;
}
.check__score small { margin-left: 4px; font-size: 1rem; letter-spacing: 0; color: var(--muted-2); }
.check__verdict { margin-bottom: 12px; font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.check__gaps { display: grid; gap: 8px; }
.check__gaps li { display: flex; gap: 10px; align-items: baseline; color: #d6d6d6; line-height: 1.45; }
.check__gaps li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-1px);
}

/* Estimativa: na mesma caixa, por baixo do diagnóstico */
.estimate {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "intro opts" "summary opts";
  grid-template-rows: auto 1fr;
  gap: 28px clamp(40px, 6vw, 96px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line-dark);
}
.estimate__intro { grid-area: intro; display: grid; gap: 14px; align-content: start; }
.estimate__intro p { color: #bdbdbd; line-height: 1.6; }
.estimate__intro .h3 { color: var(--paper); }
.estimate__opts { grid-area: opts; display: grid; gap: 28px; align-content: start; }
.estimate__summary { grid-area: summary; display: grid; gap: 16px; align-content: start; justify-items: start; }

.estimate__group { display: grid; gap: 8px; }
.estimate__label { margin-bottom: 4px; font-size: .85rem; color: var(--muted-2); }
.estimate__opt {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.estimate__opt:hover { background: rgba(255, 255, 255, .04); }
.estimate__opt:has(input:checked) { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); }
.estimate__opt:has(input:disabled) { cursor: not-allowed; }
.estimate__opt:has(input:disabled) > :not(.estimate__name),
.estimate__opt:has(input:disabled) .estimate__name > :not(.estimate__req) { opacity: .45; }
.estimate__opt input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.estimate__switch {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  transition: background-color .2s var(--ease);
}
.estimate__switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform .4s var(--spring), background-color .2s var(--ease);
}
.estimate__opt input:checked ~ .estimate__switch { background: var(--paper); }
.estimate__opt input:checked ~ .estimate__switch::after { transform: translateX(16px); background: var(--ink); }
.estimate__opt input:focus-visible ~ .estimate__switch { outline: 2px solid var(--paper); outline-offset: 3px; }
.estimate__name { display: grid; gap: 2px; min-width: 0; }
.estimate__name strong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.estimate__name small { font-size: .85rem; line-height: 1.4; color: #bdbdbd; }
.estimate__name .estimate__req { color: var(--muted-2); }
.estimate__opt:not(:has(input:disabled)) .estimate__req { display: none; }
.estimate__tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.3;
}
.estimate__tag[hidden] { display: none; }
.estimate__count {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.estimate__n { display: inline-block; min-width: 1ch; font-variant-numeric: tabular-nums; }
.estimate__chosen { display: flex; flex-wrap: wrap; gap: 8px; min-height: 38px; }
.estimate__chosen li {
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
}
.estimate__empty { font-size: .95rem; color: #bdbdbd; }
.estimate__empty[hidden] { display: none; }
.estimate__fine { padding-top: 16px; border-top: 1px solid var(--line-dark); font-size: .9rem; line-height: 1.5; color: var(--muted-2); width: 100%; }
.estimate__summary .btn { margin-top: 8px; }

/* ---------- Como trabalhamos ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(48px, 6vw, 80px);
}
.process__step {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}
.process__step .pill { justify-self: start; margin-bottom: 14px; }
.process__step h3 { font-size: 1.45rem; line-height: 1.2; }
.process__step p { color: var(--muted); line-height: 1.6; }

/* ---------- Perguntas frequentes ---------- */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 48px;
  align-items: start;
}
.faq__head { display: grid; gap: 20px; position: sticky; top: 120px; }
.faq__head .h2 { font-size: clamp(2.1rem, 3.6vw, 2.9rem); }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.03em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon {
  position: relative;
  flex: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform .3s var(--ease), background-color .25s var(--ease);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item summary:hover .faq__icon { border-color: var(--ink); }
.faq__item[open] .faq__icon { background: var(--ink); border-color: var(--ink); }
.faq__item[open] .faq__icon::before,
.faq__item[open] .faq__icon::after { background: var(--paper); }
.faq__item[open] .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__item p { max-width: 720px; padding: 0 64px 28px 0; color: var(--muted); line-height: 1.65; }

/* ---------- Formulário: interesses ---------- */
.interest { min-width: 0; margin: 28px 0 4px; padding: 0; border: 0; }
.interest legend { margin-bottom: 12px; padding: 0; font-size: .95rem; color: var(--muted); }
.interest__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.interest__opts label { position: relative; cursor: pointer; }
.interest__opts input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.interest__opts span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  background: var(--paper);
  font-size: .92rem;
  font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.interest__opts span::before { content: "+"; font-weight: 600; }
.interest__opts label:hover span { border-color: var(--ink); }
.interest__opts input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.interest__opts input:checked + span::before { content: "✓"; }
.interest__opts input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .case__features--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}

@media (max-width: 991px) {
  .estimate {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "opts" "summary";
    grid-template-rows: auto;
  }
  .trust__inner,
  .more__head,
  .case__head,
  .check,
  .faq { grid-template-columns: 1fr; }
  .case__head, .faq { gap: 28px; }
  .faq__head { position: static; }
  .row__body { grid-column: 1 / -1; }

  .showcase--photo .showcase__visual { padding: 0; }
  .showcase--photo .showcase__visual img {
    height: auto;
    aspect-ratio: 5 / 4;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%);
    mask-image: linear-gradient(180deg, transparent 0, #000 22%);
  }

  .case__gallery { grid-template-columns: 1fr 1fr; }
  .case__fig--main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 3 / 2; }
  .case__features { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__fig { grid-column: span 1; aspect-ratio: 1 / 1; }
  .bento__fig--site { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .bento__fig--tall { aspect-ratio: auto; }
  .bento__fig--half { aspect-ratio: 1 / 1; }

  .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .brand__label { font-size: .95rem; }
  .law-badge__mark { width: 46px; height: 46px; }

  .case__stats,
  .case__features,
  .case__features--4,
  .why,
  .process { grid-template-columns: 1fr; }
  .case__meta div { grid-template-columns: 76px minmax(0, 1fr); }

  /* Galerias em carrossel horizontal no telemóvel */
  .case__gallery,
  .bento,
  .more__grid {
    display: flex;
    gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .case__gallery::-webkit-scrollbar,
  .bento::-webkit-scrollbar,
  .more__grid::-webkit-scrollbar { display: none; }
  .case__gallery:focus-visible,
  .bento:focus-visible,
  .more__grid:focus-visible { outline-offset: -2px; }
  .more__card { flex: 0 0 84%; scroll-snap-align: start; }
  .case__fig,
  .case__fig--main,
  .bento__fig,
  .bento__fig--site,
  .bento__fig--tall,
  .bento__fig--half {
    flex: 0 0 84%;
    aspect-ratio: 1 / 1;
    scroll-snap-align: start;
  }

  .press .arrow-link { margin-left: 0; }
  .why { gap: 12px; }
  .why__card { padding: 24px; }
  .why__card .pill { margin-bottom: 6px; }

  .check__q { flex-direction: column; align-items: flex-start; gap: 12px; }
  .check__opts { margin-left: 32px; }
  .check__result { grid-template-columns: 1fr; gap: 16px; }
  .estimate__opt { gap: 14px; padding: 14px; }
  .estimate__summary .btn { width: 100%; white-space: normal; text-align: center; }
  .case__cta .btn { width: 100%; white-space: normal; text-align: center; }

  .faq__item p { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .case__fig:hover img,
  .bento__fig:hover img { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .case__fig figcaption,
  .bento__fig figcaption { background: var(--ink); backdrop-filter: none; }
}

/* Aviso de cookies (assets/js/cookie-consent.js, o mesmo de kapta.pt): usa as fontes desta página.
   O script traz os próprios estilos com Satoshi/General Sans por nome, que aqui não existem. */
#kapta-cookie-banner,
#kapta-cookie-banner button,
#kapta-cookie-manage { font-family: var(--font-body) !important; }
#kapta-cookie-banner h2 { font-family: var(--font-display) !important; font-weight: 500 !important; letter-spacing: -.045em !important; }
#kapta-cookie-banner button,
#kapta-cookie-manage { font-weight: 600 !important; }

/* ==========================================================================
   Movimento
   Os estados iniciais escondidos só existem com JS e sem "reduzir movimento";
   com prefers-reduced-motion, kapta.css desliga animações e transições.
   ========================================================================== */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); interpolate-size: allow-keywords; }

@keyframes header-in { from { opacity: 0; transform: translateY(-14px); } }
@keyframes word-up { to { transform: translateY(0); } }
@keyframes drift-a { 50% { transform: translate(80px, 40px) scale(1.08); } }
@keyframes drift-b { 50% { transform: translate(-70px, -30px) scale(1.12); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes parallax { from { translate: 0 -5%; } to { translate: 0 5%; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(6px) scale(.6); } }
@keyframes chip-out { to { opacity: 0; transform: scale(.7); } }
@keyframes bump { 40% { transform: scale(1.35); } }
@keyframes tag-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes flash {
  30% { box-shadow: 0 0 0 4px rgba(229, 85, 92, .45); border-color: rgba(229, 85, 92, .9); }
  100% { box-shadow: 0 0 0 10px rgba(229, 85, 92, 0); }
}
@keyframes shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

/* Cabeçalho e brilhos de fundo */
.site-header { animation: header-in .8s var(--ease) both; }
.hero::before { animation: drift-a 16s ease-in-out infinite; }
.hero::after { animation: drift-b 19s ease-in-out infinite; }
.showcase::before { animation: drift-b 14s ease-in-out infinite; }
.section--dark::before,
.site-footer::before,
.check::before,
.why__card:first-child::before { animation: drift-a 18s ease-in-out infinite; }
.showcase__chips .glass { animation: float 6s ease-in-out infinite; }
.showcase__chips .glass:nth-child(2) { animation-delay: -3s; }

/* Títulos palavra a palavra */
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: .1em 0 .14em;
  margin: -.1em 0 -.14em;
}
.split .w > span { display: inline-block; }

/* Números a contar sem saltos de largura */
[data-contar] { font-variant-numeric: tabular-nums; }

/* Entidades em faixa contínua */
.marquee {
  display: flex;
  min-width: 0;
  padding-block: 6px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  flex: none;
  flex-wrap: nowrap;
  animation: marquee 40s linear infinite;
}
/* Logótipos: a cinzento, com a cor original ao passar o rato */
.logos { display: flex; align-items: center; }
.logos li { display: flex; align-items: center; justify-content: center; height: 72px; padding: 0 30px; }
.logos img {
  width: auto;
  height: var(--h, 40px);
  max-width: none;
  filter: grayscale(1);
  opacity: .62;
  transition: filter .4s var(--ease), opacity .4s var(--ease);
}
.logos li:hover img { filter: none; opacity: 1; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* Linhas que se desenham ao entrar */
.row,
.process__step,
.case__features li,
.case__stats p { position: relative; }
.row { border-bottom: 0; }
.process__step,
.case__features li,
.case__stats p { border-top: 0; }
.row::after,
.process__step::before,
.case__features li::before,
.case__stats p::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--line-dark);
  transform-origin: left;
  transition: transform 1.2s var(--ease) .1s;
}
.row::after { bottom: 0; background: var(--line); }
.process__step::before,
.case__features li::before,
.case__stats p::before { top: 0; }
.process__step::before { background: var(--ink); }
.case--light .case__features li::before,
.case--light .case__stats p::before { background: var(--line); }

/* Botões e ligações */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn--light::after { background: linear-gradient(110deg, transparent 30%, rgba(229, 85, 92, .22) 50%, transparent 70%); }
.btn--dark:hover::after,
.btn--light:hover::after,
.btn.is-ready::after { animation: shine .9s var(--ease); }
.btn--outline,
.press__list a {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: 100% 0;
  transition: background-size .45s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .25s var(--ease);
}
.btn--outline:hover,
.press__list a:hover {
  background-color: var(--paper);
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: 100% 100%;
  color: var(--paper);
}
.nav a { position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover { background: transparent; }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Cartões "Porquê a Kapta": brilho que segue o cursor */
.why__card { transition: border-color .3s var(--ease); }
.why__card:hover { border-color: #cfcfcf; }
.why__card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(229, 85, 92, .12), transparent 65%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.why__card:hover::after { opacity: 1; }

/* Perguntas frequentes: abrir e fechar com altura animada (onde há suporte) */
.faq__item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size .45s var(--ease), content-visibility .45s allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }
.faq__item[open] p { animation: fade-up .5s var(--ease); }

/* Simulador */
.check__progress i { box-shadow: 0 0 14px rgba(255, 255, 255, .5); }
.check__result:not([hidden]) { animation: pop-in .7s var(--ease); }
.check__gaps li { animation: fade-up .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + .15s); }
.check__score [data-pontos] { display: inline-block; }
.is-bump { animation: bump .45s var(--spring); }
.estimate__opt.is-flash { animation: flash .9s var(--ease); }
.estimate__tag:not([hidden]) { animation: tag-pop .5s var(--spring); }
.estimate__chosen li { animation: chip-in .45s var(--spring) both; }
.estimate__chosen li.is-leaving { animation: chip-out .25s var(--ease) forwards; }

/* Estados iniciais das entradas */
@media (prefers-reduced-motion: no-preference) {
  .js .split.reveal { opacity: 1; transform: none; }
  .js .split .w > span { transform: translateY(110%); }
  .js .split.is-in .w > span,
  .js .is-in .split .w > span { animation: word-up .9s var(--ease) forwards; animation-delay: calc(var(--i) * 55ms + 60ms); }

  .js .reveal .case__fig,
  .js .reveal .bento__fig,
  .js .more__card.reveal img {
    clip-path: inset(9% 9% 9% 9% round var(--radius));
    transition: clip-path 1.2s var(--ease);
  }
  .js .reveal.is-in .case__fig,
  .js .reveal.is-in .bento__fig,
  .js .more__card.reveal.is-in img { clip-path: inset(0 round var(--radius)); }
  .js .reveal .case__fig img,
  .js .reveal .bento__fig img,
  .js .showcase.reveal .showcase__visual img { transition: transform 1.6s var(--ease); }
  .js .reveal:not(.is-in) .case__fig img,
  .js .reveal:not(.is-in) .bento__fig img,
  .js .showcase.reveal:not(.is-in) .showcase__visual img { transform: scale(1.18); }
  .case__fig:nth-child(2), .bento__fig:nth-child(2) { transition-delay: .1s; }
  .case__fig:nth-child(3), .bento__fig:nth-child(3) { transition-delay: .2s; }
  .bento__fig:nth-child(4) { transition-delay: .3s; }
  .bento__fig:nth-child(5) { transition-delay: .4s; }
  .bento__fig:nth-child(6) { transition-delay: .5s; }

  .js .row.reveal:not(.is-in)::after,
  .js .process__step.reveal:not(.is-in)::before,
  .js .case__features li.reveal:not(.is-in)::before,
  .js .case__stats p.reveal:not(.is-in)::before { transform: scaleX(0); }
}

/* Paralaxe suave nas imagens, ligada ao scroll (browsers com scroll-driven animations) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .case__fig img,
    .bento__fig img,
    .showcase--photo .showcase__visual img {
      scale: 1.12;
      animation: parallax linear both;
      animation-timeline: view();
      animation-range: cover;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { flex: 1; flex-wrap: wrap; padding-right: 0; }
  .marquee__track[aria-hidden="true"] { display: none; }
}
