/* =============================================================================
 * SINTETIZZA - GLOBAL STYLES & RESET (PROFISSIONAL & CORPORATIVO)
 * ============================================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-md));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  background:
    radial-gradient(circle at top, rgba(225, 242, 251, 0.9), transparent 30%),
    var(--color-bg-light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.22;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.1rem, 4vw + 0.5rem, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.8vw + 0.3rem, 2.4rem); }
h3 { font-size: clamp(1.25rem, 1.8vw + 0.2rem, 1.6rem); }
h4 { font-size: 1.15rem; font-weight: 700; }
h5 { font-size: 1rem; font-weight: 700; }

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

.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;
}

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

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

/* Sections */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-lg {
  padding: var(--space-4xl) 0;
}

.section-sm {
  padding: var(--space-xl) 0;
}

/* Home navigation keeps a gentle section-by-section rhythm without
   trapping the user before the footer. */
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  html.screen-scroll {
    scroll-snap-type: y proximity;
  }

  .home-page > section,
  .home-page > #site-footer-container {
    scroll-snap-align: start;
    scroll-margin-top: var(--header-height);
  }

  .home-page > section {
    min-height: calc(100svh - var(--header-height));
  }

  .home-page > .hero-section {
    min-height: 100svh;
  }
}

.section-dark {
  background-color: var(--color-slate-950);
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border-dark);
  border-bottom: 1px solid var(--color-border-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-text-light);
}

.section-dark p {
  color: var(--color-slate-400);
}

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

.section-white {
  background-color: var(--color-surface-light);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-subtitle {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--color-brand);
  background-color: rgba(250, 90, 0, 0.1);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.section-title {
  margin-bottom: var(--space-xs);
  color: var(--color-text-primary);
}

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

.section-header.text-left .section-subtitle {
  margin-left: 0;
}

.section-dark .section-title {
  color: var(--color-text-light);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.section-dark .section-desc {
  color: var(--color-slate-400);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.badge-brand {
  background-color: var(--color-brand);
  color: var(--color-slate-950);
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(250, 90, 0, 0.22);
}

.badge-brand-soft {
  background-color: var(--color-brand-light);
  color: var(--color-brand-dark);
}

.badge-dark {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: var(--color-slate-100);
}

.badge-success {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

.badge-ghost {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-slate-200);
  backdrop-filter: blur(6px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-family-base);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal), box-shadow var(--transition-normal);
  text-align: center;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background-color: var(--color-brand);
  color: var(--color-slate-950);
  font-weight: 800;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  background-color: var(--color-brand-hover);
  color: var(--color-slate-950);
  box-shadow: 0 14px 28px rgba(250, 90, 0, 0.3);
  transform: translateY(-2px);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 3px;
}

.btn-dark {
  background-color: var(--color-slate-950);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.btn-dark:hover {
  background-color: var(--color-slate-900);
  border-color: var(--color-brand);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-slate-300);
}

.btn-outline:hover {
  background-color: var(--color-slate-100);
  border-color: var(--color-brand);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-brand);
  color: var(--color-brand);
  transform: translateY(-2px);
}

.btn-outline-brand {
  background-color: transparent;
  color: var(--color-brand-dark);
  border: 1.5px solid var(--color-brand);
}

.btn-outline-brand:hover {
  background-color: var(--color-brand);
  color: var(--color-slate-950);
  box-shadow: var(--shadow-brand);
}

.btn-whatsapp {
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: var(--color-whatsapp-glow);
}

.btn-whatsapp:hover {
  background-color: var(--color-whatsapp-hover);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
}

.btn-lg {
  padding: 16px 30px;
  font-size: 1.05rem;
  border-radius: var(--radius-pill);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.required {
  color: var(--color-danger);
  font-weight: 800;
}

.form-helper {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.form-control {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border-light);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  font-size: 0.96rem;
  line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
  appearance: none;
}

.form-control::placeholder {
  color: var(--color-text-light-subtle);
}

.form-control:hover {
  border-color: var(--color-slate-300);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 4px var(--color-brand-glow), inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transform: translateY(-1px);
  background: var(--color-surface-light);
}

textarea.form-control {
  min-height: 132px;
  resize: vertical;
}

select.form-control {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-slate-600) 50%),
    linear-gradient(135deg, var(--color-slate-600) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

input[type="date"].form-control {
  padding-right: 14px;
}

/* Grids */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Text Utilities */
.text-brand { color: var(--color-brand); }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-secondary); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Content appears progressively without blocking the page when JavaScript is unavailable. */
.js-motion .reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-motion .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
