:root {
  /* Dark Theme (Default) - Premium Corporate & Industrial */
  --bg-body: #111111;
  --bg-topbar: #0A0A0A;
  --bg-header: rgba(17, 17, 17, 0.96);
  --bg-surface-1: #111111;
  --bg-surface-2: #181818;
  --bg-card: #1E1E1E;
  --bg-card-elevated: #262626;
  --bg-input: #242424;
  --bg-footer: #0A0A0A;
  
  --border-color: #383838;
  --border-subtle: #2C2C2C;
  --border-gold: #C5A059;
  
  --text-main: #FFFFFF;
  --text-body: #E0E0E0;
  --text-muted: #B0B0B0;
  --text-footer-muted: #9A9E9A;
  
  /* Brand Colors */
  --color-gold-brand: #C5A059; /* Ouro Envelhecido Sólido */
  --color-gold-cta: #D4AF37;   /* Ouro Vibrante CTA */
  --color-gold-cta-hover: #E5C158;
  --color-gold-cta-text: #111111;
  
  --color-green-emerald: #1A5F3B;
  --color-green-cta: #1E7E44;
  --color-red-maroon: #8B0000;
  
  --shadow-card: 0 10px 30px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 25px rgba(197, 160, 89, 0.15);
}

[data-theme="light"] {
  /* Light Theme - Clean Corporate & Institutional */
  --bg-body: #F8F9FA;
  --bg-topbar: #EAEAEA;
  --bg-header: rgba(255, 255, 255, 0.98);
  --bg-surface-1: #FFFFFF;
  --bg-surface-2: #F1F3F5;
  --bg-card: #FFFFFF;
  --bg-card-elevated: #F8F9FA;
  --bg-input: #FFFFFF;
  --bg-footer: #181818;        /* Rodapé escuro elegante institucional */
  
  --border-color: #D1D5DB;
  --border-subtle: #E5E7EB;
  --border-gold: #A87C28;
  
  --text-main: #111827;
  --text-body: #374151;        /* Alto contraste para leitura no fundo claro */
  --text-muted: #4B5563;       /* Texto auxiliar bem visível */
  --text-footer-muted: #9CA3AF;/* Texto legível no rodapé escuro */
  
  --color-gold-brand: #9E7422; /* Ouro Rico Escuro para excelente contraste no fundo branco! */
  --color-gold-cta: #D4AF37;
  --color-gold-cta-hover: #B8892C;
  --color-gold-cta-text: #111111;
  
  --color-green-emerald: #166034;
  --color-green-cta: #1E7E44;
  --color-red-maroon: #8B0000;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(158, 116, 34, 0.15);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-variant-numeric: lining-nums;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-gold-brand);
}

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

img {
  max-width: 100%;
}

