/* TITAM — folha de estilo do site de conteúdo.
   Tokens portados de design-system-light.md / design-system-dark.md. */

/* Inter — fonte oficial de todos os produtos TITAM (design system §6).
   Self-hospedada (variable, subset latin) para não depender de terceiro. */
@font-face{
  font-family:"Inter";
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root{
  color-scheme: light;
  --color-brand: #2F6BFF;
  --color-brand-hover: #2458D8;
  --color-brand-soft: #EAF0FF;

  --color-text-strong: #101318;
  --color-text: #29313D;
  --color-text-muted: #596474;
  --color-text-subtle: #747F8F;

  --color-bg: #FFFFFF;
  --color-bg-subtle: #FAFBFC;
  --color-bg-muted: #F5F7FA;
  --color-surface: #FFFFFF;

  --color-border: #E9ECF1;
  --color-border-strong: #DCE1E8;

  --color-success: #168A5B;
  --color-success-soft: #E8F7F0;
  --color-warning: #A66500;
  --color-warning-soft: #FFF4D6;
  --color-danger: #C93C49;
  --color-danger-soft: #FDECEF;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --radius-sm: .5rem; --radius-md: .75rem; --radius-lg: 1.125rem; --radius-xl: 1.5rem; --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16,19,24,.05);
  --shadow-md: 0 10px 30px rgba(16,19,24,.08);
  --shadow-lg: 0 24px 64px rgba(16,19,24,.12);
  --shadow-blue: 0 16px 40px rgba(47,107,255,.20);

  --container: 75rem;
  --container-article: 42rem;
}

/* Site sempre no tema CLARO/branco — a identidade de marca do TITAM é clara
   (design-system-light.md), igual ao produto. Sem troca automática por
   preferência do sistema operacional. Os tokens claros do :root acima valem
   sempre. */

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--color-bg); color:var(--color-text);
  font-family:var(--font-sans); font-size:1rem; line-height:1.6;
  letter-spacing:-.01em; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
img{max-width:100%; height:auto; display:block}
a{color:var(--color-brand)}
:focus-visible{outline:3px solid rgba(47,107,255,.30); outline-offset:3px}
.container{max-width:var(--container); margin:0 auto; padding:0 20px}
@media(min-width:768px){.container{padding:0 32px}}

/* Escala tipográfica — design system §6 (marca). Títulos com tracking negativo
   e pesos altos (Inter), corpo confortável. */
h1,h2,h3,h4{color:var(--color-text-strong); font-weight:670; letter-spacing:-.03em; line-height:1.12; text-wrap:balance; margin:0}
h1{font-size:clamp(2.1rem,4.4vw,2.95rem); line-height:1.07}
h2{font-size:clamp(1.5rem,2.7vw,1.9rem); font-weight:650; letter-spacing:-.025em; line-height:1.2; margin-top:2.2em}
h3{font-size:clamp(1.25rem,1.8vw,1.5rem); font-weight:640; letter-spacing:-.02em; margin-top:1.8em}
p{margin:1em 0; max-width:68ch}
article p, article li{color:var(--color-text)}
ul,ol{max-width:68ch; padding-left:1.3em}
li{margin:.45em 0}
.lede{font-size:clamp(1.1rem,1.4vw,1.19rem); line-height:1.6; color:var(--color-text-muted); max-width:60ch}

