/* ==========================================================
   NINJAHOST — THEME CSS v2.0
   Cor primária: #6d4aff / #8b6cff
   ========================================================== */

:root {
  /* --- Cores base (LIGHT) --- */
  --bg:            #f5f5f6;
  --bg-2:          #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #fafafb;
  --bg-elevated:   #ffffff;

  /* --- Vermelho — igual à logo --- */
  --red:           #6d4aff;
  --red-bright:    #8b6cff;
  --red-dark:      #4f2fd7;
  --red-glow:      rgba(109, 74, 255, 0.35);
  --red-soft:      rgba(109, 74, 255, 0.06);
  --red-border:    rgba(109, 74, 255, 0.22);

  /* --- Texto --- */
  --text:          #222225;
  --text-2:        #222225;
  --text-3:        #9094a0;

  /* --- Bordas --- */
  --border:        rgba(10,12,20,0.08);
  --border-strong: rgba(10,12,20,0.14);

  /* --- Tipografia --- */
  --font-display:  "DM Sans", Roboto, sans-serif;
  --font-body:     "DM Sans", Roboto, sans-serif;
  --font-brand:    "Space Grotesk", "DM Sans", sans-serif;

  /* --- Escala tipográfica (tokens — adotar progressivamente nos componentes) --- */
  --fs-eyebrow: 0.62rem;                       /* sobrelinhas / labels */
  --fs-caption: 0.78rem;                       /* legendas, notas */
  --fs-small:   0.86rem;                       /* texto auxiliar */
  --fs-body:    1rem;                          /* corpo padrão */
  --fs-lead:    clamp(0.95rem, 2vw, 1.1rem);   /* parágrafo de destaque */
  --fs-h4:      clamp(0.95rem, 1.8vw, 1.05rem);
  --fs-h3:      clamp(1.05rem, 2.2vw, 1.3rem);
  --fs-h2:      clamp(1.5rem, 3.5vw, 2.25rem); /* título de seção */
  --fs-h1:      clamp(1.9rem, 4.5vw, 3.4rem);  /* título de página/hero */
  --fs-display: clamp(2.2rem, 6vw, 4rem);      /* hero gigante */

  /* --- Altura de linha --- */
  --lh-tight:  1.12;
  --lh-snug:   1.3;
  --lh-normal: 1.6;

  /* --- Pesos --- */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 500;
  --fw-bold:     500;

  /* --- Sombras --- */
  --shadow-sm:     0 2px 8px rgba(20,21,26,0.06);
  --shadow-md:     0 10px 32px rgba(20,21,26,0.10);
  --shadow-lg:     0 24px 60px rgba(20,21,26,0.14);
  --shadow-red:    0 4px 14px rgba(109, 74, 255,0.14);
  --shadow-btn:    0 2px 8px rgba(20,21,26,0.10);

  /* --- Espaços --- */
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
}

/* ========================
   RESET + BASE
   ======================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--red) #e4e4e7;
}

html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-track { background: #e4e4e7; }
html::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.9375rem, 2.2vw, 1.0625rem);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin-block: 0; }
p { margin-block: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ========================
   BACKGROUND AMBIENTE
   ======================== */
.nh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.nh-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(109, 74, 255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(79, 47, 215,0.03) 0%, transparent 55%),
    var(--bg);
}

.nh-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(109, 74, 255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 74, 255,0.028) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 65% 65% at 50% 40%, black 10%, transparent 75%);
  animation: grid-scroll 25s linear infinite;
}

@keyframes grid-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(52px); }
}

/* ========================
   WRAP / LAYOUT
   ======================== */
.nh-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ========================
   TIPOGRAFIA UTILITÁRIA
   ======================== */
.nh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.nh-eyebrow::before,
.nh-eyebrow::after {
  content: "";
  display: block;
  width: 20px;
  height: 1px;
  background: var(--red);
  opacity: 0.7;
}

.nh-section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--text);
}

.nh-section-title em {
  font-style: normal;
  color: inherit;
}

.nh-section-lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-normal);
  color: var(--text-2);
  max-width: 48rem;
}

