/* FabriSiteGPRS — visual premium + revelação ao scroll */

:root {
  --fs-font: "DM Sans", system-ui, -apple-system, sans-serif;
  --fs-premium-bg: #060c17;
  --fs-premium-bg-mid: #121a2e;
  --fs-premium-surface: rgba(255, 255, 255, 0.06);
  --fs-premium-border: rgba(255, 255, 255, 0.1);
  --fs-premium-glow: rgba(232, 200, 74, 0.35);
  --fs-premium-accent: #2dd4bf;
  --fs-premium-gold: #fbbf24;
  --fs-header-h: 4rem;
  --fs-reveal-duration: 0.85s;
  --fs-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Margem horizontal padrão (alinhada ao hero da index: ~2rem no desktop) */
  --fs-page-gutter-x: clamp(1rem, 3vw, 2rem);
}

/* Tipografia display */
.fs-landing h1,
.fs-landing .fs-tile h2,
.fs-section__head h2 {
  font-family: "Outfit", var(--fs-font);
  letter-spacing: -0.02em;
}

body.fs-landing {
  padding-top: calc(var(--fs-header-h) + env(safe-area-inset-top, 0));
  background: var(--fs-premium-bg);
  background-image:
    radial-gradient(ellipse 130% 90% at 50% -15%, rgba(232, 200, 74, 0.45) 0%, transparent 52%),
    radial-gradient(ellipse 85% 55% at 100% 50%, rgba(201, 162, 39, 0.28) 0%, transparent 45%),
    radial-gradient(ellipse 65% 45% at 0% 85%, rgba(251, 191, 36, 0.16) 0%, transparent 40%);
  color: #e2e8f0;
}

/* Barra superior */
.fs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(12, 18, 34, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--fs-premium-border);
  transition: box-shadow 0.35s var(--fs-reveal-ease);
}

.fs-header.is-scrolled {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.fs-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.65rem var(--fs-page-gutter-x);
  min-height: var(--fs-header-h);
}

/* Tema + Área do cliente colados (evita espaço enorme do space-between) */
.fs-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.fs-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  font-family: "Outfit", var(--fs-font);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: #f8fafc;
  text-decoration: none;
}

.fs-header__logo-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.fs-header__logo-text {
  min-width: 0;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fs-header__logo:hover .fs-header__logo-text {
  -webkit-text-fill-color: #2dd4bf;
}

.fs-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 2vw, 1.25rem);
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.fs-header__nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.fs-header__nav a:hover,
.fs-header__nav a:focus-visible {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

/* Tema: um botão — sol no modo escuro (ação → claro), lua no modo claro (ação → escuro) */
.fs-header__theme {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.fs-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--fs-premium-border);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.28s ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.fs-theme-toggle:hover {
  background: rgba(232, 200, 74, 0.18);
  border-color: rgba(232, 200, 74, 0.4);
  color: #f8fafc;
  box-shadow:
    0 0 0 1px rgba(232, 200, 74, 0.15) inset,
    0 4px 20px rgba(15, 23, 42, 0.35);
}

.fs-theme-toggle:focus-visible {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
}

.fs-theme-toggle .fs-theme-ico {
  display: block;
  pointer-events: none;
}

html[data-theme="dark"] .fs-theme-ico--moon,
html[data-theme="light"] .fs-theme-ico--sun {
  display: none;
}

/* Dropdown Área do Cliente — painel sem lista HTML cru (evita marcadores / links azuis do UA) */
.fs-header__dropdown {
  position: relative;
  flex-shrink: 0;
  z-index: 10001;
}

.fs-header__dropdown summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e2e8f0;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--fs-premium-border);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, background 0.2s;
  font-family: "DM Sans", var(--fs-font);
}

.fs-header__dropdown summary::-webkit-details-marker {
  display: none;
}

.fs-header__dropdown summary::after {
  content: "▾";
  margin-left: 0.4rem;
  font-size: 0.65rem;
  opacity: 0.85;
}

.fs-header__dropdown[open] summary {
  border-color: rgba(232, 200, 74, 0.45);
  background: rgba(232, 200, 74, 0.12);
}

