/* ================================================
   CSS VARIABLES
   ================================================ */
:root {
    /* Backgrounds */
    --bg-primary:   #0A0A0A;
    --bg-secondary: #111111;
    --bg-tertiary:  #1A1A1A;
    --bg-card:      #1C1C1E;

    /* Text */
    --text-primary:   #FFFFFF;
    --text-secondary: #E5E5E5;
    --text-muted:     #8E8E93;

    /* Accent */
    --accent:       #007AFF;
    --accent-hover: #0051D5;
    --accent-glow:  rgba(0, 122, 255, 0.25);

    /* Glass */
    --glass-bg:     rgba(255, 255, 255, 0.04);
    --glass-bg-md:  rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.09);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 24px rgba(0, 122, 255, 0.3);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --max-width: 1440px;
    --section-padding: clamp(80px, 10vw, 120px) 0;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Global fixed background ─────────────────────────── */
.global-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.g-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 12s ease-in-out infinite;
    will-change: transform;
}

/* Distribuidos por toda la viewport para ser visibles en cualquier punto del scroll */
.g-orb-1 {
    width: 750px; height: 750px;
    background: radial-gradient(circle, #007AFF 0%, transparent 65%);
    top: -15%; right: -8%;
    opacity: 0.28;
    animation-delay: 0s;
}
.g-orb-2 {
    width: 650px; height: 650px;
    background: radial-gradient(circle, #5E5CE6 0%, transparent 65%);
    top: 25%; left: -12%;
    opacity: 0.22;
    animation-delay: -4s;
}
.g-orb-3 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #BF5AF2 0%, transparent 65%);
    top: 55%; right: 5%;
    opacity: 0.18;
    animation-delay: -7s;
}
.g-orb-4 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #007AFF 0%, transparent 65%);
    bottom: -5%; left: 15%;
    opacity: 0.20;
    animation-delay: -2s;
}

.g-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: 64px 64px;
}

/* ── Alternating section types ───────────────────────── */
.section,
header.hero,
footer {
    position: relative;
    z-index: 1;
}

/* Clear: transparente, se ven los orbs nítidos */
.s-clear {
    background: rgba(10, 10, 10, 0.18);
}

/* Glass: cristal esmerilado, orbs difusos detrás */
.s-glass {
    background: rgba(8, 8, 14, 0.45);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* ================================================
   UTILITIES
   ================================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(20px, 3vw, 48px);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

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

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

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-title.align-left {
    text-align: left;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.gradient-text {
    background: linear-gradient(135deg, #007AFF 0%, #5E5CE6 50%, #BF5AF2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.tech-tags span {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(0, 122, 255, 0.12);
    border: 1px solid rgba(0, 122, 255, 0.2);
    color: var(--accent);
    letter-spacing: 0.02em;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition);
    background: rgba(255, 255, 255, 0.08);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active { transform: translateY(0); }

.btn-glass {
    background: var(--glass-bg-md);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-glass:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ================================================
   NAVBAR
   ================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px clamp(20px, 3vw, 48px);
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.08);
    box-shadow: 0 0 12px var(--accent-glow);
}

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

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--glass-bg-md);
}

.nav-cta {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: var(--radius-sm) !important;
}

.nav-cta:hover {
    background: var(--accent-hover) !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.hamburger:hover { background: var(--glass-bg-md); }

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 12px clamp(20px, 3vw, 48px) 16px;
    border-top: 1px solid var(--glass-border);
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.25s;
    pointer-events: none;
    z-index: 999;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.mobile-menu a:hover {
    color: var(--text-primary);
    background: var(--glass-bg-md);
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0 80px;
}

/* Orbs moved to .global-bg (fixed, global) — see top of file */

/* Hero layout */
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.hero-content {
    max-width: 580px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: 100px;
    background: var(--glass-bg-md);
    border: 1px solid var(--glass-border);
    margin-bottom: 24px;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34C759;
    box-shadow: 0 0 8px #34C759;
    animation: pulse 2s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Hero Photo */
.hero-photo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-photo-glass {
    position: relative;
    display: inline-block;
}

.hero-photo-frame {
    width: clamp(260px, 30vw, 360px);
    height: clamp(260px, 30vw, 360px);
    border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
    background: var(--glass-bg-md);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: morphBorder 8s ease-in-out infinite;
}

.hero-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #007AFF, #5E5CE6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    white-space: nowrap;
    animation: floatBadge 4s ease-in-out infinite;
}

.hero-floating-badge > span { font-size: 1.2rem; }
.hero-floating-badge strong { display: block; font-size: 1.1rem; font-weight: 700; }
.hero-floating-badge small { color: white; font-size: 0.72rem; }

.badge-top {
    top: 10%;
    right: -20%;
    animation-delay: -1s;
}

.badge-bottom {
    bottom: 10%;
    left: -20%;
    animation-delay: -2.5s;
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    z-index: 1;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* ================================================
   SERVICES SECTION — carousel + desktop grid
   ================================================ */

/* Desktop: wrap is invisible, track renders as 3-col grid */
.svc-wrap {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.svc-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.svc-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Arrow buttons — hidden on desktop */
.svc-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg-md);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all var(--transition);
    cursor: pointer;
}

.svc-arrow:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.svc-arrow:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dots — hidden on desktop */
.svc-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.svc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
}

