/* ============================================
   PREMIUM DESIGN SYSTEM - JAVIER CASTAÑEDA
   ============================================ */

/* FONTS - Hybrid loading to preserve specific 'ss01' features */
@font-face {
    font-family: 'MuseoModernoLocal';
    src: url('fonts/MuseoModerno-Medium.woff2') format('woff2'),
        url('fonts/MuseoModerno-Medium.woff') format('woff');
    font-weight: 500, 600;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Main font uses Google for weights, but local for the specific 'J' */
    --font-main: 'MuseoModerno', 'MuseoModernoLocal', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Solid Colors */
    --deep-royal-pulse: #4900C9;
    --electric-crown: #5D17EB;
    --digital-sky: #7681FF;
    --neon-growth: #88C900;
    --fresh-energy: #AEEC65;
    --soft-nature-glow: #E1FFB4;
    --pure-canvas: #F7F7F7;
    --midnight-core: #0B0F14;

    /* Semantic Colors - LIGHT THEME */
    --color-bg: var(--pure-canvas);
    --color-text: var(--midnight-core);
    --color-accent: var(--electric-crown);
    --color-accent-hover: var(--deep-royal-pulse);
    --color-primary-dark: var(--deep-royal-pulse);
    --color-primary: var(--electric-crown);
    --color-primary-light: var(--digital-sky);

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-hover: rgba(255, 255, 255, 0.9);

    /* Refined Spacing System - Desktop */
    --spacing-2xs: 0.25rem;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;
    --spacing-3xl: 8rem;

    /* Typography Scale & Weights */
    --font-main: 'MuseoModerno', 'MuseoModernoLocal', -apple-system, BlinkMacSystemFont, sans-serif;

    --weight-thin: 100;
    --weight-extralight: 200;
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    --weight-black: 900;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3rem;

    /* Premium Shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(93, 23, 235, 0.12);
    --shadow-glow-purple: 0 0 60px rgba(93, 23, 235, 0.18);
    --shadow-glow-green: 0 8px 32px rgba(136, 201, 0, 0.25);

    /* Border Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 18px;
    overflow-x: hidden;
    position: relative;
    /* Safari Fix: Subpixel rendering prevents the 'smearing' common with variable fonts */
    -webkit-font-smoothing: subpixel-antialiased;
    text-rendering: initial;
}

/* Ensure no faux-bolding occurs */
* {
    -webkit-font-smoothing: subpixel-antialiased;
}

/* Animated Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(93, 23, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(136, 201, 0, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(118, 129, 255, 0.05) 0%, transparent 50%);
    z-index: -2;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 1;
        transform: translate(0, 0);
    }

    50% {
        opacity: 0.8;
        transform: translate(1%, 1%);
    }
}

/* Noise Texture Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    z-index: -1;
    pointer-events: none;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4 {
    font-weight: var(--weight-bold);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-text-stroke: 0.1px transparent;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: var(--weight-extrabold);
    background: linear-gradient(135deg, #fff 0%, var(--fresh-energy) 50%, var(--neon-growth) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: shimmer 5s ease-in-out infinite;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: var(--weight-semibold);
    color: var(--color-accent);
    position: relative;
}

h3 {
    font-size: 1.5rem;
    font-weight: var(--weight-semibold);
    color: var(--color-primary-light);
}

p {
    margin-bottom: var(--spacing-md);
    max-width: 100%;
    text-align: left;
    font-weight: var(--weight-regular);
    opacity: 0.92;
    line-height: 1.7;
    text-wrap: pretty;
}

strong {
    color: var(--color-accent);
    font-weight: var(--weight-bold);
}

.fs {
    font-family: 'MuseoModernoLocal', sans-serif;
    font-feature-settings: 'ss01' 1;
    /* Forzamos el peso 500 que es el que tiene tu archivo local 
       esto evita que Safari lo emborrone al intentar hacerlo negrita */
    font-weight: 600 !important;
}



/* ============================================
   LAYOUT
   ============================================ */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

