/*
Theme Name: Nu-Fe
Theme URI: https://nu-fe.com
Author: Nu-Fe
Description: Tema institucional da Nu-Fe — emissão fiscal via API para desenvolvedores (NF-e, NFC-e, NFS-e, CT-e). Landing, planos, cadastro self-service e fale conosco.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nufe
*/

/* =========================================================
   Tokens — paleta a partir da logo (nuvem rosa em fundo creme)
   ========================================================= */
:root {
  --nufe-cream:        #FBF5EE;
  --nufe-cream-alt:     #F5EBDF;
  --nufe-surface:       #FFFFFF;
  --nufe-pink-50:       #FDF0F3;
  --nufe-pink-100:      #FADCE3;
  --nufe-pink-300:      #F0A8B8;
  --nufe-pink-500:      #E5849B;
  --nufe-pink-600:      #D06682;
  --nufe-pink-700:      #B14E68;
  --nufe-ink:           #40312E;
  --nufe-ink-soft:      #7A6A64;
  --nufe-ink-faint:     #A6968F;
  --nufe-border:        #EBDFD3;
  --nufe-border-soft:   #F1E7DB;
  --nufe-success:       #5F9E7A;
  --nufe-success-bg:    #EAF5EE;
  --nufe-warn:          #C08A3E;
  --nufe-warn-bg:       #FBF1DF;
  --nufe-error:         #C4586A;
  --nufe-error-bg:      #FBEAEC;
  --nufe-dark:          #2C2220;
  --nufe-dark-surface:  #382B28;

  --nufe-radius-sm: 10px;
  --nufe-radius: 16px;
  --nufe-radius-lg: 24px;
  --nufe-shadow: 0 1px 2px rgba(64, 49, 46, 0.04), 0 8px 24px -8px rgba(64, 49, 46, 0.10);
  --nufe-shadow-lg: 0 20px 50px -12px rgba(64, 49, 46, 0.22);
  --nufe-max-width: 1120px;
  --nufe-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================================
   Reset básico
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--nufe-cream);
  color: var(--nufe-ink);
  font-family: var(--nufe-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

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

.nufe-section { padding: 96px 0; }
.nufe-section--tight { padding: 64px 0; }
.nufe-section--alt { background: var(--nufe-cream-alt); }
.nufe-section--surface { background: var(--nufe-surface); border-top: 1px solid var(--nufe-border-soft); border-bottom: 1px solid var(--nufe-border-soft); }
.nufe-section--dark { background: var(--nufe-dark); color: #F3E9E4; }

.nufe-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--nufe-pink-50);
  color: var(--nufe-pink-700);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--nufe-pink-100);
}

.nufe-heading {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nufe-ink);
}
.nufe-heading--center { text-align: center; }
.nufe-subheading {
  margin-top: 14px;
  font-size: 17px;
  color: var(--nufe-ink-soft);
  max-width: 640px;
}
.nufe-subheading--center { margin-left: auto; margin-right: auto; text-align: center; }

/* =========================================================
   Header
   ========================================================= */
.nufe-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 238, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--nufe-border-soft);
}
.nufe-header__bar {
  max-width: var(--nufe-max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nufe-logo { display: flex; align-items: center; gap: 10px; }
.nufe-logo img { height: 30px; width: auto; }
.nufe-logo span {
  font-weight: 800;
  font-size: 19px;
  color: var(--nufe-ink);
  letter-spacing: -0.01em;
}
.nufe-nav {
  display: none;
  align-items: center;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--nufe-ink-soft);
}
.nufe-nav a:hover { color: var(--nufe-pink-700); }
.nufe-header__cta { display: none; }
.nufe-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--nufe-radius-sm);
  border: 1px solid var(--nufe-border);
  background: var(--nufe-surface);
}
.nufe-menu-toggle span,
.nufe-menu-toggle span::before,
.nufe-menu-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--nufe-ink);
  position: relative;
  transition: 0.2s;
}
.nufe-menu-toggle span::before { position: absolute; top: -6px; }
.nufe-menu-toggle span::after { position: absolute; top: 6px; }

.nufe-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--nufe-border-soft);
}
.nufe-mobile-nav.is-open { display: flex; }
.nufe-mobile-nav a {
  padding: 12px 4px;
  font-weight: 600;
  color: var(--nufe-ink);
  border-bottom: 1px solid var(--nufe-border-soft);
}
.nufe-mobile-nav .nufe-btn { margin-top: 14px; }

@media (min-width: 900px) {
  .nufe-nav { display: flex; }
  .nufe-header__cta { display: inline-flex; }
  .nufe-menu-toggle { display: none; }
  .nufe-mobile-nav { display: none !important; }
}

/* =========================================================
   Botões
   ========================================================= */