/* ===== Skip link ===== */
.skip-link{position:absolute; left:-9999px; top:0; z-index:100; background:var(--color-brand); color:#fff; padding:12px 20px; border-radius:0 0 var(--radius-md) 0; font-weight:640; text-decoration:none}
.skip-link:focus{left:0}

/* ===== Header ===== */
.site-header{position:sticky; top:0; z-index:40; background:color-mix(in srgb, var(--color-bg) 92%, transparent); backdrop-filter:blur(10px); border-bottom:1px solid var(--color-border)}
.site-header .container{display:flex; align-items:center; justify-content:space-between; height:72px; gap:16px}
.wordmark{display:inline-flex; align-items:center; text-decoration:none}
.wordmark img{height:26px; width:auto; display:block}
.site-footer .wordmark img{height:24px}
.nav-links{display:flex; align-items:center; gap:28px; list-style:none; margin:0; padding:0}
.nav-links a{color:var(--color-text-muted); text-decoration:none; font-size:.92rem; font-weight:560}
.nav-links a:hover{color:var(--color-text-strong)}
.nav-actions{display:flex; align-items:center; gap:10px}
.nav-toggle{display:none; background:none; border:1px solid var(--color-border); border-radius:var(--radius-sm); padding:8px 10px; color:var(--color-text)}

/* Mega menu */
.has-mega{position:relative}
.has-mega > a{display:inline-flex; align-items:center; gap:5px}
.has-mega .chev{transition:transform .16s ease}
.has-mega:hover .chev, .has-mega:focus-within .chev{transform:rotate(180deg)}
.mega-menu{position:absolute; top:calc(100% + 14px); left:50%; transform:translateX(-50%) translateY(4px); width:560px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-lg); box-shadow:var(--shadow-md); padding:18px; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .14s ease, transform .14s ease}
/* Ponte invisível que cobre o vão de 14px entre o item e o menu, para o
   dropdown não fechar quando o mouse desce do link até o menu. */
.mega-menu::before{content:""; position:absolute; top:-18px; left:0; right:0; height:18px}
.has-mega:hover .mega-menu, .has-mega:focus-within .mega-menu{opacity:1; visibility:visible; pointer-events:auto; transform:translateX(-50%) translateY(0)}
.mega-menu-grid{display:grid; grid-template-columns:1fr 1fr; gap:4px}
.mega-menu-grid a{display:flex; gap:12px; align-items:flex-start; padding:10px 12px; border-radius:var(--radius-md); text-decoration:none}
.mega-menu-grid a:hover{background:var(--color-bg-muted)}
.mega-menu-grid .mm-ic{display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:var(--radius-sm); background:var(--color-brand-soft); color:var(--color-brand); flex:none}
.mega-menu-grid .mm-ic .ic{width:18px; height:18px}
.mega-menu-grid .mm-tx{display:block; min-width:0}
.mega-menu-grid strong{display:block; font-size:.86rem; color:var(--color-text-strong); font-weight:620}
.mega-menu-grid span{display:block; font-size:.76rem; color:var(--color-text-subtle); margin-top:2px}
.mega-menu-all{display:block; margin-top:10px; padding-top:12px; border-top:1px solid var(--color-border); font-size:.84rem; font-weight:620; text-decoration:none; text-align:center}

@media(max-width:860px){
  .nav-links{display:none; flex-direction:column; align-items:stretch; gap:2px; padding:14px 0}
  .nav-toggle{display:inline-flex}
  .nav-links[data-open="true"]{display:flex}
  .nav-links li{width:100%}
  .nav-links > li > a{display:block; padding:12px 4px}
  .has-mega .mega-menu{position:static; transform:none; opacity:1; visibility:visible; pointer-events:auto; box-shadow:none; border:none; width:auto; margin:4px 0 8px; padding:8px 0 8px 14px; display:block}
  .mega-menu-grid{grid-template-columns:1fr}
  .chev{display:none}
}

/* ===== Ícones (DS §11 — linha, quadrado de cor suave, igual aos KPIs do produto) ===== */
.ic{width:20px; height:20px; flex:none; display:block}
.icon-box{display:inline-flex; align-items:center; justify-content:center; width:46px; height:46px; border-radius:var(--radius-md); background:var(--color-brand-soft); color:var(--color-brand); margin-bottom:16px}
.icon-box .ic{width:23px; height:23px}

