/* =========================================================
   INSTITUTO CODE — ESCOLA DE TECNOLOGIA
   Folha de estilos principal
========================================================= */

:root {
  /* Identidade de cor */
  --blue: #0068E8;
  --blue-dark: #0050C0;
  --blue-vivid: #0088F8;
  --blue-light: #EAF4FF;
  --white: #FFFFFF;

  --ink: #0B1F3A;          /* texto principal — azul-marinho, não preto puro */
  --ink-soft: #4E6084;     /* texto secundário */
  --amber: #FFB238;        /* usado apenas na seção de medalhas */

  --shadow-sm: 0 6px 16px -8px rgba(5, 40, 90, 0.18);
  --shadow-md: 0 20px 40px -18px rgba(5, 40, 90, 0.28);
  --shadow-lg: 0 30px 60px -20px rgba(5, 40, 90, 0.32);

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

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;

  --header-h: 78px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
}

h2 { font-size: clamp(1.7rem, 1.35rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { color: var(--ink-soft); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

:focus-visible {
  outline: 3px solid var(--blue-vivid);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- BOTÕES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-vivid), var(--blue-dark));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--white);
  color: var(--blue);
  border: 2px solid var(--blue-light);
}
.btn-outline:hover {
  border-color: var(--blue-vivid);
  transform: translateY(-2px);
}

.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-header { padding: 10px 22px; font-size: 0.88rem; }

/* =========================================================
   HEADER
========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 500;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 104, 232, 0.1);
  box-shadow: 0 8px 30px -20px rgba(5, 40, 90, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { display: flex; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--ink);
}
.logo-text strong { color: var(--blue); font-weight: 700; }

.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
}
.main-nav a:hover { background: var(--blue-light); color: var(--blue-dark); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
  margin: 0 auto;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--white);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.mobile-menu.is-open { opacity: 1; transform: translateY(0); visibility: visible; }
.mobile-menu ul { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mobile-menu a { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; padding: 8px 0; }

/* =========================================================
   HERO
========================================================= */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 64px) 0 90px;
  background: linear-gradient(180deg, var(--blue-light) 0%, #ffffff 78%);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.floaty {
  position: absolute;
  font-family: 'Poppins', monospace;
  font-weight: 700;
  color: var(--blue);
  opacity: 0.12;
  font-size: 2.4rem;
  animation: floatSlow 9s ease-in-out infinite;
}
.floaty-1 { top: 12%; left: 4%; animation-delay: 0s; }
.floaty-2 { top: 68%; left: 8%; font-size: 1.6rem; animation-delay: 1.5s; }
.floaty-3 { top: 20%; right: 6%; animation-delay: 0.8s; }
.floaty-4 { top: 72%; right: 10%; font-size: 1.8rem; animation-delay: 2.4s; }

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(3deg); }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--blue-dark);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.hero-text {
  font-size: 1.12rem;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-actions.center { justify-content: center; }

.hero-visual { position: relative; }
.hero-illustration {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(0, 104, 232, 0.35);
  border-radius: 100px;
}
.scroll-cue span {
  position: absolute;
  top: 7px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--blue);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 7px; opacity: 1; }
  70% { opacity: 0.3; }
  100% { top: 22px; opacity: 0; }
}

/* =========================================================
   SEÇÕES GERAIS
========================================================= */
.section { padding: 96px 0; }
.section-alt { background: var(--blue-light); }

.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head p { margin-top: 14px; font-size: 1.05rem; }
.section-head-light h2 { color: var(--white); }
.section-head-light p { color: rgba(255,255,255,0.82); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Grids */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* Cards de recurso */
.feature-card, .value-card {
  background: var(--white);
  border: 1px solid rgba(0, 104, 232, 0.08);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover, .value-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  font-size: 1.8rem;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-light);
  border-radius: 16px;
  margin-bottom: 18px;
  transition: transform 0.3s ease;
}
.feature-card:hover .feature-icon, .value-card:hover .feature-icon {
  transform: scale(1.1) rotate(-4deg);
}
.feature-card h3, .value-card h3 { margin-bottom: 8px; }
.feature-card p, .value-card p { font-size: 0.96rem; }
.value-card p { color: var(--blue-dark); font-weight: 700; font-family: var(--font-display); font-size: 0.92rem; }

/* =========================================================
   METODOLOGIA — trilha de aprendizagem
========================================================= */
.learn-path {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
}
.learn-path::before {
  content: '';
  position: absolute;
  top: 34px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(0,104,232,0.35) 0 10px, transparent 10px 20px);
}
.learn-step {
  text-align: center;
  padding: 0 12px;
  position: relative;
}
.learn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  font-size: 1.7rem;
  background: var(--white);
  border: 2px solid var(--blue-light);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}
.learn-step h3 { margin-bottom: 6px; font-size: 1.05rem; }
.learn-step p { font-size: 0.9rem; }

/* =========================================================
   JORNADA / GRADE
========================================================= */
.journey-phase { margin-bottom: 48px; }
.journey-phase:last-child { margin-bottom: 0; }
.journey-phase-title {
  font-size: 1.05rem;
  color: var(--blue-dark);
  margin-bottom: 20px;
  padding-left: 2px;
}

.month-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.month-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.month-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--blue);
  background: var(--blue-light);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.month-icon { font-size: 1.6rem; margin-bottom: 10px; }
.month-card h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 8px; }
.month-card p { font-size: 0.88rem; }

.month-card-highlight {
  background: linear-gradient(135deg, var(--blue-vivid), var(--blue-dark));
}
.month-card-highlight .month-tag { background: rgba(255,255,255,0.18); color: var(--white); }
.month-card-highlight h4, .month-card-highlight p { color: var(--white); }

