/* =============================================
   ZERØCRAFT — Components
   Navbar, buttons, cards, forms, footer
   ============================================= */

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  z-index: var(--z-navbar);
  transition: all var(--duration-slow) var(--ease-out);
}

.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.navbar.scrolled::before {
  opacity: 1;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-8);
  position: relative;
  z-index: 2;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
  color: var(--white);
  transition: opacity var(--duration-fast) var(--ease-out);
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wide);
  position: relative;
  padding: var(--space-2) 0;
  transition: color var(--duration-normal) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  z-index: 10;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: all var(--duration-normal) var(--ease-out);
  transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* Mobile Nav */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: var(--z-overlay);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.nav-mobile-overlay.active {
  display: flex;
  opacity: 1;
}

.nav-mobile-overlay .nav-link {
  font-size: var(--text-2xl);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}


/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Large button variant */
.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

/* Secondary — outline */
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

/* Ghost — text only */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover {
  color: var(--white);
}

/* Accent button */
.btn-accent {
  background: var(--accent);
  color: var(--black);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Icon button */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-icon:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}


/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--accent);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}


/* ===== SECTION HEADERS ===== */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: var(--radius-full);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--space-4);
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: var(--leading-relaxed);
}

.section-desc.centered {
  margin: 0 auto;
}


/* ===== FORMS ===== */
.input-group {
  display: flex;
  gap: var(--space-3);
  max-width: 480px;
}

.input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-6);
  color: var(--text);
  font-size: var(--text-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

@media (max-width: 480px) {
  .input-group {
    flex-direction: column;
  }
}


/* ===== SPEC TABLE ===== */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid var(--border);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: var(--space-4) 0;
  font-size: var(--text-sm);
}

.spec-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
  width: 40%;
  padding-right: var(--space-8);
}

.spec-table td:last-child {
  color: var(--text);
  font-weight: 600;
}


/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: var(--space-16) 0;
}


/* ===== FOOTER ===== */
.footer {
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-12);
  gap: var(--space-8);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--white);
  margin-bottom: var(--space-3);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 280px;
}

.footer-nav {
  display: flex;
  gap: var(--space-12);
}

.footer-nav-group h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  margin-bottom: var(--space-4);
}

.footer-nav-group a {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-1) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-nav-group a:hover {
  color: var(--white);
}

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

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: var(--space-4);
}

.footer-socials a {
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-socials a:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
  }

  .footer-nav {
    flex-direction: column;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}
