/* ============================================
   JGS PROFICIÊNCIA - ENSAIOS DE PROFICIÊNCIA
   Design System 2025
   ============================================ */

/* ===== VARIÁVEIS CSS (Design Tokens) ===== */
:root {
  /* Cores */
  --color-primary: #529927;
  --color-primary-dark: #176326;
  --color-primary-light: #70B82D;
  --color-accent: #ffa200;
  --color-bg: #ffffff;
  --color-surface: #f9fafb;
  --color-surface-alt: #f3f4f6;
  --color-border: #e5e7eb;
  --color-text: #141516;
  --color-text-muted: #000000;
  --color-text-light: #020202;
  
  /* Tipografia */
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  /* Tamanhos */
  --max-width: 1280px;
  --spacing-unit: 8px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-float: 0 25px 50px -12px rgba(17, 92, 250, 0.15);
  
  /* Transições */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
}

ul {
  list-style-position: inside;
}

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: calc(var(--spacing-unit) * 2.5);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  margin-bottom: calc(var(--spacing-unit) * 2);
  font-weight: 600;
}

h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  font-weight: 600;
}

h5 {
  font-size: 1.25rem;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  font-weight: 600;
}

p {
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== COMPONENTES REUTILIZÁVEIS ===== */

/* Badge */
.badge {
  display: inline-block;
  background: rgba(17, 92, 250, 0.1);
  color: var(--color-primary);
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.badge-alt {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-accent);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 1);
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.btn-light {
  background: white;
  color: var(--color-primary);
}

.btn-light:hover {
  background: var(--color-surface);
  transform: translateY(-2px);
}

/* Link sublinhado */
.link-underline {
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.link-underline:hover::after {
  width: 100%;
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: calc(var(--spacing-unit) * 4);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card h3 {
  color: var(--color-text);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.card p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card a {
  color: var(--color-primary);
  font-weight: 600;
}

.card a:hover {
  text-decoration: underline;
}

/* Múltiplas rodadas ativas ao mesmo tempo */
.rodada-block { margin-bottom: 56px; }
.rodada-block:last-child { margin-bottom: 0; }

.rodadas-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}
.rodadas-badges-row .badge { margin-bottom: 0; }

/* Scope Card */
.scope-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: calc(var(--spacing-unit) * 3.5);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.scope-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--color-primary);
  transition: height var(--transition-base);
}

.scope-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.scope-card:hover::before {
  height: 100%;
}

.scope-card h3 {
  color: var(--color-primary);
  font-size: 1.125rem;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.scope-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing-unit) * 6);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing-unit) * 3);
}

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

/* Container genérico */
section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 3);
}

/* ===== TOPBAR ===== */
.topbar {
  background: var(--color-primary-dark);
  color: white;
  padding: calc(var(--spacing-unit) * 1.5) 0;
  font-size: 0.8125rem;
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: calc(var(--spacing-unit) * 3);
  flex-wrap: wrap;
}

.topbar a {
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1);
}

.topbar a:hover {
  opacity: 1;
}

.topbar .social {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
}

.icon {
  font-style: normal;
  font-size: 1rem;
}

/* ===== HEADER ===== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing-unit) * 3);
}

.logo img {
  height: 44px;
  width: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 3.5);
  list-style: none;
}

.main-nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  opacity: 0.8;
  transition: all var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
  opacity: 1;
}

.main-nav .btn {
  opacity: 1;
  color: white;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 20);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg width="60" height="60" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h60v60H0z" fill="none"/%3E%3Cpath d="M30 30m-2 0a2 2 0 1 0 4 0 2 2 0 1 0-4 0" fill="rgba(255,255,255,0.03)"/%3E%3C/svg%3E');
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero .badge {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(8px);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: calc(var(--spacing-unit) * 3);
  line-height: 1.05;
  color: white;
}

.hero h2 {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 400;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 42rem;
  margin: 0 auto calc(var(--spacing-unit) * 5);
  color: white;
}

.hero .btn {
  font-size: 1rem;
  padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 5);
  background: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-xl);
}

.hero .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.25);
}

/* ===== CONTATO RÁPIDO ===== */
.quick-contact {
  position: relative;
  z-index: 10;
  margin-top: calc(var(--spacing-unit) * -12);
  padding-bottom: calc(var(--spacing-unit) * 8);
}

.quick-contact .grid-3 {
  gap: 2px;
  background: var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.quick-contact .card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.quick-contact .card:hover {
  transform: none;
}

/* ===== SOBRE O PROGRAMA ===== */
.accreditation {
  background: var(--color-surface);
}

.accreditation .img-placeholder {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.accreditation .img-placeholder img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ===== CHAMADA (CTA BAND) ===== */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 3);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.cta-band .badge {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(8px);
}

.cta-band p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: calc(var(--spacing-unit) * 4);
  color: rgba(255, 255, 255, 0.9);
}