/* ========================
   BOTÕES
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), var(--red) 60%, var(--red-dark));
  border-color: var(--red);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--red-border); background: var(--red-soft); color: var(--red-bright); }

.btn-outline-red {
  color: var(--red-bright);
  background: var(--red-soft);
  border-color: var(--red-border);
}
.btn-outline-red:hover { background: rgba(109, 74, 255,0.18); border-color: rgba(109, 74, 255,0.45); }

/* ========================
   BADGE / PILLS
   ======================== */
.nh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
}

.nh-badge--red {
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
  box-shadow: var(--shadow-btn);
}

.nh-badge--outline {
  color: var(--red-bright);
  border: 1px solid var(--red-border);
  background: var(--red-soft);
}

.nh-badge--subtle {
  color: var(--text-2);
  border: 1px solid var(--border);
  background: rgba(10,12,20,0.04);
}

/* ========================
   CARDS GENÉRICO
   ======================== */
.nh-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.nh-card:hover {
  border-color: var(--red-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(109, 74, 255,0.1);
}

/* ========================
   CHECK LIST
   ======================== */
.nh-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.nh-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.4;
}
.nh-check-list li::before {
  content: "✓";
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--red-bright);
  margin-top: 0.1em;
}

/* ========================
   STATS BAR
   ======================== */
.nh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--border);
}
.nh-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
}
.nh-stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--red-bright);
  line-height: 1;
}
.nh-stat span {
  font-size: 0.78rem;
  color: var(--text-2);
}

/* ========================
   SEÇÕES — SPACING
   ======================== */
.nh-section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.nh-section + .nh-section {
  border-top: 1px solid var(--border);
}

/* ========================
   WORDMARK (logo textual temporário — NINJAHOST)
   ======================== */
.site-logo__word,
.site-footer__word {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.site-footer__word { font-size: clamp(1.05rem, 2.2vw, 1.3rem); }
.site-logo__word-a,
.site-footer__word-a { color: var(--text); }
.site-logo__word-b,
.site-footer__word-b { color: var(--red); }

/* ========================
   REDUCED MOTION
   ======================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ==========================================================
   BOTÃO PADRÃO — roxo escuro chapado; uma luz roxa clara varre
   girando, clareando e revelando uma grade fina só por onde passa.
   ========================================================== */
@property --btnfx-a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.hero .btn-primary,
.domain-search__btn,
.dom-search__go,
.site-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: none;
  background: #4326c2;            /* uma cor: roxo escuro */
}

/* CLARÃO roxo claro + grade — revelados SÓ na faixa da borda por onde a luz passa
   máscara = (arco da luz) ∩ (faixa próxima da borda) */
.hero .btn-primary::before,
.domain-search__btn::before,
.dom-search__go::before,
.site-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(231, 223, 255, 0.95) 1.1px, transparent 1.7px) 0 0 / 7px 7px,
    linear-gradient(rgba(165, 138, 255, 0.8), rgba(165, 138, 255, 0.8));
  -webkit-mask:
    radial-gradient(150% 180% at 50% 50%, transparent 40%, #000 80%),
    conic-gradient(from var(--btnfx-a), transparent 0 62%, #000 76%, #000 88%, transparent 97%);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(150% 180% at 50% 50%, transparent 40%, #000 80%),
    conic-gradient(from var(--btnfx-a), transparent 0 62%, #000 76%, #000 88%, transparent 97%);
  mask-composite: intersect;
  animation: btnfx-rotate 4s linear infinite;
  pointer-events: none;
}

/* a luz: anel claro (gradiente roxo) percorrendo a BORDA */
.hero .btn-primary::after,
.domain-search__btn::after,
.dom-search__go::after,
.site-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--btnfx-a),
    rgba(150, 120, 255, 0.40) 0 68%,
    rgba(242, 235, 255, 0.98) 80%,
    rgba(150, 120, 255, 0.40) 92% 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: btnfx-rotate 4s linear infinite;
  pointer-events: none;
}

@keyframes btnfx-rotate { to { --btnfx-a: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .hero .btn-primary::before, .hero .btn-primary::after,
  .domain-search__btn::before, .domain-search__btn::after,
  .dom-search__go::before, .dom-search__go::after,
  .site-cta::before, .site-cta::after { animation: none; }
}
