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

:root {
  --bg: #fafafa;
  --bg-alt: #f0f0f5;
  --text: #1a1a2e;
  --text-muted: #555;
  --primary: #5865F2;
  --primary-dark: #4752c4;
  --accent: #A855F7;
  --white: #fff;
  --border: #e0e0e8;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

img { max-width: 100%; height: auto; }

/* ========= Layout ========= */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

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

.section h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========= Header ========= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.logo img { border-radius: 8px; }

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

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ========= Buttons ========= */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}

.btn:hover { text-decoration: none; }

.btn-sm { padding: 6px 16px; font-size: 0.875rem; }

.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

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

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary); color: var(--white); }

/* ========= Hero ========= */
.hero {
  text-align: center;
  padding: 100px 0 80px;
  background: linear-gradient(165deg, #f8f8ff 0%, #f0f0ff 40%, #faf5ff 100%);
}

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

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-icons {
  display: flex;
  justify-content: center;
  gap: 48px;
}

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

.hero-icon-card img {
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-icon-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ========= Grids ========= */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

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

/* ========= Cards ========= */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 14px;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card ul li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  color: var(--text-muted);
}

.card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ========= Features ========= */
.feature {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========= Steps ========= */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.step {
  text-align: center;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ========= Architecture ========= */
.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
  position: relative;
}

.arch-node {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  min-width: 160px;
}

.arch-node strong { display: block; margin-bottom: 4px; }
.arch-node span { font-size: 0.85rem; color: var(--text-muted); }

.arch-server { border-color: var(--primary); }
.arch-parent { border-color: var(--accent); }
.arch-agent { border-color: #f59e0b; }
.arch-dashboard { border-color: #10b981; }

.arch-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.arch-web {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-arrow-up {
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* ========= Comparison Table ========= */
.table-wrap {
  overflow-x: auto;
  margin-top: 32px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

thead {
  background: var(--bg-alt);
}

th, td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th { font-weight: 600; }

th:last-child, td:last-child {
  background: rgba(88, 101, 242, 0.04);
}

.highlight {
  font-weight: 600;
  color: var(--primary);
}

/* ========= Age Cards ========= */
.card-age {
  text-align: center;
}

.card-limit {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.card-age p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.tip {
  text-align: center;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========= FAQ ========= */
.faq-list {
  max-width: 720px;
  margin: 32px auto 0;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--white);
}

details + details { margin-top: 0; }

summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 16px;
}

details[open] summary::after { content: '-'; }

summary::-webkit-details-marker { display: none; }

details p {
  padding: 0 20px 16px;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

/* ========= CTA ========= */
.cta {
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
}

.cta h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 28px;
  font-size: 1.1rem;
}

.cta .btn-primary {
  background: var(--white);
  color: var(--primary);
  font-size: 1.05rem;
}

.cta .btn-primary:hover {
  background: #f0f0ff;
}

.cta .btn-ghost {
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.cta .btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

/* ========= Footer ========= */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.footer-left img { border-radius: 4px; }

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-right p { margin: 0; }

/* ========= Responsive ========= */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1.05rem; }
  .hero { padding: 60px 0 50px; }
  .section { padding: 56px 0; }
  .section h2 { font-size: 1.6rem; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 32px; }

  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }

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

  .arch-diagram {
    flex-direction: column;
  }

  .arch-web {
    position: static;
    transform: none;
  }

  .arch-arrow { transform: rotate(90deg); }

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

  .hero-icons { gap: 24px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.65rem; }
  .steps { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