section {
    padding: var(--spacing-xl) 0;
    position: relative;
    /* Safari Fix: Aislar contextos de renderizado */
    isolation: isolate;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.main-header {
    padding: var(--spacing-md) 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    /* White glass */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--electric-crown) 50%,
            transparent 100%);
    opacity: 0.3;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translate3d(0, -2px, 0);
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(136, 201, 0, 0.3));
}

/* ============================================
   HERO SECTION - PREMIUM REDESIGN
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    overflow: hidden;
}

/* Animated Gradient Orbs */
.hero::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -8%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(93, 23, 235, 0.18) 0%, transparent 70%);
    opacity: 1;
    filter: blur(80px);
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -8%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(136, 201, 0, 0.12) 0%, transparent 70%);
    opacity: 1;
    filter: blur(80px);
    z-index: 0;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -30px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

.hero-content {
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-content img {
    margin: 0 auto var(--spacing-lg);
}

/* Hero Name */
.hero-name {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    color: var(--pure-canvas);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    margin-bottom: var(--spacing-md);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 4px 24px rgba(247, 247, 247, 0.12);
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    background: linear-gradient(135deg, var(--digital-sky) 0%, var(--fresh-energy) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-lg);
    font-weight: var(--weight-semibold);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Hero Description */
.hero-description {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    font-weight: var(--weight-light);
    opacity: 0.9;
    line-height: 1.7;
    max-width: 65ch;
    margin: 0 auto var(--spacing-lg);
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
}

.hero-btn {
    display: inline-block;
    padding: 1.125rem 2.5rem;
    background: linear-gradient(135deg, var(--neon-growth), var(--fresh-energy));
    color: var(--midnight-core);
    font-weight: 500;
    font-size: var(--font-size-base);
    border-radius: 40px 0px 21px 40px;
    margin-top: var(--spacing-sm);
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow-green);
    letter-spacing: 0.02em;
    /* Safari Fix: Mantener capa activa siempre */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    outline: 1px solid transparent;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.hero-btn:hover::before {
    left: 100%;
}

.hero-btn:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 12px 40px rgba(136, 201, 0, 0.4);
    background: linear-gradient(135deg, var(--fresh-energy), var(--neon-growth));
}

.hero-btn:active {
    transform: translateY(-1px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity var(--transition-base);
    z-index: 10;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    outline: 1px solid transparent;
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--fresh-energy);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 0 12px rgba(174, 236, 101, 0.25);
}

.wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: 4px;
    height: 4px;
    background-color: var(--fresh-energy);
    border-radius: 50%;
    animation: scrollWheel 2s infinite;
}

.arrow-down {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--fresh-energy);
    border-bottom: 2px solid var(--fresh-energy);
    transform: rotate(45deg);
    animation: arrowBounce 2s infinite;
    animation-delay: 1s;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        top: 6px;
    }

    100% {
        opacity: 0;
        top: 24px;
    }
}

@keyframes arrowBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate3d(0, 0, 0) rotate(45deg);
    }

    40% {
        transform: translate3d(0, -5px, 0) rotate(45deg);
    }

    60% {
        transform: translate3d(0, -3px, 0) rotate(45deg);
    }
}



/* ============================================
   CONTEXTO SECTION - PREMIUM REDESIGN
   ============================================ */

.contexto-section {
    background-color: var(--deep-royal-pulse);
    color: var(--pure-canvas);
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.quote-wrapper {
    max-width: 950px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 var(--spacing-md);
}

.quote-mark {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-lg);
    display: inline-block;
}

