/* ==========================================================================
   THE CASTRO — Seção de serviços com ícones animados (só na home)
   Cards escuros da marca; cada ícone se desenha quando o card entra na tela
   (classe .ativo do reveal do main.js) e depois segue num movimento leve.
   Ícones: uma família só, traço 1.6, uma cor.
   ========================================================================== */

.sv-head { max-width: 760px; margin: 0 auto var(--space-6); text-align: center; }
.sv-head h2 { margin-bottom: var(--space-2h); }
.sv-head .tc-h2x { line-height: 1.4; text-wrap: balance; }
.sv-head .tc-h2x b { font-weight: 700; }

.sv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  width: 100%;
  max-width: 1040px;
  margin: 0 auto var(--space-3);
}

.sv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px;
  border-radius: 22px;
  background: var(--tc-primario);
  color: var(--tc-claro);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 40px 80px rgba(1, 28, 29, .14), 0 10px 30px rgba(1, 28, 29, .1);
  transition: transform 1s var(--tc-ease), box-shadow 1s var(--tc-ease), opacity .6s ease !important;
}
.sv-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -25%;
  top: -30%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(81, 170, 150, .22), transparent);
  transition: transform 1.2s var(--tc-ease), opacity 1.2s ease;
  opacity: .7;
}
.sv-card:hover { transform: translateY(-8px); box-shadow: 0 60px 100px rgba(1, 28, 29, .22), 0 15px 40px rgba(1, 28, 29, .14); }
.sv-card:hover::before { transform: translate(-10%, 10%) scale(1.15); opacity: 1; }

.sv-ico {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
  color: var(--tc-verde);
  background: linear-gradient(135deg, rgba(81, 170, 150, .16), rgba(50, 143, 146, .06));
  border: 1px solid rgba(81, 170, 150, .28);
  transition: border-color 1s ease, box-shadow 1s ease;
}
.sv-card:hover .sv-ico { border-color: rgba(81, 170, 150, .6); box-shadow: 0 0 30px rgba(81, 170, 150, .25); }
.sv-ico svg { width: 52px; height: 52px; overflow: visible; }
.sv-ico svg * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sv-ico svg .sv-ponto { fill: currentColor; stroke: none; }

.sv-titulo {
  font-family: var(--tc-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--tc-verde);
  margin-bottom: var(--space-2);
}
.sv-desc { font-size: 17px; line-height: 1.45; color: #fff; margin-bottom: var(--space-3); }
.sv-desc strong { font-weight: 700; }

.sv-lista { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sv-lista li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: #fff; }
.sv-lista li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid rgba(81, 170, 150, .7);
  background: radial-gradient(circle, var(--tc-verde) 0 3px, transparent 3.5px);
}

.sv-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  padding: 10px 10px 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(81, 170, 150, .35);
  background: rgba(81, 170, 150, .07);
  font-family: var(--tc-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  transition: background 1s var(--tc-ease), border-color 1s ease, box-shadow 1s ease;
}
.sv-link-seta {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--tc-teal), var(--tc-verde));
  color: #fff;
  transition: background 1s ease, color 1s ease;
}
.sv-link-seta svg { width: 14px; height: 14px; transition: transform 1s var(--tc-ease); }
.sv-link:hover {
  background: linear-gradient(135deg, var(--tc-teal), var(--tc-verde));
  border-color: transparent;
  box-shadow: 0 12px 30px -8px rgba(81, 170, 150, .45);
}
.sv-link:hover .sv-link-seta { background: rgba(255, 255, 255, .95); color: var(--tc-realce); }
.sv-link:hover .sv-link-seta svg { transform: translate(2px, -2px); }

