*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --teal:        #00c8e0;
  --teal-bright: #00eeff;
  --teal-glow:   rgba(0,238,255,0.18);
  --teal-mid:    #0891a8;
  --amber:       #ffb340;
  --amber-dim:   rgba(255,179,64,0.18);
  --navy:        #060b14;
  --navy-deep:   #03060e;
  --navy-card:   rgba(8,18,34,0.82);
  --silver:      #c4d8e4;
  --silver-dim:  #7a9aac;
  --white:       #f0f8ff;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--silver);
  font-family: 'Sora', sans-serif;
}

/* ═══════════════════════════════
   ATMOSPHERIC BACKGROUND
═══════════════════════════════ */
.bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at -10% 50%, rgba(0,140,168,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 105% 25%, rgba(0,238,255,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(0,80,110,0.22) 0%, transparent 60%),
    var(--navy-deep);
}

.bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.55;
  pointer-events: none;
}

.bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at  7% 11%, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 18% 73%, rgba(255,255,255,0.4)  0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 41% 6%, rgba(0,238,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 61% 52%, rgba(255,255,255,0.3)  0%, transparent 100%),
    radial-gradient(1px 1px at 76% 85%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 89% 33%, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1px 1px at 30% 41%, rgba(255,255,255,0.28) 0%, transparent 100%),
    radial-gradient(1px 1px at 54% 91%, rgba(0,238,255,0.45)   0%, transparent 100%),
    radial-gradient(1px 1px at 82%  4%, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1px 1px at 12% 62%, rgba(255,255,255,0.32) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 29%, rgba(255,255,255,0.22) 0%, transparent 100%),
    radial-gradient(1px 1px at 94% 68%, rgba(255,255,255,0.38) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 25% 88%, rgba(0,238,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 67% 19%, rgba(255,255,255,0.3)  0%, transparent 100%);
}

.grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,238,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,238,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 85% at 50% 50%, transparent 45%, rgba(3,6,14,0.65) 100%);
}

.scanline {
  position: fixed; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,238,255,0.15) 35%, rgba(0,238,255,0.3) 50%, rgba(0,238,255,0.15) 65%, transparent 100%);
  animation: scan 14s linear infinite; z-index: 0; pointer-events: none;
}
@keyframes scan { from { top: -1px; } to { top: 100vh; } }

/* ═══════════════════════════════
   LAYOUT
═══════════════════════════════ */
.page {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ═══════════════════════════════
   LEFT — LOGO & THUMBNAILS
═══════════════════════════════ */
.col-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 48px 40px 0;
  position: relative;
}

.col-logo::after {
  content: '';
  position: absolute;
  top: 12%; bottom: 12%; right: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0,238,255,0.12) 20%,
    rgba(0,238,255,0.28) 50%,
    rgba(0,238,255,0.12) 80%,
    transparent
  );
}

.logo-wrap {
  position: relative;
  cursor: pointer;
  animation: float 7s ease-in-out infinite;
  transition: filter 0.5s ease;
}

.logo-wrap::before {
  content: '';
  position: absolute; inset: -60px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,238,255,0.10) 0%, transparent 65%);
  animation: aura 5s ease-in-out infinite;
  pointer-events: none;
}

.logo-wrap::after {
  content: '';
  position: absolute;
  bottom: -22px; left: 10%; right: 10%; height: 22px;
  background: radial-gradient(ellipse, rgba(0,238,255,0.22) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
  transition: opacity 0.4s;
}

.logo-wrap:hover { animation-play-state: paused; }
.logo-wrap:hover .logo-img {
  filter:
    drop-shadow(0 0 50px rgba(0,238,255,0.9))
    drop-shadow(0 0 20px rgba(0,180,220,1))
    drop-shadow(0 0 80px rgba(0,238,255,0.4));
  transform: scale(1.05);
}

.logo-img {
  display: block; width: auto; height: auto;
  max-height: min(44vh, 340px);
  max-width: min(44vw, 380px);
  filter:
    drop-shadow(0 0 28px rgba(0,238,255,0.52))
    drop-shadow(0 0 10px rgba(0,160,200,0.88));
  transition: filter 0.5s ease, transform 0.5s ease;
}

.logo-hint {
  margin-top: 22px;
  font-family: 'Sora', sans-serif;
  font-size: 9px; font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--teal-bright);
  opacity: 0;
  transition: opacity 0.5s;
}
.col-logo:hover .logo-hint { opacity: 0.35; }

@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-13px)} }
@keyframes aura  { 0%,100%{opacity:.4;transform:scale(1)} 50%{opacity:.9;transform:scale(1.08)} }

/* ═══════════════════════════════
   RIGHT — CONTENT
═══════════════════════════════ */
.col-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 40px 56px;
  gap: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--teal-bright);
  opacity: 0.65;
  margin-bottom: 10px;
  animation: fadeUp 0.8s ease both 0.1s;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-bright));
  flex-shrink: 0;
}

