/* ==================== Codeisa — Layout CSS ==================== */
/* Header, Nav, Footer, Page Container, Grid System */

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(7,4,28,.78), rgba(7,4,28,.55));
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 32px rgba(0,0,0,.45);
}
.site-header .header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-logo {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 20% 10%, #c4b5fd 0%, #818cf8 40%, #6366f1 70%, #4338ca 100%);
  box-shadow: 0 10px 30px rgba(99,102,241,.45), 0 0 0 1px rgba(255,255,255,.16) inset, 0 2px 0 rgba(255,255,255,.20) inset;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.site-logo::after {
  content: "";
  position: absolute; inset: -40%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.22) 30%, transparent 60%);
  transform: translateX(-80%) rotate(18deg);
  animation: logo-shine 4.8s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.35;
}
@keyframes logo-shine { 0%,100% { transform: translateX(-80%) rotate(18deg); } 50% { transform: translateX(80%) rotate(18deg); } }
.site-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(120deg, #c7d2fe 0%, #e9d5ff 35%, #fbcfe8 70%, #c7d2fe 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: title-shimmer 6s ease-in-out infinite;
}
@keyframes title-shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.site-subtitle {
  font-size: 10.5px;
  color: rgba(200,210,255,.7);
  font-weight: 500;
  letter-spacing: .02em;
}

/* ---- Navigation ---- */
.site-nav {
  position: sticky;
  top: 72px;
  z-index: 40;
  padding: 14px 20px 8px;
  background: linear-gradient(180deg, rgba(7,4,28,.40), rgba(7,4,28,.20));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.05);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav .nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  min-width: max-content;
}
.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.09);
  color: rgba(244,244,255,.75);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), border-color .2s ease, background .25s ease, box-shadow .3s ease, color .2s ease;
  text-decoration: none;
}
.nav-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(168,85,247,.45);
  background: linear-gradient(180deg, rgba(168,85,247,.12), rgba(99,102,241,.06));
  text-decoration: none;
}
.nav-btn.active {
  color: #fff;
  border-color: rgba(255,255,255,.32);
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 55%, #ec4899 100%);
  box-shadow: 0 14px 30px rgba(139,92,246,.45), inset 0 1px 0 rgba(255,255,255,.30);
  transform: translateY(-1px);
}

/* ---- Page Container ---- */
.page-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 1;
}

/* ---- Glass Cards ---- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .35s var(--ease), border-color .25s ease, box-shadow .35s ease, background .25s ease;
}
.glass:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.08);
}
.glass-dark {
  background: linear-gradient(180deg, rgba(5,4,18,.72), rgba(5,4,18,.55));
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-md);
}
.glass > * { position: relative; z-index: 1; }

/* ---- Section Headings ---- */
.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.022em;
  background: linear-gradient(120deg, #ffffff 0%, #d8dcff 60%, #e9d5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

/* ---- Grid System ---- */
.grid { display: grid; gap: 16px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-dim);
  font-size: 13px;
}
.site-footer a { color: var(--c-accent); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .site-header { padding: 12px 14px; }
  .site-title { font-size: 19px; }
  .site-logo { width: 38px; height: 38px; border-radius: 12px; }
  .site-nav { padding: 10px 14px 6px; top: 62px; }
  .nav-btn { padding: 9px 14px; font-size: 12.5px; }
  .page-container { padding: 0 14px 40px; }
  .page-title { font-size: 19px; }
  .glass { padding: 14px; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .glass { padding: 18px; }
}
@media (min-width: 1024px) {
  .glass { padding: 22px; }
}