/* bloco "também faço": título + 4 mini cards */
.sv-outros {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto var(--space-6);
  padding: 40px;
  border-radius: 22px;
  background: var(--tc-primario);
  box-shadow: 0 40px 80px rgba(1, 28, 29, .14), 0 10px 30px rgba(1, 28, 29, .1);
}
.sv-outros-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); margin-bottom: var(--space-4); }
.sv-outros-titulo { font-family: var(--tc-serif); font-style: italic; font-size: 30px; line-height: 1; letter-spacing: -.02em; color: var(--tc-verde); }
.sv-outros-sub { font-size: 15px; color: #fff; margin: 0; }
.sv-outros ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.sv-outros li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border-radius: 14px;
  background: rgba(245, 247, 247, .035);
  border: 1px solid rgba(245, 247, 247, .08);
  transition: border-color 1s ease, background 1s ease, transform 1s var(--tc-ease);
}
.sv-outros li:hover { border-color: rgba(81, 170, 150, .45); background: rgba(81, 170, 150, .07); transform: translateY(-4px); }
.sv-outros li b { font-family: var(--tc-serif); font-style: italic; font-weight: 400; font-size: 20px; line-height: 1.1; color: #fff; }
.sv-outros li span:last-child { font-size: 14px; line-height: 1.4; color: #fff; }
.sv-mini {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--tc-verde);
  background: rgba(81, 170, 150, .12);
  border: 1px solid rgba(81, 170, 150, .25);
  margin-bottom: 4px;
}
.sv-mini svg { width: 26px; height: 26px; overflow: visible; }
.sv-mini svg * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sv-mini svg .sv-ponto { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------------ animações
   1) desenho de entrada: tudo com .sv-desenha se traça quando o card fica .ativo */
.sv-desenha { stroke-dasharray: 160; stroke-dashoffset: 160; }
.ativo .sv-desenha { animation: svDesenha 1.6s var(--tc-ease) forwards; }
.ativo .sv-desenha:nth-child(2) { animation-delay: .15s; }
.ativo .sv-desenha:nth-child(3) { animation-delay: .3s; }
@keyframes svDesenha { to { stroke-dashoffset: 0; } }

/* 2) institucional: os blocos da página surgem um a um, em loop */
.sv-bloco { opacity: .15; animation: svSurge 4.8s ease-in-out infinite; }
.sv-bloco:nth-of-type(2) { animation-delay: .35s; }
.sv-bloco:nth-of-type(3) { animation-delay: .7s; }
.sv-bloco:nth-of-type(4) { animation-delay: 1.05s; }
@keyframes svSurge { 0%, 10% { opacity: .15; } 25%, 80% { opacity: 1; } 95%, 100% { opacity: .15; } }

/* 3) one page: o conteúdo rola dentro da página */
.sv-rola { animation: svRola 6s ease-in-out infinite; }
@keyframes svRola { 0%, 12% { transform: translateY(0); } 50%, 62% { transform: translateY(-22px); } 100% { transform: translateY(0); } }

/* 4) landing page: o cursor vai até o botão e clica */
.sv-cursor { animation: svCursor 4.2s var(--tc-ease) infinite; transform-box: fill-box; }
.sv-botao { animation: svClique 4.2s ease infinite; }
@keyframes svCursor {
  0%, 10%  { transform: translate(14px, 10px); }
  45%      { transform: translate(0, 0); }
  50%      { transform: translate(0, 0) scale(.82); }
  56%, 80% { transform: translate(0, 0) scale(1); }
  100%     { transform: translate(14px, 10px); }
}
@keyframes svClique { 0%, 48% { fill: transparent; } 52%, 75% { fill: rgba(81, 170, 150, .45); } 100% { fill: transparent; } }

/* 5) identidade: o traço da caneta se refaz em loop */
.sv-traco { stroke-dasharray: 70; animation: svTraco 4.5s ease-in-out infinite; }
@keyframes svTraco { 0% { stroke-dashoffset: 70; } 45%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -70; } }
.sv-cor { animation: svPulso 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sv-cor:nth-of-type(2) { animation-delay: .3s; }
.sv-cor:nth-of-type(3) { animation-delay: .6s; }
@keyframes svPulso { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

/* mini ícones da faixa */
.sv-pula { animation: svPula 2.8s ease-in-out infinite; transform-box: fill-box; }
@keyframes svPula { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
.sv-barra { transform-box: fill-box; transform-origin: bottom; animation: svBarra 3.2s ease-in-out infinite; }
.sv-barra:nth-of-type(2) { animation-delay: .25s; }
.sv-barra:nth-of-type(3) { animation-delay: .5s; }
@keyframes svBarra { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.sv-brilho { transform-box: fill-box; transform-origin: center; animation: svBrilho 3s ease-in-out infinite; }
@keyframes svBrilho { 0%, 100% { transform: scale(.6) rotate(0); opacity: .4; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
.sv-linha-bio { opacity: .25; animation: svSurge 3.6s ease-in-out infinite; }
.sv-linha-bio:nth-of-type(2) { animation-delay: .3s; }
.sv-linha-bio:nth-of-type(3) { animation-delay: .6s; }

@media (max-width: 1024px) {
  .sv-outros ul { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .sv-grid { grid-template-columns: 1fr; }
  .sv-card { padding: 28px; }
  .sv-ico { width: 64px; height: 64px; border-radius: 16px; margin-bottom: var(--space-3); }
  .sv-ico svg { width: 44px; height: 44px; }
  .sv-titulo { font-size: 28px; }
  .sv-desc { font-size: 16px; }
  .sv-outros { padding: 28px 20px; }
  .sv-outros-titulo { font-size: 26px; }
  .sv-outros ul { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sv-outros li { padding: 16px 14px; }
  .sv-outros li b { font-size: 18px; }
  .sv-link { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-ico *, .sv-mini * { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   COMO FUNCIONA (3 passos, cards claros, ícones animados da mesma família)
   ========================================================================== */
.cf { padding: 8vw 5vw; }
.cf .tc-container { display: flex; flex-direction: column; align-items: center; }
.cf-passos { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); width: 100%; max-width: 1040px; margin-bottom: var(--space-4); counter-reset: passo; }
.cf-passo {
  position: relative;
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(1, 28, 29, .08);
  box-shadow: 0 17px 30px rgba(1, 28, 29, .06);
  transition: transform 1s var(--tc-ease), box-shadow 1s var(--tc-ease), border-color 1s ease, opacity .6s ease !important;
}
.cf-passo:hover { transform: translateY(-6px); border-color: rgba(81, 170, 150, .45); box-shadow: 0 30px 55px -18px rgba(1, 28, 29, .22); }
.cf-topo { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-3); }
.cf-ico { margin-bottom: 0; color: var(--tc-realce); }
.cf-num {
  font-family: var(--tc-serif); font-style: italic; font-size: 56px; line-height: 1.15;
  padding: 0 .14em 0 .04em; margin: -.1em -.14em 0 0; /* folga para o itálico com degradê não cortar */
  background: linear-gradient(90deg, #328F92, #51AA96);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cf-titulo { font-family: var(--tc-serif); font-style: italic; font-weight: 400; font-size: 26px; line-height: 1.05; letter-spacing: -.01em; color: var(--tc-primario); margin-bottom: var(--space-2); }
.cf-passo p { font-size: 16.5px; line-height: 1.5; color: var(--tc-texto); margin: 0; }
.cf-prazo { font-size: 18px; line-height: 1.5; color: var(--tc-texto); text-align: center; margin: 0 0 var(--space-4); }
.cf-prazo b { color: var(--tc-primario); }

.cf-digita { animation: cfDigita 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes cfDigita { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
.cf-check { stroke-dasharray: 30; stroke-dashoffset: 30; animation: cfCheck 3.6s var(--tc-ease) infinite; }
@keyframes cfCheck { 0%, 15% { stroke-dashoffset: 30; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 30; } }
.cf-onda { transform-box: fill-box; transform-origin: center; opacity: 0; animation: cfOnda 3.6s ease-out infinite; }
@keyframes cfOnda { 0%, 40% { transform: scale(.7); opacity: 0; } 50% { opacity: .6; } 90%, 100% { transform: scale(1.5); opacity: 0; } }

@media (max-width: 1024px) {
  .cf-passos { grid-template-columns: 1fr; max-width: 620px; }
}
@media (max-width: 767px) {
  .cf { padding: 15vw 5vw; }
  .cf-passo { padding: 24px; }
  .cf-num { font-size: 46px; }
  .cf-titulo { font-size: 23px; }
  .cf-prazo { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cf-digita, .cf-check, .cf-onda { animation: none !important; stroke-dashoffset: 0 !important; }
}
