/* ===== Variáveis e reset (tokens vêm de brand/guide-tokens.css) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #0B0F17; padding: 10px 16px;
  border-radius: 0 0 8px 0; z-index: 1000; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: var(--accent); color: #0B0F17;
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(52, 211, 153, 0.42); }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--text-muted); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  background: transparent;
}
.site-header.menu-open { background: var(--bg); }
.site-header.scrolled {
  /* segue o tema: fundo claro no modo claro, escuro no modo escuro */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; display: block; }
.accent { color: var(--accent-2); }
.nav-list { display: flex; gap: 28px; }
.nav-list a { color: var(--text-muted); font-weight: 500; font-size: 0.92rem; transition: color 0.2s; }
.nav-list a:hover { color: var(--text); }
.header-cta { padding: 9px 18px; font-size: 0.88rem; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(52, 211, 153, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(99, 102, 241, 0.10), transparent 60%);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../brand/bg-grid.svg");
  background-repeat: repeat;
  opacity: 0.5;
}
.hero-inner { max-width: 880px; }
.hero-eyebrow { color: var(--accent-2); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 12px; }
.hero-title {
  font-family: var(--font-display); font-size: var(--h1); line-height: 1.05; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 20px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text-muted); max-width: 640px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; }
.stat-value { display: inline-block; min-width: 4ch;
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { display: block; color: var(--text-muted); font-size: 0.88rem; margin-top: -4px; }

/* ===== Seções ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-elev); }
.section-title { font-family: var(--font-display); font-size: var(--h2); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-lede { color: var(--text-muted); max-width: 620px; margin-bottom: 44px; font-size: 1.05rem; }

/* ===== Sobre ===== */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; }
.about-text strong { color: var(--text); }
.about-cards { display: grid; gap: 16px; }
.about-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.about-card h3 { font-family: var(--font-display); font-size: var(--h3); margin-bottom: 8px; color: var(--accent); }
.about-card p { color: var(--text-muted); font-size: 0.94rem; }

/* ===== Cards de serviço ===== */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 28px; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.card-icon { font-size: 2rem; margin-bottom: 14px; }
.card h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.94rem; }

/* ===== Stack ===== */
.stack-group { margin-bottom: 30px; }
.stack-group h3 { font-family: var(--font-display); font-size: 1.05rem; color: var(--accent); margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--bg-elev); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 999px;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--text); }

/* ===== Portfólio ===== */
.portfolio-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.portfolio-list li {
  font-family: var(--font-display);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  font-weight: 600; text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.portfolio-list li:hover, .portfolio-list li:focus-within { transform: translateY(-4px); border-color: var(--accent); }
/* o card inteiro e o link do produto */
.portfolio-list a { display: block; padding: 20px; border-radius: inherit; }
.portfolio-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== CTA ===== */
.cta-section { background: var(--grad); }
.cta-inner { text-align: center; max-width: 720px; }
.cta-section .section-title { color: #0B0F17; }
.cta-section .section-lede { color: rgba(11, 15, 23, 0.78); margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-section .btn-primary { background: #0B0F17; color: #F8FAFC; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.cta-section .btn-ghost { color: #0B0F17; border-color: rgba(11,15,23,0.4); }
.cta-section .btn-ghost:hover { background: rgba(11,15,23,0.08); }

/* ===== Footer ===== */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer-wordmark { display: block; height: auto; opacity: 0.95; }
.footer-muted { color: var(--text-muted); font-size: 0.82rem; }
.footer-copy { color: var(--text-muted); font-size: 0.82rem; }

/* ===== CTA flutuante ===== */
.floating-cta {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.45);
  transition: transform 0.25s ease;
}
.floating-cta:hover { transform: scale(1.1); }

/* ===== Animações / reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Acessibilidade: foco e reduced motion ===== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  .btn, .card, .portfolio-list li, .floating-cta, .tag { transition: none; }
}

/* ===== Responsivo ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .header-cta { padding: 8px 14px; font-size: 0.8rem; }
  .site-header.menu-open .nav {
    display: block; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg); padding: 20px 24px; border-bottom: 1px solid var(--border);
  }
  .site-header.menu-open .nav-list { flex-direction: column; gap: 16px; }
}
@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .section { padding: 64px 0; }
}