/* ===== Buttons ===== */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:0 22px; border-radius:var(--radius-md); font-weight:620; font-size:.95rem; letter-spacing:-.01em; text-decoration:none; border:1px solid transparent; cursor:pointer; font-family:var(--font-sans); transition:transform .16s var(--ease,cubic-bezier(.2,0,0,1)), box-shadow .16s ease, background-color .16s ease}
.btn-primary{background:var(--color-brand); color:#fff; border-color:var(--color-brand); box-shadow:0 4px 14px rgba(47,107,255,.16)}
.btn-primary:hover{background:var(--color-brand-hover); transform:translateY(-1px); box-shadow:0 8px 20px rgba(47,107,255,.22)}
.btn-secondary{background:transparent; color:var(--color-text); border-color:var(--color-border-strong)}
.btn-secondary:hover{background:var(--color-bg-muted)}
.btn-whatsapp{background:#25D366; color:#06301b; border-color:#25D366}
.btn-whatsapp:hover{filter:brightness(.96); transform:translateY(-1px)}
.btn-sm{min-height:40px; padding:0 16px; font-size:.86rem}

/* ===== Breadcrumb ===== */
.breadcrumb{display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:.82rem; color:var(--color-text-subtle); margin:22px 0 8px}
.breadcrumb a{color:var(--color-text-subtle); text-decoration:none}
.breadcrumb a:hover{color:var(--color-brand)}
.breadcrumb .sep{opacity:.6}

/* ===== Hero (content pages) ===== */
.article-hero{padding:8px 0 32px; max-width:var(--container-article)}
.eyebrow{display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--color-brand); margin-bottom:10px}

/* ===== Featured image ===== */
.featured-image{margin:24px auto 8px}
.featured-image img{width:100%; max-width:var(--container); aspect-ratio:1672/941; object-fit:cover; border-radius:var(--radius-xl); border:1px solid var(--color-border); background:var(--color-bg-muted); box-shadow:var(--shadow-md)}
/* Variante embutida no corpo do artigo (depois do título): largura da coluna,
   sem padding de container e cantos um pouco menores. */
.featured-image.is-inline{max-width:none; padding:0; margin:20px 0 8px}
.featured-image.is-inline img{max-width:none; border-radius:var(--radius-lg)}

/* ===== Article body ===== */
.article-body{max-width:var(--container-article); padding-bottom:40px}
.article-body :is(h2,h3):first-child{margin-top:0}
.article-body table{width:100%; border-collapse:collapse; margin:28px 0; font-size:.92rem; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-lg); overflow:hidden}
.article-body th,.article-body td{padding:13px 14px; border-bottom:1px solid var(--color-border); text-align:left; vertical-align:top}
.article-body th{font-weight:700; color:var(--color-text-strong); background:var(--color-bg-muted)}
.article-body tr:last-child td{border-bottom:0}
@media(max-width:680px){.article-body table{display:block; overflow-x:auto; white-space:nowrap}.article-body th,.article-body td{min-width:180px}}

/* ===== Callout blocks ===== */
.callout{background:var(--color-brand-soft); border:1px solid color-mix(in srgb, var(--color-brand) 25%, transparent); border-radius:var(--radius-lg); padding:24px 28px; margin:36px auto; max-width:var(--container-article)}
.callout h3{margin-top:0; font-size:1.05rem}
.callout p{margin-bottom:16px}
.callout-actions{display:flex; gap:10px; flex-wrap:wrap}

/* ===== FAQ ===== */
.faq{max-width:var(--container-article); margin:clamp(48px,5vw,64px) auto}
.faq > h2{margin-bottom:20px}
.faq details{border:1px solid var(--color-border); border-radius:var(--radius-lg); padding:2px 20px; margin-bottom:12px; background:var(--color-surface); transition:border-color .16s ease}
.faq details:hover{border-color:var(--color-border-strong)}
.faq summary{cursor:pointer; padding:16px 0; font-weight:620; color:var(--color-text-strong); list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+"; float:right; color:var(--color-brand); font-weight:700}
.faq details[open] summary::after{content:"–"}
.faq p{padding-bottom:14px; color:var(--color-text-muted)}

/* ===== Related links ===== */
.related{max-width:var(--container); margin:56px 0 0; padding-top:36px; border-top:1px solid var(--color-border)}
.related h2{margin-top:0; font-size:1.1rem}
.related-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; margin-top:18px}
.related-card{display:block; padding:18px 20px; border:1px solid var(--color-border); border-radius:var(--radius-lg); text-decoration:none; color:var(--color-text-strong); font-weight:610; font-size:.92rem; background:var(--color-surface); transition:border-color .16s ease, transform .16s ease, box-shadow .16s ease}
.related-card:hover{border-color:var(--color-border-strong); transform:translateY(-2px); box-shadow:var(--shadow-sm)}
.related-card span{display:block; font-weight:500; color:var(--color-text-subtle); font-size:.78rem; margin-top:4px}
.related-card-soon{opacity:.55; cursor:default}
.related-card-soon:hover{border-color:var(--color-border)}

