:root {
  --color-black: #000000;
  --color-white: #ffffff;
  --black: var(--color-black);
  --white: var(--color-white);
  --zinc-50: #f9fafb;
  --zinc-100: #f3f4f6;
  --zinc-200: #e5e7eb;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
}

/* === BASE === */
body {
  background-color: var(--white);
  color: var(--black);
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--black);
  color: var(--white);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--white);
  border-left: 2px solid var(--black);
}
::-webkit-scrollbar-thumb {
  background: var(--black);
  border-left: 2px solid var(--black);
}

html {
  scroll-behavior: smooth;
}

/* === LOADING SCREEN === */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-character {
  width: 120px;
  height: 120px;
  border: 3px solid var(--black);
  overflow: hidden;
  animation: loader-bounce 1s ease-in-out infinite;
}

.loader-character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loader-bar-track {
  width: 200px;
  height: 6px;
  border: 2px solid var(--black);
  margin-top: 1.5rem;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--black);
  animation: loader-progress 1.5s ease-in-out forwards;
}

@keyframes loader-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes loader-progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* === COMIC DESIGN SYSTEM === */
.comic-border {
  border: 2px solid var(--black);
}

.btn-primary {
  background-color: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  transition: all 0.2s ease;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--white);
  color: var(--black);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px 0px var(--black);
}

.btn-secondary {
  background-color: transparent;
  color: var(--black);
  border: 2px solid var(--black);
  transition: all 0.2s ease;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--black);
  color: var(--white);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px 0px var(--black);
}

/* Inverted buttons (for dark bg) */
.btn-primary-inverted {
  background-color: var(--white);
  color: var(--black);
  border: 3px solid var(--white);
  transition: all 0.25s ease;
  font-weight: 800;
  padding: 1rem 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary-inverted:hover {
  background-color: transparent;
  color: var(--white);
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0px 0px rgba(255, 255, 255, 0.5);
}

.card-flat {
  border: 2px solid var(--black);
  padding: 2rem;
  transition: all 0.25s ease;
  background: var(--white);
  position: relative;
}

.card-flat:hover {
  transform: translate(-4px, -4px) rotate(-1deg);
  box-shadow: 6px 6px 0px 0px var(--black);
}

/* === MARQUEE === */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
  background: var(--white);
  border-top: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  padding: 1.5rem 0;
}

.marquee-content {
  display: flex;
  animation: marquee 25s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

.marquee-item {
  padding: 0 3rem;
  font-weight: 900;
  font-size: 1.15rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* === ILLUSTRATIONS === */
.illustration-box {
  border: 2px solid var(--black);
  background: var(--white);
  overflow: hidden;
  position: relative;
}

.illustration-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  transition: transform 0.4s ease;
}

.illustration-box:hover img {
  transform: scale(1.03);
}

/* === NAV === */
.nav-link {
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  color: var(--black);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--black);
  transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active-nav::after {
  width: 100%;
}

/* === MOBILE MENU === */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.4s ease,
    opacity 0.3s ease;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* === CONTACT FORM === */
.form-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--black);
  background: var(--white);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px 0px var(--black);
}

.form-input::placeholder {
  color: var(--zinc-400);
  font-weight: 500;
}

.form-select {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--black);
  background: var(--white);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23000'%3E%3Cpath d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.form-select:focus {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px 0px var(--black);
}

textarea.form-input {
  resize: vertical;
  min-height: 150px;
}

/* === TAG BADGES === */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1.5px solid var(--black);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
}

.tag:hover {
  background: var(--black);
  color: var(--white);
}

/* === BACK TO TOP === */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--white);
  color: var(--black);
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0px 0px var(--black);
}

/* === WHATSAPP FLOAT === */
#whatsapp-float {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: var(--white);
  border: 2px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  text-decoration: none;
}

#whatsapp-float.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#whatsapp-float:hover {
  background: var(--white);
  color: #25d366;
  transform: translate(3px, -3px);
  box-shadow: -5px 5px 0px 0px var(--black);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Reveal on Scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal from right */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children reveal */
.reveal-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-group.active > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group.active > *:nth-child(1) {
  transition-delay: 0.05s;
}
.reveal-group.active > *:nth-child(2) {
  transition-delay: 0.12s;
}
.reveal-group.active > *:nth-child(3) {
  transition-delay: 0.19s;
}
.reveal-group.active > *:nth-child(4) {
  transition-delay: 0.26s;
}
.reveal-group.active > *:nth-child(5) {
  transition-delay: 0.33s;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem !important;
    line-height: 1.15 !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  #preloader,
  #back-to-top,
  nav,
  #mobile-menu,
  #mobile-floating-widget {
    display: none !important;
  }
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
  }
  body {
    color: #000;
  }
}

/* === CUSTOM CURSOR === */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--black);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s,
    height 0.2s,
    background-color 0.2s,
    mix-blend-mode 0.2s;
  mix-blend-mode: difference;
}
.custom-cursor.hover {
  width: 40px;
  height: 40px;
  background-color: var(--white);
  mix-blend-mode: difference;
}

@media (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
}

/* === FAQ ACCORDION === */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.4s ease;
}
.faq-item.open .faq-content {
  max-height: 500px;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* === MOBILE FLOATING WIDGET === */
#mobile-floating-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
@media (min-width: 768px) {
  #mobile-floating-widget {
    display: none;
  }
}
