:root {
    --bg-color: #0d0d0d;
    --surface-color: rgba(26, 26, 28, 0.4); /* Tarjetas más sutiles y uniformes */
    --surface-border: rgba(255, 255, 255, 0.04);
    
    --text-primary: #f5f5f7;
    --text-sec: #86868b;
    
    --glass-blur: blur(25px);
    --glass-highlight: rgba(255, 255, 255, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

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

/* Ambient Subtle Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, rgba(30, 30, 35, 1) 0%, rgba(13, 13, 13, 1) 70%);
}

/* Glassmorphism Panel Core */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    border-radius: 100px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Estado al hacer scroll: full width, bordes rectos, mayor contraste */
.navbar.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    background: rgba(18, 18, 20, 0.85); /* Un poco más opalescente para lectura */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    max-width: 1200px; /* Limitamos el contenido aunque la barra ocupe el 100% */
    margin: 0 auto;
    transition: padding 0.4s ease;
}

.navbar.scrolled .navbar-container {
    padding: 0.4rem 2rem; /* Padding vertical reducido para hacerla más fina */
}

.logo {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-sec);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

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

@media (max-width: 768px) {
    .nav-links { display: none; }
    .navbar { width: 95%; max-width: none; top: 0.5rem; }
    .navbar.scrolled { width: 100%; top: 0; }
}

/* Typography */
h1, h2, h3 { 
    letter-spacing: -0.04em; 
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
}
.btn-primary:hover { opacity: 0.85; }

.btn-glass {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.15);
}
.btn-glass:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}

/* Hero Section */
.hero {
    min-height: 80vh; /* Reducido de 100vh a 80vh para flujo más rápido */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1rem 4rem;
}

.hero-content { max-width: 650px; } /* Texto más recogido */

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: var(--text-sec);
}

.pulse-dot {
    width: 6px; height: 6px;
    background: #00ff66;
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-sec);
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Sections Common */
section {
    padding: 5rem 1rem;
    position: relative;
    z-index: 10;
}

