/* --- Variáveis --- */
:root {
  --bg: #ffffff;
  --text-muted: #64748b;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
}

/* --- Página do logo --- */
.logo-page {
  min-height: calc(100vh - 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-page-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.logo-page-img {
  max-width: min(400px, 85vw);
  height: auto;
  animation: logoFadeIn 0.7s ease-out forwards, logoPulse 2.5s ease-in-out 0.7s infinite;
}

@keyframes logoFadeIn {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* --- Animação código --- */
.code-typing {
  max-width: min(420px, 90vw);
  background: #1e293b;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  overflow: visible;
  min-width: 0;
  opacity: 1;
}

.code-typing-code {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.code-typing-lines {
  display: block;
}

.code-line {
  display: block;
  white-space: nowrap;
  min-width: 0;
  overflow: visible;
}

.code-cursor {
  display: inline-block;
  color: #14b8a6;
  animation: cursorBlink 0.9s step-end infinite;
  margin-left: 1px;
  vertical-align: top;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* --- Rodapé --- */
.logo-footer {
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Telemóveis e ecrãs pequenos --- */
@media (max-width: 600px) {
  .logo-page {
    min-height: calc(100vh - 5rem);
    padding: 1rem 0 1.5rem;
  }

  .logo-page-content {
    gap: 1.5rem;
    padding: 0 1rem;
    max-width: 100%;
  }

  .logo-page-img {
    max-width: min(320px, 85vw);
  }

  .code-typing {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    align-self: stretch;
    padding: 0.875rem 1rem;
    border-radius: 8px;
  }

  .code-typing-code {
    font-size: 0.65rem;
    line-height: 1.5;
  }

  .logo-footer {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    line-height: 1.4;
  }
}
