:root {
  --bg-deep: #0c1419;
  --bg-card: #121d26;
  --text: #e8eef2;
  --text-muted: #8fa3b0;
  --accent: #2dd4bf;
  --accent-dim: #0d9488;
  --border: rgba(45, 212, 191, 0.22);
  --glow: rgba(45, 212, 191, 0.12);
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --radius: 14px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-deep);
  position: relative;
  overflow-x: hidden;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--glow), transparent),
    linear-gradient(rgba(45, 212, 191, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(100%, 48rem);
  text-align: center;
}

.site-acronym {
  margin: 0;
  font-size: clamp(0.88rem, 4vw, 1.35rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-inline: auto;
  line-height: 1.35;
  max-width: none;
  white-space: nowrap;
}

.site-acronym strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 360px) {
  .site-acronym {
    white-space: normal;
    font-size: 1rem;
    max-width: 24rem;
  }
}

.site-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 3.75rem);
  font-weight: 600;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #f0f7fa 0%, #b8e8e0 45%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-subtitle {
  margin: 0;
  font-size: clamp(1rem, 2.8vw, 1.125rem);
  color: var(--text-muted);
  max-width: 28ch;
  margin-inline: auto;
}

.site-subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.site-main {
  margin-top: clamp(2rem, 6vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.25rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.partner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 10rem;
}

.partner-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.partner-detail {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.partner-integra {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.75;
  filter: drop-shadow(0 0 10px var(--glow));
}

.partner-integra-svg {
  display: block;
  width: clamp(2.25rem, 6vw, 2.75rem);
  height: auto;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.actions-split {
  margin: clamp(1.25rem, 3vw, 1.5rem) 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.actions--project {
  margin-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.35rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: none;
}

.btn-primary:hover {
  color: #041210;
  background: linear-gradient(165deg, #5eead4, #2dd4bf);
  box-shadow: 0 12px 32px rgba(45, 212, 191, 0.35);
}

.btn-primary:focus-visible {
  color: #041210;
  background: linear-gradient(165deg, #5eead4, #2dd4bf);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  color: #041210;
  background: linear-gradient(165deg, #5eead4, #2dd4bf);
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: 0 12px 32px rgba(45, 212, 191, 0.35);
}

.btn-secondary:focus-visible {
  color: #041210;
  background: linear-gradient(165deg, #5eead4, #2dd4bf);
}

.site-footer {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.site-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer p + p {
  margin-top: 0.65rem;
}

.site-footer a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-footer-license {
  max-width: none;
  margin-inline: 0;
  line-height: 1.6;
  font-size: 0.875rem;
}

@media (min-width: 480px) {
  .actions,
  .actions--project {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn {
    min-width: 11.5rem;
  }

  .actions .btn,
  .actions--project .btn {
    flex: 1 1 calc(50% - 0.5rem);
    max-width: 18rem;
  }
}

/* Páginas internas provisórias (simulador / tutorial) */
.page-stub {
  margin-top: 2rem;
  text-align: center;
}

.page-stub .site-title {
  font-size: clamp(1.75rem, 5vw, 2rem);
}

.page-stub .site-subtitle {
  max-width: none;
}

.page-stub .stub-back {
  margin-top: 1.5rem;
}

/* Página Sobre (texto corrido) */
.page-sobre {
  margin-top: 2rem;
  text-align: left;
  width: min(100%, 48rem);
}

.page-sobre .site-title {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  text-align: center;
  margin-bottom: 1.25rem;
}

.page-sobre .sobre-lead {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
}

.page-sobre .sobre-body {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-sobre .sobre-body li {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 0.98rem;
}

.page-sobre .sobre-body li:last-child {
  margin-bottom: 0;
}

.page-sobre .sobre-body a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.page-sobre .sobre-body a:hover {
  text-decoration: underline;
}

.page-sobre .sobre-body a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.page-sobre .stub-back {
  margin-top: 1.75rem;
  text-align: center;
}

/* Página Equipe */
.page-equipe .equipe-inst {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-equipe .equipe-inst:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.page-equipe .equipe-institution {
  margin: 0 0 0.65rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.page-equipe .equipe-intro {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.page-equipe .equipe-intro strong {
  color: var(--text);
  font-weight: 600;
}

.page-equipe .equipe-heading {
  margin: 1rem 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-equipe .equipe-inst .equipe-heading:first-of-type {
  margin-top: 0;
}

.page-equipe .equipe-list {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.page-equipe .equipe-list li {
  margin-bottom: 0.35rem;
}

.page-equipe .equipe-list li:last-child {
  margin-bottom: 0;
}

.page-equipe .equipe-area {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Página Tutorial */
.page-tutorial .tutorial-block {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-tutorial .tutorial-block:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.page-tutorial .tutorial-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
}

.page-tutorial .tutorial-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.page-tutorial .tutorial-list li:last-child {
  margin-bottom: 0;
}

.page-tutorial .tutorial-mouse-icon {
  width: 24px;
  height: auto;
  flex: 0 0 24px;
  margin-top: 0.1rem;
}

.page-tutorial .tutorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.page-tutorial .tutorial-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.9rem;
}

.page-tutorial .tutorial-card img {
  display: block;
  width: 54px;
  height: auto;
  object-fit: contain;
  flex: 0 0 54px;
  border-radius: 10px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  margin-bottom: 0;
}

.page-tutorial .tutorial-card-content {
  min-width: 0;
}

.page-tutorial .tutorial-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--text);
}

.page-tutorial .tutorial-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 520px) {
  .page-tutorial .tutorial-card img {
    width: 48px;
    height: auto;
    flex-basis: 48px;
  }

}

@media (min-width: 900px) {
  .page-tutorial.site-main {
    width: min(100%, 58rem);
  }
}
