/* ==========================================================================
   Tathos — Nova Home (V1 preview)
   Paleta reaproveitada da marca existente (cores já usadas no site atual:
   #0f7699 / #149dcc no botão de cookies, #0E3B53 nos títulos das páginas
   legais, #334155 / #0f172a no corpo de texto).
   ========================================================================== */

:root{
  --color-primary: #0f7699;
  --color-primary-dark: #0b5c78;
  --color-accent: #149dcc;
  --color-navy: #0e3b53;
  --color-ink: #0f172a;
  --color-body: #334155;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0e3b53;
  --color-bg-enterprise: #f1f5f9;

  --font-base: 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(14, 59, 83, 0.16);

  --container: 1140px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-body);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: var(--color-primary); text-decoration: none; }
a:hover{ color: var(--color-primary-dark); }

h1, h2, h3{
  color: var(--color-ink);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
}

h1{ font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; }
h2{ font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3{ font-size: 1.05rem; font-weight: 600; }

p{ margin: 0 0 16px; }

ul, ol{ margin: 0; padding: 0; list-style: none; }

.sr-only{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

.skip-link{
  position: absolute; left: -9999px; top: 0;
  background: var(--color-navy); color: #fff;
  padding: 12px 20px; border-radius: 0 0 8px 0; z-index: 1000;
}
.skip-link:focus{ left: 0; }

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

/* ---------- Botões ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover{
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost{
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-border);
}
.btn-ghost:hover{
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-lg{ padding: 16px 32px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand{ flex-shrink: 0; }
.brand img{ height: 38px; width: auto; flex-shrink: 0; }

.nav-toggle{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}
.nav-toggle span{
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  transition: transform .2s ease, opacity .2s ease;
}

.main-nav{
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.main-nav.is-open{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease;
}

.main-nav ul{
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.main-nav a{
  color: var(--color-navy);
  font-weight: 600;
  font-size: 1.1rem;
}
.main-nav a:hover{ color: var(--color-primary); }
.nav-cta{ align-self: flex-start; }
.main-nav .nav-cta{ color: #fff; }

/* Hamburguer -> X, reaproveitando o aria-expanded que o main.js já define */
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* iOS Safari: backdrop-filter num ancestral altera o comportamento de position
   em descendentes. O painel mobile agora usa position:absolute (não fixed),
   então isso deixou de ser estritamente necessário, mas mantido por segurança. */
@media (max-width: 899px){
  .site-header{ backdrop-filter: none; }
  .nav-cta{
    align-self: stretch;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

/* ---------- Hero ---------- */
.hero{
  padding: 64px 0 72px;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(20,157,204,0.10), transparent 60%),
    var(--color-bg);
}
.hero-grid{
  display: grid;
  gap: 48px;
  align-items: center;
}
.eyebrow{
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(15,118,153,0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-lead{
  font-size: 1.2rem;
  color: var(--color-navy);
}
.hero-desc{
  font-size: 1.02rem;
  color: var(--color-body);
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* Chat mockup (hero + exemplo) */
.chat-card{
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  max-width: 420px;
  margin-inline: auto;
}
.chat-card-lg{ max-width: 480px; }
.chat-card-head{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.chat-card-head .dot{
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-border);
}
.chat-card-title{
  margin-left: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-muted);
}
.chat-bubble{
  max-width: 86%;
  padding: 11px 15px;
  border-radius: 16px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.chat-bubble-in{
  background: var(--color-bg-alt);
  color: var(--color-ink);
  border-bottom-left-radius: 4px;
}
.chat-bubble-out{
  background: var(--color-primary);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-bubble em{ font-style: normal; opacity: 0.92; font-size: 0.85em; }

.chat-typing{
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 14px 16px;
  width: fit-content;
}
.chat-typing span{
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  animation: typing 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2){ animation-delay: .15s; }
.chat-typing span:nth-child(3){ animation-delay: .3s; }
@keyframes typing{
  0%, 60%, 100%{ opacity: 0.35; transform: translateY(0); }
  30%{ opacity: 1; transform: translateY(-2px); }
}

/* ---------- Seções genéricas ---------- */
.section{ padding: 72px 0; }
.section-alt{ background: var(--color-bg-alt); }
.section-lead{
  font-size: 1.08rem;
  color: var(--color-navy);
  max-width: 640px;
}
.section-closing{
  font-weight: 600;
  color: var(--color-navy);
  font-size: 1.05rem;
}
.muted-note{ color: var(--color-muted); font-size: 0.95rem; }
.disclaimer{ color: var(--color-muted); font-size: 0.88rem; font-style: italic; }

.two-col{
  display: grid;
  gap: 48px;
  align-items: start;
}
.two-col.reverse .demo-frame{ order: 1; }

.side-card{
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.side-card h3{ margin-bottom: 10px; }

/* Lista com check */
.check-list{ margin: 0 0 20px; }
.check-list li{
  position: relative;
  padding: 6px 0 6px 30px;
  color: var(--color-ink);
}
.check-list li::before{
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/12px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Problema */
.problem-grid{
  display: grid;
  gap: 20px;
  margin: 32px 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.problem-grid li{
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
}
.problem-grid svg{
  width: 26px; height: 26px;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.problem-grid p{ margin: 0; color: var(--color-ink); font-weight: 500; }

/* Como funciona */
.steps{
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 32px;
}
.steps li{
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  position: relative;
}
.step-num{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--color-navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.steps h3{ margin-bottom: 6px; }
.steps p{ margin: 0; font-size: 0.92rem; }

/* Segmentos */
.segment-grid{
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 28px;
}
.segment-card{
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.segment-card:hover{
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.segment-card svg{
  width: 26px; height: 26px;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.segment-card h3{ margin-bottom: 6px; font-size: 1rem; }
.segment-card p{ margin: 0; font-size: 0.88rem; color: var(--color-muted); }

/* Mais que Secretária IA (dark) */
.section-dark{
  background: linear-gradient(135deg, var(--color-navy), #133a52 60%, #0b2c40);
  color: #e2ecf2;
}
.section-dark h2{ color: #fff; }
.section-dark .section-lead{ color: #c7d9e3; max-width: 760px; }

/* Enterprise */
.section-enterprise{ background: var(--color-bg-enterprise); }
/* Mesmo princípio de scroll-margin-top usado em /enterprise/ (assets/css/
   enterprise.css) para as âncoras internas: header ~68px mobile / ~83px
   desktop + respiro visual, para o título não ficar colado no header
   sticky ao navegar direto para #enterprise. */
#enterprise{ scroll-margin-top: 88px; }
@media (min-width: 900px){
  #enterprise{ scroll-margin-top: 112px; }
}
.enterprise-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0 0;
}
.enterprise-list li{ display: flex; }
.enterprise-list a{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.92rem;
}
.enterprise-list a:hover{
  border-color: var(--color-primary);
  color: var(--color-primary);
}
@media (min-width: 900px){
  .enterprise-list{
    grid-template-columns: repeat(4, 1fr);
    max-width: 760px;
  }
}

/* Ação secundária discreta, abaixo do grid — não deve competir visualmente
   com os quatro produtos nem parecer um quinto botão. */
.enterprise-more{ margin: 20px 0 0; }
.enterprise-more a{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.enterprise-more a span{ transition: transform .15s ease; }
.enterprise-more a:hover span{ transform: translateX(3px); }

/* CTA final */
.section-cta{
  background: var(--color-bg-alt);
  text-align: center;
}
.cta-inner{ max-width: 640px; }
.cta-inner .section-lead{ margin-inline: auto; }
.cta-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--color-navy);
  color: #cfe0e8;
  padding: 56px 0 0;
}
.footer-grid{
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-logo{ height: 28px; width: auto; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: 0.9; }
.site-footer h3{
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.site-footer ul{ display: flex; flex-direction: column; gap: 10px; }
.site-footer a{ color: #cfe0e8; }
.site-footer a:hover{ color: #fff; }
.site-footer p{ font-size: 0.9rem; }
.footer-bottom{
  padding: 20px 0;
  font-size: 0.82rem;
  color: #93b0bd;
}

/* ---------- Responsivo ---------- */
@media (min-width: 900px){
  .nav-toggle{ display: none; }
  .main-nav{
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    max-height: none;
    overflow-y: visible;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border-top: none;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    gap: clamp(16px, 3vw, 32px);
  }
  .main-nav ul{ flex-direction: row; gap: clamp(14px, 2.2vw, 26px); }
  .main-nav a{ font-size: clamp(0.85rem, 1.5vw, 0.96rem); }
}

@media (min-width: 860px){
  .hero-grid{ grid-template-columns: 1.1fr 0.9fr; }
  .two-col{ grid-template-columns: 1fr 1fr; }
  .two-col.reverse{ grid-template-columns: 0.9fr 1.1fr; }
  .two-col.reverse .demo-frame{ order: 0; }
}