.section-heading {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-heading h2 {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.section-heading p {
    color: var(--text-sec);
    font-size: 1rem;
}

/* Bento Grid */
.bento-section {
    max-width: 1000px; /* Reducido para que no quede tan ancho y respire */
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, auto); /* Altura base más discreta */
    gap: 1rem;
}

.bento-card {
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 3; }

.bento-icon {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    opacity: 0.9;
}

.bento-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.bento-card p {
    color: var(--text-sec);
    font-size: 0.95rem;
    line-height: 1.5;
}

.bento-large .bento-visual {
    margin-top: auto;
    padding-top: 1rem;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 2.5rem 0 1.5rem 0; /* Huge top margin to separate from the text above */
}

.service-list li {
    margin-bottom: 0.8rem;
    color: var(--text-sec);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.service-list i {
    color: #00ff66;
    font-size: 1.1rem;
}

.supported-models-banner {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: var(--text-sec);
}

.supported-models-banner strong {
    color: var(--text-primary);
}

.whatsapp-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}
.whatsapp-layout-text { flex: 1; }

@media (max-width: 900px) {
    .bento-grid { grid-template-columns: 1fr 1fr; }
    .bento-large { grid-column: span 2; }
    .bento-wide { grid-column: span 2; }
    .whatsapp-layout { flex-direction: column; text-align: left; align-items: flex-start; }
}

@media (max-width: 600px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large, .bento-wide { grid-column: span 1; }
}

/* Interactive Card Glow (Subtle White Glow) */
.interactive-card { --x: 50%; --y: 50%; }
.hover-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(400px circle at var(--x) var(--y), rgba(255,255,255,0.03), transparent 40%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}
.hover-glow:hover::before { opacity: 1; }

/* Massive Sticky Store Stack - 21 Cards */
.store-section {
    max-width: 800px; /* Estrecho, estilo elegante */
    margin: 0 auto;
    padding-bottom: 250vh; /* Muchísimo espacio vertical para permitir que 21 tarjetas hagan scroll */
}

/* Modificamos el último item del sticky stack para que libere al formulario */
.stack-card:last-child {
    margin-bottom: 0;
}

.stacking-container {
    position: relative;
    margin-top: 4rem;
}

.stack-card {
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    position: sticky;
    top: 15vh;
    height: 60vh;
    min-height: 380px;
    margin-bottom: 8vh;
    box-shadow: 0 -15px 40px rgba(0,0,0,0.8);
    transform-origin: top center;
    transition: transform 0.3s ease;
    background-color: #050505; /* Fondo solido de la tarjeta */
    overflow: hidden; /* Corta la imagen sobrante y protege bordes redondeados */
    perspective: 1200px; /* Añadimos perspectiva para el efecto 3D isomérico */
    transform-style: preserve-3d; /* Optimización 3D */
    backface-visibility: hidden;  /* Evita renderizar caras traseras */
    will-change: transform;       /* Informar a la GPU sobre posibles cambios */
}

/* El contenido (texto y botones) debe ir por encima de la imagen flotante */
.stack-card .card-content {
    position: relative;
    z-index: 2;
}

/* Pseudo-elemento: Imagen del iPhone en 3D a la derecha */
.stack-card::after {
    content: '';
    position: absolute;
    top: 2%;       /* Lo bajamos un poquito más para separarlo del techo (estaba en -2%) */
    right: -8%;    /* Lo corremos otro poquito a la izquierda (estaba en -10%) */
    width: 75%;    /* Ocupará un cuarto de la tarjeta hacia la derecha */
    height: 120%;  /* Sobrepasamos el límite inferior para que se ampute la mitad del modelo */
    background-repeat: no-repeat;
    
    /* Combinación balanceada de Posición y Zoom */
    background-position: left 25%; /* Enfocamos la mirada hacia el módulo de cámaras */
    background-size: 150%;   /* Escala intermedia: no está comprimido ni sumamente explotado ("zoom ideal") */
    z-index: 0;
    
    /* Máscara de degrade suave */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 15%, black 60%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 15%, black 60%);
    
    /* Rotación 3D moderada con translateZ(0) para forzar hardware acceleration */
    transform-origin: right center;
    transform: translateZ(0) rotateY(-15deg) rotateX(5deg) rotateZ(0deg) scale(1);
    
    /* Eliminamos drop-shadow por completo ya que aniquila los FPS al animarse.
       Reemplazamos por opacidad para simular el brillo sin costo de CPU */
    opacity: 0.85;
    
    /* Transition explícita y super optimizada. Opacidad y Transform son las más rápidas */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
    will-change: transform, opacity; /* Alerta a GPU de los cambios exactos */
    backface-visibility: hidden;
}

/* Efecto hover extra-fluido y liviano: Sólo GPU */
.stack-card:hover::after {
    transform: translateZ(0) rotateY(-5deg) rotateX(2deg) rotateZ(0deg) scale(1.05) translate(-2%, 2%);
    opacity: 1; /* Simula aumento de brillo al hacer hover sin lag */
}

/* Asignación de imágenes por modelo al pseudoelemento */
#card-17-pm::after, #card-17-p::after, #card-17::after { background-image: url('../iphone/iPhone17.png'); }
#card-17-a::after { background-image: url('../iphone/iPhone17e.png'); }
#card-16-pm::after, #card-16-p::after, #card-16-pl::after, #card-16::after { background-image: url('../iphone/iPhone16.png'); }
#card-16e::after { background-image: url('../iphone/iPhone16e.png'); }
#card-15-pm::after, #card-15-p::after, #card-15-pl::after, #card-15::after { background-image: url('../iphone/iPhone15.png'); }
#card-14-pm::after, #card-14-p::after { background-image: url('../iphone/iPhone14pro,%2014%20promax.png'); }
#card-14-pl::after, #card-14::after { background-image: url('../iphone/iPhone14,14plus.png'); }
#card-13-pm::after, #card-13-p::after, #card-13-m::after, #card-13::after { background-image: url('../iphone/iPhone13.png'); }