.quote-text {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: var(--weight-medium);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.01em;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.quote-text i {
    flex-shrink: 0;
    margin-top: 0.3em;
}

.quote-text:first-of-type {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: var(--weight-semibold);
    color: var(--fresh-energy);
    margin-bottom: var(--spacing-xl);
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* First quote without icon - align to match star icons */
.quote-text-first {
    padding-left: 0;
    display: block;
    text-align: center;
}

.quote-line {
    width: 70px;
    height: 5px;
    background: rgba(255, 255, 255, 0.95);
    margin: var(--spacing-xl) auto 0;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}


/* ============================================
   WORKFLOW SECTION
   ============================================ */

.workflow-section {
    background: var(--digital-sky);
    color: var(--pure-canvas);
    position: relative;
    overflow: hidden;
}

.workflow-section h2 {
    text-align: center;
    color: var(--fresh-energy);
    margin-bottom: var(--spacing-xl);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: var(--spacing-lg);
}

.process-card {
    background: rgba(255, 255, 255, 0.95);
    color: var(--midnight-core);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    /* Safari Fix: No usar 'all', especificar propiedades */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 15px 45px rgba(93, 23, 235, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Safari Rendering Stability */
    isolation: isolate;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform, box-shadow;
    -webkit-font-smoothing: antialiased;
}

/* Watermark icons for each card */
.process-card::after {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    font-size: 14.4rem;
    color: rgba(11, 15, 20, 0.05);
    z-index: 0;
    pointer-events: none;
    top: -5.5rem;
    right: -1.5rem;
}

/* Card 1 - Search icon rotated 15deg */
.process-card:nth-child(1)::after {
    content: "\f002";
    transform: rotate(0deg);
}

/* Card 2 - Calendar icon rotated -12deg */
.process-card:nth-child(2)::after {
    content: "\f133";
    transform: rotate(-12deg);
}

/* Card 3 - Pencil-ruler icon rotated 18deg */
.process-card:nth-child(3)::after {
    content: "\f5ad";
    transform: rotate(18deg);
}

/* Card 4 - Check-circle icon rotated -15deg */
.process-card:nth-child(4)::after {
    content: "\f058";
    transform: rotate(-18deg);
}

/* Ensure content stays above watermark */
.process-card>* {
    position: relative;
    z-index: 1;
}

.process-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background: linear-gradient(180deg, var(--neon-growth), var(--fresh-energy));
    opacity: 1;
    transition: opacity 0.4s ease;
}

.process-card:hover::before {
    opacity: 0;
}

.process-card:hover {
    /* Safari Fix: EVITAR scale() en contenedores con texto */
    transform: translate3d(0, -12px, 0);
    box-shadow: 0 30px 80px rgba(93, 23, 235, 0.5);
}

.process-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--electric-crown), var(--digital-sky));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(93, 23, 235, 0.25);
    transition: all 0.4s ease;
    margin-bottom: 0.5rem;
}

.process-card:hover .process-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(93, 23, 235, 0.35);
}

.process-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon-growth);
    opacity: 1;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.process-card:hover .process-number {
    opacity: 1;
}

.process-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    font-weight: var(--weight-semibold);
    color: var(--midnight-core);
    transition: color 0.3s ease;
    letter-spacing: -0.03em;
}

.process-card:hover h3 {
    color: var(--electric-crown);
}

.process-card p {
    opacity: 0.7;
    font-size: 0.9rem;
    font-weight: var(--weight-regular);
    line-height: 1.6;
    color: var(--midnight-core);
}

/* ============================================
   PORTFOLIO SECTION - PREMIUM REDESIGN
   ============================================ */

.portfolio-section {
    background-color: #03020a;
    padding: var(--spacing-2xl) 0;
    position: relative;
    z-index: 1;
}

.portfolio-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--fresh-energy);
}

.portfolio-section>.container>p {
    text-align: center;
    max-width: 70ch;
    margin: 0 auto var(--spacing-xl);
    font-size: var(--font-size-md);
    opacity: 0.9;
    color: var(--pure-canvas);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: var(--spacing-xl);
    margin-bottom: 6rem;
}

.project-card {
    position: relative;
    border-radius: var(--radius-xl) 0 var(--radius-xl) var(--radius-xl);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--midnight-core);
    background-clip: padding-box;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--midnight-core);
    /* Safari Fix: No usar 'all' */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    /* Safari Fix */
    isolation: isolate;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    outline: 1px solid var(--midnight-core);
}

.project-card:hover {
    transform: translate3d(0, -12px, 0);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--midnight-core);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Info Below Image */
.project-info {
    position: relative;
    width: 100%;
    padding: var(--spacing-lg);
    background: #fff;
    z-index: 2;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--midnight-core);
    letter-spacing: -0.02em;
}

.project-info p {
    margin: 0;
    font-size: var(--font-size-base);
    color: rgba(0, 0, 0, 0.65);
    font-weight: 400;
    line-height: 1.6;
}

