/* ==========================================================================
   Milvolts Studio - Modern Cinematic CSS Design System
   ========================================================================== */

/* Modern CSS Reset & Variable Definitions */
:root {
  --color-bg: #000000;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.5);
  --color-text-muted: rgba(255, 255, 255, 0.3);
  --color-accent-red: #ff3b30;
  --color-accent-red-glow: rgba(255, 59, 48, 0.4);

  --font-display: 'Montserrat', sans-serif;
  --font-ui: 'Inter', sans-serif;

  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Text Selection Styling */
::selection {
  background-color: var(--color-accent-red);
  color: var(--color-text-primary);
}

/* Base Layout Structure */
.app-container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  padding: 0 40px 40px; /* Remove top padding */
}

/* ==========================================================================
   Header Component (Logo & REC Indicator)
   ========================================================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 10;
}

.logo-container {
  display: inline-block;
  text-decoration: none;
  opacity: 0;
  animation: fadeInLogo 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.3s;
}

.logo-img {
  height: 150px;
  width: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: var(--transition-smooth);
}

.logo-img:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Modern "● REC" Status Indicator */
.rec-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 50px;
  opacity: 0;
  animation: fadeInLogo 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.5s;
  pointer-events: none;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-red);
  border-radius: 50%;
  position: relative;
}

.rec-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background-color: var(--color-accent-red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulseRec 2.5s infinite ease-out;
}

.rec-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

/* ==========================================================================
   Main Content Component (Centered Typography)
   ========================================================================== */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  z-index: 5;
}

.main-content {
  text-align: center;
}

.central-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  line-height: 1.5;
  text-align: center;
  min-height: 3em; /* Evita que o layout se desloque verticalmente durante a digitação */
}

/* Cursor de digitação moderno */
.typing-cursor {
  display: inline-block;
  color: var(--color-accent-red);
  font-weight: 200;
  margin-left: 6px;
  animation: blink 0.8s infinite;
  vertical-align: middle;
}

.typing-cursor.finished {
  animation: blink 0.8s infinite, fadeOutCursor 1.5s forwards;
  animation-delay: 2.5s; /* Mantém o cursor piscando por 2.5s após a conclusão antes de sumir */
}

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

@keyframes fadeOutCursor {
  to { opacity: 0; }
}

@keyframes fadeInChar {
  0% {
    opacity: 0;
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

/* Modern accent line below the text for premium studio aesthetic */
.divider-line {
  width: 40px;
  height: 1px;
  background-color: var(--color-accent-red);
  margin: 30px auto 0;
  opacity: 0;
  animation: fadeInDivider 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.8s;
}

/* ==========================================================================
   Footer Component (Contact Links & Rights)
   ========================================================================== */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
  z-index: 10;
  opacity: 0;
  animation: fadeInLogo 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.9s;
}

.contact-info {
  display: flex;
  gap: 30px;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
  padding: 0;
}

.social-link svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.social-link::after {
  display: none !important;
}

.social-link:hover {
  color: var(--color-text-primary);
  transform: scale(1.18);
}

.contact-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  padding-bottom: 2px;
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: var(--transition-fast);
}

.contact-link:hover {
  color: var(--color-text-primary);
}

.contact-link:hover::after {
  width: 100%;
}

.copyright {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Animations & Transitions
   ========================================================================== */

/* Cinematic Fade-in and tracking expansion for center text */
@keyframes fadeInCinematic {
  0% {
    opacity: 0;
    letter-spacing: 0.4em;
    transform: translateY(15px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    letter-spacing: 0.28em;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Fading in logo, status bar, and footer details */
@keyframes fadeInLogo {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Divider line slow width expansion */
@keyframes fadeInDivider {
  0% {
    opacity: 0;
    width: 0;
  }
  100% {
    opacity: 0.6;
    width: 40px;
  }
}

/* Pulsing REC glow ring animation */
@keyframes pulseRec {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(3.5);
    opacity: 0;
  }
}

/* ==========================================================================
   Responsive & Adaptive Media Queries
   ========================================================================== */

@media (max-width: 768px) {
  .app-container {
    padding: 0 24px 30px; /* Remove top padding on mobile */
  }

  header {
    flex-direction: row;
    align-items: center;
  }

  .logo-img {
    height: 80px;
  }

  .rec-container {
    padding: 6px 12px;
  }

  .rec-label {
    font-size: 0.65rem;
  }

  .central-title {
    line-height: 1.6;
    letter-spacing: 0.2em;
    animation-name: fadeInCinematicMobile;
  }

  footer {
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

@keyframes fadeInCinematicMobile {
  0% {
    opacity: 0;
    letter-spacing: 0.3em;
    transform: translateY(15px);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    letter-spacing: 0.2em;
    transform: translateY(0);
    filter: blur(0);
  }
}
