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

:root {
    --primary: #4f46c2;
    --secondary: #00a9b9;
    --bg-page: #f5f7ff;
    --bg-surface: #ffffff;
    --bg-subtle: #ecf1ff;
    --text-dark: #1c1f3b;
    --text-muted: #6c7091;
    --text-light: #f9f9ff;
    --text-on-primary: #f9f9ff;
    --border-color: rgba(79, 70, 194, 0.14);
    --shadow-color: rgba(79, 70, 194, 0.18);
    --transition: all 0.3s ease-in-out;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: linear-gradient(180deg, #f8f9ff 0%, var(--bg-page) 60%, #fbfdff 100%);
    overflow-x: hidden;
}

.main-container {
    background: transparent;
}

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

nav {
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.logo img {
    height: 44px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Subtle splash background overlay on top of the video */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('assets/background.jpeg?v=20251024');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    mix-blend-mode: soft-light;
    z-index: 2;
    pointer-events: none;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(79, 70, 194, 0.55) 0%, rgba(79, 70, 194, 0.35) 45%, rgba(229, 231, 255, 0.75) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
}

/* Secondary brand mark */
.brand-mark {
    position: absolute;
    left: 40px;
    bottom: 40px;
    width: 120px;
    height: auto;
    opacity: 0.25;
    filter: drop-shadow(0 6px 12px rgba(79, 70, 194, 0.25));
    z-index: 2;
    pointer-events: none;
}

@media (min-width: 1024px) {
    .brand-mark {
        width: 180px;
        left: 60px;
        bottom: 60px;
    }
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-on-primary);
    text-shadow: 0 8px 24px rgba(33, 33, 83, 0.35);
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    color: rgba(247, 247, 255, 0.85);
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-on-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary), #6258ff);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(79, 70, 194, 0.28);
}

/* Angled Dividers */
.angled-divider {
    position: relative;
    height: 100px;
    background: transparent;
}

.angled-divider.top {
    margin-top: -1px;
}

.angled-divider.top::before {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-page);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.angled-divider.bottom {
    margin-bottom: -1px;
}

.angled-divider.bottom::before {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-page);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Section Styling */
section {
    padding: 120px 60px;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Clases Section */
.clases {
    background: var(--bg-surface);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--bg-subtle);
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(79, 70, 194, 0.12);
    box-shadow: 0 18px 40px rgba(79, 70, 194, 0.12);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 22px 44px rgba(79, 70, 194, 0.2);
    border-color: var(--primary);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--primary);
}

.card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* App Section */
.app {
    background: var(--bg-page);
}

.app-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.app-image {
    text-align: center;
}

/* Device mockup */
.device {
    display: inline-block;
}

.device .frame {
    position: relative;
    /* Slightly increase phone size after feedback */
    width: clamp(190px, 22vw, 280px);
    aspect-ratio: 360 / 740;
    height: auto;
    max-width: 100%;
    border-radius: 30px;
    background: #000;
    border: 7px solid #000;
    box-shadow: 0 22px 44px var(--shadow-color);
}

.device .notch {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    height: 12px;
    background: #000;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 2;
}

.device .screen {
    position: absolute;
    inset: 6px;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(180deg, #0e0e0e, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.device .screen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 6px 4px 8px;
    box-sizing: border-box;
}

.app-caption {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.app-features {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.feature i {
    font-size: 24px;
    color: var(--primary);
    margin-top: 5px;
}

.feature h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.feature h3 .soon {
    font-size: 0.75em;
    font-weight: 500;
    color: var(--secondary);
    margin-left: 6px;
}

.feature p {
    color: var(--text-muted);
    font-size: 15px;
}

.badges {
    margin-top: 40px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.badges img {
    transition: var(--transition);
}

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

/* Contacto Section */
.contacto {
    background: var(--bg-surface);
}

.contacto-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.contacto-map {
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.contacto-map iframe {
    filter: none;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contacto-item {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contacto-item i {
    font-size: 24px;
    color: var(--primary);
}

.contacto-item h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contacto-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: var(--transition);
}

.contacto-item a:hover {
    color: var(--primary);
}

/* Footer */
footer {
    background: linear-gradient(180deg, rgba(79, 70, 194, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
    padding: 60px 60px 40px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-dark);
}

/* Decorative pattern overlay using provided background image */
.with-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M0 39 H40 M0 19 H40' stroke='%234f46c2' stroke-opacity='0.08' stroke-width='1'/%3E%3Cpath d='M39 0 V40 M19 0 V40' stroke='%2300a9b9' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.07;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Ensure positioned context for pattern */
.with-pattern {
    position: relative;
    overflow: hidden;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

.footer-copyright {
    color: var(--text-muted);
    font-size: 14px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 1024px) {

    .app-content,
    .contacto-container {
        grid-template-columns: 1fr;
    }

    .app-image {
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        /* Simple responsive, could be a burger menu */
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 18px;
    }

    section {
        padding: 80px 24px;
    }

    .section-header h2 {
        font-size: 36px;
    }

    .hero h1 {
        font-size: 40px;
    }
}

/* Optional details background (use with a container/section that needs the provided blue pattern)
   Uses existing asset `landing/assets/background.jpeg`. */
.details-bg {
    background-image: linear-gradient(rgba(79, 70, 194, 0.25), rgba(0, 169, 185, 0.25)), url('assets/background.jpeg?v=20251024');
    background-size: cover;
    background-position: center;
}