/* =============================================================================
   Samirhv — Sistema visual da vitrine pública
   Dark-only · restraint técnico · acento indigo · tipografia Archivo.
   Ver DESIGN.md e PRODUCT.md na raiz do repositório.
   Substitui o antigo tema "Ai Coding / CodePilot" (removido: costume de
   terminal, CSS morto de #features/#benchmarks/#compare/#pricing).
============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* Canvas theme bridge (mantém a engrenagem do tema Canvas coerente) */
  --cnvs-themecolor: #6366f1;
  --cnvs-themecolor-rgb: 99, 102, 241;
  --cnvs-body-font: 'Archivo', sans-serif;
  --cnvs-secondary-font: 'JetBrains Mono', monospace;

  /* Superfícies */
  --s-bg: #0b0b11;
  --s-bg-2: #101019;
  --s-surface: #14141e;
  --s-surface-2: #1b1b28;
  --s-line: rgba(150, 155, 185, 0.12);
  --s-line-2: rgba(99, 102, 241, 0.22);

  /* Tinta */
  --s-ink: #f4f5fb;
  --s-ink-2: #c3c8d8;
  --s-muted: #8b93a7;
  --s-faint: #626a7e;

  /* Acento */
  --s-accent: #6366f1;
  --s-accent-ink: #8b93f8;      /* acento como TEXTO em dark (contraste AA) */
  --s-accent-ink-2: #a5b4fc;    /* acento como texto sobre superfície tintada */
  --s-accent-deep: #4f46e5;
  --s-accent-soft: rgba(99, 102, 241, 0.10);
  --s-accent-soft-2: rgba(99, 102, 241, 0.16);

  /* Semânticos */
  --s-ok: #34d399;
  --s-warn: #f5b301;
  --s-danger: #f87171;

  /* Fontes */
  --s-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --s-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Raio / medidas */
  --s-r-sm: 8px;
  --s-r: 12px;
  --s-r-lg: 16px;
  --s-r-pill: 999px;
  --s-w: 1120px;
  --s-w-prose: 720px;

  /* z-index semântico */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-modal: 1050;
  --z-toast: 1080;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
body {
  font-family: var(--s-sans);
  background-color: var(--s-bg);
  color: var(--s-ink-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.stretched { overflow-x: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--s-sans);
  color: var(--s-ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a { color: var(--s-accent-ink); text-decoration: none; }
a:hover { color: var(--s-accent-ink-2); }

::selection { background: rgba(99, 102, 241, 0.30); color: #fff; }

:focus-visible {
  outline: 2px solid var(--s-accent-ink);
  outline-offset: 2px;
  border-radius: 5px;
}

/* Scrollbar sóbria */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--s-bg); }
::-webkit-scrollbar-thumb { background: #262636; border-radius: 6px; border: 2px solid var(--s-bg); }
::-webkit-scrollbar-thumb:hover { background: #33334a; }

/* Container: teto próprio, respiro lateral consistente */
.container { max-width: var(--s-w); }

/* ── Ritmo de seção (fluido, variado) ───────────────────────────────────── */
.s-section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; }
.s-section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.s-bg-2 { background-color: var(--s-bg-2); }
.s-prose { max-width: var(--s-w-prose); }

/* ── Tipografia utilitária ──────────────────────────────────────────────── */
.s-display {
  font-family: var(--s-sans);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--s-ink);
  text-wrap: balance;
  margin: 0;
}
.s-h2 {
  font-weight: 700;
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  letter-spacing: -0.025em;
  color: var(--s-ink);
  text-wrap: balance;
  margin: 0;
}
.s-h3 {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  color: var(--s-ink);
  margin: 0;
}
.s-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--s-ink-2);
  max-width: 34em;
  margin: 0;
}
.s-body { font-size: 1rem; line-height: 1.75; color: var(--s-ink-2); }
.s-muted { color: var(--s-muted); }
.s-mono { font-family: var(--s-mono); }
.s-meta {
  font-family: var(--s-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--s-muted);
}

/* Kicker: no máximo UM por página. Sem "//". */
.s-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--s-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--s-accent-ink-2);
  margin: 0 0 1.1rem;
}
.s-kicker::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--s-accent);
  display: inline-block;
}

/* ── Botões ─────────────────────────────────────────────────────────────── */
.s-btn {
  --btn-bg: var(--s-accent);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--s-sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 13px 22px;
  border-radius: var(--s-r-sm);
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .12s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.s-btn:hover { background: var(--s-accent-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(79, 70, 229, 0.30); }
.s-btn:active { transform: translateY(0); }
.s-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--s-ink);
  border-color: var(--s-line);
}
.s-btn--ghost:hover { background: var(--s-accent-soft); border-color: var(--s-line-2); color: var(--s-ink); box-shadow: none; transform: translateY(-1px); }
.s-btn--sm { padding: 9px 15px; font-size: 0.85rem; }
.s-btn--lg { padding: 15px 26px; font-size: 1rem; }
.s-btn i { font-size: 0.9em; }

