/* ============================================
   PiMatrix - Estilos Landing Page
   Paleta basada en logo: Verde Tech, Naranja Fuego, Teal Oscuro
   ============================================ */

/* === Variables === */
:root {
    --color-primary: #00D26A;       /* Verde vivo tech */
    --color-primary-dark: #00B85C;  /* Verde profundo */
    --color-secondary: #FF6B2C;     /* Naranja cálido */
    --color-secondary-light: #FF8F5C;
    --color-accent: #FBBF24;        /* Amarillo fuego */
    --color-dark: #0A3D47;          /* Teal profundo */
    --color-dark-light: #1A6B7C;
    --color-text: #1F2937;          /* Gris oscuro para texto */
    --color-text-light: #6B7280;    /* Gris para texto secundario */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8FAFC;
    --color-bg-dark: #0D1B1E;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 50px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Typography === */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-dark);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-primary {
    background: linear-gradient(160deg, #00E676 0%, var(--color-primary) 50%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 210, 106, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 210, 106, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
}

.btn-secondary:hover {
    background: var(--color-dark);
    color: white;
    box-shadow: 0 4px 15px rgba(10, 61, 71, 0.3);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    text-decoration: none;
}

.logo img {
    height: 48px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* === Hero === */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero h1 {
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Sections === */
.section {
    padding: 100px 0;
}

.section h2 {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* === Problem Section === */
.problem {
    background: var(--color-bg-alt);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.problem-card {
    background: white;
    padding: 40px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s;
}

.problem-card:hover {
    transform: translateY(-5px);
}

.problem-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.problem-icon i {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.problem-card h3 {
    color: var(--color-dark);
    margin-bottom: 12px;
}

.problem-card p {
    color: var(--color-text-light);
    margin: 0;
}

/* === Solution Section === */
.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.solution-card {
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid #E5E7EB;
    transition: all 0.3s;
}

.solution-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 25px rgba(0, 210, 106, 0.15);
}

.solution-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.solution-card p {
    color: var(--color-text-light);
    margin: 0;
}

/* === How it Works === */
.how-it-works {
    background: var(--color-dark);
    color: white;
}

.how-it-works h2 {
    color: white;
}

.steps {
    max-width: 800px;
    margin: 60px auto 0;
}

.step {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 48px;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00E676 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 210, 106, 0.3);
}

.step-content h3 {
    color: white;
    margin-bottom: 8px;
}

.step-content p {
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* === Use Cases === */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.use-case-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.use-case-card:hover {
    background: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.use-case-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.use-case-icon i {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.8;
    transition: all 0.3s;
}

.use-case-card:hover .use-case-icon i {
    opacity: 1;
    transform: scale(1.1);
}

.use-case-card h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.use-case-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* === Tech Section === */
.tech {
    background: var(--color-bg-alt);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.tech-item {
    text-align: center;
}

.tech-item h4 {
    color: var(--color-primary-dark);
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.tech-item p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* === About Section === */
.about {
    background: var(--color-bg-alt);
}

.about .section-subtitle {
    max-width: 700px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 60px;
}

.about-card {
    text-align: center;
    padding: 40px 28px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.about-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-icon i {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-card h3 {
    color: var(--color-dark);
    margin-bottom: 12px;
}

.about-card p {
    color: var(--color-text-light);
    margin: 0;
}

/* === CTA Section === */
.cta {
    background: linear-gradient(135deg, var(--color-dark) 0%, #0E4D59 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: 16px;
}

.cta > .container > p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 48px;
}

/* === Contact Form === */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: var(--font-main);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
    color: white;
    transition: all 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255,255,255,0.1);
}

.contact-form textarea {
    resize: vertical;
    margin-bottom: 24px;
}

.contact-form .btn {
    width: 100%;
}

/* === Footer === */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.footer-brand img {
    height: 60px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* === Hamburger Menu Button === */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-dark);
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* === Mobile Menu Overlay === */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-dark);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-menu-nav a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-menu-nav a:hover {
    color: var(--color-primary);
}

/* === Responsive - Tablet (768px) === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 120px 0 70px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 32px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 320px;
    }

    .section {
        padding: 60px 0;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .problem-grid {
        gap: 20px;
        margin-top: 40px;
    }

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

    .solution-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 40px;
    }

    .solution-card {
        padding: 24px;
    }

    .steps {
        margin-top: 40px;
    }

    .step {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin-bottom: 36px;
    }

    .step-number {
        margin: 0 auto;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 40px;
    }

    .use-case-card {
        padding: 24px 16px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .footer {
        padding: 40px 0 24px;
    }

    .footer-content {
        margin-bottom: 24px;
    }
}

/* === Responsive - Mobile (480px) === */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .nav {
        height: 64px;
    }

    .logo img {
        height: 40px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .section {
        padding: 48px 0;
    }

    .problem-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 32px;
    }

    .problem-card {
        padding: 28px 20px;
    }

    .problem-icon {
        font-size: 2.5rem;
        margin-bottom: 16px;
    }

    .solution-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 32px;
    }

    .solution-card {
        padding: 24px 20px;
    }

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

    .step {
        margin-bottom: 32px;
    }

    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 32px;
    }

    .use-case-card {
        padding: 20px 12px;
    }

    .use-case-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .use-case-card h3 {
        font-size: 1rem;
    }

    .use-case-card p {
        font-size: 0.8rem;
    }

    .cta h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .contact-form textarea {
        margin-bottom: 16px;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .footer-brand img {
        height: 48px;
    }
}