/* =========================================================
   DO JOGADOR AO CRIADOR
========================================================= */
.flow-section {
  background: radial-gradient(120% 140% at 50% 0%, var(--blue-vivid) 0%, var(--blue-dark) 60%, #003b8f 100%);
  position: relative;
  overflow: hidden;
}
.flow-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.12), transparent 45%);
  pointer-events: none;
}

.flow-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}
.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  min-width: 130px;
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease, background 0.3s ease;
}
.flow-node:hover { transform: translateY(-6px); background: rgba(255,255,255,0.16); }
.flow-node span { font-size: 1.8rem; }
.flow-node p { color: var(--white); font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.flow-node-final { background: var(--white); }
.flow-node-final p { color: var(--blue-dark); }
.flow-arrow { color: rgba(255,255,255,0.6); font-size: 1.4rem; padding: 0 4px; }

/* =========================================================
   PROJETOS
========================================================= */
.grid-project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.project-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  padding-bottom: 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.project-thumb {
  background: linear-gradient(135deg, var(--c1, var(--blue-vivid)), var(--c2, var(--blue-dark)));
  padding: 22px;
  margin-bottom: 18px;
}
.project-thumb svg { width: 100%; height: auto; display: block; }
.project-card h3 { padding: 0 20px; margin-bottom: 6px; font-size: 1.02rem; }
.project-card p { padding: 0 20px; font-size: 0.9rem; }

/* =========================================================
   MEDALHAS
========================================================= */
.medal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.medal {
  text-align: center;
  padding: 28px 12px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.medal:hover { transform: translateY(-6px) scale(1.03); box-shadow: var(--shadow-md); }
.medal-icon {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  font-size: 1.7rem;
  background: linear-gradient(135deg, #FFE1A8, var(--amber));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.medal p { font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; color: var(--ink); }

/* =========================================================
   PRIMEIRA TURMA
========================================================= */
.turma-section {
  background: var(--blue-light);
}
.turma-inner { text-align: center; max-width: 760px; }
.turma-inner h2 { margin-bottom: 16px; }
.turma-inner > p { font-size: 1.05rem; margin-bottom: 36px; }

.turma-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}
.turma-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 12px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   FAQ
========================================================= */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}
.faq-plus {
  position: relative;
  width: 18px; height: 18px;
  flex: none;
}
.faq-plus::before, .faq-plus::after {
  content: '';
  position: absolute;
  background: var(--blue);
  border-radius: 2px;
  transition: transform 0.3s ease;
}
.faq-plus::before { top: 8px; left: 0; width: 18px; height: 2.5px; }
.faq-plus::after { top: 0; left: 8px; width: 2.5px; height: 18px; }
.faq-item.is-open .faq-plus::after { transform: rotate(90deg) scaleX(0); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-answer p { padding: 0 24px 20px; font-size: 0.96rem; }
.faq-item.is-open .faq-answer { max-height: 260px; }

/* =========================================================
   CTA FINAL
========================================================= */
.cta-final {
  background: linear-gradient(135deg, var(--blue-vivid), var(--blue-dark));
}
.cta-final-inner { text-align: center; max-width: 640px; }
.cta-final-inner h2 { color: var(--white); margin-bottom: 14px; }
.cta-final-inner p { color: rgba(255,255,255,0.85); font-size: 1.08rem; margin-bottom: 34px; }
.cta-final .btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.cta-final .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }
.cta-final .btn-primary { background: var(--white); color: var(--blue-dark); }

/* =========================================================
   FOOTER
========================================================= */
.site-footer { background: var(--ink); padding: 64px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo-text-footer { color: var(--white); font-size: 1.2rem; }
.logo-text-footer strong { color: var(--blue-vivid); }
.footer-brand p { color: rgba(255,255,255,0.65); margin-top: 10px; font-size: 0.92rem; }
.footer-slogan { font-style: italic; max-width: 30ch; }

.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { color: rgba(255,255,255,0.75); font-size: 0.94rem; transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--white); }

.footer-social { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-social a {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.94rem;
  transition: color 0.2s ease;
}
.footer-social a:hover { color: var(--blue-vivid); }

.footer-bottom { padding: 22px 0; }
.footer-bottom p { color: rgba(255,255,255,0.45); font-size: 0.82rem; text-align: center; }

/* =========================================================
   BOTÃO FLUTUANTE WHATSAPP
========================================================= */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--blue-vivid), var(--blue-dark));
  color: var(--white);
  padding: 14px 20px;
  border-radius: 100px;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.92rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-float:hover { transform: translateY(-4px); }
.whatsapp-float-icon { font-size: 1.25rem; }

/* =========================================================
   RESPONSIVO
========================================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-project { grid-template-columns: repeat(2, 1fr); }
  .medal-grid { grid-template-columns: repeat(3, 1fr); }
  .learn-path { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .learn-path::before { display: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .header-actions { gap: 8px; }
  .btn-header { display: none; }

  .section { padding: 72px 0; }
  .grid-4, .grid-3, .grid-project { grid-template-columns: 1fr; }
  .medal-grid { grid-template-columns: repeat(2, 1fr); }
  .learn-path { grid-template-columns: 1fr; gap: 26px; }

  .flow-chain { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); padding: 4px 0; }

  .footer-grid { grid-template-columns: 1fr; text-align: left; }

  .whatsapp-float-text { display: none; }
  .whatsapp-float { padding: 16px; }
}

@media (max-width: 480px) {
  .hero-actions, .hero-actions.center { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .hero-actions.center .btn { width: 100%; }
  .turma-info { flex-direction: column; align-items: stretch; }
  .turma-item { justify-content: center; }
}