/* ── Superfícies (sem glass) ────────────────────────────────────────────── */
.s-card {
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: var(--s-r);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.s-card--pad { padding: clamp(1.4rem, 2.5vw, 2rem); }
a.s-card:hover, .s-card--hover:hover {
  border-color: var(--s-line-2);
  transform: translateY(-2px);
  background: var(--s-surface-2);
}
.s-panel {
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: var(--s-r-lg);
}

/* ── Tags / chips ───────────────────────────────────────────────────────── */
.s-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--s-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--s-muted);
  background: rgba(150, 155, 185, 0.06);
  border: 1px solid var(--s-line);
  border-radius: 6px;
  padding: 4px 10px;
}
.s-tag--accent { color: var(--s-accent-ink-2); background: var(--s-accent-soft); border-color: var(--s-line-2); }

/* Ícone-selo (substitui os "rounded-icon acima de todo heading" — usado com parcimônia) */
.s-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--s-accent-soft);
  border: 1px solid var(--s-line-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--s-accent-ink-2);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.s-icon--lg { width: 58px; height: 58px; border-radius: 14px; font-size: 1.45rem; }

/* ── Painel terminal / agente (imagery de produto, ESTÁTICO) ────────────── */
.s-term {
  background: #0c0c15;
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.s-term__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  background: #101017;
  border-bottom: 1px solid var(--s-line);
}
.s-term__dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.s-term__dot--r { background: #ff5f57; }
.s-term__dot--y { background: #febc2e; }
.s-term__dot--g { background: #28c840; }
.s-term__title { margin-left: 10px; font-family: var(--s-mono); font-size: 0.72rem; color: var(--s-muted); }
.s-term__body {
  padding: 20px 22px;
  font-family: var(--s-mono);
  font-size: 0.82rem;
  line-height: 1.85;
  color: #e6e9f2;
  overflow-x: auto;
}
.s-term__body .c-prompt { color: var(--s-accent-ink-2); user-select: none; }
.s-term__body .c-cmt { color: #737b90; }
.s-term__body .c-ok { color: #4ade80; }
.s-term__body .c-key { color: #c4b5fd; font-weight: 500; }
.s-term__body .c-dim { color: #9aa2b6; }
.s-term__foot {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px;
  border-top: 1px solid var(--s-line);
  background: rgba(99, 102, 241, 0.05);
  font-family: var(--s-mono);
  font-size: 0.72rem;
  color: var(--s-accent-ink-2);
}

/* ── Aura de fundo (quieta — substitui dot-grid animado + glows fortes) ──── */
.s-aura {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.s-aura::before {
  content: '';
  position: absolute;
  top: -42%; right: -4%;
  width: min(640px, 66vw); height: min(640px, 66vw);
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.11), transparent 60%);
  filter: blur(16px);
}
.s-aura--center::before { top: -40%; left: 50%; right: auto; transform: translateX(-50%); opacity: 0.7; }

/* ── Dot-grid animado (restaurado a pedido: bolinhas índigo driftando sobre a aura) ── */
.s-hero__dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
  animation: s-dot-drift 8s ease-in-out infinite;
}
@keyframes s-dot-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) { .s-hero__dots { animation: none; } }

/* ── Header retematizado ────────────────────────────────────────────────── */
#header {
  --cnvs-header-bg: transparent;
  --cnvs-header-sticky-bg: rgba(11, 11, 17, 0.86);
  --cnvs-primary-menu-font: var(--s-sans);
  --cnvs-primary-menu-font-weight: 500;
  --cnvs-primary-menu-font-size: 0.94rem;
  --cnvs-primary-menu-tt: none;
  --cnvs-primary-menu-ls: 0;
  --cnvs-primary-menu-color: var(--s-ink-2);
  --cnvs-primary-menu-hover-color: var(--s-ink);
}
#header.sticky-header #header-wrap { backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--s-line); }
.s-logo { font-family: var(--s-mono); font-size: 1.2rem; font-weight: 700; color: var(--s-ink); letter-spacing: -0.02em; }
.s-logo b { color: var(--s-accent); font-weight: 700; }
.s-cta { /* botão do header */ }

/* Dropdown "Projetos" (retheme do antigo cp-dropdown) */
.s-dd-parent { position: relative; }
.s-dd { list-style: none; margin: 0; padding: 8px; }
.s-dd > li { margin: 0; }
.s-dd a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--s-ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.s-dd a:hover { background-color: var(--s-accent-soft); color: var(--s-ink); }
.s-dd a > i { font-size: 1.05rem; color: var(--s-accent-ink-2); width: 22px; text-align: center; flex-shrink: 0; }
.s-dd-text { display: flex; flex-direction: column; line-height: 1.3; }
.s-dd-text strong { font-weight: 600; font-size: 0.9rem; color: inherit; }
.s-dd-text small { font-family: var(--s-mono); font-size: 0.66rem; color: var(--s-muted); }
.s-caret { font-size: 0.6rem; margin-left: 6px; opacity: .65; transition: transform .2s ease; }

@media (min-width: 992px) {
  .s-dd {
    position: absolute; top: 100%; left: 50%; margin-top: 12px;
    transform: translateX(-50%) scale(.97); transform-origin: top center;
    min-width: 262px;
    background-color: #12121b;
    border: 1px solid var(--s-line);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: var(--z-dropdown);
  }
  .s-dd::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; }
  .s-dd-parent:hover > .s-dd { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) scale(1); }
  .s-dd-parent:hover .s-caret { transform: rotate(180deg); }
}
@media (max-width: 991.98px) {
  .s-dd { padding-left: 16px; }
  .s-caret { display: none; }
}

/* ── Footer retematizado ────────────────────────────────────────────────── */
#footer { background-color: var(--s-bg); border-top: 1px solid var(--s-line); }
#footer h4 { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--s-muted); }
#footer a.s-flink { color: var(--s-ink-2); }
#footer a.s-flink:hover { color: var(--s-accent-ink-2); }
#copyrights { background-color: var(--s-bg); border-top: 1px solid var(--s-line); }

/* ── Abas por SO ────────────────────────────────────────────────────────── */
.s-ostabs { display: flex; gap: 8px; flex-wrap: wrap; }
.s-ostab {
  font-family: var(--s-sans); font-size: 0.85rem; font-weight: 600;
  color: var(--s-muted);
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: 9px;
  padding: 9px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: .15s;
}
.s-ostab:hover:not(:disabled) { color: var(--s-ink-2); border-color: var(--s-line-2); }
.s-ostab.is-active { color: #fff; background: var(--s-accent-soft-2); border-color: var(--s-accent); }
.s-ostab:disabled { opacity: .45; cursor: not-allowed; }
.s-ostab .cnt { font-family: var(--s-mono); font-size: 0.66rem; color: var(--s-muted); background: rgba(0,0,0,0.3); border-radius: 5px; padding: 1px 7px; }
.s-ostab.is-active .cnt { color: var(--s-accent-ink-2); }

/* ── Movimento (page-load discreto) ─────────────────────────────────────────
   Failure-safe: o conteúdo NUNCA depende da animação para ficar visível.
   Só transform é animado (opacity fica 1). Em headless/aba oculta/reduced-motion
   o elemento aparece normalmente — no máximo sem o deslize.                    */
@media (prefers-reduced-motion: no-preference) {
  .s-reveal { animation: s-rise .8s cubic-bezier(.16, 1, .3, 1) both; }
  .s-reveal[data-d="1"] { animation-delay: .06s; }
  .s-reveal[data-d="2"] { animation-delay: .13s; }
  .s-reveal[data-d="3"] { animation-delay: .2s; }
  .s-reveal[data-d="4"] { animation-delay: .27s; }
}
@keyframes s-rise {
  from { transform: translateY(16px); }
  to   { transform: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.s-hero {
  position: relative;
  padding-top: clamp(7rem, 11vw, 10.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.s-hero__trust {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--s-mono); font-size: 0.76rem; color: var(--s-muted);
}
.s-hero__trust .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--s-ok); box-shadow: 0 0 0 3px rgba(52,211,153,0.16); }

/* Faixa fina de tecnologias — estática, sóbria (substitui o marquee animado) */
.s-techrow { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.s-techrow span { display: inline-flex; align-items: center; gap: 7px; font-family: var(--s-mono); font-size: 0.72rem; color: var(--s-muted); }
.s-techrow i { color: var(--s-accent-ink-2); font-size: 0.85rem; }

/* Grade de projetos + destaque */
.s-featured { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; }
@media (min-width: 900px) { .s-featured { grid-template-columns: auto 1fr auto; gap: 28px; } }
.s-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

/* Lista de pontos (feature) */
.s-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.s-points li { display: flex; gap: 13px; }
.s-points .n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: var(--s-accent-soft); border: 1px solid var(--s-line-2); color: var(--s-accent-ink-2); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.s-points strong { display: block; color: var(--s-ink); font-weight: 600; font-size: 0.98rem; margin-bottom: 2px; }
.s-points span.d { color: var(--s-muted); font-size: 0.9rem; line-height: 1.6; }

/* ── Helpers ────────────────────────────────────────────────────────────── */
.s-divider { height: 1px; background: var(--s-line); border: 0; margin: 0; }
.s-stack { display: flex; flex-direction: column; }
.s-hero-min { min-height: min(760px, 100vh); }
.s-accent-ink { color: var(--s-accent-ink-2); }