.svc-dot.is-active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* Clones are only needed in carousel mode */
.svc-clone { display: none; }

.service-card {
    padding: 28px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: default;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.15);
}

.service-card.service-card-featured {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.06);
}

.service-card.service-card-featured:hover {
    box-shadow: var(--shadow-glow);
}

.service-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--accent);
    transition: background var(--transition), box-shadow var(--transition);
}

.service-card:hover .service-icon {
    background: rgba(0, 122, 255, 0.18);
    box-shadow: 0 0 16px rgba(0, 122, 255, 0.2);
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ================================================
   STACK SECTION
   ================================================ */
/* .stack-section background handled by .s-clear */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    cursor: default;
}

.stack-item:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: var(--shadow-md);
}

.stack-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform var(--transition);
}

.stack-item:hover img { transform: scale(1.1); }

.stack-item span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

/* ================================================
   PROJECTS SECTION
   ================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.15);
}

.project-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.project-img-wrapper {
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.project-img {
    height: 220px;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
    opacity: 1;
}

.project-overlay span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    background: var(--glass-bg-md);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-info {
    padding: 22px 24px 24px;
}

.project-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.project-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ================================================
   FAQ SECTION
   ================================================ */
/* .faq-section background handled by .s-clear */

.faq-container {
    max-width: 780px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    overflow: hidden;
    border-radius: var(--radius-md) !important;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item:has(.faq-btn[aria-expanded="true"]) {
    border-color: rgba(0, 122, 255, 0.25);
}

.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    transition: color var(--transition);
    background: none;
}

.faq-btn:hover { color: var(--accent); }

.faq-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.faq-icon svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition);
}

.faq-btn[aria-expanded="true"] .faq-icon {
    background: var(--accent);
    border-color: var(--accent);
}

.faq-btn[aria-expanded="true"] .faq-icon svg {
    transform: rotate(45deg);
    stroke: #fff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding var(--transition);
    padding: 0 24px;
}

.faq-answer.open {
    max-height: 300px;
    padding: 0 24px 20px;
}

.faq-answer p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.faq-answer p strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ================================================
   ABOUT SECTION
   ================================================ */
.about-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 2vw, 40px);
    padding-right: clamp(16px, 2vw, 40px);
}

.about-photo-glass {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 420px;
}

.about-photo-img {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: var(--radius-xl);
    object-fit: cover;
    object-position: center 25%;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    display: block;
}

.about-decoration {
    position: absolute;
    inset: -16px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 122, 255, 0.15);
    z-index: -1;
}

/* Responsive-only photo inside about content */
.about-photo-mobile {
    display: none;
}

.about-content .section-tag { display: inline-block; margin-bottom: 10px; }
.about-content .section-title { margin-bottom: 20px; }

