/* ==========================================================================
   PortDeck Landing Page - Modern Dark Cyber Aesthetics
   Version: 1.1.0
   ========================================================================== */

:root {
  /* Color System */
  --bg-primary: #080b11;
  --bg-secondary: #0e1320;
  --bg-tertiary: #141b2d;
  --bg-glass: rgba(16, 23, 41, 0.72);
  --bg-glass-card: rgba(22, 31, 54, 0.55);
  --bg-glass-hover: rgba(30, 41, 69, 0.75);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(255, 146, 111, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #ffedd5;

  /* Accent Colors */
  --accent-brand: #ff926f;
  --accent-brand-light: #ffa68a;
  --accent-brand-glow: rgba(255, 146, 111, 0.28);
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: 'JetBrains Mono', "SF Mono", Consolas, Menlo, monospace;

  /* Layout */
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 35px var(--accent-brand-glow);
  --shadow-cyan-glow: 0 0 30px rgba(6, 182, 212, 0.22);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(255, 146, 111, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 10% 25%, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
              radial-gradient(circle at 90% 60%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
              var(--bg-primary);
}

/* Background Grids & Ambient Lights */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 600px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 146, 111, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
  position: relative;
  z-index: 1;
}

/* Typography & Utilities */
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 20%, #cbd5e1 60%, var(--accent-brand-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-brand-gradient {
  background: linear-gradient(135deg, #ff926f 0%, #ffc09f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 0 12px var(--accent-brand-glow);
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 146, 111, 0.15);
  color: var(--accent-brand);
  border: 1px solid rgba(255, 146, 111, 0.3);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-item a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-item a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ff926f 0%, #fa7a50 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 146, 111, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 146, 111, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15.5px;
  border-radius: var(--radius-lg);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 70px;
  text-align: center;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 146, 111, 0.1);
  border: 1px solid rgba(255, 146, 111, 0.3);
  color: var(--accent-brand);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(255, 146, 111, 0.12);
  animation: pulsePill 3s infinite ease-in-out;
}

@keyframes pulsePill {
  0%, 100% { border-color: rgba(255, 146, 111, 0.3); }
  50% { border-color: rgba(255, 146, 111, 0.6); box-shadow: 0 0 25px rgba(255, 146, 111, 0.25); }
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 62px);
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 20px;
  max-width: 960px;
  margin-inline: auto;
}

.hero-desc {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.cta-tip {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Hero Mockup Frame */
.mockup-container {
  max-width: 1040px;
  margin-inline: auto;
  position: relative;
  perspective: 1000px;
}

.mockup-window {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.8),
              0 0 50px rgba(255, 146, 111, 0.08);
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.mockup-window:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 70px -10px rgba(0, 0, 0, 0.9),
              0 0 65px rgba(255, 146, 111, 0.16);
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(14, 19, 32, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-window-title {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.mockup-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   NAS Ecosystem Logos
   ========================================================================== */
.ecosystem-section {
  padding: 40px 0 60px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.ecosystem-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.ecosystem-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}

.nas-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.nas-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.nas-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.nas-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==========================================================================
   Stats Bar
   ========================================================================== */
.stats-section {
  padding: 50px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.stat-number {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  font-family: var(--font-sans);
}

.stat-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Core Features Matrix
   ========================================================================== */
.features-section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-brand);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 40px);
  margin-bottom: 16px;
  letter-spacing: -0.8px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  background: var(--bg-glass-hover);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
}

.feature-title {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.feature-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feature-tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* ==========================================================================
   Interactive Showcase / Tabs Section
   ========================================================================== */
.showcase-section {
  padding: 60px 0 90px 0;
}

.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  color: #ffffff;
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  box-shadow: 0 4px 16px rgba(255, 146, 111, 0.35);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.showcase-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.showcase-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
}

.showcase-info h3 {
  font-size: 26px;
  margin-bottom: 16px;
}

.showcase-info p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 24px;
}

.showcase-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-primary);
}

.check-icon {
  color: var(--accent-emerald);
  font-weight: bold;
}

.showcase-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
}

.showcase-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Download Section
   ========================================================================== */
.download-section {
  padding: 80px 0;
  position: relative;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 40px;
}

.download-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}

.download-card.highlight {
  border-color: var(--accent-brand);
  background: linear-gradient(180deg, rgba(255, 146, 111, 0.08) 0%, rgba(22, 31, 54, 0.6) 100%);
  box-shadow: 0 12px 36px rgba(255, 146, 111, 0.15);
}

.download-card:hover {
  transform: translateY(-4px);
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 146, 111, 0.2);
  color: var(--accent-brand);
  border: 1px solid rgba(255, 146, 111, 0.35);
}

.download-icon {
  font-size: 44px;
  margin-bottom: 14px;
}

.download-title {
  font-size: 22px;
  margin-bottom: 8px;
}

.download-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.download-action {
  margin-bottom: 16px;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px dashed var(--border-light);
  transition: all 0.2s ease;
}

.code-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--accent-brand);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
  padding: 70px 0;
}

.faq-list {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
}

.faq-item:hover {
  border-color: var(--border-light);
}

.faq-question {
  padding: 20px 24px;
  font-size: 16.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.faq-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
  color: var(--accent-brand);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.75;
  padding: 0 24px;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 24px 22px 24px;
  transition: max-height 0.4s ease-in-out, padding 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 36px 0;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 14px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-emerald);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .showcase-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-tertiary);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: none;
  }

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

  .features-grid,
  .download-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
