﻿/* =====================================================================
   NAV
   ===================================================================== */
.nav {
  position: sticky;
  top: 12px;
  z-index: 100;
  margin: 0 auto 12px;
  width: min(94%, 1100px);
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
  overflow: visible;
}
[data-theme="dark"] .nav {
  background: var(--bg);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .2);
}
.nav.is-scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, .1), 0 2px 4px rgba(0, 0, 0, .06);
  border-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  min-height: 56px;
  gap: 12px;
  padding: 0 10px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__logo { width: 34px; height: 34px; display: block; }
.brand__logo svg { width: 100%; height: 100%; }
.brand__word { font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav__links a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .15s; }
.nav__links a:hover { color: var(--text); }
.nav__links .btn.nav__cta { color: #fff; }

.nav__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover {
  background: rgba(56, 161, 105, 0.08);
  color: var(--accent-ink);
  transform: translateY(-1px);
}
#themeSweep {
  position: fixed;
  top: -140px;
  right: -140px;
  width: 360px;
  height: 360px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.22) 0%, transparent 28%),
    radial-gradient(circle at 60% 65%, var(--theme-sweep-color, var(--bg)) 0%, transparent 70%);
  filter: blur(38px);
  transform: translate(56px, -56px) scale(0.72);
  transition: opacity 1100ms ease, transform 1300ms cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}
#themeSweep.is-active {
  opacity: 0.34;
  transform: translate(0, 0) scale(1);
}

.hero, .section, .footer, .hero__grid {
  position: relative;
  z-index: 1;
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
}
/* Light mode: show sun, hide moon */
.theme-toggle__icon--light { display: block; }
.theme-toggle__icon--dark  { display: none; }
/* Dark mode: show moon, hide sun */
[data-theme="dark"] .theme-toggle__icon--light { display: none; }
[data-theme="dark"] .theme-toggle__icon--dark  { display: block; }

