/* ==========================================
   TAKUMI - Estilos Principales
   ========================================== */

:root {
    --primary-color: #0066ff;
    --secondary-color: #00d4ff;
    --dark-bg: #0a0e27;
    --light-bg: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --accent-gradient: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --shadow-lg: 0 20px 60px rgba(0, 102, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   HEADER & NAVEGACIÓN
   ========================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-img {
    height: 54px;
    width: auto;
    transition: opacity 0.3s ease;
}

.logo-img.is-hidden {
    opacity: 0;
}

.logo-animation {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 700;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.45s ease;
    pointer-events: none;
}

.logo-animation.active {
    opacity: 1;
}

.logo-container .logo-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.9rem;
    letter-spacing: 0.3em;
    gap: 0.2rem;
}

.logo-piece {
    display: inline-block;
}

.splash-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 102, 255, 0.35), transparent 55%),
                radial-gradient(circle at 70% 70%, rgba(0, 212, 255, 0.25), transparent 60%),
                #050816;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.splash-screen::before,
.splash-screen::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.45;
    animation: splashPulse 8s ease-in-out infinite;
}

.splash-screen::before {
    width: 420px;
    height: 420px;
    background: rgba(0, 102, 255, 0.35);
    top: 18%;
    left: 15%;
}

.splash-screen::after {
    width: 480px;
    height: 480px;
    background: rgba(0, 212, 255, 0.25);
    bottom: 12%;
    right: 16%;
    animation-delay: -3s;
}

.splash-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(320px, 58vw, 720px);
    height: clamp(320px, 58vw, 720px);
    padding: clamp(2.8rem, 6vw, 4.8rem);
    border-radius: 28px;
    background: rgba(10, 14, 39, 0.35);
    backdrop-filter: blur(18px);
    box-shadow: 0 35px 120px rgba(0, 0, 0, 0.45);
    overflow: visible;
}

.splash-logo::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.45), rgba(0, 212, 255, 0.25));
    opacity: 0.15;
    transform: rotate(12deg);
}

.splash-logo .logo-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(3.5rem, 12vw, 8rem);
    letter-spacing: 0.4em;
    gap: 0.18em;
    z-index: 3;
}

.splash-logo .logo-piece {
    text-shadow: 0 25px 45px rgba(0, 0, 0, 0.35);
}

.splash-logo-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(160px, 24vw, 320px);
    height: auto;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 35px 65px rgba(0, 0, 0, 0.45));
}

.splash-logo-img.is-visible {
    opacity: 1;
}

@keyframes splashPulse {
    0%, 100% {
        transform: scale(0.95) translate3d(0, 0, 0);
        opacity: 0.35;
    }
    50% {
        transform: scale(1.05) translate3d(0, -12px, 0);
        opacity: 0.55;
    }
}

/* Logo CSS estilizado (fallback visual) */
.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: white;
    position: relative;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.logo-icon::before {
    content: 'T';
    font-family: 'Poppins', sans-serif;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.logo-sub {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 2px;
}

/* Legacy logo styles - mantener por compatibilidad */
.logo {
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all 0.3s ease;
}

/* ==========================================
   HERO SECTION
   ========================================== */

#hero {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: float 20s infinite;
    opacity: 0.6;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-100px) translateX(50px);
    }
    50% {
        transform: translateY(-200px) translateX(-50px);
    }
    75% {
        transform: translateY(-100px) translateX(100px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    max-width: 1200px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ==========================================
   SECCIÓN DE SERVICIOS
   ========================================== */

#servicios {
    padding: 8rem 5%;
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.servicio-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.servicio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.servicio-card:hover::before {
    transform: scaleX(1);
}

.servicio-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.servicio-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.servicio-card p {
    color: #666;
    line-height: 1.8;
}

/* ==========================================
   SECCIÓN TECNOLOGÍAS
   ========================================== */

#tecnologias {
    padding: 8rem 5%;
    background: var(--dark-bg);
    color: var(--text-light);
}

.tech-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 3rem auto 0;
}

.tech-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tech-category:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.tech-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.tech-list {
    list-style: none;
}

