/* ==========================================================================
   GameLys Studio • Apple-Style Floating Capsule & Balanced Dark Theme
   Smart Autohide Floating Glass Navbar, Pixel-Perfect Alignment.
   ========================================================================== */

:root {
  --bg-deep: #07080c;
  --bg-surface: #0e1017;
  --bg-surface-hover: #141722;
  --bg-glass: rgba(14, 16, 23, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.18);

  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-main: #f5f5f7;
  --text-secondary: #86868b;
  --text-muted: #6e6e73;

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

  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-pill: 9999px;

  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-apple: 0.2s var(--ease-apple);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-deep);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Scroll Offset for In-Page Anchors */
section {
  scroll-margin-top: 100px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #1e2230;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2e354a;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Clean Cards */
.clean-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-apple), background-color var(--transition-apple);
}

.clean-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

/* ==========================================================================
   Floating Glass Capsule Navbar (Smart Autohide on Scroll Down)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 1040px;
  z-index: 100;
  background: rgba(12, 14, 20, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s var(--ease-apple), opacity 0.35s ease;
}

/* Hidden state on downward scroll */
.navbar.nav-hidden {
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  padding: 0 1.25rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.nav-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: color var(--transition-apple);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #5865F2;
  color: #ffffff;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition-apple), filter var(--transition-apple);
}

.btn-nav:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.btn-nav:active {
  transform: scale(0.98);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* ==========================================================================
   Apple-Style Fluid Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-apple);
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: #ffffff;
  color: #000000;
}

.btn-primary:hover {
  background: #e5e5ea;
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: var(--border-hover);
  transform: scale(1.02);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-discord {
  background: #5865F2;
  color: #ffffff;
}

.btn-discord:hover {
  background: #4752c4;
  transform: scale(1.02);
}

.btn-discord:active {
  transform: scale(0.98);
}

/* Fluid Link Tag Capsules */
.link-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all var(--transition-apple);
}

.link-tag:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  transform: scale(1.02);
}

.link-tag:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Hero Section (Split Desktop Layout)
   ========================================================================== */
.hero-section {
  padding-top: 145px;
  padding-bottom: 70px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content-left {
  text-align: left;
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.7rem);
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2.25rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Hero Visual Right: Live Hub Card */
.hero-visual-right {
  display: flex;
  flex-direction: column;
}

.hero-hub-card {
  padding: 1.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.hub-card-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.hub-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.hub-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.hub-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--accent-emerald);
  font-family: var(--font-body);
  font-weight: 500;
  background: rgba(16, 185, 129, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.hub-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.hub-big-number {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.hub-sub-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.hub-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hub-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
}

.hub-status-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hub-status-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-status-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hub-status-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.hub-status-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section Headers (Split Editorial Layout on Desktop)
   ========================================================================== */
.section {
  padding: 60px 0;
}

.section-head-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.75rem;
  gap: 2rem;
}

.section-head-left {
  max-width: 500px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ==========================================================================
   Servers Grid
   ========================================================================== */
.servers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.server-card {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.server-card-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

.server-logo-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.server-logo {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.server-card-header h3 {
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
}

.server-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.server-live-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
}

.dot-green {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  margin-right: 0.35rem;
}

/* ==========================================================================
   Projects Grid
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.project-card {
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.project-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-links-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Team Section
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem;
}

.team-card {
  padding: 2rem 1.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-avatar-box {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 1.15rem;
}

.team-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  background: #0e1017;
}

.team-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-surface);
}

.status-online { background-color: var(--accent-emerald); }
.status-idle { background-color: var(--accent-amber); }
.status-dnd { background-color: var(--accent-rose); }
.status-offline { background-color: var(--text-muted); }

.team-name {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.team-role {
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.team-bio {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1.35rem;
  flex-grow: 1;
}

.team-tags {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #040508;
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.75rem;
}

.footer-brand h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 360px;
}

.footer-col h5 {
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-apple);
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .navbar {
    top: 12px;
    width: calc(100% - 1.5rem);
  }

  .hero-section {
    padding-top: 110px;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-content-left {
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .section-head-split {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .section-head-left {
    max-width: 100%;
  }

  .servers-grid, .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: #0c0e14;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: transform var(--transition-apple);
    z-index: 99;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

  .btn-nav {
    display: none;
  }
}