:root {
  color-scheme: dark;
  --void: #06060d;
  --ink: #0b0b16;
  --panel: #12121f;
  --panel-soft: rgba(18, 18, 31, 0.86);
  --fog: #c9c9e6;
  --muted: #8a8ab0;
  --line: #23233a;
  --cyan: #00f0ff;
  --violet: #8b5cff;
  --magenta: #ff2bd6;
  --lime: #aaff00;
  --brass: #d3a44e;
  --header-bg: rgba(6, 6, 13, 0.82);
  --reading-bg: rgba(7, 7, 13, 0.88);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --focus-ring: #00f0ff;
  --section-alt-bg: rgba(18, 18, 31, 0.5);
  --font-body: "Rajdhani", "Segoe UI", sans-serif;
  --font-display: "Orbitron", "Segoe UI", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
}

/* Tema claro — aceita a classe .light (padrão do site) e o data-theme legado */
html.light,
:root[data-theme="light"] {
  color-scheme: light;
  --void: #f4f6fb;
  --ink: #ffffff;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.9);
  --fog: #151529;
  --muted: #555576;
  --line: #d8dbeb;
  /* mesmos tons escurecidos do site principal, para ter contraste no branco */
  --cyan: #0a90ad;
  --violet: #6a37e6;
  --magenta: #bb1f9e;
  --lime: #2f8f3a;
  --brass: #9a6c1b;
  --header-bg: rgba(250, 251, 255, 0.9);
  --reading-bg: rgba(255, 255, 255, 0.94);
  --shadow: 0 20px 60px rgba(30, 32, 70, 0.16);
  --focus-ring: #5b21b6;
  --section-alt-bg: rgba(232, 235, 247, 0.75);
}

/* Texto pequeno em ciano precisa de tom mais escuro no tema claro (WCAG 1.4.3:
   4,5:1 para texto normal). Vale p/ o e-mail de inscrição e o rótulo de idioma. */
html.light .email-link,
html.light .language,
:root[data-theme="light"] .email-link,
:root[data-theme="light"] .language {
  color: #05616f;
}

/* O hero tem foto + véu escuro por trás nos DOIS temas, então mantém a paleta
   clara-sobre-escuro mesmo no tema claro (senão o texto some no fundo escuro). */
.hero,
.hero-content {
  --fog: #eaeaf6;
  --muted: #bcbcd4;
  --cyan: #00f0ff;
  --lime: #aaff00;
  --brass: #d3a44e;
  --magenta: #ff2bd6;
  --focus-ring: #00f0ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--void);
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: 0;
}

body,
button,
a {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background: var(--void);
  pointer-events: none;
}

#matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
}

.aurora-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 50% at 15% 10%, rgba(139, 92, 255, 0.22), transparent 60%),
    radial-gradient(45% 55% at 85% 15%, rgba(255, 43, 214, 0.16), transparent 60%),
    radial-gradient(50% 60% at 50% 100%, rgba(0, 240, 255, 0.13), transparent 60%);
  opacity: 0.45;
}

.grid-layer {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.2;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--fog);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--brass);
  border-radius: 8px;
  color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.08);
}

.brand-name {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--cyan);
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--fog);
}

.nav-links a:hover::after,
.nav-links a[aria-current]::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 16px;
}

.theme-toggle,
.menu-toggle {
  display: grid;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 20px;
}

.theme-toggle:hover {
  border-color: var(--line);
  color: var(--cyan);
}

.language {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  background: currentColor;
}

main {
  min-height: 100vh;
}

article {
  width: min(1120px, calc(100% - 40px));
  margin: 32px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--reading-bg);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(6, 6, 13, 0.96) 0%, rgba(6, 6, 13, 0.78) 50%, rgba(6, 6, 13, 0.22) 80%),
    linear-gradient(0deg, rgba(6, 6, 13, 0.86), transparent 45%);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  content: "";
  pointer-events: none;
}

.hero-content {
  display: flex;
  min-height: 620px;
  max-width: 760px;
  padding: 48px 52px 54px;
  flex-direction: column;
  justify-content: flex-end;
}

.back-link {
  position: absolute;
  top: 36px;
  color: var(--cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  color: var(--lime);
}

.year {
  color: var(--muted);
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--font-display);
}

h1 {
  max-width: 750px;
  margin-bottom: 18px;
  background: linear-gradient(100deg, var(--cyan), var(--violet) 52%, var(--magenta));
  background-clip: text;
  color: transparent;
  font-size: clamp(42px, 6.4vw, 72px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--cyan);
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  color: var(--fog);
  font-size: 19px;
  line-height: 1.35;
}

.hero-summary {
  max-width: 670px;
  margin: 0 0 26px;
  color: #d9d9eb;
  font-size: 21px;
  line-height: 1.42;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  color: #05050a;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.16);
}

.button-secondary {
  border-color: rgba(211, 164, 78, 0.6);
  background: rgba(6, 6, 13, 0.46);
  color: #eaeaf6;
}

.button-secondary:hover {
  border-color: var(--brass);
}

.facts-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact {
  min-width: 0;
  padding: 24px 28px;
}

