/* ============================================================================
   Conecta Tecnologia — Site institucional
   Depende de tokens.css. Tema controlado por [data-theme] no <html>.
   ============================================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--brand-soft-strong); color: var(--text); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-6); }

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand-text);
}

/* Palavra de destaque — coral sólido (o gradiente fica reservado ao símbolo) */
.grad-text { color: var(--brand); }

/* Visibilidade por tema */
[data-theme="dark"] .only-light { display: none !important; }
[data-theme="light"] .only-dark { display: none !important; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: var(--z-toast);
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--r-md);
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================ Botões ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-weight: 600; font-size: var(--fs-body);
  padding: 10px 18px; border-radius: var(--r-md);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  white-space: nowrap; border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 14px 26px; font-size: 1rem; border-radius: var(--r-lg); }
.btn--sm { padding: 8px 14px; font-size: var(--fs-sm); }

.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--brand-strong); box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-3); border-color: var(--text-faint); }

.btn--glass { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.32); backdrop-filter: blur(6px); }
.btn--glass:hover { background: rgba(255,255,255,.22); }

/* ============================ Header ============================ */
.site-header {
  position: sticky; top: 0; z-index: var(--z-topbar);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.site-header__inner { display: flex; align-items: center; gap: var(--sp-6); height: 68px; }
.brand__logo { height: 34px; width: auto; }

.site-nav { display: flex; gap: var(--sp-2); margin-left: auto; }
.site-nav a {
  padding: 8px 14px; border-radius: var(--r-md); font-weight: 500;
  color: var(--text-secondary); transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface-3); }

.site-header__actions { display: flex; align-items: center; gap: var(--sp-3); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center;
  color: var(--text-secondary); border: 1px solid var(--border);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.theme-toggle:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); }

.menu-toggle { display: none; width: 40px; height: 40px; border-radius: var(--r-md); flex-direction: column; gap: 5px; align-items: center; justify-content: center; border: 1px solid var(--border); }
.menu-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4) var(--sp-6) var(--sp-6); border-bottom: 1px solid var(--border-subtle); background: var(--surface); }
.mobile-nav a { padding: 12px; border-radius: var(--r-md); font-weight: 500; color: var(--text-secondary); }
.mobile-nav a:hover { background: var(--surface-3); color: var(--text); }
.mobile-nav .btn { margin-top: var(--sp-2); }
.mobile-nav.is-open { display: flex; }

/* ============================ Hero ============================ */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(55% 50% at 82% 12%, rgba(255,92,51,.07), transparent 70%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--bg-pattern) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .6;
  -webkit-mask-image: radial-gradient(75% 75% at 50% 30%, #000, transparent 80%);
  mask-image: radial-gradient(75% 75% at 50% 30%, #000, transparent 80%);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; letter-spacing: -0.03em; }
.hero__lead { margin-top: var(--sp-5); font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-secondary); max-width: 40ch; }
.hero__cta { margin-top: var(--sp-7); display: flex; gap: var(--sp-3); flex-wrap: wrap; }


/* Hero visual — tela real do produto num mockup de navegador */
.hero__visual { display: grid; place-items: center; }
.hero-shot { position: relative; width: min(560px, 100%); animation: heroFloat 7s var(--ease) infinite; }
.hero-shot__win { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-xl); background: var(--surface); }
.hero-shot__bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border-subtle); }
.hero-shot__bar .d { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.hero-shot__bar .d:first-child { background: var(--brand); }
.hero-shot__bar .u { margin-left: 10px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-faint); }
.hero-shot__frame { position: relative; width: 100%; aspect-ratio: 16 / 11; overflow: hidden; background: var(--surface); --z: .55; }
.hero-shot__frame iframe { position: absolute; top: 0; left: 0; width: calc(100% / var(--z)); height: calc(100% / var(--z)); transform: scale(var(--z)); transform-origin: top left; border: 0; }
.hero-shot__tag { position: absolute; left: -14px; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--r-full); box-shadow: var(--shadow-lg); }
.hero-shot__dots { display: flex; }
.hero-shot__dots span { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--elevated); margin-left: -5px; }
.hero-shot__dots span:first-child { margin-left: 0; }
.hero-shot__tag b { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--text); white-space: nowrap; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ============================ Segmentos ============================ */
.segments { border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); background: var(--surface-2); padding: var(--sp-7) 0; }
.segments__label { text-align: center; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-4); }
.segments__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sp-3) var(--sp-4); font-family: var(--font-display); font-weight: 600; color: var(--text-secondary); font-size: clamp(.9rem, 1.5vw, 1.05rem); }
.segments__row span[aria-hidden] { color: var(--brand); }

/* ============================ Seções ============================ */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--surface-2); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.section__head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.section__head .eyebrow { margin-bottom: var(--sp-3); }
.section__title { font-size: clamp(1.75rem, 3.5vw, 2.6rem); }
.section__sub { margin-top: var(--sp-4); color: var(--text-secondary); font-size: 1.05rem; }