.carousel-intro {
    text-align: center;
    color: var(--pure-canvas);
    font-size: 0.6rem;
    /* text-transform: uppercase; */
    /* letter-spacing: 0.25em; */
    opacity: 0.35;
    margin-bottom: 1.25rem;
    width: 100%;
}

/* Logo Carousel Styling */
.logo-carousel {
    overflow: hidden;
    padding: var(--spacing-md) 0;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}

/* Gradient Mask for Edges */
.logo-carousel::before,
.logo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.logo-carousel::before {
    left: 0;
    background: linear-gradient(to right, #03020a, transparent);
}

.logo-carousel::after {
    right: 0;
    background: linear-gradient(to left, #03020a, transparent);
}

.logo-track {
    display: flex;
    width: calc(300px * 16);
    animation: scrollLogos 30s linear infinite;
    align-items: center;
}

.logo-slide {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}

.logo-slide img {
    max-width: 220px;
    height: auto;
    max-height: 100px;
    filter: grayscale(1) brightness(1.5) opacity(0.5);
    transition: all 0.4s ease;
    object-fit: contain;
}

.logo-slide img:hover {
    filter: grayscale(0) brightness(1) opacity(1);
    transform: scale(1.05);
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-300px * 8));
    }
}

/* Responsive adjustment for carousel */
@media (max-width: 768px) {
    .logo-track {
        width: calc(220px * 16);
    }

    .logo-slide {
        width: 220px;
        padding: 0 20px;
    }

    .logo-slide img {
        max-width: 260px;
        max-height: 100px;
    }

    @keyframes scrollLogos {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-220px * 8));
        }
    }
}

/* ============================================
   ABOUT ME SECTION - PREMIUM REDESIGN
   ============================================ */

#sobre-mi {
    background: linear-gradient(135deg, var(--fresh-energy), var(--soft-nature-glow));
    color: var(--midnight-core);
    padding: var(--spacing-2xl) 0;
}

#sobre-mi .container {
    max-width: 900px;
}

#sobre-mi h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--midnight-core);
}

#sobre-mi p {
    font-size: var(--font-size-md);
    line-height: 1.75;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
    text-align: center;
    font-weight: var(--weight-medium);
}

/* ============================================
   CONTACT SECTION - PREMIUM REDESIGN
   ============================================ */

.contact-section {
    background: var(--digital-sky);
    color: var(--pure-canvas);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* Decorative background elements */
.contact-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(93, 23, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.contact-section::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(174, 236, 101, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* Info Side Styling */
.contact-info-side {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.info-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-logo {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.contact-logo:hover {
    transform: translate3d(0, 0, 0) scale(1.05);
}

.info-header h2 {
    font-size: 2.5rem;
    font-weight: var(--weight-semibold);
    color: var(--pure-canvas);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.info-header p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    max-width: 90%;
}

/* Contact Details */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--pure-canvas);
    padding: 1.25rem;
    background: var(--electric-crown);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Safari Fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    outline: 1px solid transparent;
}

.detail-item:hover {
    transform: translate3d(8px, 0, 0);
    background: var(--deep-royal-pulse);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.detail-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: all 0.3s ease;
}

.detail-item:hover .detail-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.detail-text {
    flex: 1;
}

.detail-text h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.detail-text p {
    font-size: 1.15rem;
    font-weight: 400;
    color: #fff;
    margin: 0;
}

/* Form Wrapper */
.form-wrapper {
    background: rgba(255, 255, 255, 0.98);
    padding: 3rem 2.75rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 20px 65px rgba(93, 23, 235, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group:last-of-type {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--midnight-core);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

input,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    color: var(--midnight-core);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(11, 15, 20, 0.4);
}

input:focus,
textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--electric-crown);
}

textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

button[type="submit"] {
    width: 100%;
    padding: 1.15rem 2rem;
    background: linear-gradient(135deg, var(--electric-crown), var(--digital-sky));
    color: #fff;
    border: none;
    border-radius: 40px 0px 21px 40px;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(93, 23, 235, 0.3);
    letter-spacing: 0.02em;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 12px 36px rgba(93, 23, 235, 0.4);
    background: linear-gradient(135deg, var(--deep-royal-pulse), var(--electric-crown));
}

button[type="submit"]:active {
    transform: translate3d(0, -1px, 0);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    padding: var(--spacing-lg) 0;
    background: #03020a;
    color: var(--pure-canvas);
    font-size: 0.9rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.footer-name {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.footer-title {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--pure-canvas);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px 0px 21px 40px;
    /* Branded shape */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    margin: 1rem 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /* Safari Fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--fresh-energy);
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.footer-copy {
    opacity: 0.5;
    font-size: 0.8rem;
    margin-top: 1rem;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--digital-sky) 50%,
            transparent 100%);
}

/* ============================================
   FLOATING ACTION BUTTONS (FAB)
   ============================================ */

.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.fab-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px) translateZ(0);
    animation: fabSlideIn 0.4s ease forwards;
    /* Safari Fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.fab-button:nth-child(1) {
    animation-delay: 0.1s;
}

.fab-button:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fabSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll to Top Button */
.fab-scroll {
    background: linear-gradient(135deg, var(--electric-crown), var(--digital-sky));
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
}

.fab-scroll.visible {
    opacity: 1;
    pointer-events: all;
    animation: fabSlideIn 0.4s ease forwards;
}

.fab-scroll:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--deep-royal-pulse), var(--electric-crown));
}