.cta-band .btn {
  background: white;
  color: var(--color-primary);
  border: none;
}

.cta-band .btn:hover {
  background: var(--color-surface);
  transform: translateY(-2px);
}

/* ===== PROGRAMAS DE ENSAIO ===== */
.calibration {
  background: var(--color-bg);
}

.calibration .badge {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.calibration h1 {
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.calibration .grid-3 {
  gap: calc(var(--spacing-unit) * 3);
}

/* ===== COMO PARTICIPAR (ACCORDION) ===== */
.consulting {
  background: var(--color-surface);
}

.consulting hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: calc(var(--spacing-unit) * 4) 0;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 2);
}

.accordion details {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: calc(var(--spacing-unit) * 3);
  transition: all var(--transition-base);
}

.accordion details:hover {
  box-shadow: var(--shadow-md);
}

.accordion details[open] {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.accordion summary {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
  transition: color var(--transition-fast);
}

.accordion summary:hover {
  color: var(--color-primary);
}

.accordion summary::before {
  content: '+';
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 92, 250, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.accordion details[open] summary::before {
  content: '−';
  background: var(--color-primary);
  color: white;
  transform: rotate(180deg);
}

.accordion details[open] summary {
  color: var(--color-primary);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.accordion ul {
  margin-left: calc(var(--spacing-unit) * 5);
  margin-top: calc(var(--spacing-unit) * 2);
}

.accordion li {
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.accordion p {
  margin-left: calc(var(--spacing-unit) * 5);
  margin-top: calc(var(--spacing-unit) * 2);
}

/* ===== SOBRE NÓS + METODOLOGIA ===== */
.about-audit {
  background: var(--color-bg);
}

/* ===== FAIXA CRUZADA (PROFICIENCY BAND) ===== */
.proficiency-band {
  background: var(--color-primary-dark);
  color: white;
  padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 3);
}

.proficiency-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing-unit) * 4);
  flex-wrap: wrap;
}

.proficiency-band h4 {
  font-size: 1.5rem;
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: white;
}

.proficiency-band p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 42rem;
  margin: 0;
}

/* ===== CONTATO + MAPA ===== */
.contact-footer {
  background: var(--color-primary-dark);
  color: white;
  padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 3);
}

.contact-footer .grid-2 {
  gap: calc(var(--spacing-unit) * 6);
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.contact-form-wrap h5 {
  color: white;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.contact-form-wrap label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: rgba(255, 255, 255, 0.9);
}

.contact-form-wrap input,
.contact-form-wrap textarea {
  width: 100%;
  padding: calc(var(--spacing-unit) * 2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  transition: all var(--transition-base);
}

.contact-form-wrap input::placeholder,
.contact-form-wrap textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus {
  outline: none;
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.contact-form-wrap textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-form-wrap .btn {
  background: white;
  color: var(--color-primary);
  cursor: pointer;
}

.contact-form-wrap .btn:hover {
  background: var(--color-surface);
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.contact-footer hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 4);
}

.footer-bottom {
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom p {
  margin-bottom: calc(var(--spacing-unit) * 1);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
  .main-nav {
    display: none; /* Implementar menu hambúrguer em JS */
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-unit: 6px;
  }
  
  .topbar {
    display: none;
  }
  
  .hero {
    padding: calc(var(--spacing-unit) * 12) calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 18);
  }
  
  .quick-contact {
    margin-top: calc(var(--spacing-unit) * -10);
  }
  
  .quick-contact .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .proficiency-inner {
    flex-direction: column;
    text-align: center;
  }
  
  section {
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 2.5);
  }
}

/* ===== ANIMAÇÕES (SCROLL) ===== */
@media (prefers-reduced-motion: no-preference) {
  .card,
  .scope-card,
  .accordion details {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
  }
  
  .card:nth-child(2) { animation-delay: 0.1s; }
  .card:nth-child(3) { animation-delay: 0.2s; }
  .scope-card:nth-child(2) { animation-delay: 0.15s; }
  .scope-card:nth-child(3) { animation-delay: 0.3s; }
  .scope-card:nth-child(4) { animation-delay: 0.45s; }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ===== ACESSIBILIDADE ===== */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  /* Adicionar modo escuro aqui se necessário */
}

/* ===== PRINT ===== */
@media print {
  .topbar,
  .main-header,
  .hero,
  .btn,
  .contact-footer {
    display: none;
  }
}