/* ============================ Área do cliente ============================ */
.access { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-4); }
.access__card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-5); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.access__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--pc, var(--brand)); }
.access__ico { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; color: #fff; background: var(--pc, var(--brand)); box-shadow: var(--shadow-sm); margin-bottom: var(--sp-2); }
.access__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.access__tag { font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); }
.access__go { margin-top: var(--sp-3); font-weight: 600; font-size: var(--fs-sm); color: var(--text-secondary); }
.access__card:hover .access__go { color: var(--pc, var(--brand)); }

/* ============================ Produtos ============================ */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.product {
  display: flex; flex-direction: column; gap: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--sp-6);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-soft-border); }
.product__icon { width: 56px; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center; color: #fff; background: var(--pc, var(--brand)); box-shadow: var(--shadow-sm); flex-shrink: 0; }
.product__icon--img { background: transparent; box-shadow: none; }
.product__icon--badge { background: transparent; padding: 0; overflow: hidden; }
.product__icon--badge img { width: 100%; height: 100%; }
.product__body { display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.product__head { display: flex; flex-direction: column; gap: 4px; }
.product__name { font-size: 1.3rem; display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.product__rename { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; color: var(--text-faint); background: var(--surface-3); padding: 2px 8px; border-radius: var(--r-full); letter-spacing: 0; text-transform: none; }
.product__tag { font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); }
.product__desc { color: var(--text-secondary); font-size: var(--fs-body); }
.product__features { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); margin-top: auto; }
.product__features li { position: relative; padding-left: 24px; font-size: var(--fs-sm); color: var(--text-secondary); }
.product__features li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.product--featured { border-color: var(--brand-soft-border); box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.product--featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand); }
.product__badge { align-self: flex-start; margin-top: var(--sp-1); font-size: var(--fs-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--r-full); background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-soft-border); letter-spacing: var(--tracking-wide); text-transform: uppercase; }

.product--cta { background: #15262E; border-color: transparent; color: var(--text-inverse); }
[data-theme="dark"] .product--cta { background: #1A2E37; border: 1px solid var(--border-strong); }
.product--cta .product__name, .product--cta .product__desc { color: #F7F8FA; }
.product--cta .product__tag { color: var(--brand-line); }
.product--cta .product__desc { color: #B7C3CA; }
.product--cta .btn { margin-top: var(--sp-2); align-self: flex-start; }

/* Card-link: o card inteiro vira link para a página do produto */
a.product { color: inherit; }
a.product .product__body::after { content: "Ver produto →"; margin-top: 4px; font-weight: 600; font-size: var(--fs-sm); color: var(--brand-text); }
a.product:hover { border-color: var(--brand-soft-border); }
a.product:hover .product__body::after { color: var(--brand); }

/* ============================ Diferenciais ============================ */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature__ico { width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); margin-bottom: var(--sp-4); }
.feature h3 { font-size: 1.1rem; margin-bottom: var(--sp-2); }
.feature p { color: var(--text-secondary); font-size: var(--fs-sm); }

/* ============================ Sobre ============================ */
.about { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.about__text .eyebrow { margin-bottom: var(--sp-3); }
.about__text .section__title { text-align: left; margin-bottom: var(--sp-5); }
.about__text p { color: var(--text-secondary); margin-bottom: var(--sp-4); }
.about__text strong { color: var(--text); }
.about__values { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }
.pill { font-size: var(--fs-sm); font-weight: 600; padding: 6px 14px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-secondary); border: 1px solid var(--border); }

.about__mark {
  display: grid; place-items: center; gap: var(--sp-5); padding: clamp(28px, 4vw, 48px);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2xl);
}
.about__mark img { width: min(260px, 80%); height: auto; }
.about__tagline { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text-secondary); text-align: center; }

/* ============================ CTA band ============================ */
.cta-band { background: #15262E; color: #F7F8FA; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-top: 3px solid var(--brand);
}
.cta-band__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-7); flex-wrap: wrap; padding: clamp(48px, 7vw, 88px) 0; }
.cta-band__text h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.cta-band__text p { color: #B7C3CA; margin-top: var(--sp-3); max-width: 46ch; font-size: 1.05rem; }
.cta-band__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ============================ Footer ============================ */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: clamp(40px, 6vw, 64px) 0 var(--sp-6); }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: var(--sp-7); }
.site-footer__brand img { height: 34px; width: auto; margin-bottom: var(--sp-4); }
.site-footer__brand p { color: var(--text-muted); font-size: var(--fs-sm); max-width: 34ch; }
.site-footer__col { display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer__col h4 { font-family: var(--font-display); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-faint); }
.site-footer__col a { color: var(--text-secondary); font-size: var(--fs-sm); transition: color var(--dur-fast) var(--ease); }
.site-footer__col a:hover { color: var(--brand-text); }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-8); padding-top: var(--sp-5); border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: var(--fs-sm); }
.site-footer__tag { font-family: var(--font-display); font-weight: 600; }

/* ============================ Reveal / animações ============================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-shot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================ Responsivo ============================ */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .hero-shot { width: min(480px, 100%); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .site-header .btn--primary { display: none; }
  .menu-toggle { display: flex; }
  .products { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
}
