
:root {
  --bg: #ffffff;
  --bg-secondary: #fafafa;
  --text: #000000;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #e5e5e5;
  --accent: #000000;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --text: #ffffff;
  --text-secondary: #888888;
  --text-muted: #555555;
  --border: #222222;
  --accent: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Utility */
.hidden { display: none !important; }

/* ========================================
   Header
   ======================================== */

header {
  height: 64px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
  background: rgba(var(--bg-rgb, 255, 255, 255), 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] header.scrolled {
  background: rgba(10, 10, 10, 0.9);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo svg {
  width: 18px;
  height: 18px;
}

.logo .pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.15s ease;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.btn-icon:hover {
  border-color: var(--text);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.mobile-menu-btn {
  display: flex;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--text);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 80px;
}

.hero-content {
  max-width: 800px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  margin-bottom: 32px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.badge svg {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  margin-bottom: 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.8;
}

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

.btn-outline:hover {
  border-color: var(--text);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* Connection Visual */
.connection-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.node-box {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-box svg {
  width: 28px;
  height: 28px;
}

.node-box.bg-secondary {
  background: var(--bg-secondary);
}

.node-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.connector {
  display: flex;
  align-items: center;
  gap: 4px;
}

.connector-line {
  width: 32px;
  height: 1px;
  background: var(--border);
}

.connector-dot {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.connector-dot svg {
  width: 12px;
  height: 12px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--text);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   Section Styles
   ======================================== */

section {
  padding: 96px 20px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 48px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 500px;
  margin: -32px auto 48px;
}

.border-top {
  border-top: 1px solid var(--border);
}

.bg-secondary-section {
  background: var(--bg-secondary);
}

/* ========================================
   Features Section
   ======================================== */

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.feature-card {
  border: 1px solid var(--border);
  padding: 24px;
  transition: border-color 0.15s ease;
}

.feature-card:hover {
  border-color: var(--text);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   How It Works Section
   ======================================== */

.steps-grid {
  max-width: 1200px;
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.step-card {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--bg);
  position: relative;
}

.step-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.3;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.diagram {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--border);
  padding: 48px 24px;
  background: var(--bg);
}

.diagram-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.diagram-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.diagram-box {
  width: 80px;
  height: 80px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-box.highlight {
  border-width: 2px;
  border-color: var(--text);
  background: var(--bg-secondary);
}

.diagram-box svg {
  width: 40px;
  height: 40px;
}

.diagram-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.diagram-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.diagram-connector-line-v {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.diagram-connector-line-h {
  width: 48px;
  height: 1px;
  background: var(--border);
}

/* ========================================
   FAQ Section
   ======================================== */

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.faq-question:hover {
  background: var(--bg-secondary);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-content {
  padding: 0 20px 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

.faq-answer-content p {
  padding-top: 16px;
}

/* ========================================
   Download Section
   ======================================== */

.download-options {
  max-width: 800px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.download-card {
  border: 1px solid var(--border);
  padding: 32px;
  text-align: center;
  background: var(--bg);
  transition: all 0.15s ease;
}

.download-card:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.download-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: border-color 0.15s ease;
}

.download-card:hover .download-icon {
  border-color: var(--bg);
}

.download-icon svg {
  width: 24px;
  height: 24px;
}

.download-card span {
  font-weight: 500;
}

.download-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */

footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 32px;
}

.footer-logo {
  grid-column: 1 / -1;
}

.footer-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-logo a svg {
  width: 16px;
  height: 16px;
}

.footer-logo p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-column h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

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

.social-links svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Xross Page
   ======================================== */

.page-header {
  padding-top: 120px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.port-card-xross {
  border: 1px solid var(--border);
  padding: 24px;
  transition: border-color 0.15s ease;
}

.port-card-xross:hover {
  border-color: var(--text);
}

.port-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.port-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s ease;
}

.port-card-xross:hover .port-icon {
  border-color: var(--text);
}

.port-icon svg {
  width: 24px;
  height: 24px;
}

.port-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.port-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

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

.port-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-family: 'SF Mono', Monaco, monospace;
}

.info-box {
  border: 1px solid var(--border);
  padding: 32px;
}

.info-box p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.info-box strong {
  color: var(--text);
  font-weight: 600;
}

/* ========================================
   Responsive
   ======================================== */

@media (min-width: 640px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .buttons {
    flex-direction: row;
  }
  
  .btn {
    width: auto;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .download-options {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .footer-logo {
    grid-column: 1;
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .diagram-content {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }
  
  .diagram-connector {
    flex-direction: row;
    align-items: center;
  }
  
  .diagram-connector-line-v {
    display: none;
  }
  
  .diagram-connector-line-h {
    width: 48px;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: none;
  }
  
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .connection-visual {
    gap: 32px;
  }
  
  .node-box {
    width: 64px;
    height: 64px;
  }
  
  .node-box svg {
    width: 32px;
    height: 32px;
  }
  
  .connector-line {
    width: 48px;
  }
}