.fs-header__dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 13.75rem;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.995) 100%);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link:any-link,
.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link:visited {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.72rem 1rem;
  font-family: "DM Sans", var(--fs-font);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: #f1f5f9;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link:any-link:hover,
.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link:any-link:focus-visible {
  background: rgba(232, 200, 74, 0.22);
  color: #fff;
  outline: none;
}

.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link--cta:any-link,
.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link--cta:visited {
  background: linear-gradient(135deg, rgba(232, 200, 74, 0.28) 0%, rgba(201, 162, 39, 0.14) 100%);
  border-color: rgba(96, 165, 250, 0.4);
  color: #ccfbf1;
}

.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link--cta:any-link:hover,
.fs-header .fs-header__dropdown-panel .fs-header__dropdown-link--cta:any-link:focus-visible {
  background: linear-gradient(135deg, rgba(232, 200, 74, 0.42) 0%, rgba(201, 162, 39, 0.28) 100%);
  border-color: rgba(147, 197, 253, 0.55);
  color: #fff;
}

/* Legado / UA: lista no dropdown ou cache antigo — evita marcadores e link azul padrão */
.fs-header__dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fs-header__dropdown ul li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fs-header__dropdown ul li a:any-link,
.fs-header__dropdown ul li a:visited {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.72rem 1rem;
  font-family: "DM Sans", var(--fs-font);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: #f1f5f9;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.fs-header__dropdown ul li a:any-link:hover,
.fs-header__dropdown ul li a:any-link:focus-visible {
  background: rgba(232, 200, 74, 0.22);
  color: #fff;
  outline: none;
}

.fs-header__dropdown ul li a[href*="cadastrar"]:any-link {
  background: linear-gradient(135deg, rgba(232, 200, 74, 0.28) 0%, rgba(201, 162, 39, 0.14) 100%);
  border-color: rgba(96, 165, 250, 0.4);
  color: #ccfbf1;
}

/* Páginas dedicadas: entrar.html / cadastrar.html */
body.fs-landing.fs-auth-page {
  min-height: 100dvh;
}

.fs-auth-wrap {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) var(--fs-page-gutter-x) calc(2rem + env(safe-area-inset-bottom, 0));
  min-height: calc(100dvh - var(--fs-header-h) - env(safe-area-inset-top, 0));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.fs-auth-wrap .fs-auth-back {
  align-self: center;
}

.fs-login-panel--page {
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--fs-premium-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* Voltar ao início — formato chip (auth + legal) */
.fs-auth-back,
.fs-legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  padding: 0.42rem 1rem 0.42rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.05);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.fs-legal-back {
  margin-bottom: 1.5rem;
}

.fs-auth-back .fs-back-ico,
.fs-legal-back .fs-back-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.fs-auth-back .fs-back-ico svg,
.fs-legal-back .fs-back-ico svg {
  display: block;
}

.fs-auth-back:hover,
.fs-auth-back:focus-visible,
.fs-legal-back:hover,
.fs-legal-back:focus-visible {
  color: #f8fafc;
  border-color: rgba(232, 200, 74, 0.45);
  background: rgba(232, 200, 74, 0.12);
  box-shadow: 0 0 0 1px rgba(232, 200, 74, 0.12);
  outline: none;
}

.fs-auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

.fs-auth-switch a {
  color: #2dd4bf;
  font-weight: 600;
  text-decoration: none;
}

.fs-auth-switch a:hover {
  color: #D4B84A;
  text-decoration: underline;
}

.fs-header__mobile {
  display: none;
}

.fs-header__mobile summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e2e8f0;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--fs-premium-border);
  background: rgba(255, 255, 255, 0.06);
}

.fs-header__mobile summary::-webkit-details-marker {
  display: none;
}

.fs-header__mobile nav {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(env(safe-area-inset-top, 0) + var(--fs-header-h) + 6px);
  min-width: 14rem;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--fs-premium-border);
  border-radius: 12px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

.fs-header__mobile nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
}

.fs-header__mobile nav a:hover {
  background: rgba(232, 200, 74, 0.2);
  color: #fff;
}

/* =============================================
   MOBILE: hamburger + drawer overlay
   ============================================= */