.tech-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-list li:last-child {
    border-bottom: none;
}

.tech-list li::before {
    content: '→';
    color: var(--secondary-color);
    font-weight: bold;
}

/* ==========================================
   SECCIÓN PROYECTOS
   ========================================== */

#proyectos {
    padding: 8rem 0;
    background: var(--light-bg);
}

#proyectos .section-title {
    max-width: 720px;
    margin: 0 auto 4.5rem;
}

.soluciones-row {
    margin-top: 0 !important;
    padding-top: 3.5rem;
    position: relative;
    z-index: 2;
}

.soluciones-row > * {
    margin-top: 0;
}


.project-card {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    background: #ffffff;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.project-header .card-title {
    margin-bottom: 0;
}

.project-image {
    width: clamp(140px, 28vw, 190px);
    height: auto;
    object-fit: contain;
}

.project-image--deriku,
.project-image--sakura {
    height: 110px;
}

.project-header--deriku,
.project-header--sakura {
    align-items: flex-start;
}

@media (min-width: 992px) {
    .project-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .project-image {
        width: clamp(130px, 14vw, 190px);
        margin-left: auto;
    }

    .project-header--deriku,
    .project-header--sakura {
        align-items: center;
    }

    .project-image--deriku,
    .project-image--sakura {
        height: 120px;
    }
}

.project-card:hover .project-image {
    transform: translateY(-2px);
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.32));
}

.project-media--tokispace .project-image {
    filter: none;
}

.project-card:hover .project-media--tokispace .project-image {
    transform: translateY(-2px);
    filter: none;
}

.project-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    backdrop-filter: blur(6px);
    z-index: 3;
}

.project-card .card-body {
    padding: 2.5rem 2.5rem 2rem;
}

.project-card .card-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-card .card-text {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1.8rem;
}

.project-features {
    margin: 0 0 2rem 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1rem;
}

.project-features li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    color: #1f2937;
}

.project-features i {
    font-size: 1.3rem;
    color: var(--secondary-color);
    background: rgba(229, 231, 235, 0.8);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-card .card-footer {
    padding: 0 2.5rem 2.5rem;
    border: none;
    background: transparent;
}

.project-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-action {
    border-radius: 40px;
    padding: 0.85rem 1.8rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.project-action.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-light);
    border: none;
}

.project-action.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(0, 102, 255, 0.35);
}

.project-action.btn-outline-primary {
    border: 2px solid rgba(0, 102, 255, 0.45);
    color: var(--primary-color);
    background: transparent;
}

.project-action.btn-outline-primary:hover {
    color: var(--text-light);
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 102, 255, 0.25);
}

@media (max-width: 992px) {
    .project-card .card-body,
    .project-card .card-footer {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    #proyectos {
        padding: 6rem 0;
    }

    .project-features {
        gap: 0.75rem;
    }
}

@media (hover: none) {
    .project-card .project-media::after {
        opacity: 1;
    }
}

.proyectos-stats {
    max-width: 900px;
    margin: 4rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.85);
    padding: 1.8rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(31, 41, 55, 0.12);
    backdrop-filter: blur(6px);
}

.stat-number {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.stat-label {
    margin-top: 0.6rem;
    font-size: 1rem;
    color: #4b5563;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ==========================================
   SECCIÓN CONTACTO
   ========================================== */

#contacto {
    padding: 8rem 5%;
    background: var(--dark-bg);
    color: var(--text-light);
}

.contacto-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contacto-info h3 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.contacto-info p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.contacto-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contacto-item i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.contacto-item div h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contacto-item div p {
    opacity: 0.8;
    margin: 0;
}

.contacto-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================
   FOOTER
   ========================================== */

footer {
    background: #050812;
    color: var(--text-light);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-gradient);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* ==========================================
   ANIMACIONES
   ========================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(10, 14, 39, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
    }

    .logo-img {
        height: 46px; /* 30% más grande (antes 35px) */
    }

    .logo-text {
        gap: 0;
    }

    .logo-main {
        font-size: 1.2rem;
    }

    .logo-sub {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .contacto-container {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .contacto-form {
        padding: 2rem 1.5rem;
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}
