/* ============================================
   layout.css V2 — 深色科技风导航/Footer/网格
   ============================================ */

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-md) 0;
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

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

.nav-logo svg { transition: filter var(--transition-base); }
.nav-logo:hover svg { filter: drop-shadow(0 0 8px rgba(255,107,94,0.5)); }

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-md), 1.8vw, var(--space-2xl));
  flex-wrap: nowrap;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: var(--space-xs) 0;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
  box-shadow: 0 0 8px rgba(255,107,94,0.4);
}

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

/* CTA Button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-bright);
  background: var(--gradient-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-base);
  box-shadow: 0 0 20px rgba(255,107,94,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(255,107,94,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-bright);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  z-index: calc(var(--z-nav) - 1);
  padding: 100px var(--space-xl) var(--space-xl);
  flex-direction: column;
  gap: var(--space-lg);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-bright);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* ── Footer ── */
.footer {
  background: #1A1A2E;
  color: #E0E0E5;
  border-top: none;
  padding: var(--space-4xl) 0 var(--space-xl);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand { max-width: 320px; }

.footer-brand-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #F5F5F7;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-brand-desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-sm);
}

.footer-col-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: rgba(255,255,255,0.7);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.4);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover { color: var(--color-primary-bright); }

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-bottom: var(--space-lg);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
}

.footer-bottom a { color: rgba(255,255,255,0.3); }
.footer-bottom a:hover { color: rgba(255,255,255,0.6); }

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

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.bento-span-2 { grid-column: span 2; }
.bento-span-3 { grid-column: span 3; }
.bento-row-2 { grid-row: span 2; }

/* ── Page Banner ── */
.page-banner {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: 64px;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glow-hero);
  pointer-events: none;
}

.page-banner-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, var(--text-6xl));
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: var(--space-lg);
}

.page-banner-title em,
.page-banner-title .gradient-text {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.page-banner-label {
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 400;
  font-variation-settings: "opsz" 14, "SOFT" 50;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-md);
  position: relative;
  padding: 0 1.4em;
}
.page-banner-label::before,
.page-banner-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 1em;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.page-banner-label::before { left: 0; }
.page-banner-label::after  { right: 0; }

.page-banner-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  line-height: 1.9;
  letter-spacing: 0.012em;
  max-width: 620px;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 1280px) {
  :root { --text-5xl: 3rem; --text-6xl: 3.5rem; --text-7xl: 4.5rem; }
}

/* 导航项较多，窄于 1100px 即收进汉堡菜单，避免横向拥挤换行 */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 1024px) {
  :root { --text-4xl: 2rem; --text-5xl: 2.5rem; --text-6xl: 3rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-span-2, .bento-span-3 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --text-3xl: 1.75rem; --text-4xl: 1.75rem; --text-5xl: 2rem; --space-5xl: 5rem; }
  .container { padding: 0 var(--space-md); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
}

@media (max-width: 480px) {
  :root { --text-3xl: 1.5rem; --text-5xl: 1.75rem; }
}