.about-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-text strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.about-stats {
    display: flex;
    width: fit-content;
    gap: 32px;
    margin: 32px 0;
    padding: 24px 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.about-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-value {
    display: flex;
    align-items: baseline;
    gap: 2px;
    line-height: 1;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
}

.stat-suffix {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* ================================================
   CTA SECTION
   ================================================ */
.cta-section {
    padding: clamp(60px, 8vw, 100px) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.cta-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(94, 92, 230, 0.25);
    background: rgba(10, 8, 28, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: clamp(60px, 10vw, 110px) clamp(24px, 6vw, 80px);
    display: flex;
    justify-content: center;
    /* Glow radial central */
    box-shadow:
        0 0 80px rgba(94, 92, 230, 0.12),
        inset 0 0 120px rgba(94, 92, 230, 0.07);
}

/* Glow central detrás del texto */
.cta-card::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(94, 92, 230, 0.18) 0%, transparent 65%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Partículas puntito */
.cta-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(130, 120, 255, 0.6);
    box-shadow: 0 0 6px rgba(130, 120, 255, 0.8);
    animation: floatBadge 4s ease-in-out infinite;
}

.cta-dot:nth-child(2) { animation-delay: -1s; width: 4px; height: 4px; }
.cta-dot:nth-child(3) { animation-delay: -2s; }
.cta-dot:nth-child(4) { animation-delay: -0.5s; width: 3px; height: 3px; }
.cta-dot:nth-child(5) { animation-delay: -3s; width: 4px; height: 4px; }
.cta-dot:nth-child(6) { animation-delay: -1.5s; width: 3px; height: 3px; }

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.cta-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    letter-spacing: 0.04em;
}

.cta-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--text-primary);
}

.cta-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 520px;
}

.cta-btn {
    padding: 16px 40px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    margin-top: 8px;
}

/* ================================================
   CONTACT SECTION
   ================================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: start;
}

.contact-form {
    padding: 36px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.required { color: var(--accent); }

.optional {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    resize: vertical;
    outline: none;
    width: 100%;
}

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

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255, 255, 255, 0.06);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(0, 122, 255, 0.04);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #FF453A;
}

.form-error {
    font-size: 0.78rem;
    color: #FF453A;
    min-height: 18px;
    display: block;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    margin-top: 24px;
    padding: 15px 24px;
    font-size: 0.95rem;
    position: relative;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-submit.loading .btn-text,
.btn-submit.loading .btn-icon-send { display: none; }
.btn-submit.loading .btn-spinner { display: block; }

.form-success[hidden] {
    display: none;
}

.form-success {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.25);
    border-radius: var(--radius-sm);
    color: #34C759;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Contact info sidebar */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 280px;
}

.contact-info-card {
    padding: 28px;
}

.contact-info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
}

.contact-link:hover {
    background: var(--glass-bg-md);
    border-color: rgba(255,255,255,0.15);
    transform: translateX(4px);
}

.contact-link-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.whatsapp-icon { background: rgba(37, 211, 102, 0.12); color: #25D366; }
.email-icon { background: rgba(0, 122, 255, 0.12); color: var(--accent); }

.contact-link-text span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-link-text small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.contact-availability {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
}

.availability-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34C759;
    box-shadow: 0 0 8px #34C759;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.contact-availability strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-availability p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    padding: 32px 0;
    /* background + border-top vienen de .s-glass */
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

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

.footer-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    transition: transform var(--transition), opacity var(--transition);
}

.footer-logo:hover .footer-logo-img {
    transform: scale(1.08);
    opacity: 0.85;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 8px;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
}

.social-btn:hover {
    color: var(--text-primary);
    background: var(--glass-bg-md);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-3px);
}

/* ================================================
   PROJECT MODAL
   ================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-slow), opacity var(--transition-slow);
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.modal-overlay.open .modal-box {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg-md);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.modal-img-wrapper { overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

.modal-img {
    height: 260px;
    transition: transform 0.5s ease;
}

.modal-content {
    padding: 28px 28px 32px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.modal-detail {
    margin: 20px 0;
    padding: 20px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-detail h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 14px;
}

.ch-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ch-block + .ch-block {
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}

.ch-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.ch-block-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #007AFF, #5E5CE6);
    border-radius: 2px;
    flex-shrink: 0;
}

.ch-block p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0;
}

.ch-mark {
    background: linear-gradient(135deg, #007AFF 0%, #5E5CE6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

/* ================================================
   RESPONSIVE — Tablet
   ================================================ */
