/* ==================================================================
   FÍSICA NA PRÁTICA — style.css
   ------------------------------------------------------------------
   Organização deste arquivo (use Ctrl+F pelos títulos em MAIÚSCULO):
     1. RESET & VARIÁVEIS GLOBAIS
     2. UTILITÁRIOS (container, botões)
     3. HEADER / NAVEGAÇÃO
     4. HERO
     5. LABORATÓRIOS (geral + específicos de cada um)
     6. COMO APRENDER NA PRÁTICA
     7. FOOTER
     8. RESPONSIVIDADE (mobile / tablet)
   ================================================================== */


/* ==================================================================
   1. RESET & VARIÁVEIS GLOBAIS
   ================================================================== */
:root {
  /* Paleta extraída da imagem de referência */
  --bg-deep:        #060c22;   /* fundo mais escuro (topo/fundo da página) */
  --bg-navy:        #0a1330;   /* fundo principal */
  --bg-navy-2:      #0f1c45;   /* fundo secundário (gradientes, cards) */
  --panel:          #101d47;   /* fundo de cards/painéis */
  --panel-light:    rgba(255, 255, 255, 0.04);
  --border-soft:    rgba(255, 255, 255, 0.08);
  --border-cyan:    rgba(45, 212, 238, 0.35);

  --cyan:           #2dd4ee;   /* cor de destaque principal */
  --cyan-light:     #7fe6f7;
  --blue:           #3b82f6;

  --text-main:      #eaf2ff;
  --text-muted:     #9db0d4;
  --text-faint:     #6b7ba3;

  --radius-md:      12px;
  --radius-lg:      18px;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--text-main);
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(45, 212, 238, 0.12), transparent 60%),
    var(--bg-navy);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }

/* Acessibilidade: foco visível ao navegar por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ==================================================================
   2. UTILITÁRIOS
   ================================================================== */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #04101f;
  box-shadow: 0 6px 20px rgba(45, 212, 238, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(45, 212, 238, 0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-lg { padding: 15px 26px; font-size: 1rem; }

.icon-flask { width: 18px; height: 18px; }


/* ==================================================================
   3. HEADER / NAVEGAÇÃO
   ================================================================== */
.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(6, 12, 34, 0.6);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  color: var(--cyan);
  flex-shrink: 0;
}
.logo-icon svg { width: 100%; height: 100%; }

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-title { font-size: 1.15rem; font-weight: 600; color: var(--text-main); }
.logo-title b { color: var(--cyan); font-weight: 700; }
.logo-subtitle { font-size: 0.72rem; color: var(--text-muted); }

.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 30px; }
.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-link:hover { color: var(--text-main); }
.nav-link.active { color: var(--cyan); border-color: var(--cyan); }

.header-cta { white-space: nowrap; }

/* Botão hambúrguer: escondido no desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text-main);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* Estado "aberto" do hambúrguer (classe alternada via JS) */
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ==================================================================
   4. HERO
   ================================================================== */