.fact + .fact {
  border-left: 1px solid var(--line);
}

.fact-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact strong {
  color: var(--fog);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.2;
}

.content-section {
  padding: 76px 56px;
}

.content-section + .content-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 38px;
}

.section-index {
  padding-top: 6px;
  color: var(--magenta);
  font-family: var(--font-mono);
  font-size: 13px;
}

.section-heading .kicker {
  margin-bottom: 6px;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 46px;
  align-items: start;
}

.prose p {
  margin: 0 0 18px;
  color: var(--muted);
}

.prose .lead {
  color: var(--fog);
  font-size: 21px;
}

.tech-list {
  display: flex;
  margin: 28px 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.tech-list li {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-image {
  margin: 0;
}

.feature-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.feature-image figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

.score-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 720px;
  margin: 0 auto 52px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.score-line > div:not(.score-separator) {
  display: flex;
  padding: 22px 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.score-line span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
}

.score-line strong {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 34px;
}

.score-separator {
  color: var(--magenta);
  font-family: var(--font-display);
  font-size: 28px;
}

.timeline {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
}

.timeline li {
  display: grid;
  min-width: 0;
  padding: 30px;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.timeline li:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.timeline-number {
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 14px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.application-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.72fr);
  gap: 48px;
}

.checklist {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 18px;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  color: var(--fog);
  font-size: 20px;
}

.checklist span {
  color: var(--lime);
  font-family: var(--font-mono);
}

.contact-panel {
  align-self: start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.contact-panel h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

.email-link {
  display: block;
  margin-bottom: 22px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
  text-decoration: none;
}

.button-full {
  width: 100%;
}

.volunteer-note {
  margin: 42px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.volunteer-note strong {
  color: var(--brass);
}

.download-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 44px;
  background: var(--section-alt-bg);
}

.download-copy h2 {
  margin-bottom: 14px;
}

.download-copy p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.download-button {
  white-space: nowrap;
}

.institutional-section {
  text-align: center;
}

.institutional-section h2 {
  margin-bottom: 38px;
}

.logo-strip {
  display: grid;
  padding: 26px;
  grid-template-columns: 0.85fr 0.9fr 1.55fr 1.1fr;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.logo-strip img {
  width: 100%;
  max-height: 86px;
  object-fit: contain;
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 28px auto 0;
  padding: 44px 0 26px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 46px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 8px;
  background: linear-gradient(100deg, var(--cyan), var(--violet), var(--magenta));
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

.site-footer p {
  margin: 0;
}

.site-footer nav,
.footer-contact {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.site-footer nav span,
.footer-contact > span {
  margin-bottom: 6px;
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.site-footer nav a,
.footer-contact a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer nav a:hover,
.footer-contact a:hover {
  color: var(--cyan);
}

.copyright {
  margin-top: 34px !important;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
}

@media (max-width: 900px) {
  .nav-shell {
    grid-template-columns: 1fr auto auto;
  }

  .menu-toggle {
    display: grid;
    grid-column: 2;
  }

  .nav-actions {
    grid-column: 3;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    right: 20px;
    left: 20px;
    display: none;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 13px 10px;
  }

  .nav-links a::after {
    display: none;
  }

  .hero {
    min-height: 650px;
  }

  .hero-content {
    min-height: 650px;
  }

  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .fact:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .intro-layout,
  .application-grid,
  .download-section {
    grid-template-columns: 1fr;
  }

  .download-button {
    justify-self: start;
  }

  .logo-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .nav-shell,
  article,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .brand-name {
    display: none;
  }

  .language {
    display: none;
  }

  article {
    margin-top: 16px;
  }

  .hero {
    min-height: 690px;
  }

  .hero-media {
    object-position: 58% center;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(6, 6, 13, 0.98) 0%, rgba(6, 6, 13, 0.76) 62%, rgba(6, 6, 13, 0.18) 100%),
      linear-gradient(90deg, rgba(6, 6, 13, 0.5), transparent);
  }

  .hero-content {
    min-height: 690px;
    padding: 34px 24px 34px;
  }

  .back-link {
    top: 24px;
  }

  h1 {
    font-size: clamp(36px, 11.5vw, 52px);
  }

  .hero-summary {
    font-size: 18px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

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

  .fact + .fact,
  .fact:nth-child(3),
  .fact:nth-child(4) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .content-section {
    padding: 58px 24px;
  }

  .section-heading {
    gap: 14px;
  }

  .intro-layout {
    gap: 34px;
  }

  .score-line {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .score-line > div:not(.score-separator) {
    justify-content: center;
  }

  .score-separator {
    padding: 0 0 8px;
  }

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

  .timeline li:nth-child(odd) {
    border-right: 0;
  }

  .timeline li {
    padding: 26px 0;
  }

  .contact-panel {
    padding: 24px;
  }

  .download-button {
    width: 100%;
    white-space: normal;
  }

  .logo-strip {
    padding: 22px;
    grid-template-columns: 1fr;
  }

  .logo-strip img {
    max-height: 76px;
  }

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

  .footer-contact {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #matrix-canvas {
    display: none;
  }

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