@media (max-width: 1024px) {
    /* Orbs más pequeños en tablet */
    .g-orb { filter: blur(80px); }
    .g-orb-1 { width: 520px; height: 520px; }
    .g-orb-2 { width: 460px; height: 460px; }
    .g-orb-3 { width: 360px; height: 360px; }
    .g-orb-4 { width: 400px; height: 400px; }

    /* Reducir backdrop-filter en tablet */
    .glass-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .hero-container {
        gap: 40px;
    }

    /* Services carousel — tablet (3-card) */
    .svc-clone { display: block; }

    .svc-wrap {
        align-items: center;
        gap: 10px;
    }

    .svc-track {
        display: flex;
        gap: 0;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }

    .svc-slide {
        flex: 0 0 calc(100% / 3);
        min-width: 0;
        padding: 0 8px;
    }

    .svc-slide .service-card {
        height: 100%;
        transition: opacity 0.4s, transform 0.4s, filter 0.4s, box-shadow var(--transition), border-color var(--transition);
    }

    /* Active card: solid dark background, prominent */
    .svc-slide.is-active .service-card {
        background: rgba(14, 12, 34, 0.92);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
    }

    /* Side cards: blurred, scaled down, very dim */
    .svc-slide:not(.is-active) .service-card {
        opacity: 0.22;
        transform: scale(0.84);
        filter: blur(3px);
        pointer-events: none;
    }

    .svc-arrow {
        display: flex;
    }

    .svc-dots {
        display: flex;
    }

    .stack-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .about-grid {
        gap: 48px;
    }

    /* about-photo-mobile no se muestra en tablet/laptop — solo en mobile */
    .about-photo-mobile {
        display: none;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-info {
        min-width: unset;
        flex-direction: row;
    }

    .contact-info > * { flex: 1; }
}

/* ================================================
   RESPONSIVE — Mobile
   ================================================ */
@media (max-width: 768px) {
    /* ── Performance: reducir carga GPU en mobile ── */

    /* Orbs: pausar animación (mayor ahorro CPU/GPU) y reducir tamaño */
    .g-orb {
        animation-play-state: paused;
        filter: blur(60px);
    }
    .g-orb-1 { width: 280px; height: 280px; }
    .g-orb-2 { width: 260px; height: 260px; }
    .g-orb-3 { width: 200px; height: 200px; }
    .g-orb-4 { width: 240px; height: 240px; }

    /* Reducir backdrop-filter en secciones y cards */
    .s-glass {
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
    .glass-card {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
    .navbar.scrolled {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .mobile-menu {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .modal-overlay {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    /* Nav */
    .nav-links { display: none; }
    .hamburger { display: flex; }

    /* Hero: una columna, centrado, sin foto */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle { max-width: 100%; }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Ocultar foto del hero en mobile */
    .hero-photo-wrapper { display: none; }

    /* Services carousel — mobile (1-card) */
    .svc-wrap {
        gap: 8px;
    }

    .svc-slide {
        flex: 0 0 100%;
        padding: 0;
    }

    .svc-slide:not(.is-active) .service-card {
        opacity: 1;
        transform: none;
    }

    .svc-arrow {
        width: 40px;
        height: 40px;
    }

    /* Smaller, more compact service cards in mobile carousel */
    .svc-slide .service-card {
        padding: 20px 18px;
    }

    .svc-slide .service-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
        background: rgba(94, 92, 230, 0.22);
        border-color: rgba(94, 92, 230, 0.3);
        color: #8b89f0;
    }

    .svc-slide .service-card h3 {
        font-size: 0.95rem;
        margin-bottom: 7px;
    }

    .svc-slide .service-card p {
        font-size: 0.83rem;
    }

    /* Stack: 4 columnas */
    .stack-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Proyectos: 1 columna */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* FAQ */
    .faq-container {
        max-width: 100%;
    }

    /* About: ocultar foto, centrar contenido */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .about-image { display: none; }

    .about-photo-mobile {
        display: block;
        width: 100%;
        max-width: 360px;
        border-radius: var(--radius-xl);
        object-fit: cover;
        border: 1px solid var(--glass-border);
        box-shadow: var(--shadow-md);
        margin: 8px auto 0;
    }

    .about-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .about-content .section-title { text-align: center; }

    .about-stats {
        gap: 20px;
        justify-content: center;
    }

    .about-stat { align-items: center; }

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

    .contact-info {
        flex-direction: column;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    /* Modal */
    /* CTA */
    .cta-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-detail { display: none; }

    /* Formulario compacto */
    .contact-form {
        padding: 20px 16px;
    }

    .form-group {
        margin-bottom: 12px;
        gap: 5px;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .form-group textarea {
        rows: 4;
        min-height: 90px;
    }

    .btn-submit {
        margin-top: 14px;
        padding: 13px 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-box {
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .stack-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stack-item {
        flex: 0 0 calc(33.33% - 10px);
    }

    .hero-badge { font-size: 0.72rem; }

    .btn {
        padding: 12px 18px;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