.hero { padding: 64px 0 48px; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: 48px;
  align-items: start;
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.08;
  letter-spacing: -0.5px;
  color: var(--text-main);
}
.hero-content h1 .highlight {
  background: linear-gradient(90deg, var(--cyan-light), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero-content .btn { margin-top: 30px; }

/* Grid lateral de cards figurativos */
.hero-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.topic-card {
  background: var(--panel-light);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.topic-card:hover { border-color: var(--border-cyan); transform: translateY(-2px); }

.topic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(45, 212, 238, 0.12);
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.topic-card h3 { font-size: 1rem; margin-bottom: 6px; }
.topic-card p { font-size: 0.82rem; color: var(--text-muted); }


/* ==================================================================
   5. LABORATÓRIOS
   ================================================================== */
.labs { padding: 24px 0 56px; }

.labs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}

.lab-card {
  background: linear-gradient(180deg, var(--bg-navy-2), var(--panel));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.lab-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  margin-bottom: 20px;
}
.lab-icon { font-size: 1.2rem; }

.lab-body { display: flex; flex-direction: column; gap: 18px; }

/* --- Controles (sliders, botões, checkboxes) --- */
.control-group { margin-bottom: 14px; }
.control-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.control-value { color: var(--text-main); font-weight: 600; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(45, 212, 238, 0.2);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(45, 212, 238, 0.2);
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 4px 0 16px;
}
.checkbox-row input { accent-color: var(--cyan); width: 15px; height: 15px; }

.lab-card .btn-primary { width: 100%; justify-content: center; margin-bottom: 18px; }

/* --- Painel de resultados --- */
.lab-results {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.lab-results h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 6px 0;
  color: var(--text-muted);
}
.result-row strong { color: var(--cyan-light); font-size: 0.95rem; }

/* --- Área visual (canvas) --- */
.lab-visual {
  background: linear-gradient(180deg, #0d1f3d, #08152c);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lab-visual canvas { width: 100%; height: auto; border-radius: 8px; }

/* Lab 2 (Newton) tem elementos extras: força label + legenda do gráfico */
.lab-visual-newton { align-items: stretch; gap: 6px; position: relative; }
.newton-force-label {
  align-self: flex-end;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.25);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.newton-force-label span { color: var(--cyan-light); font-weight: 700; }
.chart-caption {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin: 8px 0 2px 2px;
}

/* Lab 3 (Ondas): estatísticas abaixo do canvas */
.wave-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}
.wave-stat {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}
.wave-stat span { display: block; font-size: 0.68rem; color: var(--text-faint); margin-bottom: 3px; }
.wave-stat strong { font-size: 0.85rem; color: var(--cyan-light); }


/* ==================================================================
   6. COMO APRENDER NA PRÁTICA
   ================================================================== */
.how-it-works {
  background: var(--panel-light);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 36px 0;
}

.how-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
  justify-content: space-between;
}

.how-intro { display: flex; align-items: center; gap: 16px; max-width: 320px; }
.how-flask { font-size: 1.8rem; }
.how-intro h2 { font-size: 1.1rem; margin-bottom: 6px; }
.how-intro p { font-size: 0.85rem; color: var(--text-muted); }

.how-steps {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.how-step { display: flex; align-items: center; gap: 12px; max-width: 190px; }
.how-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(45, 212, 238, 0.12);
  border: 1px solid var(--border-cyan);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.how-step h3 { font-size: 0.9rem; margin-bottom: 3px; }
.how-step p { font-size: 0.78rem; color: var(--text-muted); }
.how-step-arrow { color: var(--text-faint); font-size: 1.1rem; }


/* ==================================================================
   7. FOOTER
   ================================================================== */
.site-footer { padding: 48px 0 24px; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}

.footer-col h4 {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.15s ease; }
.footer-col a:hover { color: var(--cyan); }

.social-icons { display: flex; gap: 10px; }
.social-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { color: var(--cyan); border-color: var(--border-cyan); }

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 20px;
}


/* ==================================================================
   8. RESPONSIVIDADE
   ================================================================== */

/* Tablets */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-cards-grid { grid-template-columns: repeat(3, 1fr); }
  .labs-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 760px) {
  .container { padding: 0 18px; }

  /* Menu vira hambúrguer */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.is-open { max-height: 320px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-nav a { display: block; padding: 12px 24px; border-bottom: none; }

  .header-inner { position: relative; flex-wrap: wrap; }
  .header-cta { display: none; }
  .menu-toggle { display: flex; margin-left: auto; }

  .hero { padding: 40px 0 32px; }
  .hero-content h1 { font-size: 2.1rem; }
  .hero-cards-grid { grid-template-columns: 1fr 1fr; }

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

  .how-inner { flex-direction: column; align-items: flex-start; }
  .how-steps { flex-direction: column; align-items: flex-start; }
  .how-step-arrow { display: none; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .hero-cards-grid { grid-template-columns: 1fr; }
  .wave-stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