@media (max-width: 1024px) {
  /* Oculta nav desktop e dropdown */
  .fs-header__nav,
  .fs-header__dropdown,
  .fs-header__mobile {
    display: none;
  }

  /* Header: logo+nome esquerda, [tema][≡] direita */
  .fs-header__inner {
    display: flex;
    align-items: center;
    padding: 0 max(0.7rem, env(safe-area-inset-left, 0px)) 0 0.5rem;
    height: var(--fs-header-h);
    min-height: var(--fs-header-h);
    gap: 0;
  }

  .fs-header__logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem;
    margin-left: 0;
    position: relative;
    top: 2px;
    height: 2.35rem;
    min-height: 2.35rem;
    align-self: center;
  }

  .fs-header__logo-text {
    display: inline-flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    font-size: 1.08rem;
    height: 2.35rem;
    min-height: 2.35rem;
    line-height: 1;
    padding-top: 0;
    padding-bottom: 0;
    position: relative;
    top: 0;
  }

  /* Grupo direito: tema + hamburger */
  .fs-header__actions {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    gap: 0.4rem;
    flex-shrink: 0;
    align-self: center;
    height: 2.35rem;
  }

  .fs-header__theme {
    display: inline-flex;
    align-items: center;
    align-self: center;
    height: 2.35rem;
  }

  .fs-header .fs-theme-toggle {
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    border: 1px solid rgba(232, 200, 74, 0.5);
    border-radius: 10px;
    background: transparent;
    color: #C9A227;
    box-shadow: none;
  }

  .fs-header .fs-theme-toggle .fs-theme-ico {
    width: 18px;
    height: 18px;
  }

  /* Botão ≡ hamburger: fica dentro de .fs-header__actions via HTML */
  .fs-nav-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    border: 1px solid rgba(232, 200, 74, 0.5);
    border-radius: 10px;
    background: transparent;
    color: #C9A227;
    box-shadow: none;
    cursor: pointer;
    flex-shrink: 0;
  }

  .fs-nav-open svg {
    width: 18px;
    height: 18px;
  }

  .fs-header .fs-theme-toggle:hover,
  .fs-header .fs-theme-toggle:focus-visible,
  .fs-header .fs-theme-toggle:active {
    background: rgba(232, 200, 74, 0.08);
    color: #8B6914;
    border-color: rgba(201, 162, 39, 0.72);
  }

  .fs-nav-open:hover,
  .fs-nav-open:focus-visible {
    background: rgba(232, 200, 74, 0.08);
    color: #8B6914;
    border-color: rgba(201, 162, 39, 0.72);
  }
}

/* Botão hamburger oculto apenas no desktop */
@media (min-width: 1025px) {
  .fs-nav-open {
    display: none;
  }
}

/* Backdrop escuro */
/* ── Dropdown menu mobile (estilo compacto) ── */
.fs-nav-dropdown {
  display: none;
  position: fixed;
  top: calc(var(--fs-header-h) + 8px);
  right: var(--fs-page-gutter-x, 1rem);
  width: min(232px, calc(100vw - 2.5rem));
  z-index: 10999;
  flex-direction: column;
  background: rgba(8, 14, 28, 0.97);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--fs-premium-border);
  border-radius: 14px;
  box-shadow: 0 24px 56px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
  overflow: hidden;
}

.fs-nav-dropdown.is-open {
  display: flex;
}

/* Links de navegação */
.fs-nav-dropdown__nav {
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  gap: 0.1rem;
}

.fs-nav-dropdown__nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.62rem 0.72rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.fs-nav-dropdown__nav a i {
  font-size: 0.76rem;
  width: 0.95rem;
  text-align: center;
  color: var(--fs-premium-accent);
  flex-shrink: 0;
}

.fs-nav-dropdown__nav a:hover,
.fs-nav-dropdown__nav a:focus-visible {
  background: rgba(232, 200, 74,0.12);
  color: #f1f5f9;
}

/* Rodapé: ações (Entrar + Assinar) */
.fs-nav-dropdown__footer {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.4rem;
  border-top: 1px solid var(--fs-premium-border);
}

.fs-nav-dropdown__entrar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.68rem 0.9rem;
  border-radius: 8px;
  background: var(--fs-premium-accent);
  color: #021510;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.15s;
}

.fs-nav-dropdown__entrar:hover {
  background: #D4B84A;
  color: #021510;
}

.fs-nav-dropdown__assinar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.62rem 0.9rem;
  border-radius: 8px;
  background: rgba(232, 200, 74, 0.12);
  border: 1.5px solid var(--fs-premium-border);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.fs-nav-dropdown__assinar:hover,
.fs-nav-dropdown__assinar:focus-visible {
  background: rgba(232, 200, 74, 0.2);
  border-color: color-mix(in srgb, var(--fs-premium-accent) 55%, var(--fs-premium-border));
  color: #f8fafc;
}
