/* GoLive Bridge site stylesheet */
:root {
  --bg: #0b0f17;
  --bg-alt: #111826;
  --surface: #161f2e;
  --surface-2: #1c273a;
  --border: #263349;
  --text: #e8edf6;
  --text-dim: #9fb0c8;
  --text-faint: #6b7c96;
  --accent: #4f8cff;
  --accent-2: #7bd6c4;
  --accent-warn: #ffb454;
  --accent-danger: #ff5c5c;
  --radius: 14px;
  --max-w: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 23, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  /* min-height, not a fixed height, so the row can never clip its contents. */
  min-height: 64px;
  /* Header bar gets a little more room than the 1120px body wrap so the
     multi-language nav (en/th labels are wider) never has to squeeze the logo. */
  max-width: 1280px;
}
.logo {
  display: flex; align-items: baseline; gap: 8px;
  font-weight: 800; font-size: 1.25rem; color: var(--text);
  letter-spacing: -0.02em;
  /* Brand name must stay on one line — never shrink or wrap it. */
  flex: 0 0 auto; white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06111f; font-weight: 900; font-size: 1rem;
}
.logo .cn { color: var(--text-dim); font-weight: 500; font-size: 0.85rem; }

nav.main-nav { display: flex; align-items: center; gap: 4px; }
nav.main-nav a {
  color: var(--text-dim); font-size: 0.92rem; padding: 8px 12px;
  border-radius: 8px; white-space: nowrap;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-cta {
  background: var(--accent); color: #06111f !important; font-weight: 700;
  padding: 8px 16px !important;
}
.nav-cta:hover { background: #6ba0ff; }

.lang-switch {
  display: flex; align-items: center; gap: 2px;
  margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--border);
}
.lang-switch a { padding: 6px 9px; font-size: 0.8rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); width: 40px; height: 40px;
  font-size: 1.1rem; cursor: pointer;
}

/* The brand subtitle is decorative. Drop it whenever the row is tight: always
   on the wider en/th labels, and on any language below 1280px. Below the mobile
   breakpoint the whole nav collapses to the hamburger menu instead. */
:root[lang="en"] .logo .cn,
:root[lang="th"] .logo .cn { display: none; }
@media (max-width: 1280px) {
  .logo .cn { display: none; }
}

/* Phones: center the logo parts (badge + wordmark) instead of baseline-aligning
   a 30px badge against 20px text — that pushed the badge below the row and
   clipped its bottom. Same font size, just clean vertical centering. */
@media (max-width: 480px) {
  .logo { align-items: center; line-height: 1; }
  .logo .mark { flex: 0 0 auto; }
}

/* Desktop but narrow (1201–1340px): tighten nav spacing only — no smaller
   text — so the wider en/th labels stay on one row. */
@media (min-width: 1201px) and (max-width: 1340px) {
  nav.main-nav { gap: 2px; }
  nav.main-nav a { padding-left: 10px; padding-right: 10px; }
  .nav-cta { padding-left: 12px !important; padding-right: 12px !important; }
  .nav-dropdown-toggle { padding-left: 10px; padding-right: 10px; }
  .lang-switch { margin-left: 3px; padding-left: 7px; }
}

@media (max-width: 1200px) {
  nav.main-nav {
    /* `.site-header` has backdrop-filter, which makes it the containing block
       for this position:fixed element — so `bottom:0` resolved against the 65px
       header and collapsed the menu to ~24px. Use a viewport-relative height
       instead (works regardless of the containing block). */
    position: fixed; top: 64px; left: 0; right: 0;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    background: var(--bg); flex-direction: column; align-items: stretch;
    padding: 12px 16px; gap: 2px; overflow-y: auto;
    transform: translateY(-110%); transition: transform 0.25s ease;
  }
  nav.main-nav.open { transform: translateY(0); }
  nav.main-nav a { padding: 14px 12px; font-size: 1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .lang-switch {
    margin: 10px 0 0; padding: 14px 0 0; border-left: none; border-top: 1px solid var(--border);
  }
  .lang-switch a { border-bottom: none !important; padding: 8px 12px; }
}

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 18px;
  letter-spacing: -0.02em; font-weight: 800;
}
.hero .sub { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-dim); max-width: 680px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 10px; font-weight: 700; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #06111f; }
.btn-primary:hover { background: #6ba0ff; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #23304a; }
.btn-block { width: 100%; justify-content: center; }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 12px; font-weight: 800; }
.section-head p { color: var(--text-dim); margin: 0; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--accent-2); text-transform: uppercase; margin-bottom: 10px;
}

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 780px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { margin: 12px 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }
.icon-badge {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* Steps */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step .num {
  counter-increment: step; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--accent-2);
}
.step .body h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.step .body p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* Flow (compact horizontal) */
.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.flow .node {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 18px; font-weight: 600; font-size: 0.92rem;
}
.flow .arrow { color: var(--text-faint); font-size: 1.1rem; }