/* ===== Lead form ===== */
.lead-form{max-width:var(--container-article); background:var(--color-bg-muted); border:1px solid var(--color-border); border-radius:var(--radius-xl); padding:clamp(24px,3vw,32px); margin:clamp(40px,5vw,56px) auto}
.lead-form h3{margin-top:0}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px}
@media(max-width:520px){.form-row{grid-template-columns:1fr}}
.field{display:flex; flex-direction:column; gap:6px}
.field.full{grid-column:1/-1}
.field label{font-size:.8rem; font-weight:620; color:var(--color-text-muted)}
.field input, .field textarea{min-height:46px; border:1px solid var(--color-border-strong); border-radius:var(--radius-md); padding:0 14px; font-family:var(--font-sans); font-size:.92rem; background:var(--color-surface); color:var(--color-text-strong)}
.field textarea{min-height:90px; padding:10px 14px; resize:vertical}
.field input:focus, .field textarea:focus{outline:none; border-color:var(--color-brand); box-shadow:0 0 0 3px var(--color-brand-soft)}
.form-msg{font-size:.85rem; margin-top:12px; display:none}
.form-msg.show{display:block}
.form-msg.ok{color:var(--color-success)}
.form-msg.err{color:var(--color-danger)}

/* ===== Home hero ===== */
.hero-home{padding:clamp(48px,7vw,92px) 0 clamp(40px,6vw,64px); display:grid; grid-template-columns:1.1fr .9fr; gap:clamp(32px,5vw,56px); align-items:center; background:radial-gradient(115% 130% at 88% 8%, var(--color-brand-soft) 0%, transparent 46%)}
@media(max-width:900px){.hero-home{grid-template-columns:1fr}}
.hero-home h1{font-size:clamp(2.4rem,5.2vw,3.4rem); line-height:1.04}
.hero-home .lede{margin-bottom:26px; font-size:clamp(1.13rem,1.6vw,1.25rem)}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap; margin-top:26px}
.hero-proof{display:flex; flex-wrap:wrap; gap:10px; margin-top:28px}
.hero-proof span{font-size:.78rem; font-weight:620; color:var(--color-text-muted); background:var(--color-bg-muted); border:1px solid var(--color-border); border-radius:var(--radius-pill); padding:6px 14px}
.hero-visual{background:var(--color-surface); border-radius:var(--radius-xl); display:flex; align-items:center; justify-content:center; border:1px solid var(--color-border); padding:8px; box-shadow:var(--shadow-lg)}
.hero-visual img{border-radius:16px; width:100%; height:auto; display:block}

/* ===== Section / cards ===== */
.section{padding:clamp(56px,6vw,88px) 0}
.section-muted{background:var(--color-bg-subtle)}
.section-head{max-width:680px; margin-bottom:clamp(32px,4vw,48px)}
.section-head h2{font-size:clamp(1.75rem,3.2vw,2.25rem)}
.card-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:20px}
.card{background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-lg); padding:clamp(24px,3vw,30px); transition:border-color .16s ease, transform .16s ease, box-shadow .16s ease}
.card h3{margin-top:0; font-size:1.12rem}
.card p{color:var(--color-text-muted); font-size:.94rem}
.card:hover{border-color:var(--color-border-strong); transform:translateY(-2px); box-shadow:var(--shadow-sm)}
.card > .icon-box{margin-bottom:16px}

