/* ============================================
   CINTHIA GRAFIK — STYLES
   ============================================ */

:root{
  /* Paleta */
  --navy-900: #0a1450;
  --navy-800: #101b66;
  --navy-700: #16237d;
  --blue-600: #1e3fd6;
  --teal-500: #3fe0e8;
  --teal-400: #6ee9ef;
  --ink-900: #0b1230;
  --paper-50: #f4f7fd;
  --paper-100: #e9eefb;
  --white: #ffffff;
  --placeholder: #F2F4F8;
  --magenta-500: #ff4f9a;

  --font-display: "Sansita One", cursive;
  --font-body: "DM Sans", sans-serif;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-soft: 0 20px 50px rgba(10, 20, 80, 0.18);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.5;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1, h2, h3{ font-family: var(--font-display); margin: 0; }

.section-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 1em 32px;
}

/* ============ NAV ============ */
.nav{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 20, 80, 0.92);
  backdrop-filter: blur(8px);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.nav.is-visible{
  transform: translateY(0);
}
.nav-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo{
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.01em;
}
.nav-logo span{ color: var(--teal-400); }
.nav-links{
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a{
  color: var(--paper-100);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover{ color: var(--teal-400); }
.nav-cta{
  background: var(--teal-500);
  color: var(--navy-900) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover{ background: var(--teal-400); }

/* ============ BUTTONS ============ */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 36px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-ghost{
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.45);
  color: var(--white);
}
.btn-ghost:hover{ border-color: var(--teal-400); color: var(--teal-400); }
.btn-solid{
  background: var(--blue-600);
  color: var(--white);
}
.btn-solid:hover{ background: var(--teal-500); color: var(--navy-900); }
.btn-outline-light{
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.45);
  color: var(--white);
}
.btn-outline-light:hover{ border-color: var(--teal-400); color: var(--teal-400); }
.btn-whatsapp{
  background: #25D366;
  color: var(--ink-900);
}
.btn-whatsapp:hover{ background: #1fb957; }

/* ============ HERO ============ */
.hero{
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--blue-600) 100%);
  padding: 48px 0 70px;
  overflow: hidden;
}
.hero-inner{
  max-width: 1080px;
  margin: 0 auto;
  padding: 8em 32px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 24px;
  z-index: 1 !important;
}
.hero-title{
  font-size: clamp(8.8em, 1vw, 3rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 0.76;
}
.hero-sub{
  margin: 32px 0 20px;
  font-size: 1.1rem;
  color: var(--paper-100);
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art{
  position: absolute;
  display: flex;
  top: 0;
  right: 0;
  width: 58%;
  z-index: 0 !important;
}
.kraken{
  width: 100%;
  max-width: 480px;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.35));
  animation: float 7s ease-in-out infinite;
}
@keyframes float{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-14px); }
}

/* ============ SERVICIOS ============ */
.servicios{
  background: linear-gradient(0deg, var(--blue-600) 30%, var(--navy-900) 100%);
  padding: 80px 0;
}
.section-title{
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--navy-900);
}
.section-title.light{ color: var(--white); }
.section-sub{
  margin: 12px 0 44px;
  font-size: 1.02rem;
  color: var(--white);
}
.servicios .section-title{ color: var(--white); }
.servicios .section-sub{ color: rgba(255,255,255,0.78); }

.service-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card{
  background: rgba(11, 18, 48, 50%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover{
  border-color: var(--teal-400);
  transform: translateY(-3px);
}
.service-card h3{
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--teal-400);
  margin: 6px 0 12px;
}
.service-card p{
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  margin: 0;
}
.service-icon{
  position: absolute;
  top: 22px;
  right: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ============ PROCESO ============ */
.proceso{
  background: var(--paper-50);
  padding: 80px 0;
}
.proceso .section-title, .proceso .section-sub{ color: var(--navy-900); }
.proceso .section-sub{ color: rgba(11,18,48,0.65); }
.proceso-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.proceso-step h3{
  font-size: 1.1rem;
  font-weight: 400;
  margin: 14px 0 10px;
  color: var(--navy-900);
}
.proceso-step p{
  font-size: 0.92rem;
  color: rgba(11,18,48,0.65);
  margin: 0;
}
.proceso-num{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--teal-400);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
}

/* ============ TRABAJO / WORK GRID ============ */
.trabajo{
  padding: 90px 0;
  background: none);
}
.trabajo .section-title, .trabajo .section-sub{ color: var(--navy-900); }
.trabajo .section-sub{ color: rgba(11,18,48,0.65); }

.work-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.work-card{
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-900 transparent);
  aspect-ratio: 4 / 3;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.work-card-open{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1;
}
.work-card-track{
  display: block; /* FIX: <span> es inline por defecto e ignora width/height,
                      por eso las imágenes de las cards no se veían */
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.work-card-track img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.work-card-track img.active{ opacity: 1; }

.work-card-video-badge{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10,16,50,0.65);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  pointer-events: none;
}

.work-card-caption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2; /* por encima de .work-card-open (z:1) para no quedar tapada por la imagen */
  background: linear-gradient(0deg, rgba(49,59,99,0.80) 80%, rgba(49,59,99,0.80) 80%);
  color: var(--white);
  padding: 18px 20px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.work-card:hover .work-card-caption,