/* Pricing */
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column; gap: 18px; position: relative;
}
.plan.highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan .badge {
  position: absolute; top: -12px; right: 20px; background: var(--accent); color: #06111f;
  font-size: 0.72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.plan .plan-name { font-size: 1.3rem; font-weight: 800; }
.plan .plan-tagline { color: var(--text-dim); font-size: 0.88rem; }
.plan .plan-period { color: var(--text-dim); font-size: 0.88rem; font-weight: 600; }
.plan .plan-price { font-size: 1.6rem; font-weight: 800; color: var(--accent-2); }
.plan .plan-price.tbd { font-size: 1rem; color: var(--text-dim); font-weight: 600; }
.plan .plan-monthly { color: var(--text-dim); font-size: 0.85rem; }
.plan .plan-savings { color: var(--accent-2); font-size: 0.85rem; font-weight: 700; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { color: var(--text-dim); font-size: 0.92rem; padding-left: 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 800; }

/* Contact box */
.contact-box {
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; color: var(--text-dim); font-size: 0.92rem;
}

/* Tables */
table.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem; }
table.spec-table th, table.spec-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border);
}
table.spec-table th { color: var(--text-faint); font-weight: 600; width: 30%; }
table.spec-table td { color: var(--text); word-break: break-all; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sha { font-size: 0.82rem; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; display: block; word-break: break-all; }

/* Article / tutorial layout */
.article-meta { color: var(--text-faint); font-size: 0.88rem; margin-bottom: 24px; }
.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin: 24px 0;
}
.toc h2 { margin-top: 0; font-size: 1rem; }
.toc ol { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 0.92rem; }
.toc li { margin-bottom: 6px; }
.article-body h2 { font-size: 1.35rem; margin: 40px 0 14px; }
.article-body h3 { font-size: 1.1rem; margin: 26px 0 10px; }
.article-body p { color: var(--text-dim); margin: 0 0 14px; }
.article-body ul, .article-body ol { color: var(--text-dim); padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.callout {
  border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0;
  padding: 16px 20px; margin: 22px 0; font-size: 0.92rem; color: var(--text-dim);
}
.callout.warn { border-left-color: var(--accent-warn); }
.callout.danger {
  border-left-color: var(--accent-danger);
  background: rgba(255, 92, 92, 0.1);
  color: var(--text);
  font-weight: 700;
}
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-list a { font-weight: 600; }

/* Screenshot placeholder */
.shot-image {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.shot-placeholder {
  aspect-ratio: 16/9; width: 100%; border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 0.9rem; text-align: center; padding: 16px;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px; text-align: center;
}
.cta-banner h2 { margin: 0 0 10px; font-size: 1.5rem; }
.cta-banner p { color: var(--text-dim); margin: 0 0 24px; }

/* Footer */
footer.site-footer { border-top: 1px solid var(--border); padding: 44px 0 30px; background: var(--bg-alt); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 0.85rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 14px; }
.footer-grid a { display: block; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--text); }
.footer-support {
  color: var(--text-dim); font-size: 0.86rem; margin-bottom: 16px;
}
.footer-support a { color: var(--text-dim); text-decoration: underline; }
.footer-support a:hover { color: var(--text); }
.footer-disclaimer {
  border-top: 1px solid var(--border); padding-top: 20px; color: var(--text-faint); font-size: 0.82rem; line-height: 1.7;
}
.footer-bottom { margin-top: 16px; color: var(--text-faint); font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.badge-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.pill {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 0.82rem; color: var(--text-dim);
}

/* ------------------------------------------------------------------ */
/* Nav «产品» dropdown (zh nav only; markup carries real <a href> links) */
/* ------------------------------------------------------------------ */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-toggle {
  /* visually identical to nav.main-nav a */
  color: var(--text-dim); font: inherit; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
  background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active,
.nav-dropdown.open > .nav-dropdown-toggle {
  color: var(--text); background: var(--surface-2);
}
.nav-dropdown-caret { font-size: 0.7rem; line-height: 1; transition: transform 170ms ease; }
.nav-dropdown.open > .nav-dropdown-toggle .nav-dropdown-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 220px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 170ms ease, transform 170ms ease, visibility 170ms;
}
.nav-dropdown.open > .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-menu a.nav-dropdown-item {
  display: block; padding: 10px 12px; border-radius: 7px;
  color: var(--text-dim); font-size: 0.9rem; white-space: nowrap;
}
.nav-dropdown-menu a.nav-dropdown-item:hover {
  color: var(--text); background: var(--surface-2); text-decoration: none;
}
.nav-dropdown-menu a.nav-dropdown-item.active {
  color: var(--accent); background: var(--surface-2);
}

/* Desktop: hover also opens (pointer devices only) */
@media (min-width: 1201px) and (hover: hover) {
  .nav-dropdown:hover > .nav-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
  }
  .nav-dropdown:hover > .nav-dropdown-toggle .nav-dropdown-caret { transform: rotate(180deg); }
}

/* Mobile: «产品» becomes an inline collapsible group inside the hamburger menu */
@media (max-width: 1200px) {
  .nav-dropdown { display: block; }
  .nav-dropdown-toggle {
    width: 100%; justify-content: space-between;
    padding: 14px 12px; font-size: 1rem;
    border-bottom: 1px solid var(--border); border-radius: 0;
  }
  .nav-dropdown-menu {
    position: static; z-index: auto;
    opacity: 1; visibility: visible; transform: none;
    background: var(--bg-alt); border: 0; border-radius: 0;
    box-shadow: none; min-width: 0; padding: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 190ms ease;
  }
  .nav-dropdown.open > .nav-dropdown-menu { max-height: 60vh; }
  .nav-dropdown-menu a.nav-dropdown-item {
    padding: 13px 12px 13px 26px; font-size: 0.98rem;
    border-bottom: 1px solid var(--border); border-radius: 0;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown-menu, .nav-dropdown-caret { transition: none; }
}