.fab-scroll:active {
    transform: translate3d(0, -2px, 0);
}

/* WhatsApp Button */
.fab-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
}

.fab-whatsapp:hover {
    transform: translate3d(0, -4px, 0) scale(1.05);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #128C7E, #075E54);
}

.fab-whatsapp:active {
    transform: translate3d(0, -2px, 0) scale(1.02);
}

/* Icon styling */
.fab-button i {
    transition: transform var(--transition-base);
}

.fab-button:hover i {
    transform: scale(1.1);
}

/* ============================================
   RESPONSIVE DESIGN - PREMIUM
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
        --spacing-2xl: 4.5rem;
        --spacing-3xl: 6rem;
    }

    .container {
        width: 92%;
    }

    .hero {
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .process-grid {
        gap: 2rem;
    }

    .portfolio-grid {
        gap: 2.5rem;
    }

    .project-card {
        border-radius: var(--radius-xl) 0 var(--radius-xl) var(--radius-xl) !important;
    }

    .project-info {
        padding: 1.5rem;
    }

    .project-info p {
        font-size: 0.95rem;
        line-height: 1.5;
        text-wrap: wrap;
        word-break: normal;
    }

    .portfolio-grid {
        gap: 2.5rem;
        margin-bottom: 5rem;
    }

    .carousel-intro {
        font-size: 0.62rem;
        margin-bottom: 1rem;
        letter-spacing: 0.18em;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2.5rem;
        --spacing-2xl: 3.5rem;
        --spacing-3xl: 4.5rem;
    }

    .container {
        width: 90%;
        padding: 0 var(--spacing-sm);
    }

    section {
        padding: var(--spacing-2xl) 0;
    }

    /* Hero Section */
    .hero {
        min-height: 100svh;
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }

    .hero-content img {
        max-width: 150px;
        margin-bottom: var(--spacing-lg);
    }

    .hero-name {
        font-size: clamp(2.25rem, 9vw, 3.25rem);
        margin-bottom: var(--spacing-md);
    }

    .hero-subtitle {
        font-size: clamp(1.4rem, 5.5vw, 2rem);
        margin-bottom: var(--spacing-lg);
    }

    .hero-description {
        font-size: 1.05rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-lg);
    }

    .hero-btn {
        padding: 1.05rem 2.25rem;
        font-size: 0.95rem;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    /* Contexto Section */
    .contexto-section {
        padding: var(--spacing-xl) 0;
    }

    .quote-wrapper {
        padding: 0 var(--spacing-sm);
    }

    .quote-mark {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-md);
    }

    .quote-text {
        font-size: 1.05rem;
        margin-bottom: var(--spacing-md);
    }

    .quote-text:first-of-type {
        margin-bottom: var(--spacing-lg);
    }

    .quote-line {
        margin-top: var(--spacing-lg);
    }

    /* Workflow Section */
    .workflow-section {
        padding: var(--spacing-xl) 0;
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .process-card {
        padding: 2rem;
    }

    .process-icon {
        width: 64px;
        height: 64px;
        font-size: 1.85rem;
    }

    .process-card::before {
        width: 8px;
    }

    /* Portfolio Section */
    .portfolio-section {
        padding: var(--spacing-xl) 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card {
        border-radius: var(--radius-lg) 0 var(--radius-lg) var(--radius-lg);
    }

    .project-info {
        padding: 1.15rem;
    }

    .project-info h3 {
        font-size: 1.25rem;
        margin-bottom: 0.4rem;
    }

    .project-info p {
        font-size: 0.85rem;
        line-height: 1.45;
        opacity: 0.85;
        text-wrap: wrap;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .carousel-intro {
        font-size: 0.58rem;
        margin-top: 5rem;
        margin-bottom: 0.7rem;
        letter-spacing: 0.15em;
    }

    /* About Me Section */
    #sobre-mi {
        padding: var(--spacing-xl) 0;
    }

    #sobre-mi p {
        font-size: var(--font-size-base);
    }

    /* Contact Section */
    .contact-section {
        padding: var(--spacing-xl) 0;
    }

    .contact-section::before,
    .contact-section::after {
        width: 300px;
        height: 300px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .contact-logo {
        max-width: 120px;
    }

    .info-header h2 {
        font-size: 2rem;
    }

    .info-header p {
        font-size: 1rem;
        max-width: 100%;
    }

    .detail-item {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .detail-icon {
        width: 54px;
        height: 54px;
        min-width: 54px;
        font-size: 1.4rem;
    }

    .detail-text h4 {
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
    }

    .detail-text p {
        font-size: 1.1rem;
    }

    .form-wrapper {
        padding: 2rem 1.5rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    input,
    textarea {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-height: 48px;
    }

    textarea {
        min-height: 120px;
    }

    button[type="submit"] {
        padding: 1.1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
    }

    /* Footer */
    footer {
        padding: var(--spacing-lg) 0;
    }

    .footer-name {
        font-size: 1.1rem;
    }

    .footer-btn {
        padding: 0.65rem 1.3rem;
        font-size: 0.8rem;
    }

    /* Floating Buttons */
    .floating-buttons {
        bottom: 1.5rem;
        right: 1.5rem;
        gap: 0.85rem;
    }

    .fab-button {
        width: 50px;
        height: 50px;
        font-size: 1.35rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --spacing-md: 1.25rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
    }

    .container {
        width: 88%;
    }

    .hero-content img {
        max-width: 130px;
        margin-bottom: var(--spacing-md);
    }

    .hero-name {
        font-size: 2rem;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .hero-btn {
        padding: 1rem 2rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
    }

    .quote-mark {
        font-size: 2rem;
    }

    .quote-text:first-of-type {
        margin-bottom: var(--spacing-lg);
    }

    .process-card {
        padding: 1.75rem;
    }

    .process-icon {
        width: 58px;
        height: 58px;
        font-size: 1.6rem;
    }

    .process-card::before {
        width: 6px;
    }

    .process-number {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    .process-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .contact-logo {
        max-width: 100px;
    }

    .info-header h2 {
        font-size: 1.75rem;
    }

    .detail-item {
        padding: 0.9rem;
        gap: 1rem;
    }

    .detail-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 1.3rem;
    }

    .detail-text h4 {
        font-size: 0.7rem;
    }

    .detail-text p {
        font-size: 1.05rem;
    }

    .form-wrapper {
        padding: 2rem 1.5rem;
    }

    input,
    textarea {
        padding: 1rem;
        font-size: 1rem;
        min-height: 50px;
    }

    textarea {
        min-height: 130px;
    }

    button[type="submit"] {
        padding: 1.1rem 1.75rem;
        font-size: 1rem;
        min-height: 50px;
        width: 100%;
    }

    /* Floating Buttons */
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
        gap: 0.75rem;
    }

    .fab-button {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible {
    border-color: var(--color-accent);
    outline: none;
}

/* Global class to pause all animations */
.paused-animations *,
.paused-animations *::before,
.paused-animations *::after {
    animation-play-state: paused !important;
}