
:root{
  --bg: #0a0707; 
  --panel: #121218;
  --text: #e9eef2;
  --muted: #9aa4ad;
  --accent: #C0C0C0;   
  --accent-2: #D3D3D3;  
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
html, body{ height: 100%; scroll-behavior: smooth; }
body{
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 30% -10%, #a70000 0%, transparent 60%), 
              radial-gradient(1200px 800px at 90% 10%, #000000 0%, transparent 55%), 
              var(--bg);
  overflow-x: hidden;
}


.header{
  position: fixed; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.2rem;
  background: transparent;
  transition: background .4s ease, border-color .4s ease;
  z-index: 1000;
}
.header.scrolled{
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1f2330;
}
.brand{ color: var(--text); font-weight: 800; text-decoration: none; letter-spacing:.3px; }

.nav ul
{ 
  margin-left: 50px;
  list-style: none; 
  display: flex; 
  gap: 1.2rem;
}
.nav a{
  color: var(--text); text-decoration: none; font-weight: 600; position: relative;
}
.nav a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); /* Ahora plateado */
}
.nav a:hover::after, .nav a.active::after{ width: 100%; }
.hamburger{ display: none; background: transparent; border: 0; cursor: pointer; }
.hamburger span{
  display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--text);
  transition: transform .3s ease, opacity .3s ease;
}
.nav.open{ transform: translateX(0); }


.hero{
  position: relative; height: 100vh; display: grid; place-items: center;
  background: url("Assets/imagenes/logoCrimson.jpg") center/cover no-repeat fixed;
}
.hero__overlay{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0,0,0,.75));
}
.hero__content{
  position: relative; z-index: 1; text-align: center; max-width: 900px; padding: 0 1rem;
  animation: fadeIn .9s ease both;
  transform: translateZ(0);
}
.title{ font-size: clamp(2rem, 4vw + 1rem, 4rem); font-weight: 900; line-height: 1.1; }
.accent{ color: var(--accent); text-shadow: 0 0 18px rgb(235, 11, 11); }
.typewriter {
  margin-top: 1rem;
  min-height: 1.6em;
  font-size: clamp(1rem, 1.2vw + .8rem, 1.4rem);
  color: var(--accent);
  opacity: 0;
  transform: scale(0.95);
  display: inline-block;
  animation: fadeInText 0.8s ease forwards;
}

@keyframes fadeInText {
  to {
    opacity: 1;
    transform: scale(1);
  }
}


.btn{
  display: inline-block; padding: .9rem 1.2rem; border-radius: 14px;
  font-weight: 800; letter-spacing:.2px; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); 
  color: #000000;
  box-shadow: var(--shadow);
}
.btn--primary:hover{ transform: translateY(-2px) scale(1.02); }
.btn--ghost{
  color: var(--text); border: 1px solid #2b3242; background: rgba(255,255,255,.04);
  margin-left: .6rem;
}
.btn--ghost:hover{ background: rgba(255,255,255,.08); transform: translateY(-2px); }
.cta{ margin-top: 1.4rem; }


.section{ padding: clamp(3rem, 6vw, 5rem) 7vw; }
.section--alt{ background: linear-gradient(180deg, rgb(0, 0, 0), transparent); }
.section__title{
  text-align: center; font-size: clamp(1.6rem, 1.8vw + 1rem, 2.2rem);
  margin-bottom: 2rem;  color: var(--accent);
}
.section__text{ max-width: 900px; margin: 0 auto; text-align: center; color: var(--muted); }



.tech-grid {
  display: flex;                  
  flex-wrap: wrap;                
  justify-content: center;        
  gap: 1rem;
  margin-top: 1.5rem;
}

.tech-card {
  background: rgba(255,255,255,0.05);
  border-radius: 24px;           
  width: 100px;
  height: 100px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;         
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
  cursor: default;
  box-shadow: 0 0 10px rgba(0,0,0,0.35);
}

.tech-card:hover {
  transform: translateY(-6px) scale(1.08);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 10px 20px rgba(0,0,0,0.6);
}

.tech-card img {
  width: 60%;                   
  height: 60%;
  border-radius: 50%;          
  margin-bottom: 0.4rem;         
  transition: transform 0.3s ease, filter 0.3s ease;
}

