/* Meyl — Apple-inspired minimal design */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
  color: #1d1d1f;
  background: #fff;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ── Nav ── */
#nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: 980px; margin: 0 auto; padding: 0 22px;
  height: 48px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-weight: 600; font-size: 18px; color: #1d1d1f; text-decoration: none; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 12px; color: #6e6e73; text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: #1d1d1f; }
.lang-btn { font-size: 11px; color: #86868b; border: 1px solid #d2d2d7; border-radius: 6px; padding: 2px 8px; background: none; cursor: pointer; transition: all 0.2s; }
.lang-btn:hover { color: #1d1d1f; border-color: #86868b; }
.nav-github { font-size: 12px; color: #fff; background: #1d1d1f; padding: 5px 14px; border-radius: 980px; text-decoration: none; font-weight: 500; transition: background 0.2s; }
.nav-github:hover { background: #000; }
.hide-mobile {}
@media (max-width: 640px) { .hide-mobile { display: none; } .nav-links { gap: 16px; } }

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 120px 24px 80px;
  background: linear-gradient(180deg, #fbfbfd 0%, #fff 100%);
}
.hero-inner { text-align: center; max-width: 720px; }
.hero-title {
  font-size: clamp(48px, 8vw, 80px); font-weight: 700;
  letter-spacing: -0.04em; line-height: 1.05;
  color: #1d1d1f;
  margin-bottom: 24px;
}
.hero-title.typing {
  border-right: 3px solid #0071e3;
  animation: blink 0.6s step-end infinite;
}
.hero-title.typed {
  border-right: 3px solid #0071e3;
  animation: blink 0.6s step-end infinite;
}
@keyframes blink { 50% { border-color: transparent; } }
.hero-sub {
  font-size: clamp(17px, 2.5vw, 21px); color: #86868b;
  line-height: 1.5; margin-bottom: 40px;
}
.hero-sub strong { color: #6e6e73; font-weight: 500; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-block; padding: 12px 32px; background: #0071e3; color: #fff;
  border-radius: 980px; font-size: 17px; font-weight: 500; text-decoration: none;
  transition: background 0.2s;
}
.btn-primary:hover { background: #0077ed; }
.btn-secondary {
  display: inline-block; padding: 12px 32px; color: #0071e3;
  border-radius: 980px; font-size: 17px; font-weight: 500; text-decoration: none;
  transition: color 0.2s;
}
.btn-secondary:hover { color: #0077ed; }

/* ── Tagline ── */
.tagline-section {
  padding: 100px 24px;
  text-align: center;
  background: #fbfbfd;
}
.tagline {
  font-size: clamp(28px, 5vw, 48px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.15;
  color: #1d1d1f;
}

/* ── Sections shared ── */
.section-inner { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.section-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: #0071e3; text-align: center;
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(32px, 5vw, 48px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1;
  text-align: center; color: #1d1d1f;
  margin-bottom: 64px;
}

/* ── Code ── */
.code-section { padding: 120px 24px; }
.code-grid { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; }
.code-card { border: 1px solid #d2d2d7; border-radius: 16px; overflow: hidden; background: #fff; }
.code-header { padding: 14px 20px; border-bottom: 1px solid #f5f5f7; display: flex; align-items: center; gap: 12px; font-size: 14px; color: #6e6e73; }
.code-num { color: #0071e3; font-weight: 600; font-variant-numeric: tabular-nums; }
.code-block { padding: 16px 20px; overflow-x: auto; background: #fff !important; margin: 0 !important; }
pre[class*="language-"] { background: transparent !important; margin: 0 !important; padding: 0 !important; }
code[class*="language-"] { font-size: 13px !important; font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace !important; }

/* ── How ── */
.how-section { padding: 120px 24px; background: #fbfbfd; }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 800px; margin: 0 auto; }
@media (max-width: 640px) { .flow-grid { grid-template-columns: 1fr; gap: 48px; } }
.flow-card { text-align: center; }
.flow-icon { width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid #d2d2d7; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: #86868b; }
.flow-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.flow-desc { font-size: 14px; color: #86868b; line-height: 1.5; }

/* ── Features ── */
.features-section { padding: 120px 24px; }
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 64px; max-width: 800px; margin: 0 auto; }
@media (max-width: 640px) { .feat-grid { grid-template-columns: 1fr; gap: 40px; } }
.feat-card {}
.feat-title { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.feat-desc { font-size: 15px; color: #86868b; line-height: 1.6; }

/* ── SDK ── */
.sdk-section { padding: 120px 24px; background: #fbfbfd; }
.sdk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 800px; margin: 0 auto; }
@media (max-width: 640px) { .sdk-grid { grid-template-columns: 1fr; } }
.sdk-card { border: 1px solid #d2d2d7; border-radius: 16px; overflow: hidden; background: #fff; }
.sdk-header { padding: 14px 20px; border-bottom: 1px solid #f5f5f7; display: flex; align-items: center; justify-content: space-between; }
.sdk-lang { font-size: 14px; font-weight: 600; color: #1d1d1f; }
.sdk-install { font-size: 12px; color: #86868b; font-family: 'SF Mono', 'Fira Code', Menlo, monospace; background: #f5f5f7; padding: 3px 10px; border-radius: 6px; }

/* ── API ── */
.api-section { padding: 120px 24px; background: #fbfbfd; }
.api-table { max-width: 560px; margin: 0 auto; border-radius: 16px; overflow: hidden; border: 1px solid #d2d2d7; background: #fff; }
.api-row { padding: 12px 20px; display: flex; align-items: center; gap: 16px; font-size: 14px; border-bottom: 1px solid #f5f5f7; }
.api-row:last-child { border-bottom: none; }
.method { font-family: 'SF Mono', 'Fira Code', Menlo, monospace; font-size: 11px; font-weight: 600; width: 48px; flex-shrink: 0; }
.method.post { color: #34c759; }
.method.get { color: #007aff; }
.method.patch { color: #ff9f0a; }
.method.delete { color: #ff3b30; }
.endpoint { font-family: 'SF Mono', 'Fira Code', Menlo, monospace; color: #1d1d1f; font-size: 13px; }
.api-desc { margin-left: auto; color: #86868b; font-size: 13px; }
@media (max-width: 640px) { .api-desc { display: none; } }
.api-link-wrap { text-align: center; margin-top: 40px; }
.api-link { color: #0071e3; font-size: 14px; font-weight: 500; text-decoration: none; }
.api-link:hover { text-decoration: underline; }

/* ── Directory ── */
.directory-section { padding: 120px 24px; }
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 768px) { .dir-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .dir-grid { grid-template-columns: 1fr; } }
.agent-card { border: 1px solid #d2d2d7; border-radius: 16px; padding: 20px; background: #fff; transition: all 0.2s; }
.agent-card:hover { border-color: #0071e3; box-shadow: 0 4px 20px rgba(0,113,227,0.08); }
.agent-name { font-weight: 600; font-size: 15px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-addr { font-size: 12px; color: #86868b; font-family: 'SF Mono', Menlo, monospace; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-desc { font-size: 13px; color: #86868b; line-height: 1.4; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-meta { display: flex; align-items: center; justify-content: space-between; }
.tag-pill { display: inline-block; padding: 2px 8px; background: #f5f5f7; color: #6e6e73; border-radius: 980px; font-size: 11px; font-weight: 500; }
.agent-msgs { font-size: 11px; color: #aeaeb2; }
.dir-empty { text-align: center; padding: 80px 0; }
.dir-zero { font-size: 72px; font-weight: 200; color: #d2d2d7; margin-bottom: 16px; }
.dir-empty-text { color: #86868b; font-size: 17px; }
.dir-empty-hint { color: #aeaeb2; font-size: 14px; margin-top: 4px; }
.dir-empty-hint code { background: #f5f5f7; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.dir-loading { text-align: center; padding: 80px 0; }
.spinner { width: 20px; height: 20px; border: 2px solid #d2d2d7; border-top-color: #0071e3; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.agent-card { animation: fadeIn 0.3s ease forwards; }
.agent-card:nth-child(2) { animation-delay: 0.05s; }
.agent-card:nth-child(3) { animation-delay: 0.1s; }

/* ── Footer ── */
.footer { border-top: 1px solid #f5f5f7; padding: 20px 22px; }
.footer-inner { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 12px; color: #aeaeb2; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 12px; color: #aeaeb2; text-decoration: none; }
.footer-links a:hover { color: #6e6e73; }
