/* ============================================
   island Labs — main stylesheet
   ============================================ */

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

html, body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  color: #f5fff0;
  background-color: #000508;
  background-image: url('images/cosmos-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Soft overlay to ensure text legibility on top of the image */
.overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 45% at 50% 42%, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,5,10,0.4) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: white;
}

.brand-img {
  height: 38px;
  width: auto;
  display: block;
}

.menu {
  display: flex;
  gap: 32px;
}

.menu a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.menu a:hover {
  color: #b8ff5e;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 40px 48px 56px;
  gap: 36px;
}

.hero-content {
  text-align: center;
  margin: auto 0;
}

.projects {
  margin-top: 0;
}

.logo-wrap {
  display: inline-block;
}

.logo-img {
  width: 420px;
  max-width: 80vw;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 50px rgba(184, 255, 94, 0.2));
}

.tagline {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  margin: 32px auto 0;
  max-width: 480px;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* ============================================
   Projects
   ============================================ */

.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 760px;
}

/* Ángulo animable para el gradiente (marco quieto, solo gira el color) */
@property --neon-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.project {
  position: relative;
  text-decoration: none;
  color: inherit;
  border-radius: 28px;
  overflow: visible;
  padding: 5px;
  border: none;
  transition: transform 0.3s ease;
  display: block;
  background: #08080b;
  box-shadow: 0 22px 50px rgba(0,0,0,0.75);
}

/* Borde de neón: el COLOR recorre el perímetro (el marco no se mueve) */
.project::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 31px;
  padding: 4px;
  background: conic-gradient(
    from var(--neon-angle),
    #b8ff5e,
    #e8e04a,
    #ff8a1e,
    #ff5fa2,
    #ff8a1e,
    #b8ff5e
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: neonSpin 6s linear infinite, neonPulse 2.4s ease-in-out infinite;
  z-index: 0;
}

/* El color da la vuelta al perímetro */
@keyframes neonSpin {
  to { --neon-angle: 360deg; }
}

/* El neón sube y baja de intensidad */
@keyframes neonPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,138,30,0.35)) brightness(0.85); }
  50%      { filter: drop-shadow(0 0 14px rgba(255,138,30,0.75)) brightness(1.3); }
}

.video-mask {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  border-radius: 24px;
  background-color: #000;
}

.project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Igualado por medición real de las letras:
   Tontine letras 34.8% alto, centro y=53% (bajo) -> menos zoom, subir un poco
   Cassian letras 27.9% alto, centro y=49.7% (centrado) -> más zoom para igualar altura */
.tontine .project-video {
  transform: scale(1.0);
  object-position: center;
}
.cassian .project-video {
  transform: scale(1.0);
  object-position: center 50%;
}

.project:hover {
  transform: translateY(-6px) scale(1.01);
}

/* Sellos / badges */
.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.badge-beta {
  color: #fff;
  background: linear-gradient(135deg, rgba(255,138,30,0.95), rgba(255,95,162,0.95));
  box-shadow: 0 4px 16px rgba(255,120,60,0.5);
  border: 1px solid rgba(255,255,255,0.25);
}

.badge-soon {
  color: #cfefff;
  background: rgba(10, 20, 30, 0.7);
  border: 1px solid rgba(120, 210, 235, 0.5);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.project-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-info {
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.project-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.9), 0 0 22px rgba(0,0,0,0.7);
}

.project-tag {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.3px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.95);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 48px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.footer a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.footer-links {
  display: flex;
  gap: 22px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  html, body { overflow-y: auto; }

  .nav {
    padding: 20px 24px;
    flex-direction: column;
    gap: 16px;
  }

  .menu { gap: 20px; }
  .menu a { font-size: 10px; }

  .hero { padding: 20px 24px 24px; gap: 24px; }

  .logo-text { font-size: 64px; letter-spacing: -2px; }
  .logo-dot { width: 10px; height: 10px; margin-top: 10px; }
  .logo-labs { font-size: 22px; padding: 4px 22px; }
  .tagline { font-size: 13px; margin-top: 20px; }

  .projects {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-image { aspect-ratio: 4 / 1; }

  .footer {
    flex-direction: column;
    gap: 10px;
    padding: 16px 24px;
    text-align: center;
  }

  .footer-links {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Neón de Cassian: misma técnica, paleta fría real del logo (cian/turquesa/plata) */
.cassian::before {
  background: conic-gradient(
    from var(--neon-angle),
    #87dcde,
    #a8e8ea,
    #5a9ba0,
    #2e5c60,
    #c9d6d8,
    #87dcde
  );
  animation-delay: -3s, -1.2s;
}

/* Badges sobre el vídeo */
.project .badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
}

/* El pulso de Cassian en tono cian, no naranja */
@keyframes neonPulseCassian {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(135,220,222,0.35)) brightness(0.85); }
  50%      { filter: drop-shadow(0 0 14px rgba(135,220,222,0.75)) brightness(1.3); }
}
.cassian::before {
  animation: neonSpin 6s linear infinite, neonPulseCassian 2.4s ease-in-out infinite;
}