/* ===== Problema (split texto + visual) ===== */
.split{display:grid; grid-template-columns:1fr 1fr; gap:clamp(28px,4vw,56px); align-items:center}
@media(max-width:860px){.split{grid-template-columns:1fr}}
.loss-list{list-style:none; padding:0; margin:20px 0 0; display:grid; gap:12px}
.loss-list li{display:flex; gap:12px; align-items:flex-start; color:var(--color-text-muted)}
.loss-list .ic{color:var(--color-danger); margin-top:2px}
.tool-chips{display:flex; flex-wrap:wrap; gap:10px; align-content:flex-start; padding:24px; background:var(--color-bg-muted); border:1px solid var(--color-border); border-radius:var(--radius-xl)}
.tool-chips span{font-size:.82rem; font-weight:560; color:var(--color-text-subtle); background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-pill); padding:7px 14px}
.tool-chips .arrow{align-self:center; color:var(--color-text-subtle); font-weight:600; border:none; background:none; padding:0}
.tool-chips .one{color:#fff; background:var(--color-brand); border-color:var(--color-brand); font-weight:620}

/* ===== Jornada integrada (stepper) ===== */
.journey{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px}
.journey .step{font-size:.82rem; font-weight:600; color:var(--color-text-strong); background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-pill); padding:9px 16px; white-space:nowrap}
.journey .step.accent{color:#fff; background:var(--color-brand); border-color:var(--color-brand)}
.journey .sep{color:var(--color-brand); font-weight:700}

/* ===== Feature rows (imagem + texto alternados) ===== */
.feature-row{display:grid; grid-template-columns:1fr 1fr; gap:clamp(28px,5vw,64px); align-items:center; padding:clamp(28px,4vw,44px) 0}
@media(max-width:860px){.feature-row{grid-template-columns:1fr; gap:24px}}
.feature-row.reverse .feature-media{order:-1}
@media(max-width:860px){.feature-row.reverse .feature-media{order:0}}
.feature-media img{width:100%; height:auto; border-radius:var(--radius-lg); border:1px solid var(--color-border); box-shadow:var(--shadow-md); background:var(--color-bg-muted)}
.feature-text h3{margin-top:14px; font-size:clamp(1.35rem,2.2vw,1.7rem)}
.feature-list{list-style:none; padding:0; margin:18px 0 0; display:grid; gap:10px}
.feature-list li{display:flex; gap:10px; align-items:flex-start; color:var(--color-text-muted); font-size:.96rem}
.feature-list .ic{color:var(--color-brand); margin-top:3px; width:18px; height:18px}

/* ===== Segmentos (grid) ===== */
.segments-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:16px}
.segment-card{display:block; padding:20px; border:1px solid var(--color-border); border-radius:var(--radius-lg); text-decoration:none; background:var(--color-surface); transition:border-color .16s ease, transform .16s ease, box-shadow .16s ease}
.segment-card:hover{border-color:var(--color-border-strong); transform:translateY(-2px); box-shadow:var(--shadow-sm)}
.segment-card .icon-box{width:40px; height:40px; margin-bottom:12px}
.segment-card .icon-box .ic{width:20px; height:20px}
.segment-card strong{display:block; color:var(--color-text-strong); font-size:.98rem}
.segment-card span{display:block; color:var(--color-text-subtle); font-size:.84rem; margin-top:4px}

/* ===== Faixa de fechamento ===== */
.cta-band{background:linear-gradient(135deg, var(--color-brand-soft), var(--color-bg-muted)); border:1px solid var(--color-border); border-radius:var(--radius-xl); padding:clamp(36px,5vw,64px); text-align:center; max-width:var(--container); margin:0 auto}
.cta-band h2{max-width:20ch; margin:0 auto}
.cta-band p{color:var(--color-text-muted); max-width:52ch; margin:14px auto 0}
.cta-band .hero-actions{justify-content:center; margin-top:26px}

/* ===== Footer ===== */
.site-footer{border-top:1px solid var(--color-border); padding:48px 0 36px; margin-top:60px; background:var(--color-bg-subtle)}
.footer-grid{display:grid; grid-template-columns:1.4fr repeat(3,1fr); gap:28px}
@media(max-width:760px){.footer-grid{grid-template-columns:1fr 1fr}}
.footer-col h4{font-size:.74rem; text-transform:uppercase; letter-spacing:.06em; color:var(--color-text-subtle); margin-bottom:14px}
.footer-col ul{list-style:none; padding:0; margin:0}
.footer-col li{margin:8px 0}
.footer-col a{color:var(--color-text-muted); text-decoration:none; font-size:.88rem}
.footer-col a:hover{color:var(--color-brand)}
.footer-bottom{margin-top:40px; padding-top:20px; border-top:1px solid var(--color-border); display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:.8rem; color:var(--color-text-subtle)}

/* ===== WhatsApp float button ===== */
.wa-float{position:fixed; right:20px; bottom:20px; z-index:50; width:56px; height:56px; border-radius:50%; background:#25D366; display:flex; align-items:center; justify-content:center; box-shadow:0 10px 26px rgba(0,0,0,.22); text-decoration:none}
.wa-float svg{width:28px; height:28px}

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