/* ============================================================
   EVUM — css/style.css
   Sistema base do Single Page | Preto + Cobre #b48151
   Variáveis, reset, tipografia, utilitários, header, footer,
   animações, scrollbar, focus-visible e reduced-motion.
   (Estilos das seções da home: ver css/home.css)
   ============================================================ */

/* ============================================================
   1. VARIÁVEIS CSS
   ============================================================ */
:root {
  /* --- Cores --- */
  --color-black: #000000;
  --color-black-soft: #0a0a0a;
  --color-deep: #11100F;
  --color-white: #ffffff;
  --color-accent: #b48151;
  --color-accent-light: #c99a6b;
  --color-accent-dark: #976b3f;
  --color-accent-bg: #f5efe6;
  --color-text: #1a1a1a;
  --color-text-light: #555555;
  --color-border: #e5e0d5;
  --color-overlay: rgba(0, 0, 0, 0.75);
  --color-header-bg: rgba(10, 10, 10, 0.88);

  /* --- Tipografia --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --fs-h1: clamp(1.75rem, 1.2rem + 2.6vw, 3rem);
  --fs-h2: clamp(1.5rem, 1.15rem + 1.7vw, 2.25rem);
  --fs-h3: clamp(1.125rem, 1rem + 0.7vw, 1.375rem);
  --fs-h4: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --fs-body: 0.875rem;
  --fs-sm: 0.8125rem;
  --fs-xs: 0.75rem;
  --fs-2xs: 0.6875rem;
  --fs-3xs: 0.625rem;

  --lh-tight: 1.3;
  --lh-base: 1.6;
  --lh-relaxed: 1.7;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;

  --ls-caps: 0.08em;
  --ls-title: 0.05em;

  /* --- Espaçamentos --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-28: 7rem;

  /* --- Layout --- */
  --container-max: 1280px;
  --container-pad: 1.25rem;
  --header-h: 64px;
  --scroll-margin: 90px;

  /* --- Breakpoints (referência; usados como literais nas media queries) --- */
  --bp-360: 360px;
  --bp-390: 390px;
  --bp-480: 480px;
  --bp-768: 768px;
  --bp-1024: 1024px;
  --bp-1280: 1280px;
  --bp-1440: 1440px;
  --bp-1920: 1920px;

  /* --- Z-index --- */
  --z-base: 1;
  --z-content: 10;
  --z-header: 1000;
  --z-overlay: 1100;
  --z-menu: 1200;
  --z-modal: 2000;
  --z-toast: 3000;

  /* --- Transições --- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration: 200ms;
  --duration-slow: 300ms;
  --duration-slide: 400ms;
  --duration-slowest: 600ms;
  --duration-crossfade: 800ms;

  /* --- Raios --- */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-pill: 9999px;
}

@media (min-width: 480px) {
  :root { --container-pad: 1.5rem; }
}

@media (min-width: 1280px) {
  :root { --container-pad: 2rem; }
}

/* ============================================================
   2. RESET / NORMALIZE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-margin);
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  border-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

ul,
ol {
  list-style: none;
}

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

[hidden] {
  display: none !important;
}

/* ============================================================
   3. TIPOGRAFIA
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--color-black);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { line-height: var(--lh-base); }

.font-heading { font-family: var(--font-heading); }
.font-sans { font-family: var(--font-sans); }

/* ============================================================
   4. SCROLLBAR PERSONALIZADA
   ============================================================ */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-dark) var(--color-black-soft);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-accent-dark);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-black-soft);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

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

/* ============================================================
   5. FOCUS VISIBLE
   ============================================================ */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   6. UTILITÁRIOS
   ============================================================ */

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow { max-width: 960px; }
.container--wide { max-width: 1440px; }

/* --- Section --- */
.section {
  padding: var(--space-16) 0 var(--space-20);
  scroll-margin-top: var(--scroll-margin);
}

main section[id] { scroll-margin-top: var(--scroll-margin); }

@media (min-width: 768px) {
  .section { padding: var(--space-24) 0 var(--space-28); }
}

.section--accent { background: var(--color-accent-bg); }
.section--black {
  background: var(--color-black);
  color: var(--color-white);
}
.section--black h2,
.section--black h3 { color: var(--color-white); }
.section--black .section__header p { color: rgba(255, 255, 255, 0.6); }

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section__header h2 { margin-bottom: var(--space-2); }

.section__header p {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  line-height: var(--lh-relaxed);
}

