/* ============================================
   YCOM - Yang Carlo Ortiz Website Styles
   ============================================ */

/* === CSS RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === ROOT VARIABLES === */
:root {
    /* Colors from Logo */
    --primary-dark: #2D4A46;
    --primary-accent: #D17254;
    --primary-light: #E8D5B7;

    /* Supporting Colors */
    --dark: #1a1a1a;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #f5f5f5;
    --white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, #1e3330 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-accent) 0%, #c15a3f 100%);
    --gradient-hero: linear-gradient(135deg, rgba(45, 74, 70, 0.95) 0%, rgba(30, 51, 48, 0.95) 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;

    /* Spacing (8px grid) */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 1.5rem;
    /* 24px */
    --space-lg: 2rem;
    /* 32px */
    --space-xl: 3rem;
    /* 48px */
    --space-2xl: 4rem;
    /* 64px */
    --space-3xl: 6rem;
    /* 96px */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.24);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Layout */
    --container-max: 1200px;
    --container-wide: 1400px;
    --header-height: 80px;
}

/* === BASE STYLES === */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--gray-dark);
    font-size: 1.125rem;
    line-height: 1.8;
}

a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: var(--container-wide);
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: var(--radius-md);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--gray-dark);
    font-weight: 500;
    font-size: 1rem;
    padding: var(--space-xs) var(--space-sm);
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: var(--primary-accent);
    transition: transform var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--primary-dark);
    transition: all var(--transition-base);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
}

.btn-small {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
}

/* === SECTIONS === */
.section {
    padding: var(--space-3xl) 0;
}

.section-dark {
    background: var(--gradient-primary);
    color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6,
.section-dark p {
    color: var(--white);
}

.section-light {
    background-color: var(--gray-light);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-medium);
    font-weight: 400;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="1" cy="1" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

.hero h1,
.hero p {
    color: var(--white);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: var(--space-xl);
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* === CARDS === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    font-size: 2rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--primary-dark);
}

.card-description {
    color: var(--gray-medium);
    font-size: 1rem;
    line-height: 1.8;
}

/* === FOOTER === */
.footer {
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--space-2xl) 0 var(--space-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
}

.footer-column p,
.footer-column a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--primary-accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--primary-accent);
    transform: translateY(-4px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* === WHATSAPP FLOAT BUTTON === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    cursor: pointer;
    transition: all var(--transition-base);
    animation: fadeInUp 1s ease 0.5s both;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease both;
}

.fade-in {
    animation: fadeIn 0.8s ease both;
}

/* Stagger animations */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* === FORMS === */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--gray-dark);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    background-color: var(--white);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(209, 114, 84, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

.form-success {
    background-color: #d4edda;
    color: #155724;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    border: 1px solid #c3e6cb;
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    :root {
        --space-3xl: 4rem;
        --space-2xl: 3rem;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        padding: var(--space-xl);
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-base);
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav .btn {
        width: 100%;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    p {
        font-size: 1rem;
    }
}

/* === VISUAL UPGRADES (NEW) === */

/* 1. Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.section-dark .glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: var(--white);
}

/* Update Card styles to use Glassmorphism by default if added */
.card.glass-panel {
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.card.glass-panel:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

/* 2. Hero Particles Canvas */
.hero {
    position: relative;
    /* Ensure z-index context */
}

#hero-particles,
#manifiesto-particles,
#footer-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content */
    pointer-events: none;
    /* Let clicks pass through */
}

/* Ensure sections with particles have relative positioning and content has higher z-index */
.section-dark,
.footer {
    position: relative;
    overflow: hidden;
    /* Contain particles */
}

.section-dark .container,
.footer .container {
    position: relative;
    z-index: 1;
    /* Above particles */
}

/* 3. Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary-accent);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 4. Glow Pulse Animation */
.btn-glow {
    animation: glow-pulse 3s infinite;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(209, 114, 84, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(209, 114, 84, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(209, 114, 84, 0);
    }
}

/* 5. Micro-interactions: Nav Link Expand */
.nav-link::after {
    /* Existing transition is good, just ensuring it's smooth */
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}