/* Asignamos un z-index creciente automáticamente en CSS moderno para no escribir 21 IDs */
.stack-card {
    z-index: auto; /* Fallback */
}
.stack-card:nth-child(1) { z-index: 1; top: 10vh; }
.stack-card:nth-child(2) { z-index: 2; top: 10.5vh; }
.stack-card:nth-child(3) { z-index: 3; top: 11vh; }
.stack-card:nth-child(4) { z-index: 4; top: 11.5vh; }
.stack-card:nth-child(5) { z-index: 5; top: 12vh; }
.stack-card:nth-child(6) { z-index: 6; top: 12.5vh; }
.stack-card:nth-child(7) { z-index: 7; top: 13vh; }
.stack-card:nth-child(8) { z-index: 8; top: 13.5vh; }
.stack-card:nth-child(9) { z-index: 9; top: 14vh; }
.stack-card:nth-child(10) { z-index: 10; top: 14.5vh; }
.stack-card:nth-child(11) { z-index: 11; top: 15vh; }
.stack-card:nth-child(12) { z-index: 12; top: 15.5vh; }
.stack-card:nth-child(13) { z-index: 13; top: 16vh; }
.stack-card:nth-child(14) { z-index: 14; top: 16.5vh; }
.stack-card:nth-child(15) { z-index: 15; top: 17vh; }
.stack-card:nth-child(16) { z-index: 16; top: 17.5vh; }
.stack-card:nth-child(17) { z-index: 17; top: 18vh; }
.stack-card:nth-child(18) { z-index: 18; top: 18.5vh; }
.stack-card:nth-child(19) { z-index: 19; top: 19vh; }
.stack-card:nth-child(20) { z-index: 20; top: 19.5vh; }
.stack-card:nth-child(21) { z-index: 21; top: 20vh; }


.card-content { flex: 1; width: 100%; }

.specs-box {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.specs-box p {
    font-size: 0.95rem;
    color: var(--text-sec);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.specs-box p:last-child {
    margin-bottom: 0;
}

.specs-box p strong {
    color: var(--text-primary);
    font-weight: 500;
}

.specs-box i {
    width: 20px;
    text-align: center;
    color: var(--text-primary);
    opacity: 0.7;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255,255,255,0.08);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-sec);
}
.tag-new { color: var(--text-primary); border: 1px solid rgba(255,255,255,0.2); }

.card-content h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    .stack-card { padding: 2rem; }
    .card-content h2 { font-size: 1.8rem; }
    .specs-box { padding: 1rem; }
}

/* Contact / Form Section */
.contact-section {
    max-width: 700px;
    margin: -180vh auto 0; /* OVERLAP FIX: Usamos un margen negativo brutal pero controlado para "comer" el scroll muerto del sticky-stack, pegando el form justo debajo de la tienda */
    padding: 0 1rem 10rem; /* Espaciado antes del footer */
    position: relative; /* Asegura estar en la capa superior visual */
    z-index: 50;
}

.contact-container {
    padding: 3rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: var(--surface-color); /* Aseguramos su propio fondo */
}

.contact-header { text-align: center; }

.contact-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact-header p {
    color: var(--text-sec);
    margin-bottom: 1.5rem;
}

/* Contenedor para múltiples botones en una tarjeta */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hours-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    font-size: 0.85rem;
    color: #00ff66;
    font-weight: 500;
}

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Nuevo layout multi-columna form */
.form-row {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.full-width {
    width: 100%;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-left: 0.5rem;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box; /* Previene desbordes en flex */
}

/* Adaptación del modal de Date */
.quote-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

.quote-form select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

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

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

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

/* Quote Live Banner */
.quote-display {
    background: rgba(138, 246, 178, 0.05);
    border: 1px solid rgba(138, 246, 178, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    margin: 0.5rem 0;
}

.quote-header {
    font-size: 0.85rem;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

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

.quote-usd {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
}

.quote-ars {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ff66;
}

.quote-disclaimer {
    font-size: 0.75rem;
    color: var(--text-sec);
    margin-top: 0.8rem;
    line-height: 1.4;
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    border-radius: 16px;
}

@media (max-width: 600px) {
    .contact-container { padding: 2rem; }
    .form-row { flex-direction: column; gap: 1.5rem; }
}

/* Footer */
footer {
    border: none;
    border-top: 1px solid var(--surface-border);
    border-radius: 0;
    padding: 2rem;
    margin-top: 4rem;
}

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

.footer-brand {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-sec);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-sec);
    font-size: 1.3rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
}

.footer-links p {
    font-size: 0.8rem;
    color: var(--text-sec);
    text-align: right;
}

.ml-disclaimer { opacity: 0.5; margin-top: 0.2rem; }

@media (max-width: 600px) {
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links p { text-align: center; }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px); /* Movimiento menos exagerado */
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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