/* =========================================================
   ComTato — Centro de Intervenção Comportamental
   Base: tokens de design + tipografia + componentes
   ========================================================= */

/* ---------- Fontes ----------
   Aestetico Informal Regular — único peso disponível (400), com
   acentuação completa. Os pesos 500-900 são sintetizados pelo
   navegador a partir dele (font-synthesis), por isso a família é
   declarada uma vez cobrindo toda a faixa 100-900.
   ------------------------------------------------------------- */
@font-face {
  font-family: 'Aestetico';
  src: url('../fonts/aestetico-informal-regular.woff2') format('woff2'),
       url('../fonts/aestetico-informal-regular.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Cores da marca (extraídas do layout) */
  --ct-blue:        #1D6CFF;
  --ct-blue-dark:   #2020A5;
  --ct-blue-soft:   #E4EDFF;
  --ct-purple:      #8C6DF2;
  --ct-purple-mid:  #9E84F4;
  --ct-purple-soft: #C8B8FE;
  --ct-pink:        #F298FF;
  --ct-lime:        #D4D859;
  --ct-ink:         #000000;
  --ct-gray:        #F5F5F5;
  --ct-white:       #FFFFFF;

  --ct-body:        #2B2B2B;
  --ct-muted:       #5A5A5A;

  /* Tipografia */
  --ct-font: 'Aestetico', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Raios */
  --ct-radius-sm:  14px;
  --ct-radius:     24px;
  --ct-radius-lg:  40px;
  --ct-radius-xl:  56px;
  --ct-radius-pill: 999px;

  /* Espaçamento de seção */
  --ct-section-y: clamp(3.5rem, 7vw, 7rem);

  /* Sombras */
  --ct-shadow-card: 0 18px 40px rgba(32, 32, 165, .10);
  --ct-shadow-photo: 0 22px 50px rgba(0, 0, 0, .18);

  /* Bootstrap overrides */
  --bs-primary: #1D6CFF;
  --bs-body-font-family: var(--ct-font);
  --bs-body-color: var(--ct-body);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--ct-font);
  color: var(--ct-body);
  background: var(--ct-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* a família tem só o peso 400: deixa o navegador sintetizar os negritos */
  font-synthesis: weight style;
}

h1, h2, h3, h4, h5, h6, .ct-display {
  font-family: var(--ct-font);
  font-weight: 800;
  color: var(--ct-ink);
  letter-spacing: -.015em;
  line-height: 1.05;
}

p { line-height: 1.6; }

a { text-decoration: none; }

img { max-width: 100%; }

/* ---------- Utilitários de tipografia ---------- */
.ct-h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); font-weight: 800; }
.ct-h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 800; }
.ct-h3 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); font-weight: 800; }
.ct-lead { font-size: clamp(1rem, 1.15vw, 1.075rem); font-weight: 400; line-height: 1.65; }
.ct-small { font-size: .95rem; line-height: 1.6; }
.ct-muted { color: var(--ct-muted); }

/* ---------- Seções ---------- */
.ct-section { padding-block: var(--ct-section-y); position: relative; }

/* Rede de segurança: gutter do Bootstrap acima de 1.5rem gera margem
   lateral maior que o padding do .container e causa scroll horizontal.
   Prefira dar respiro com padding nas colunas, não aumentando o gutter. */
.container > .row { --bs-gutter-x: 1.5rem; }
.ct-section--gray { background: var(--ct-gray); }
.ct-section--purple { background: var(--ct-purple-soft); }

/* ---------- Botões ---------- */
.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.9rem;
  border: 0;
  border-radius: var(--ct-radius-pill);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  cursor: pointer;
}
.ct-btn:hover { transform: translateY(-2px); }

.ct-btn--blue   { background: var(--ct-blue); color: #fff; box-shadow: 0 10px 24px rgba(29,108,255,.32); }
.ct-btn--blue:hover { background: #0d5cf0; color: #fff; }

.ct-btn--dark   { background: var(--ct-blue-dark); color: #fff; }
.ct-btn--dark:hover { background: #191983; color: #fff; }

.ct-btn--white  { background: #fff; color: var(--ct-blue); }
.ct-btn--white:hover { background: #f2f6ff; color: var(--ct-blue); }

.ct-btn--purple { background: var(--ct-purple); color: #fff; }
.ct-btn--purple:hover { background: #7b58ee; color: #fff; }

.ct-btn--outline {
  background: transparent;
  color: var(--ct-blue);
  box-shadow: inset 0 0 0 2px var(--ct-blue);
}
.ct-btn--outline:hover { background: var(--ct-blue); color: #fff; }

.ct-btn--upper { text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Cartões ---------- */
.ct-card {
  border-radius: var(--ct-radius);
  padding: 2rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ---------- Fotos com moldura arredondada ---------- */
.ct-photo {
  border-radius: var(--ct-radius);
  object-fit: cover;
  width: 100%;
  display: block;
}
.ct-photo--tilt-l { transform: rotate(-4deg); box-shadow: var(--ct-shadow-photo); }
.ct-photo--tilt-r { transform: rotate(4deg);  box-shadow: var(--ct-shadow-photo); }

/* ---------- Blobs decorativos ---------- */
.ct-blob {
  position: absolute;
  border-radius: 46% 54% 60% 40% / 48% 42% 58% 52%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Acessibilidade ---------- */
:focus-visible {
  outline: 3px solid var(--ct-blue-dark);
  outline-offset: 3px;
  border-radius: 6px;
}

.ct-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ct-blue-dark);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 12px 0;
  z-index: 2000;
}
.ct-skip:focus { left: 0; color: #fff; }

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