/* =============================================
   HES - Habla, Escucha, Siente
   Minimal macOS + Prehispanic Design System
   ============================================= */

/* Variables */
:root {
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-strong: rgba(255, 255, 255, 0.85);
    --bg-dark: #1B3A4B;
    --bg-dark-deep: #0F2430;

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --text-on-dark: #F5F5F7;

    --teal: #1B3A4B;
    --turquesa: #43B9B2;
    --turquesa-light: #5DD8D0;
    --turquesa-glow: rgba(67, 185, 178, 0.15);
    --slate: #6B8DAE;
    --oro: #C8A84E;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 100px;

    --shadow-xs: 0 1px 2px 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.10);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);

    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Prehispanic Background Pattern */
.pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.022;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 8 L44 18 L54 18 L46 24 L49 34 L40 28 L31 34 L34 24 L26 18 L36 18 Z' fill='none' stroke='%231B3A4B' stroke-width='1'/%3E%3Cpath d='M10 55 L15 55 L15 60 L20 60 L20 65 L15 65 L15 70 L10 70 L10 65 L5 65 L5 60 L10 60 Z' fill='none' stroke='%231B3A4B' stroke-width='0.8'/%3E%3Cpath d='M60 55 L65 55 L65 60 L70 60 L70 65 L65 65 L65 70 L60 70 L60 65 L55 65 L55 60 L60 60 Z' fill='none' stroke='%231B3A4B' stroke-width='0.8'/%3E%3C/svg%3E");
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--turquesa);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--teal);
}

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

/* =============================================
   NAVBAR - macOS Glassmorphism
   ============================================= */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1100px;
    padding: 0 24px;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo img {
    height: 34px;
    width: auto;
}

.nav-logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.nav-logo-text .h { color: var(--teal); }
.nav-logo-text .e { color: var(--turquesa); }
.nav-logo-text .s { color: var(--slate); }

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--teal);
    color: white;
    box-shadow: 0 2px 8px rgba(27, 58, 75, 0.25);
}

.btn-primary:hover {
    background: #244D63;
    color: white;
    box-shadow: 0 4px 16px rgba(27, 58, 75, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.2);
}

.btn-accent {
    background: var(--turquesa);
    color: white;
    box-shadow: 0 2px 8px rgba(67, 185, 178, 0.3);
}

.btn-accent:hover {
    background: var(--turquesa-light);
    color: white;
    box-shadow: 0 4px 16px rgba(67, 185, 178, 0.4);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 0.8125rem;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   HERO SECTION - Inicio
   ============================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--turquesa-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(107, 141, 174, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-logo {
    width: 140px;
    height: auto;
    margin: 0 auto 32px;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(27, 58, 75, 0.15));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(67, 185, 178, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--turquesa);
    margin-bottom: 24px;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero h1 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--turquesa) 50%, var(--slate) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Prehispanic geometric divider */
.divider-prehispanic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    opacity: 0.2;
}

.divider-prehispanic::before,
.divider-prehispanic::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.divider-prehispanic svg {
    width: 20px;
    height: 20px;
    color: var(--teal);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeInUp 1s ease 1.5s both;
}

.scroll-indicator .mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-tertiary);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator .mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: var(--turquesa);
    border-radius: 3px;
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* =============================================
   SECTION: QUE ES HES
   ============================================= */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--turquesa);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.05rem;
}

/* Feature Cards - Glassmorphism */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: var(--transition);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: var(--transition);
}

.feature-card:nth-child(1)::before { background: linear-gradient(90deg, var(--turquesa), var(--turquesa-light)); }
.feature-card:nth-child(2)::before { background: linear-gradient(90deg, var(--oro), #E0C068); }
.feature-card:nth-child(3)::before { background: linear-gradient(90deg, var(--teal), var(--slate)); }

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.8);
}

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

.feature-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-primary);
    padding: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover .feature-avatar {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.feature-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Prehispanic decorative border for section */
.section-que-es::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 15 L45 15 L37 22 L40 32 L30 26 L20 32 L23 22 L15 15 L25 15 Z' fill='%231B3A4B'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* How it works - minimal steps */
.steps-container {
    display: flex;
    justify-content: center;
    gap: 48px;
    max-width: 900px;
    margin: 64px auto 0;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 180px;
    max-width: 240px;
    position: relative;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--teal);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50%;
    margin-bottom: 16px;
}

.step h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.step p {
    font-size: 0.875rem;
}

/* Connector lines between steps */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    right: -28px;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--turquesa), transparent);
}

/* =============================================
   SECTION: CONTACTO
   ============================================= */
.section-contacto {
    background: linear-gradient(180deg, var(--bg-primary) 0%, #EDF2F7 100%);
}

.contact-container {
    max-width: 560px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--turquesa);
    box-shadow: 0 0 0 3px var(--turquesa-glow);
    background: white;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

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

.contact-card .btn {
    width: 100%;
    margin-top: 8px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.contact-info-item svg {
    width: 18px;
    height: 18px;
    color: var(--turquesa);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    position: relative;
    z-index: 1;
    background: var(--bg-dark-deep);
    color: var(--text-on-dark);
    padding: 48px 24px 32px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 32px;
}

.footer-logo-text {
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-logo-text .h { color: var(--slate); }
.footer-logo-text .e { color: var(--turquesa); }
.footer-logo-text .s { color: var(--slate); }

.footer-tagline {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--turquesa);
}

.footer-bottom {
    max-width: 1100px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Prehispanic footer decoration */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--turquesa), var(--slate), var(--turquesa), var(--teal));
}

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

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .navbar {
        top: 8px;
        width: calc(100% - 16px);
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-glass-strong);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: var(--radius-lg);
        padding: 16px;
        flex-direction: column;
        gap: 4px;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }

    .nav-actions .btn-secondary {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    .hero-logo {
        width: 100px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 400px;
    }

    .feature-card {
        padding: 32px 24px;
    }

    .feature-avatar {
        width: 100px;
        height: 100px;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .section {
        padding: 64px 20px;
    }

    .contact-card {
        padding: 32px 24px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .scroll-indicator {
        display: none;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.text-muted { color: var(--text-tertiary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
