/**
 * Base Styles
 * Reset, Typography, and Base Elements
 */

/* =========================================================================
   RESET
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

/* LANDING PAGES e HOME: Fundo escuro */
body.home,
body.page-template-template-lp-venda,
body.page-template-template-lp-parceiros,
body.page-template-template-landing,
body.page-template-template-landing-franquia {
  background-color: #0a0a0a !important;
  color: #fff;
}

body.home .site-main,
body.page-template-template-lp-venda .site-main,
body.page-template-template-lp-parceiros .site-main,
body.page-template-template-landing .site-main {
  background-color: #0a0a0a !important;
}

/* Main content area */
.site-main {
  min-height: 100vh;
}

/* =========================================================================
   ESPAÇAMENTO PARA HEADER FIXO - PÁGINAS INTERNAS
   ========================================================================= */

/* Páginas internas precisam de padding-top para não ficar sob o header */
body:not(.home):not(.page-template-template-landing):not(.page-template-template-blank) .site-main {
  padding-top: 180px; /* Espaço para o logo grande + menu */
}

/* Se a página tem cover/hero, não precisa de padding extra */
body:not(.home):not(.page-template-template-landing) .site-main:has(.wp-block-cover:first-child),
body:not(.home):not(.page-template-template-landing) .site-main:has(.fp-hero:first-child),
body:not(.home):not(.page-template-template-landing) .site-main:has(.fp-slider:first-child),
body:not(.home):not(.page-template-template-landing) .site-main:has(.fp-page-header:first-child) {
  padding-top: 0;
}

/* Fallback para navegadores que não suportam :has() */
@supports not selector(:has(*)) {
  body:not(.home):not(.page-template-template-landing) .site-main {
    padding-top: 180px;
  }

  /* Classe para remover padding quando tem hero/cover */
  body.has-hero-section .site-main {
    padding-top: 0 !important;
  }
}

/* Banner de página interna (Page Header) */
.fp-page-header {
  margin-top: 0;
  padding-top: 180px; /* Espaço para o header */
}

/* Header SEMPRE transparente no início */
.site-header {
  background: transparent !important;
}

/* Só fica escuro quando rola (is-scrolled) - e APENAS no site institucional */
body:not(.page-template-template-landing) .site-header.is-scrolled {
  background: linear-gradient(135deg,
    rgba(30, 30, 30, 0.95) 0%,
    rgba(50, 45, 35, 0.95) 50%,
    rgba(40, 35, 25, 0.95) 100%
  ) !important;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--color-bg) inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* =========================================================================
   TYPOGRAPHY - BOLD & IMPACTFUL
   ========================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-secondary);
  margin-bottom: 0.5em;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

h5 {
  font-size: var(--text-xl);
  font-weight: 600;
}

h6 {
  font-size: var(--text-lg);
  font-weight: 600;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: var(--font-weight-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

/* Links */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Lead text */
.lead {
  font-size: var(--text-xl);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-light);
}

/* Section titles */
.section-label {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-light);
  max-width: 700px;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* Gold text */
.text-gold {
  color: var(--color-primary);
}

.text-gradient-gold {
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Display text - Super impactful */
.text-display {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.text-display-sm {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Accent font */
.text-accent {
  font-family: var(--font-accent);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em;
}

/* Uppercase badge style */
.text-badge {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold);
}

/* Highlight text */
.text-highlight {
  position: relative;
  display: inline;
}

.text-highlight::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: 0;
  width: 100%;
  height: 0.3em;
  background: var(--color-gold);
  opacity: 0.3;
  z-index: -1;
  transform: skewX(-5deg);
}

/* Glow effect on text */
.text-glow {
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5),
               0 0 40px rgba(212, 175, 55, 0.3);
}

/* Stroke/Outline text */
.text-stroke {
  -webkit-text-stroke: 2px var(--color-gold);
  -webkit-text-fill-color: transparent;
}

/* Numbers styling */
.number-display {
  font-family: var(--font-accent);
  font-size: var(--text-6xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-gold);
}

/* Quote styling */
.blockquote,
blockquote {
  position: relative;
  padding: var(--space-8);
  padding-left: var(--space-10);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text-light);
  border-left: 4px solid var(--color-gold);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.blockquote::before,
blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 4rem;
  font-family: Georgia, serif;
  color: var(--color-gold);
  opacity: 0.3;
  line-height: 1;
}

/* =========================================================================
   LAYOUT
   ========================================================================= */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--full {
  max-width: var(--container-full);
  padding-left: 0;
  padding-right: 0;
}

/* Sections */
.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

.section--sm {
  padding-top: var(--section-padding-sm);
  padding-bottom: var(--section-padding-sm);
}

.section--lg {
  padding-top: var(--section-padding-lg);
  padding-bottom: var(--section-padding-lg);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-white);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* =========================================================================
   WORDPRESS ALIGNMENTS
   ========================================================================= */

.alignwide {
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: var(--space-6);
  margin-bottom: var(--space-4);
}

.alignright {
  float: right;
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

/* =========================================================================
   UTILITIES
   ========================================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }

/* =========================================================================
   SELECTION
   ========================================================================= */

::selection {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

::-moz-selection {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

/* =========================================================================
   FOCUS
   ========================================================================= */

:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* =========================================================================
   SCROLLBAR - Premium Gold Style
   ========================================================================= */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-black-soft);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) var(--color-black-soft);
}

/* =========================================================================
   BODY STATES
   ========================================================================= */

body.menu-open {
  overflow: hidden;
}

body.is-loading {
  overflow: hidden;
}

body.is-loading * {
  cursor: wait !important;
}

/* Cursor normal - no custom cursor */

/* =========================================================================
   SELECTION - Gold Accent
   ========================================================================= */

::selection {
  background-color: var(--color-gold);
  color: var(--color-black);
}

::-moz-selection {
  background-color: var(--color-gold);
  color: var(--color-black);
}