/* Typography & Brand Elements */
.wm {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  display: block;
  color: var(--color-gold-brand) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

/* Navigation Links */
.nl {
  position: relative;
  transition: color 0.2s;
  color: var(--text-main) !important;
}

.nl:after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 5px;
  height: 2px;
  background: var(--color-gold-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.nl:hover {
  color: var(--color-gold-brand) !important;
}

.nl:hover:after {
  transform: scaleX(1);
}

/* Call to Action Buttons */
.cta {
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  transition: all 0.25s ease;
  cursor: pointer;
  background: var(--color-gold-cta) !important;
  color: var(--color-gold-cta-text) !important;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cta:hover {
  background: var(--color-gold-cta-hover) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.cta-secondary {
  border: 1.5px solid var(--color-gold-brand) !important;
  color: var(--color-gold-brand) !important;
  background: transparent !important;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cta-secondary:hover {
  background: var(--color-gold-brand) !important;
  color: #111111 !important;
}

.cta-green {
  background: var(--color-green-cta) !important;
  color: #FFFFFF !important;
}

.cta-green:hover {
  background: #166034 !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--color-gold-brand);
  padding: 4px 10px;
  border-radius: 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-weight: 600;
}

.theme-toggle-btn:hover {
  border-color: var(--color-gold-brand);
  background: var(--bg-card-elevated);
}

/* Form Controls & High Contrast Inputs */
input, select, textarea {
  background-color: var(--bg-input) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 2px !important;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-gold-brand) !important;
  outline: none !important;
  box-shadow: 0 0 8px rgba(197, 160, 89, 0.3) !important;
}

input::placeholder, textarea::placeholder {
  color: #6B7280 !important;
  opacity: 1 !important;
}

[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder {
  color: #9CA3AF !important;
}

select option {
  background-color: var(--bg-card-elevated) !important;
  color: var(--text-main) !important;
  padding: 10px;
}

.g-form label {
  color: var(--color-gold-brand) !important;
  font-weight: 600 !important;
}

/* Burger Menu */
.g-burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--text-main);
  color: var(--text-main);
  padding: 6px 12px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Scroll reveal animations */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

@media(prefers-reduced-motion: reduce) {
  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Card & Section styling helpers */
.card-themed {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card-themed:hover {
  border-color: var(--color-gold-brand);
}

.badge-green {
  background: rgba(26, 95, 59, 0.15);
  color: #166034;
  border: 1px solid var(--color-green-emerald);
}

[data-theme="dark"] .badge-green {
  background: rgba(26, 95, 59, 0.25);
  color: #2ECC71;
}

.badge-red {
  background: rgba(139, 0, 0, 0.15);
  color: #B91C1C;
  border: 1px solid var(--color-red-maroon);
}

[data-theme="dark"] .badge-red {
  background: rgba(139, 0, 0, 0.25);
  color: #FF6B6B;
}

/* Responsive Styles */
@media(min-width:861px) and (max-width:1340px) {
  .g-nav a.nl { padding: 10px 6px !important; font-size: 13px !important; }
  .g-nav .cta { padding: 11px 14px !important; font-size: 13.5px !important; }
  .g-headerrow { gap: 14px !important; }
}

@media(max-width:860px) {
  .g-topbar-ops { display: none !important; }
  .g-topbar { justify-content: center !important; min-height: auto !important; padding: 8px 16px !important; }
  .g-headerrow { min-height: auto !important; padding-top: 10px !important; padding-bottom: 2px !important; gap: 6px !important; }
  .g-headerrow { flex-wrap: wrap !important; }
  .g-burger { display: block !important; }
  .g-headerrow > a { flex: 1 1 0 !important; min-width: 0; gap: 10px !important; }
  .g-headerrow > a img { width: 42px !important; height: 42px !important; }
  .g-headerrow > a span span:last-child { white-space: normal !important; letter-spacing: .08em !important; font-size: 8.5px !important; line-height: 1.35; }
  .g-nav { display: none !important; flex-direction: column !important; align-items: stretch !important; width: 100%; margin: 0 !important; padding: 0 0 12px !important; max-height: 70vh; overflow-y: auto; background: var(--bg-header); }
  .g-nav.open { display: flex !important; }
  .g-nav a.nl { padding: 14px 2px !important; font-size: 16px !important; border-bottom: 1px solid var(--border-color); }
  .g-nav .cta { margin: 14px 0 0 !important; padding: 14px 16px !important; text-align: center; font-size: 15px !important; }
  .g-hero { grid-template-columns: 1fr !important; }
  .g-herocopy { padding: 44px 0 40px !important; }
  .g-hero > div:last-child { min-height: auto !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; }
  .g-emblem { margin: 44px 0 36px !important; width: 68% !important; }
  .g-kpi { position: static !important; width: 100%; }
  .prod-row { grid-template-columns: 1fr !important; gap: 6px !important; }
  .prod-head { display: none !important; }
  .g-termrow, .g-procrow { grid-template-columns: 1fr !important; gap: 10px !important; }
  .g-cards3, .g-cards2, .g-terms { grid-template-columns: 1fr !important; }
  .g-steps4 { grid-template-columns: 1fr !important; }
  .g-cov, .g-2col, .g-quote { grid-template-columns: 1fr !important; gap: 36px !important; }
  .g-safety, .g-norms { grid-template-columns: 1fr !important; }
  .g-form { grid-template-columns: 1fr !important; padding: 22px !important; }
  .g-footer { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }
  .g-photos { grid-template-columns: 1fr !important; }
  .g-photos figure { min-height: 240px !important; }
}

@media(max-width:520px) {
  .g-footer { grid-template-columns: 1fr !important; }
}