.tech-card:hover img {
  transform: scale(1.15) rotate(5deg);
  filter: brightness(1.2) drop-shadow(0 0 6px #ff0000);
}

.tech-card span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}


@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 20px rgba(255,0,0,0.6); }
  50% { box-shadow: 0 12px 24px rgba(255,0,0,0.9); }
}

.tech-card {
  animation: float 3s ease-in-out infinite;
}

.tech-card:hover {
  animation: float 3s ease-in-out infinite, pulseGlow 1.5s ease-in-out infinite;
}


.card {
  background: linear-gradient(180deg, #0f121a, #0b0e14);
  border: 1px solid #1d2433;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  flex: 0 0 calc(100% / 5 - 16px);
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  filter: saturate(1.1);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card__content {
  padding: 1rem 1rem 1.2rem;
}

.card h3 {
  margin-bottom: 0.35rem;
}

.card p {
  color: var(--muted);
}

.tags {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span {
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(151, 159, 160, 0.575);
  border: 1px solid rgba(168, 5, 5, 0.459);
}


.carousel-container {
  position: relative;
  width: 100%;
  overflow: visible; 
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.carousel-track {
  overflow: hidden;
  width: 90%;
}

.carousel-track .projects {
  display: flex;
  transition: transform 0.6s ease-in-out;
  gap: 16px;
}


.carousel-btn {
  position: absolute;      
  top: 50%;                 
  transform: translateY(-50%); 
  background: rgba(0, 0, 0, 0.6);
  color: var(--accent);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  padding: 10px 15px;
  transition: background 0.3s, transform 0.2s;
  z-index: 20;             
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: 10px; }


/* SECCIÓN PRODUCTOS*/
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 6rem 2rem;
}

.product-gallery img {
  width: 100%;
  max-width: 420px;
  border-radius: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

.product-info h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.product-info p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.product-info ul {
  margin-bottom: 2rem;
}

.product-info li {
  margin-bottom: .5rem;
}

.products-section {
  padding: 6rem 2rem;
}

.product-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.product-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-wrapper img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1.4;
  object-fit: cover;
  border-radius: 40px; /* cuadrado-circular */
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

.arrow {
  position: absolute;
  background: none;
  border: none;
  font-size: 3rem;
  cursor: pointer;
  color: #f1f1f1;
}

.arrow.left { left: 30px; }
.arrow.right { right: 30px; }

.product-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.product-info p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
}

/*SECCIÓN CONTACTOS*/
#contacto {
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  text-align: center;
}

form.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 500px; 
}
form.form:hover {
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); 
  transform: translateY(-3px);
}

form.form input,
form.form textarea {
  background-color: #000000;  
  color: #ffffff;            
  border: 2px solid #ff0000;  
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
}

form.form input::placeholder,
form.form textarea::placeholder {
  color: #ffffff; 
  opacity: 0.7;
}

form.form button.btn--primary {
  background: #ff0000; 
  color: #ffffff;
  border: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

form.form button.btn--primary:hover {
  background: #cc0000; 
  transform: translateY(-2px);
}


footer.footer {
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  background: rgba(0,0,0,0.8); 
}

footer.footer p {
  margin: 0;
}

footer.footer .social a {
  color: #ffffff;
  text-decoration: none;
  margin: 0 0.3rem;
}

footer.footer .social a:hover {
  color: #ff0000;
}
form.form input:focus,
form.form textarea:focus {
  outline: none; 
  border-color: #ff4d4d; 
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.6); 
}


@media (max-width: 1024px) {
  .card {
    flex: 0 0 calc(100% / 3 - 12px);
  }
   .arrow.left { left: -20px; }
   .arrow.right { right: -20px; }
  .carousel-btn {
    font-size: 1.8rem;
    padding: 8px 12px;
  }
}

@media (max-width: 600px) {
  .card {
    flex: 0 0 calc(100% / 1.5 - 10px);
  }

  .arrow.left { left: -20px; }
  .arrow.right { right: -20px; }

  .carousel-btn {
    font-size: 1.4rem;
    padding: 6px 8px;
  }

  .carousel-track {
    width: 95%;
  }
}