/* --- Botões --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-6);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  text-align: center;
  border: 1px solid var(--color-white);
  border-radius: var(--radius-pill);
  color: var(--color-white);
  background: transparent;
  cursor: pointer;
  transition: color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              background-color var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn:active { transform: translateY(1px); }

/* Primário — preenchido cobre */
.btn--primary,
.btn--accent {
  border-color: var(--color-accent);
  color: var(--color-white);
  background: var(--color-accent);
}

.btn--primary:hover,
.btn--primary:focus-visible,
.btn--accent:hover,
.btn--accent:focus-visible {
  border-color: var(--color-accent-dark);
  background: var(--color-accent-dark);
  color: var(--color-white);
}

/* Secundário — contorno escuro (fundos claros) */
.btn--secondary,
.btn--dark {
  border-color: var(--color-black);
  color: var(--color-black);
  background: transparent;
}

.btn--secondary:hover,
.btn--secondary:focus-visible,
.btn--dark:hover,
.btn--dark:focus-visible {
  border-color: var(--color-accent-dark);
  color: var(--color-accent-dark);
}

.btn--sm {
  padding: var(--space-1) var(--space-4);
  font-size: var(--fs-xs);
}

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

/* --- Classes de grid --- */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--gap-sm { gap: var(--space-3); }
.grid--gap-lg { gap: var(--space-8); }

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

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

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

@media (min-width: 1280px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .grid--sidebar { grid-template-columns: 2fr 1fr; }
  .grid--sidebar-rev { grid-template-columns: 1fr 2fr; }
}

/* --- Helpers --- */
.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; }
.text-accent { color: var(--color-accent); }
.text-white { color: var(--color-white); }
.muted { color: var(--color-text-light); }
.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
}

.mt-1 { margin-top: var(--space-4); }
.mt-2 { margin-top: var(--space-8); }
.mt-3 { margin-top: var(--space-12); }
.mb-1 { margin-bottom: var(--space-4); }
.mb-2 { margin-bottom: var(--space-8); }
.mb-3 { margin-bottom: var(--space-12); }

.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ============================================================
   7. HEADER — SINGLE PAGE
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background-color: var(--color-header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(180, 129, 81, 0.2);
}

.header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: var(--header-h);
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo-img {
  height: 40px;
  width: auto;
  display: block;
}

/* Assinatura no meio do header */
.header__divider-img {
  height: 20px;
  width: auto;
  max-width: 24vw;
  object-fit: contain;
  flex-shrink: 1;
  min-width: 0;
}

/* Menu desktop */
.header__nav { display: none; }

.header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-accent);
  font-size: var(--fs-sm);
  white-space: nowrap;
  transition: color var(--duration) var(--ease);
}

.header__nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 100%;
  height: 1px;
  background: var(--color-white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease);
}

.header__nav-link:hover,
.header__nav-link:focus-visible,
.header__nav-link:active,
.header__nav-link--active,
.header__nav-link.active {
  color: var(--color-white);
}

.header__nav-link:hover::after,
.header__nav-link:focus-visible::after,
.header__nav-link--active::after,
.header__nav-link.active::after {
  transform: scaleX(1);
}

/* Efeito de scroll no header */
.header.scrolled {
  background-color: rgba(8, 8, 8, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-bottom-color: rgba(180, 129, 81, 0.35);
}

/* Botão de orçamento no header */
.header__cta { display: none; }

.btn--nav {
  border-color: var(--color-accent);
  color: var(--color-accent);
  padding: var(--space-1) var(--space-5);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.btn--nav:hover,
.btn--nav:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-black-soft);
}

/* Hamburger */
.header__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-white);
  padding: var(--space-1);
  flex-shrink: 0;
}

.header__hamburger svg { width: 24px; height: 24px; }

.header__hamburger .icon-close { display: none; }
.header__hamburger[aria-expanded="true"] .icon-open { display: none; }
.header__hamburger[aria-expanded="true"] .icon-close { display: block; }

/* Menu mobile — slide-in overlay */
.header__mobile-menu {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  z-index: var(--z-menu);
  background: rgba(0, 0, 0, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  visibility: hidden;
  overflow-y: auto;
  transition: transform var(--duration-slow) var(--ease),
              visibility var(--duration-slow) var(--ease);
}

.header__mobile-menu--open {
  transform: translateX(0);
  visibility: visible;
}

.header__mobile-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-10) 0;
  gap: var(--space-4);
}

.header__mobile-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-accent);
  font-size: var(--fs-body);
  padding: var(--space-2) 0;
  transition: color var(--duration) var(--ease);
}