.nufe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--nufe-radius-sm);
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.nufe-btn:active { transform: translateY(1px); }
.nufe-btn--primary {
  /* pink-600 em vez de pink-500: contraste do texto branco em cima do rosa
     mais claro ficava abaixo do mínimo recomendado (~3:1) para o tamanho de
     fonte do botão -- pink-600 sobe pra perto de 4.5:1. */
  background: var(--nufe-pink-600);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(208, 102, 130, 0.5);
}
.nufe-btn--primary:hover { background: var(--nufe-pink-700); }
.nufe-btn--dark {
  background: var(--nufe-ink);
  color: #fff;
}
.nufe-btn--dark:hover { background: var(--nufe-dark); }
.nufe-btn--ghost {
  background: var(--nufe-surface);
  color: var(--nufe-ink);
  border-color: var(--nufe-border);
}
.nufe-btn--ghost:hover { background: var(--nufe-cream-alt); }
.nufe-btn--block { width: 100%; }
.nufe-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* =========================================================
   Hero
   ========================================================= */
.nufe-hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 72px 0 96px;
}
@media (min-width: 960px) {
  .nufe-hero { grid-template-columns: 1.05fr 0.95fr; padding: 88px 0 120px; }
}
.nufe-hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--nufe-ink);
}
.nufe-hero p {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--nufe-ink-soft);
  max-width: 540px;
}
.nufe-hero__actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.nufe-hero__note { margin-top: 16px; font-size: 12.5px; color: var(--nufe-ink-faint); }

