/* ============================================================
   LAYOUT.CSS — NAVBAR, FOOTER, BUTTONS, GLOBAL COMPONENTS
============================================================ */

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 1.25rem;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: rgba(5, 7, 11, 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

body.light .site-header.is-scrolled {
  background: rgba(248, 250, 252, 0.88);
}

.navbar {
  width: min(100%, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 30% 25%, var(--accent), transparent 48%),
    linear-gradient(135deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--border-strong);
  box-shadow: var(--glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--muted);
}

/* NAV */

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.lang-btn,
.theme-btn,
.menu-btn {
  min-height: 40px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  border-radius: 999px;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.lang-btn:hover,
.theme-btn:hover,
.menu-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--border-strong);
}

.lang-btn {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.theme-btn,
.menu-btn {
  width: 42px;
  padding: 0;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-btn span,
.menu-btn::before,
.menu-btn::after {
  content: "";
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  display: block;
  transition: transform var(--transition), opacity var(--transition);
}

/* BUTTONS */

.btn {
  min-height: 46px;
  padding: 0 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 850;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #020617;
  background: linear-gradient(135deg, var(--accent), #dff8ff);
  box-shadow: 0 16px 45px rgba(56, 189, 248, 0.2);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: var(--border-strong);
}

.btn-ghost {
  color: var(--text-soft);
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

/* PILLS / CHIPS */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  min-height: 34px;
  padding: 0 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.pill-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* CARDS */

.card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-pad {
  padding: 1.5rem;
}

.module-card {
  position: relative;
  min-height: 190px;
  padding: 1.4rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.11), transparent 42%),
    rgba(255,255,255,0.035);
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.module-card:hover {
  transform: translateY(-7px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--glow);
}

.module-card small {
  color: var(--accent);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-card h3 {
  margin-top: 1rem;
  margin-bottom: 0.6rem;
}

.module-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.module-icon {
  width: 44px;
  height: 44px;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  color: #020617;
  background: var(--accent);
  margin-bottom: 1rem;
}

/* SECTION HEADINGS */

.section-heading {
  max-width: 820px;
  margin-bottom: 3rem;
}

.section-heading.center {
  text-align: center;
  margin-inline: auto;
}

.section-heading p {
  margin-bottom: 0;
}

/* MOBILE PANEL */

.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 950;
  padding: 6rem 1.25rem 1.25rem;
  background: rgba(5, 7, 11, 0.94);
  backdrop-filter: blur(20px);
  transform: translateY(-100%);
  transition: transform 0.32s ease;
}

body.menu-open .mobile-panel {
  transform: translateY(0);
}

body.light .mobile-panel {
  background: rgba(248, 250, 252, 0.94);
}

.mobile-panel nav {
  display: grid;
  gap: 0.75rem;
}

.mobile-panel a {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 850;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .menu-btn span {
  opacity: 0;
}

body.menu-open .menu-btn::before {
  transform: translateY(6px) rotate(45deg);
}

body.menu-open .menu-btn::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* FLOATING SOCIALS */

.floating-actions {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 850;
  display: grid;
  gap: 0.65rem;
}

.floating-action {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform var(--transition), background var(--transition);
}

.floating-action:hover {
  transform: translateY(-3px) scale(1.03);
  background: var(--accent-soft);
}

/* FOOTER */

.site-footer {
  padding: 3rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
  width: min(100%, var(--container));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.footer-brand {
  display: grid;
  gap: 0.4rem;
}

.footer-brand strong {
  font-size: 0.95rem;
}

.footer-brand span {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 750;
}

.footer-links a:hover {
  color: var(--text);
}

/* RESPONSIVE */

@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .brand-text span {
    display: none;
  }

  .nav-actions .btn {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.8rem 1rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
  }
}