/* ========================================
   PAGE STYLES — Felipe MXD
   ======================================== */

/* === HERO === */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  padding-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #09090B 0%, #111116 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Pixel art grid pattern */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.3;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-title {
  margin-bottom: var(--space-md);
  font-size: 56px;
  line-height: 1.1;
  position: relative;
  padding-left: 12px;
}

/* Pixel art accent */
.hero-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  background-color: var(--accent-primary);
  box-shadow: 
    0 8px 0 var(--accent-primary),
    0 16px 0 var(--accent-primary),
    0 24px 0 var(--accent-primary),
    0 32px 0 var(--accent-light);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: var(--line-height-relaxed);
}

.hero-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  transition: transform var(--transition-slow);
}

.hero-image-wrapper:hover {
  transform: translateY(-4px);
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
  position: relative;
}

/* Decorative elements */
.hero-decoration {
  position: absolute;
  pointer-events: none;
  opacity: 0.12;
}

.hero-decoration-1 {
  top: 10%;
  right: -5%;
  width: 120px;
  height: 120px;
  border: 2px solid var(--accent-primary);
  border-radius: 2px;
  transform: rotate(15deg);
}

.hero-decoration-1::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
}

.hero-decoration-1::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-light);
}

.hero-decoration-2 {
  bottom: 15%;
  left: -8%;
  width: 100px;
  height: 100px;
  border: 2px solid var(--accent-primary);
  border-radius: 2px;
  transform: rotate(-10deg);
}

.hero-decoration-2::before {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
}

@media (max-width: 1023px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .hero-text {
    text-align: center;
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 42px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .hero-image {
    order: -1;
  }
  
  .hero-image-wrapper {
    max-width: 360px;
    margin: 0 auto;
  }
  
  .cta-group {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-2xl);
  }
  
  .hero-title {
    font-size: 36px;
    padding-left: 0;
  }
  
  /* Simplify pixel detail on mobile */
  .hero-title::before {
    display: none;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .hero-image-wrapper {
    max-width: 280px;
  }
  
  .hero-decoration {
    display: none;
  }
  
  /* Simplify hero grid on mobile */
  .hero::after {
    background-size: 20px 20px;
    opacity: 0.15;
  }
}

/* === PORTFOLIO === */

.portfolio {
  background-color: var(--bg-secondary);
}

.portfolio-video {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 2px solid var(--border-subtle);
}

/* Aspect ratio markers */
.portfolio-video::before,
.portfolio-video::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-primary);
  z-index: 1;
  opacity: 0.4;
}

.portfolio-video::before {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
}

.portfolio-video::after {
  bottom: 8px;
  right: 8px;
  border-left: none;
  border-top: none;
}

.portfolio-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

/* === SERVICES === */

.services {
  background-color: var(--bg-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.services-grid .service-card:nth-child(4),
.services-grid .service-card:nth-child(5) {
  grid-column: span 1;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .services-grid .service-card:nth-child(4),
  .services-grid .service-card:nth-child(5) {
    margin-left: 0;
  }
  
  .services-grid .service-card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  .services-grid .service-card:nth-child(4) {
    margin-left: 25%;
  }
}

@media (max-width: 767px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid .service-card:nth-child(4),
  .services-grid .service-card:nth-child(5) {
    margin-left: 0;
  }
}

.service-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-hover);
}

.service-card h3 {
  font-size: var(--font-size-h4);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  position: relative;
  padding-left: 16px;
}

/* Pixel indicator */
.service-card h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  opacity: 0.6;
  transition: opacity var(--transition-base);
}

.service-card:hover h3::before {
  opacity: 1;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.service-list li {
  color: var(--text-secondary);
  padding-left: var(--space-sm);
  position: relative;
}

.service-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* === PROCESS === */

.process {
  background-color: var(--bg-secondary);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

/* Timeline connector (desktop) */
@media (min-width: 768px) {
  .process-steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: repeating-linear-gradient(
      90deg,
      var(--accent-primary) 0px,
      var(--accent-primary) 8px,
      transparent 8px,
      transparent 16px
    );
    opacity: 0.3;
  }
}

@media (max-width: 767px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  border-radius: 4px;
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  font-family: 'Courier New', Courier, monospace;
  position: relative;
}

/* Pixel corners */
.process-number::before,
.process-number::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: var(--accent-light);
}

.process-number::before {
  top: -2px;
  left: -2px;
}

.process-number::after {
  bottom: -2px;
  right: -2px;
}

.process-step h3 {
  font-size: var(--font-size-h4);
  margin-bottom: var(--space-sm);
}

.process-step p {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

/* === ABOUT === */

.about {
  background-color: var(--bg-primary);
}

.about-content {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: var(--space-2xl);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-hover);
}

.about-text h2 {
  margin-bottom: var(--space-md);
  position: relative;
  padding-left: 16px;
}

/* Pixel detail */
.about-text h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background-color: var(--accent-primary);
  box-shadow: 
    0 12px 0 var(--accent-primary),
    0 24px 0 var(--accent-light);
}

.about-text p {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-md);
}

.about-text p:last-of-type {
  margin-bottom: var(--space-lg);
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tool-tag {
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  position: relative;
  padding-left: 12px;
}

/* Small pixel marker */
.tool-tag::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background-color: var(--accent-primary);
  opacity: 0.6;
}

@media (max-width: 1023px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .about-image {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .about-image {
    max-width: 100%;
  }
  
  /* Simplify pixel details on mobile */
  .about-text h2::before,
  .cta-final h2::before,
  .cta-final h2::after {
    display: none;
  }
  
  .section-title::before,
  .section-title::after {
    width: 4px;
    height: 4px;
  }
  
  .section-title::before {
    top: -8px;
    left: -8px;
    box-shadow: 
      4px 0 0 var(--accent-primary),
      0 4px 0 var(--accent-primary);
  }
  
  .section-title::after {
    top: -8px;
    right: -8px;
    box-shadow: 
      -4px 0 0 var(--accent-primary),
      0 4px 0 var(--accent-primary);
  }
  
  .cta-final {
    padding-top: calc(var(--section-padding-y) + var(--space-md));
  }
}

/* === CTA FINAL === */

.cta-final {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--section-padding-y) + var(--space-xl));
}

.cta-final::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-final .container {
  position: relative;
  z-index: 1;
}

.cta-final h2 {
  margin-bottom: var(--space-md);
  font-size: var(--font-size-h2);
  position: relative;
  display: inline-block;
}

/* Pixel brackets */
.cta-final h2::before,
.cta-final h2::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background-color: var(--accent-primary);
}

.cta-final h2::before {
  left: -20px;
  box-shadow: 4px 0 0 var(--accent-primary);
}

.cta-final h2::after {
  right: -20px;
  box-shadow: -4px 0 0 var(--accent-primary);
}

.cta-final p {
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === REVEAL ANIMATION === */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-slower),
              transform var(--transition-slower);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
  }
}
