/* ==========================================================================
   ZENTIQ STUDIO — AAA Game Engine & Studio Design System
   Powered by FLUX.1 + TRELLIS / Hunyuan3D-2 + MusicGen
   ========================================================================== */

:root {
  --bg-deep: #06080c;
  --bg-surface: rgba(14, 18, 25, 0.75);
  --bg-surface-hover: rgba(20, 26, 38, 0.9);
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.3);
  
  --accent: #00f0ff;
  --accent-secondary: #a855f7;
  --accent-glow: rgba(0, 240, 255, 0.25);

  --text-main: #f3f4f6;
  --text-muted: rgba(243, 244, 246, 0.65);
  --text-dim: rgba(243, 244, 246, 0.38);

  --font-heading: 'Orbitron', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --corner-radius: 12px;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 50% 120px, rgba(0, 240, 255, 0.08) 0%, transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

/* Accessible focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */
.studio-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 12, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.nav-logo .logo-bracket {
  color: var(--accent);
}

.nav-divider {
  color: var(--border);
  font-size: 0.9rem;
}

.nav-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.studio-nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
@media (max-width: 820px) {
  .studio-nav__links { display: none; }
}

.studio-nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.studio-nav__link:hover {
  color: var(--accent);
}

.studio-nav__status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #050608;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}
.btn--primary:hover {
  background: #39ff9f;
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.5);
}

.btn--outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-main);
}
.btn--outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ==========================================================================
   MAIN CONTENT & HERO
   ========================================================================== */
.studio-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.studio-hero {
  text-align: center;
  max-width: 820px;
  margin-bottom: 3.5rem;
  position: relative;
  animation: fadeIn 0.6s ease-out;
}

.studio-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.studio-hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 1.8rem;
}

.studio-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   2x2 CARDS GRID (AAA LAUNCHER STYLE)
   ========================================================================== */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
  width: 100%;
  max-width: 1080px;
  animation: fadeIn 0.8s ease-out;
}
@media (max-width: 768px) {
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

.card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--corner-radius);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  overflow: hidden;
  clip-path: polygon(
    0 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% 100%,
    0 100%
  );
}

/* Glowing chamfered top-right corner mark */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, transparent 50%, var(--accent) 50%);
  opacity: 0.6;
  transition: var(--transition-smooth);
}

.card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 
    0 14px 34px rgba(0, 0, 0, 0.45),
    0 0 20px var(--accent-glow);
}
.card:hover::before {
  opacity: 1;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.card__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  transition: var(--transition-smooth);
}
.card:hover .card__icon-wrap {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent);
  transform: scale(1.08);
}

.card__tag {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--accent);
  text-transform: uppercase;
}
.card:hover .card__tag {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent);
}

.card__body {
  margin-bottom: 1.6rem;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}
.card:hover .card__title {
  color: var(--accent);
}

.card__description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.card__action {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.card:hover .card__action {
  gap: 10px;
}

.card__meta {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.studio-footer {
  background: rgba(6, 8, 12, 0.8);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.studio-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.studio-footer a:hover {
  color: var(--accent);
}

/* ==========================================================================
   ANIMATIONS & REDUCED MOTION
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #06080c; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00f0ff, #a855f7, #ec4899); border-radius: 8px; border: 2px solid #06080c; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #38bdf8, #c084fc, #f472b6); }
html { scrollbar-width: thin; scrollbar-color: #a855f7 #06080c; }

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE ADJUSTMENTS
   ========================================================================== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .studio-nav {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .studio-nav__status {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .studio-main {
    padding: 1.25rem 0.9rem 2.5rem !important;
  }

  .studio-hero {
    margin-bottom: 2rem;
  }

  .studio-hero__subtitle {
    font-size: 0.95rem;
  }

  .workspace-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    min-height: auto !important;
  }

  .panel {
    padding: 1.1rem !important;
  }

  .viewport-container {
    min-height: 360px !important;
  }

  .card {
    padding: 1.4rem 1.2rem;
  }

  .btn {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.84rem;
  }

  /* Prevent iOS Safari auto-zoom on form focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  .studio-footer {
    flex-direction: column;
    justify-content: center;
    padding: 1.2rem 1rem;
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  .nav-divider,
  .nav-title {
    display: none;
  }

  .engine-badge {
    font-size: 0.7rem;
    padding: 3px 9px;
  }

  .viewport-container {
    min-height: 300px !important;
  }
}