.nufe-code-card {
  background: var(--nufe-dark);
  border-radius: var(--nufe-radius-lg);
  overflow: hidden;
  box-shadow: var(--nufe-shadow-lg);
}
.nufe-code-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nufe-code-card__dot { width: 10px; height: 10px; border-radius: 50%; }
.nufe-code-card__dot--r { background: #E5849B; }
.nufe-code-card__dot--y { background: #E0B15C; }
.nufe-code-card__dot--g { background: #6FAF87; }
.nufe-code-card__label { margin-left: 6px; font-size: 11.5px; color: #B7A9A3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.nufe-code-card pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #F1E7DB;
}
.nufe-code-card .is-dim { color: #7A6D67; }

/* =========================================================
   Passos (como funciona)
   ========================================================= */
.nufe-steps {
  display: grid;
  gap: 36px;
  margin-top: 56px;
}
@media (min-width: 720px) {
  .nufe-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .nufe-steps { grid-template-columns: repeat(4, 1fr); }
}
.nufe-step { text-align: center; }
.nufe-step__num {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 14px;
  background: var(--nufe-pink-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 10px 22px -8px rgba(208, 102, 130, 0.45);
}
.nufe-step h3 { margin-top: 16px; font-weight: 700; font-size: 16.5px; color: var(--nufe-ink); }
.nufe-step p { margin-top: 8px; font-size: 14px; color: var(--nufe-ink-soft); line-height: 1.6; }

/* =========================================================
   Cards de recurso
   ========================================================= */
.nufe-grid {
  display: grid;
  gap: 20px;
  margin-top: 52px;
}
@media (min-width: 640px) { .nufe-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .nufe-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.nufe-card {
  background: var(--nufe-surface);
  border: 1px solid var(--nufe-border-soft);
  border-radius: var(--nufe-radius);
  padding: 26px;
  box-shadow: var(--nufe-shadow);
}
.nufe-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--nufe-pink-50);
  color: var(--nufe-pink-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.nufe-card h3 { margin-top: 16px; font-weight: 700; font-size: 16px; color: var(--nufe-ink); }
.nufe-card p { margin-top: 6px; font-size: 14px; color: var(--nufe-ink-soft); line-height: 1.6; }
.nufe-card code {
  background: var(--nufe-cream-alt);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nufe-note {
  margin-top: 36px;
  font-size: 13px;
  color: var(--nufe-ink-faint);
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* =========================================================
   Planos / preços
   ========================================================= */
.nufe-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--nufe-warn-bg);
  color: var(--nufe-warn);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #EEDBB0;
}

.nufe-plans {
  display: grid;
  gap: 24px;
  margin-top: 44px;
}
@media (min-width: 900px) { .nufe-plans { grid-template-columns: repeat(3, 1fr); } }

.nufe-plan {
  background: var(--nufe-surface);
  border: 1px solid var(--nufe-border);
  border-radius: var(--nufe-radius-lg);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
}
.nufe-plan--highlight {
  border: 2px solid var(--nufe-pink-500);
  box-shadow: var(--nufe-shadow-lg);
  position: relative;
}
.nufe-plan__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--nufe-pink-600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 999px;
}
.nufe-plan h3 { font-weight: 800; font-size: 18px; color: var(--nufe-ink); }
.nufe-plan__tagline { margin-top: 4px; font-size: 13.5px; color: var(--nufe-ink-soft); }
.nufe-plan__price { margin-top: 24px; font-size: 36px; font-weight: 800; color: var(--nufe-ink); }
.nufe-plan__price small { font-size: 15px; font-weight: 700; color: var(--nufe-ink-faint); }
.nufe-plan__caption { font-size: 13px; color: var(--nufe-ink-faint); }
.nufe-plan ul { margin-top: 22px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.nufe-plan li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--nufe-ink); }
.nufe-plan li .nufe-check { color: var(--nufe-success); margin-top: 2px; }
.nufe-plan .nufe-btn { margin-top: 26px; }

/* =========================================================
   Formulários
   ========================================================= */
.nufe-form-shell {
  background: var(--nufe-surface);
  border: 1px solid var(--nufe-border-soft);
  border-radius: var(--nufe-radius-lg);
  box-shadow: var(--nufe-shadow);
  padding: 32px;
}
@media (min-width: 640px) { .nufe-form-shell { padding: 40px; } }

.nufe-field { margin-bottom: 18px; }
.nufe-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--nufe-ink);
  margin-bottom: 6px;
}
.nufe-field input,
.nufe-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--nufe-border);
  border-radius: var(--nufe-radius-sm);
  background: var(--nufe-cream);
  color: var(--nufe-ink);
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nufe-field input:focus,
.nufe-field textarea:focus {
  outline: none;
  border-color: var(--nufe-pink-500);
  box-shadow: 0 0 0 3px var(--nufe-pink-100);
  background: var(--nufe-surface);
}
.nufe-field-row { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .nufe-field-row--2 { grid-template-columns: 1fr 1fr; }
  .nufe-field-row--cnpj { grid-template-columns: 3fr 1fr 1fr 2fr; }
  .nufe-field-row--endereco { grid-template-columns: 3fr 1fr 2fr; }
  .nufe-field-row--cidade { grid-template-columns: 3fr 1fr 2fr; }
}
.nufe-field-inline { display: flex; gap: 10px; }
.nufe-field-inline input { flex: 1; }
.nufe-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.nufe-hint { margin-top: 7px; font-size: 12.5px; color: var(--nufe-ink-faint); }
.nufe-hint--ok { color: var(--nufe-success); }
.nufe-hint--warn { color: var(--nufe-warn); }
.nufe-hint--error { color: var(--nufe-error); }

.nufe-alert {
  padding: 13px 16px;
  border-radius: var(--nufe-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
}
.nufe-alert.is-visible { display: block; }
.nufe-alert--error { background: var(--nufe-error-bg); color: var(--nufe-error); border: 1px solid #F1C6CC; }
.nufe-alert--success { background: var(--nufe-success-bg); color: var(--nufe-success); border: 1px solid #CFE7D8; }

.nufe-result {
  display: none;
  margin-top: 36px;
  background: var(--nufe-dark);
  border-radius: var(--nufe-radius-lg);
  padding: 30px;
  color: #F3E9E4;
}
.nufe-result.is-visible { display: block; }
.nufe-result__title { display: flex; align-items: center; gap: 10px; color: #8FD1A9; font-weight: 700; }
.nufe-result p { margin-top: 10px; font-size: 13.5px; color: #CBBDB6; line-height: 1.7; }
.nufe-key-block { margin-top: 10px; }
.nufe-key-block label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #A79892; }
.nufe-key-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--nufe-dark-surface);
  border-radius: var(--nufe-radius-sm);
  padding: 12px 14px;
}
.nufe-key-row code { flex: 1; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: #F0A8B8; }
.nufe-copy-btn { background: none; border: none; color: #A79892; padding: 4px; }
.nufe-copy-btn:hover { color: #fff; }

/* =========================================================
   CTA final
   ========================================================= */
.nufe-cta {
  text-align: center;
  background: var(--nufe-dark);
  color: #fff;
  border-radius: var(--nufe-radius-lg);
  padding: 56px 32px;
}
.nufe-cta h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; }
.nufe-cta p { margin-top: 12px; color: #CBBDB6; max-width: 460px; margin-left: auto; margin-right: auto; }
.nufe-cta .nufe-hero__actions { justify-content: center; margin-top: 26px; }

/* =========================================================
   Footer
   ========================================================= */
.nufe-footer { background: var(--nufe-dark); color: #B7A9A3; }
.nufe-footer__inner {
  max-width: var(--nufe-max-width);
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: grid;
  gap: 32px;
}
@media (min-width: 780px) { .nufe-footer__inner { grid-template-columns: 1.3fr 1fr 1fr; } }
.nufe-footer .nufe-logo span { color: #fff; }
.nufe-footer__tagline { margin-top: 12px; font-size: 13.5px; max-width: 280px; line-height: 1.6; }
.nufe-footer h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 14px; }
.nufe-footer ul { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.nufe-footer a:hover { color: #fff; }
.nufe-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
  font-size: 12.5px;
}

/* =========================================================
   Utilidades
   ========================================================= */
.nufe-center { text-align: center; }
.nufe-mx-auto { margin-left: auto; margin-right: auto; }
.nufe-hidden { display: none !important; }
@media (max-width: 680px) {
  .nufe-hero__actions .nufe-btn { flex: 1 1 auto; }
}