/* MODIFICADO: Estilo Glitch Agresivo */
.studio-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(52px, 6.5vw, 88px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -2px;
  color: #ffffff;
  position: relative;
  margin-bottom: 8px;
  text-shadow: 
    3px 0 rgba(255, 0, 0, 0.8), 
    -3px 0 rgba(0, 238, 255, 0.8);
  animation: fadeUp 0.8s ease both 0.18s;
}

/* Capa Roja del Glitch */
.studio-name::before {
  content: "CAMELOT";
  position: absolute;
  top: 0; left: 2px;
  width: 100%; height: 100%;
  background: transparent;
  text-shadow: -2px 0 #ff0000;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

/* Capa Cian del Glitch */
.studio-name::after {
  content: "CAMELOT";
  position: absolute;
  top: 0; left: -2px;
  width: 100%; height: 100%;
  background: transparent;
  text-shadow: 2px 0 #00eeff;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.tagline {
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 300;
  letter-spacing: 3px;
  color: var(--silver); opacity: 0.6;
  animation: fadeUp 0.8s ease both 0.26s;
  margin-bottom: 22px;
}

.pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 26px;
  animation: fadeUp 0.8s ease both 0.34s;
}
.pill {
  font-family: 'Sora', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--silver-dim);
  background: rgba(0,238,255,0.05);
  border: 1px solid rgba(0,238,255,0.14);
  border-radius: 3px;
  padding: 5px 13px;
  transition: all 0.25s;
}
.pill:hover {
  border-color: rgba(0,238,255,0.35);
  color: var(--teal-bright);
  background: rgba(0,238,255,0.09);
}

.separator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease both 0.38s;
}
.sep-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,238,255,0.35), transparent);
  max-width: 80px;
}
.sep-diamond {
  width: 5px; height: 5px;
  background: var(--teal-bright);
  transform: rotate(45deg);
  opacity: 0.6;
}

.card {
  background: var(--navy-card);
  border: 1px solid rgba(0,238,255,0.13);
  border-radius: 4px;
  padding: 24px 28px;
  position: relative; overflow: hidden;
  backdrop-filter: blur(18px);
  animation: fadeUp 0.8s ease both 0.44s;
  margin-bottom: 16px;
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(0,238,255,0.28); }

.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--teal-bright) 40%, var(--amber) 75%, transparent 100%);
}

.card-glow {
  position: absolute; top: -30px; left: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(ellipse, rgba(0,238,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,238,255,0.07);
  border: 1px solid rgba(0,238,255,0.22);
  color: var(--teal-bright);
  font-family: 'Sora', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  padding: 7px 14px; border-radius: 2px; margin-bottom: 14px;
}
.badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--teal-bright); flex-shrink: 0;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.1} }

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px; font-weight: 600;
  color: var(--white);
  margin-bottom: 9px; line-height: 1.4;
  letter-spacing: -0.3px;
}

.card-text {
  font-family: 'Sora', sans-serif;
  font-size: 13px; font-weight: 300;
  color: var(--silver);
  opacity: 0.78;
  line-height: 1.75;
  margin-bottom: 20px;
}

.btn-project {
  display: inline-flex; align-items: center; gap: 12px;
  background: transparent;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 3px;
  border: 1px solid var(--teal-bright);
  position: relative; overflow: hidden;
  transition: all 0.35s ease;
  box-shadow: 0 0 20px rgba(0,238,255,0.12), inset 0 0 20px rgba(0,238,255,0.05);
}
.btn-project:hover {
  border-color: var(--teal-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(0,238,255,0.3), 0 0 60px rgba(0,238,255,0.1), inset 0 0 30px rgba(0,238,255,0.08);
  color: var(--teal-bright);
}
.btn-arrow { font-size: 14px; transition: transform 0.3s; }
.btn-project:hover .btn-arrow { transform: translateX(5px); }

/* ═══════════════════════════════
   CONTACT ROW
═══════════════════════════════ */
.contact-row {
  display: flex; gap: 10px;
  animation: fadeUp 0.8s ease both 0.56s;
}
.contact-link {
  flex: 1;
  display: flex; align-items: center; gap: 13px;
  background: rgba(8,18,34,0.6);
  border: 1px solid rgba(0,238,255,0.09);
  border-radius: 4px;
  padding: 13px 16px;
  text-decoration: none;
  color: var(--silver);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  position: relative; overflow: hidden;
}
.contact-link:hover {
  border-color: rgba(0,238,255,0.3);
  background: rgba(0,238,255,0.06);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,238,255,0.1);
}

.c-icon {
  width: 34px; height: 34px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.c-icon-web { background: rgba(0,238,255,0.08); }
.c-icon-li  { background: rgba(10,102,194,0.14); }
.c-label {
  font-family: 'Sora', sans-serif;
  font-size: 8px; letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--silver-dim); opacity: 0.55;
  margin-bottom: 2px;
}
.c-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 600;
}

