/* ============================================
   DECK - Estudio de Arquitectura
   "Donde la vida pasa"
   Custom Styles with Parallax Effects
   ============================================ */

/* =====================
   CSS CUSTOM PROPERTIES
   ===================== */
:root {
  /* Colors - Paleta Calida y Emocional */
  --deck-cream: #f4f0dd;
  --deck-white: #FFFFFF;
  --deck-light: #F5F3F0;
  --deck-gray: #8A8A8A;
  --deck-charcoal: #2C2C2C;
  --deck-black: #1A1A1A;
  --deck-accent: #C9A87C;
  --deck-accent-dark: #A68B5B;
  --deck-terracota: #C9A87C;

  /* Transitions */
  --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-parallax: 0.1s linear;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
}

/* =====================
   BASE STYLES
   ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--deck-cream);
  color: var(--deck-charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Selection color */
::selection {
  background-color: var(--deck-accent);
  color: var(--deck-black);
}

/* =====================
   CUSTOM CURSOR
   ===================== */
.custom-cursor,
.custom-cursor-follower {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-cursor {
  width: 10px;
  height: 10px;
  background-color: var(--deck-accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(44, 44, 44, 0.8);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3), 0 0 2px rgba(255, 255, 255, 0.5);
}

.custom-cursor-follower {
  width: 40px;
  height: 40px;
  border: 2px solid var(--deck-accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 0 12px rgba(201, 168, 124, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Cursor visible on desktop */
@media (hover: hover) and (pointer: fine) {
  .custom-cursor,
  .custom-cursor-follower {
    opacity: 1;
  }

  body {
    cursor: none;
  }

  a, button, [role="button"] {
    cursor: none;
  }
}

/* Cursor hover effect */
.cursor-hover .custom-cursor {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 12px rgba(201, 168, 124, 0.6), 0 0 4px rgba(255, 255, 255, 0.8);
}

.cursor-hover .custom-cursor-follower {
  width: 60px;
  height: 60px;
  border-color: var(--deck-accent);
  background-color: rgba(201, 168, 124, 0.15);
  box-shadow: 0 0 20px rgba(201, 168, 124, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* =====================
   ARCHITECTURAL LINES
   ===================== */
.architectural-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.arch-line {
  position: absolute;
  background-color: var(--deck-charcoal);
  opacity: 0.03;
}

.arch-line-1 {
  width: 1px;
  height: 100%;
  left: 10%;
}

.arch-line-2 {
  width: 1px;
  height: 100%;
  right: 10%;
}

.arch-line-3 {
  width: 100%;
  height: 1px;
  top: 50%;
}

/* =====================
   GRID PATTERN (Menu)
   ===================== */
.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--deck-charcoal) 1px, transparent 1px),
    linear-gradient(90deg, var(--deck-charcoal) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.05;
}

/* =====================
   SCROLL LINE ANIMATION
   ===================== */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.5;
    transform: scaleY(0.8);
  }
}

/* =====================
   HERO PARALLAX SYSTEM
   ===================== */

/* Parallax Container */
.parallax-container {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Parallax Layers */
.parallax-layer {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Hero GIF Background */
#inicio .parallax-layer:first-child > div {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
  transform: scale(1.1); /* Permite movimiento de parallax sin mostrar bordes */
}

/* Parallax Elements (individual items) */
.parallax-element {
  will-change: transform;
  transition: transform var(--transition-parallax);
}

/* Parallax Background */
.parallax-bg {
  will-change: transform;
}

/* =====================
   SWIPER CUSTOMIZATION - PROYECTOS
   ===================== */
.projects-swiper .swiper {
  overflow: visible;
  padding: 20px 0;
}

.projects-swiper .swiper-slide {
  width: 320px;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

@media (min-width: 768px) {
  .projects-swiper .swiper-slide {
    width: 380px;
  }
}

@media (min-width: 1024px) {
  .projects-swiper .swiper-slide {
    width: 420px;
  }
}

/* Slide not active */
.projects-swiper .swiper-slide:not(.swiper-slide-active) {
  opacity: 0.6;
  transform: scale(0.95);
}

/* Project Card */
.project-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.5s ease;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(201, 168, 124, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
}

/* Project Card Image Parallax Effect */
.project-card img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover img {
  transform: scale(1.05);
}

/* Pagination dots */
.swiper-pagination-custom {
  display: flex;
  gap: 8px;
  align-items: center;
}

.swiper-pagination-bullet-custom {
  width: 8px;
  height: 8px;
  background-color: rgba(44, 44, 44, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-custom.active,
.swiper-pagination-bullet-custom:hover {
  background-color: var(--deck-accent);
  transform: scale(1.3);
}

/* Dark section pagination (proyectos is now in cream background) */
.bg-deck-cream .swiper-pagination-bullet-custom {
  background-color: rgba(44, 44, 44, 0.3);
}

.bg-deck-cream .swiper-pagination-bullet-custom.active,
.bg-deck-cream .swiper-pagination-bullet-custom:hover {
  background-color: var(--deck-accent);
}

/* Navigation Buttons */
.swiper-button-prev-custom,
.swiper-button-next-custom {
  transition: all 0.3s ease;
}

.swiper-button-prev-custom:hover,
.swiper-button-next-custom:hover {
  transform: scale(1.1);
}

.swiper-button-prev-custom:active,
.swiper-button-next-custom:active {
  transform: scale(0.95);
}

/* =====================
   AOS CUSTOM ANIMATIONS
   ===================== */

/* Scale X animation for decorative lines */
[data-aos="scale-x"] {
  transform: scaleX(0);
  transition-property: transform;
}

[data-aos="scale-x"].aos-animate {
  transform: scaleX(1);
}

/* Fade variations */
[data-aos="fade-up-subtle"] {
  transform: translateY(30px);
  opacity: 0;
}

[data-aos="fade-up-subtle"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

/* Reveal from left */
[data-aos="reveal-left"] {
  clip-path: inset(0 100% 0 0);
}

[data-aos="reveal-left"].aos-animate {
  clip-path: inset(0 0 0 0);
}

/* =====================
   SERVICE CARDS
   ===================== */
.service-card {
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background-color: var(--deck-accent);
  transition: height 0.5s ease;
}

.service-card:hover::before {
  height: 100%;
}

/* Service Card Hover Effects */
.service-card > div {
  transition: all 0.5s ease;
}

.service-card:hover > div {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* =====================
   FORM STYLING
   ===================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: white;
  -webkit-box-shadow: 0 0 0px 1000px var(--deck-black) inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Focus ring */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Select dropdown styling */
select option {
  background-color: var(--deck-black);
  color: white;
  padding: 10px;
}

/* =====================
   LOADING ANIMATION
   ===================== */
.page-loader {
  position: fixed;
  inset: 0;
  background-color: var(--deck-black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  animation: logoFade 2s ease-in-out infinite;
}

@keyframes logoFade {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =====================
   SMOOTH SCROLL SECTIONS
   ===================== */
section {
  position: relative;
}

/* Section transition effect */
section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 2;
}

/* =====================
   TEXT REVEAL ANIMATION
   ===================== */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
}

.text-reveal.revealed span {
  transform: translateY(0);
  opacity: 1;
}

/* Staggered reveal */
.text-reveal span:nth-child(1) { transition-delay: 0s; }
.text-reveal span:nth-child(2) { transition-delay: 0.1s; }
.text-reveal span:nth-child(3) { transition-delay: 0.2s; }
.text-reveal span:nth-child(4) { transition-delay: 0.3s; }
.text-reveal span:nth-child(5) { transition-delay: 0.4s; }

/* =====================
   HOVER EFFECTS
   ===================== */

/* Link hover underline effect */
.hover-underline {
  position: relative;
  display: inline-block;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--deck-accent);
  transition: width 0.3s ease;
}

.hover-underline:hover::after {
  width: 100%;
}

/* Image hover zoom */
.hover-zoom {
  overflow: hidden;
}

.hover-zoom img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-zoom:hover img {
  transform: scale(1.05);
}

/* =====================
   DIFERENCIAL SECTION - Lista animada
   ===================== */
#diferencial .group:hover .w-2 {
  transform: scale(1.5);
  transition: transform 0.3s ease;
}

/* =====================
   GERARDO SECTION - Imagen styling
   ===================== */
#gerardo img {
  object-position: center top;
}

/* =====================
   DECORATIVE ELEMENTS
   ===================== */

/* Floating geometric shapes */
.floating-shape {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* Rotating element */
.rotating {
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Pulsing element */
.pulsing {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* =====================
   QUOTE/FRASE STYLING
   ===================== */
blockquote,
.font-serif.italic {
  position: relative;
}

/* Quote marks decorative */
.quote-mark::before {
  content: '"';
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  color: var(--deck-accent);
  opacity: 0.3;
  position: absolute;
  left: -20px;
  top: -20px;
}

/* =====================
   RESPONSIVE ADJUSTMENTS
   ===================== */

/* Hide architectural lines on mobile */
@media (max-width: 768px) {
  .architectural-lines {
    display: none;
  }

  .custom-cursor,
  .custom-cursor-follower {
    display: none !important;
  }
}

/* Mobile Hero adjustments */
@media (max-width: 640px) {
  #inicio h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .projects-swiper .swiper-slide {
    width: 350px;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .parallax-layer,
  .parallax-element {
    transform: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* =====================
   UTILITY CLASSES
   ===================== */

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--deck-accent), var(--deck-accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Noise texture overlay */
.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

/* =====================
   SECTION SPECIFIC STYLES
   ===================== */

/* Identidad Section */
#identidad {
  background: linear-gradient(180deg, var(--deck-cream) 0%, rgba(244, 240, 221, 0.95) 100%);
}

/* Nosotros Section */
#nosotros {
  background: linear-gradient(135deg, var(--deck-charcoal) 0%, #252525 100%);
}

/* Diferencial Section */
#diferencial {
  background: linear-gradient(180deg, var(--deck-black) 0%, #151515 100%);
}

/* Gerardo Section */
#gerardo {
  background: linear-gradient(135deg, var(--deck-charcoal) 0%, #202020 100%);
}

/* Contacto Section */
#contacto {
  background: linear-gradient(180deg, var(--deck-black) 0%, #0d0d0d 100%);
}

/* =====================
   PRINT STYLES
   ===================== */
@media print {
  .architectural-lines,
  .custom-cursor,
  .custom-cursor-follower,
  nav,
  .parallax-layer,
  footer button {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  section {
    page-break-inside: avoid;
  }
}

/* =====================
   DARK MODE SUPPORT
   (for future implementation)
   ===================== */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed */
}

/* =====================
   HIGH CONTRAST MODE
   ===================== */
@media (prefers-contrast: high) {
  :root {
    --deck-accent: #D4A84B;
    --deck-gray: #666666;
  }

  .arch-line {
    opacity: 0.1;
  }
}

/* =====================
   FOCUS STATES (Accessibility)
   ===================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--deck-accent);
  outline-offset: 2px;
}

/* Skip to content link (accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--deck-accent);
  color: var(--deck-black);
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}