.header__mobile-link:hover,
.header__mobile-link:focus-visible,
.header__mobile-link--active,
.header__mobile-link.active {
  color: var(--color-white);
}

.header__mobile-cta {
  display: flex;
  justify-content: center;
  padding: 0 var(--space-6) var(--space-10);
}

/* Overlay do menu mobile */
.menu-overlay {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: calc(var(--z-menu) - 1);
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) var(--ease),
              visibility var(--duration-slow) var(--ease);
}

.menu-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .menu-overlay { display: none !important; }
}

/* Bloqueio de scroll com menu aberto */
body.menu-open { overflow: hidden; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-overlay);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--duration-slow) var(--ease),
              visibility var(--duration-slow) var(--ease),
              transform var(--duration-slow) var(--ease),
              background-color var(--duration) var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-accent-dark);
}

.back-to-top svg { width: 20px; height: 20px; }

/* ============================================================
   7. WHATSAPP FLUTUANTE — acima do back-to-top
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: calc(var(--space-6) + 56px);
  right: var(--space-6);
  z-index: var(--z-overlay);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: background-color var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.whatsapp-float svg { width: 20px; height: 20px; }

/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  background: var(--color-white);
  color: var(--color-black);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer__brand { max-width: 320px; }

.footer__logo-img {
  height: 40px;
  width: auto;
  margin-bottom: var(--space-6);
}

.footer__description {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-6);
}

.footer__social { display: flex; gap: var(--space-3); }

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-black);
  transition: color var(--duration) var(--ease);
}

.footer__social-link:hover { color: var(--color-accent); }
.footer__social-link svg { width: 20px; height: 20px; }

.footer__column-title {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  margin-bottom: var(--space-4);
  font-weight: var(--fw-medium);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__link {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  transition: color var(--duration) var(--ease);
}

.footer__link:hover { color: var(--color-accent); }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  line-height: var(--lh-base);
}

.footer__contact-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.footer__contact-item a {
  color: var(--color-text-light);
  transition: color var(--duration) var(--ease);
}

.footer__contact-item a:hover { color: var(--color-accent); }

.footer__bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.footer__bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.footer__copyright {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
}

.footer__legal { display: flex; gap: var(--space-6); }

.footer__legal-link {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  text-decoration: underline;
  transition: color var(--duration) var(--ease);
}

.footer__legal-link:hover { color: var(--color-accent); }

/* ============================================================
   9. ANIMAÇÕES (base)
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Classes de animação aplicáveis a qualquer elemento */
.anim-fade-in { animation: fadeIn var(--duration-slow) var(--ease-out) both; }
.anim-slide-up { animation: slideUp var(--duration-slowest) var(--ease-out) both; }
.anim-zoom-in { animation: zoomIn var(--duration-slow) var(--ease) both; }

/* Reveal on scroll — ativadas via JS (.is-visible) */
.reveal { opacity: 0; }

.reveal--fade.is-visible { animation: fadeIn var(--duration-slow) var(--ease-out) both; }
.reveal--slide.is-visible { animation: slideUp var(--duration-slowest) var(--ease-out) both; }
.reveal--zoom.is-visible { animation: zoomIn var(--duration-slow) var(--ease) both; }

/* ============================================================
   10. MEDIA QUERIES GERAIS (sistema)
   ============================================================ */

/* --- 768px (tablet / início do desktop) --- */
@media (min-width: 768px) {
  .header__nav { display: block; }
  .header__cta { display: inline-flex; }
  .header__hamburger { display: none; }
  .header__mobile-menu { display: none !important; }

  .header__nav-list { gap: var(--space-5); }
  .header__nav-link { font-size: var(--fs-sm); }
  .header__divider-img { height: 24px; max-width: 18vw; margin-inline: var(--space-2); }

  .footer__grid { grid-template-columns: 1fr 1fr; }

  .footer__bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* --- 1024px (desktop médio) --- */
@media (min-width: 1024px) {
  .header__nav-list { gap: var(--space-6); }
  .header__nav-link { font-size: var(--fs-body); }
  .header__divider-img { height: 28px; max-width: 22vw; margin-inline: var(--space-4); }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* --- 1280px (desktop grande) --- */
@media (min-width: 1280px) {
  .header__divider-img { height: 32px; max-width: none; margin-inline: var(--space-8); }
  .header__nav-list { gap: var(--space-8); }
  .header__nav-link { font-size: var(--fs-body); }
}

/* ============================================================
   11. PREFERS-REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1 !important; transform: none !important; }
}