/* ═══════════════════════════════
   FOOTER
═══════════════════════════════ */
.footer-bar {
  position: relative; z-index: 1;
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.035);
}
.f-copy { font-family: 'Sora', sans-serif; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: rgba(180,205,218,0.22); }
.f-dots { display: flex; gap: 6px; align-items: center; }
.f-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(0,238,255,0.2); }

/* ═══════════════════════════════
   THUMBNAIL STRIP
═══════════════════════════════ */
.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 60px;
  animation: fadeUp 0.8s ease both 0.6s;
  max-width: calc(5 * 72px + 4 * 8px);
}
.thumb {
  width: 72px; height: 72px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-color: rgba(0,238,255,0.04);
  border: 1px solid rgba(0,238,255,0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.thumb:hover {
  border-color: rgba(0,238,255,0.7);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,238,255,0.22);
}

/* ═══════════════════════════════
   MODAL & ANIMATIONS
═══════════════════════════════ */
#modal {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(3,6,14,0.94); align-items: center; justify-content: center;
  backdrop-filter: blur(8px); cursor: zoom-out;
}
#modal.open { display: flex; animation: fadeIn 0.22s ease; }
#modal-img { display: block; max-width: min(88vw, 960px); max-height: 82vh; }

/* ANIMACIONES DE RECORTE (GLITCH) */
@keyframes glitch-anim-1 {
  0% { clip: rect(30px, 9999px, 10px, 0); transform: skew(0.5deg); }
  20% { clip: rect(80px, 9999px, 90px, 0); transform: skew(0.2deg); }
  40% { clip: rect(10px, 9999px, 30px, 0); transform: skew(0.8deg); }
  60% { clip: rect(70px, 9999px, 40px, 0); transform: skew(0.3deg); }
  80% { clip: rect(40px, 9999px, 80px, 0); transform: skew(1deg); }
  100% { clip: rect(90px, 9999px, 20px, 0); transform: skew(0.1deg); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(10px, 9999px, 30px, 0); transform: skew(-0.5deg); }
  25% { clip: rect(40px, 9999px, 20px, 0); transform: skew(-1deg); }
  50% { clip: rect(80px, 9999px, 90px, 0); transform: skew(-0.2deg); }
  75% { clip: rect(20px, 9999px, 60px, 0); transform: skew(-0.8deg); }
  100% { clip: rect(60px, 9999px, 10px, 0); transform: skew(-0.1deg); }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

/* ═══════════════════════════════
   MOBILE
═══════════════════════════════ */
@media (max-width: 760px) {
  html, body { overflow: auto; height: auto; }
  .page { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 0 22px; height: auto; }
  .col-logo { padding: 50px 0 24px; justify-content: center; }
  .logo-wrap, .thumb-strip { margin-top: 20px; }
  .logo-img { max-height: 200px; max-width: 68vw; }
  .col-content { padding: 28px 0 36px; }
  .contact-row { flex-direction: column; }
}

.c-icon-dc  { background: rgba(88,101,242,0.16); color: #8b95ff; }
.c-icon svg { width: 18px; height: 18px; display: block; }

/* ═══════════════════════════════
   TRAILER POPUP
═══════════════════════════════ */
#trailerModal {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: trailerFadeIn 0.5s ease;
  transition: opacity 0.3s ease;
}
@keyframes trailerFadeIn { from{opacity:0} to{opacity:1} }
#trailerModal .trailer-box {
  position:relative;
  width:min(860px,92vw);
  background:#000;
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 0 80px rgba(0,0,0,0.9);
  border-radius:4px;
  overflow:hidden;
}
#trailerModal .trailer-close {
  position:absolute; top:12px; right:12px; z-index:10;
  background:rgba(0,0,0,0.55); border:1px solid rgba(255,255,255,0.35);
  color:#fff; font-size:18px; width:36px; height:36px;
  border-radius:50%; cursor:pointer; display:flex;
  align-items:center; justify-content:center;
  transition:background 0.2s,border-color 0.2s; line-height:1; padding:0;
}
#trailerModal .trailer-close:hover { background:rgba(255,255,255,0.2); border-color:rgba(255,255,255,0.7); }
#trailerModal .trailer-ratio {
  position:relative; width:100%; padding-top:56.25%;
}
#trailerModal .trailer-ratio iframe {
  position:absolute; inset:0; width:100%; height:100%; border:none; display:block;
}
#trailerModal .trailer-footer {
  width:min(860px,92vw); margin-top:14px; text-align:center;
  font-family:'Space Grotesk',sans-serif; font-size:15px;
  letter-spacing:0.25em; color:#ffffff;
  text-transform:uppercase; user-select:none;
}