.work-card:focus-within .work-card-caption{
  opacity: 1;
}
.work-card-caption .caption-text{ text-align: left; }
.work-card-caption .caption-text h4{
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
  text-align: left;
}
.work-card-caption .caption-text p{
  font-size: 0.82rem;
  margin: 0;
  color: rgba(255,255,255,0.78);
  text-align: left;
}
.work-card-arrow{
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
  pointer-events: none;
}
.work-card:hover .work-card-arrow{
  opacity: 1;
  transform: translateX(0);
  background: var(--teal-500);
  color: var(--navy-900);
}
.work-card:focus-within .work-card-arrow{
  opacity: 1;
  transform: translateX(0);
}

/* Mini-carrusel dentro de la card */
.card-carousel-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(10,16,50,0.55);
  color: var(--white);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.work-card:hover .card-carousel-nav,
.work-card:focus-within .card-carousel-nav{ opacity: 1; }
.card-carousel-nav:hover{ background: var(--blue-600); }
.card-carousel-prev{ left: 10px; }
.card-carousel-next{ right: 10px; }

.card-carousel-dots{
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 5px;
}
.card-carousel-dots .dot{
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: background 0.2s ease, transform 0.2s ease;
}
.card-carousel-dots .dot.active{
  background: var(--teal-400);
  transform: scale(1.3);
}

.work-card:focus-visible{
  outline: 3px solid var(--blue-600);
  outline-offset: 3px;
}

/* ============ CONTACTO ============ */
.contacto{
  background: var(--navy-900);
  padding: 90px 0;
}
.contacto-inner{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: start;
}
.contacto-text .section-sub.light{ color: rgba(255,255,255,0.78); }

.contacto-form{
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.contacto-form label{
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 14px;
}
.contacto-form input,
.contacto-form select,
.contacto-form textarea{
  font-family: inherit;
  font-size: 0.96rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  outline: none;
  transition: border-color 0.2s ease;
}
.contacto-form input::placeholder,
.contacto-form textarea::placeholder{ color: rgba(255,255,255,0.4); }
.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus{
  border-color: var(--teal-400);
}
.contacto-form select{ color: var(--white); }
.contacto-form select option{ color: var(--ink-900); }
.contacto-form textarea{ resize: vertical; }

.form-error{
  color: #ff9aa6;
  font-size: 0.85rem;
  margin: 14px 0 0;
}

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

/* ============ FOOTER ============ */
.footer{
  background: var(--navy-900);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
}
.footer-inner{
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
}

/* ============ PROJECT OVERLAY (estilo Behance) ============ */
.project-overlay{
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.project-overlay.is-open{ display: flex; }
.project-overlay-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 36, 0.82);
  backdrop-filter: blur(4px);
}
.project-modal{
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 88vh;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  /* sin height fija: el modal crece con su contenido y solo
     hace scroll interno si de verdad no alcanza el viewport */
}
.project-modal-gallery,
.project-modal-info{
  max-height: 88vh;
  overflow-y: auto;
}
.overlay-close{
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(10,16,50,0.7);
  color: var(--white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-close:hover{ background: var(--blue-600); }

.project-modal-gallery{
  position: relative;
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.modal-media{
  width: 100%;
  height: 100%;
  display: flex;
}
.modal-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-media .modal-video-wrap{
  position: relative;
  width: 100%;
  height: 100%;
}
.modal-media iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.modal-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -8px 0 22px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-600);
}
.modal-link:hover{ color: var(--magenta-500); text-decoration: underline; }
.gallery-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(10,16,50,0.6);
  color: var(--white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.gallery-nav:hover{ background: var(--blue-600); }
.gallery-prev{ left: 14px; }
.gallery-next{ right: 14px; }
.gallery-dots{
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.gallery-dots .dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.2s ease;
}
.gallery-dots .dot.active{ background: var(--teal-400); }

.project-modal-info{
  padding: 32px 30px;
}
.project-modal-info h3{
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--navy-900);
  margin-bottom: 14px;
}
.project-modal-info p{
  font-size: 0.97rem;
  color: rgba(11,18,48,0.72);
  line-height: 1.6;
  margin: 0 0 22px;
}
.modal-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-tags span{
  background: var(--paper-100);
  color: var(--navy-800);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 920px){
  .hero-inner{ grid-template-columns: 1fr; text-align: center; padding: 10em 1.4em 5em 1.4em}
  .hero-title {font-size: clamp(5.4em, 1vw, 3rem)}
  .hero-text{ order: 1; text-align: left; z-index: 0 !important}
  .hero-art{ position: absolute; display: flex; top: 0; right: 0; width: 80%}
  .hero-actions{ justify-content: left; padding-top: 1em}
  .hero-sub{ margin-inline: 0; }
  .service-grid{ grid-template-columns: repeat(2, 1fr); }
  .proceso-grid{ grid-template-columns: repeat(2, 1fr); }
  .work-grid{ grid-template-columns: repeat(2, 1fr); }
  .contacto-inner{ grid-template-columns: 1fr; }
  .project-modal{ grid-template-columns: 1fr; }
  .project-modal-gallery{ min-height: 260px; }
}

@media (max-width: 600px){
  .nav-links{ gap: 14px; }
  .nav-links a:not(.nav-cta){ display: none; }
  .service-grid{ grid-template-columns: 1fr; }
  .proceso-grid{ grid-template-columns: 1fr; }
  .work-grid{ grid-template-columns: 1fr; }
  .hero{ padding: 60px 0 50px; }
}

@media (prefers-reduced-motion: reduce){
  .kraken{ animation: none; }
  *{ transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
