/* ============================================================
   A3SEO — shared styles for standalone content pages
   (about / terms / privacy / cookies)
   Reuses the design tokens + nav + footer look from index.html.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-2: #f5f5f5;
  --ink: #1e1e1e;
  --ink-2: #4a4a4a;
  --ink-3: #8a8a8a;
  --line: #e6e6e6;
  --line-2: #d4d4d4;
  --blue: #0d99ff;
  --purple: #9747ff;
  --pink: #ff24bd;
  --orange: #ff7262;
  --yellow: #ffcd29;
  --green: #14ae5c;
  --red: #f24822;
  --f: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}
html[lang="zh-Hans"] { --f: 'Inter', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
html[lang="zh-Hant"] { --f: 'Inter', 'Noto Sans TC', -apple-system, 'PingFang TC', 'Microsoft JhengHei', sans-serif; }

* { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, li, button { margin: 0; padding: 0; }
ul { list-style: none; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--f); -webkit-font-smoothing: antialiased; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; position: relative; }
@media (max-width: 720px) { .container { padding: 0 16px; } }

/* Top nav — Figma toolbar */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
@media (max-width: 720px) {
  .nav-bar { padding: 8px 12px; gap: 6px; justify-content: center; }
  .nav-bar .logo { display: none; }
  .nav-cta { display: none; }
}
.nav-bar .logo { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; }
.nav-bar .logo:hover { background: var(--bg-2); }
.nav-bar .logo { padding: 0 8px; }
.nav-bar .logo img { height: 56px; width: auto; image-rendering: -webkit-optimize-contrast; }
.nav-tabs { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-tab { padding: 6px 12px; font-size: 13px; color: var(--ink-2); text-decoration: none; border-radius: 6px; font-weight: 500; }
.nav-tab:hover { background: var(--bg-2); color: var(--ink); }
.nav-tools { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--bg-2); border-radius: 8px; margin-right: 8px; }
.tool { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }
.tool:hover { background: #fff; color: var(--ink); }
.tool.active { background: var(--blue); color: #fff; }
.avatars { display: flex; }
.avatars .avatar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; }
.nav-cta { padding: 8px 16px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 600; font-size: 13px; text-decoration: none; }
.nav-cta:hover { background: #0078ce; }
@media (max-width: 720px) { .nav-tabs, .nav-tools, .avatars { display: none; } }

/* Language switcher */
.lang-switch { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; margin-right: 8px; font-family: var(--f-mono); font-size: 11px; font-weight: 600; flex-shrink: 0; }
.lang-switch button { padding: 4px 10px; border-radius: 999px; border: none; background: transparent; color: var(--ink-2); cursor: pointer; font: inherit; line-height: 1; }
.lang-switch button:hover:not(.active) { color: var(--ink); }
.lang-switch button.active { background: var(--ink); color: #fff; }
@media (max-width: 720px) { .lang-switch { margin-right: 4px; padding: 2px; font-size: 10px; } .lang-switch button { padding: 4px 8px; } }

/* ── Page header ── */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-block; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.page-head .sub { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 640px; }
.page-head .updated { margin-top: 16px; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; }

/* ── Article / prose ── */
.article { padding: 48px 0 80px; }
.prose { max-width: 760px; color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1.3; margin: 44px 0 14px; scroll-margin-top: 90px; }
.prose h3 { color: var(--ink); font-size: 17px; font-weight: 600; margin: 28px 0 10px; }
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: #0078ce; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; padding-left: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose em { font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 12px 16px; text-align: left; }
.prose th { color: var(--ink); font-weight: 700; background: var(--bg-2); }
.prose .cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 14px 24px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; }
.prose .cta:hover { background: #0078ce; color: #fff; }

/* Language blocks: only the active language shows (toggled by legal.js). */
[data-lang-block] { display: none; }

/* Footer (verbatim from index.html) */
footer { padding: 60px 0 40px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col h5 { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 16px; font-family: var(--f-mono); }
.foot-col ul { list-style: none; }
.foot-col li { padding: 5px 0; }
.foot-col a { color: var(--ink-2); text-decoration: none; font-size: 13px; }
.foot-col a:hover { color: var(--ink); }
.foot-brand .logo img { height: 72px; width: auto; margin-bottom: 16px; image-rendering: -webkit-optimize-contrast; }
.foot-bottom { padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); flex-wrap: wrap; gap: 12px; font-family: var(--f-mono); letter-spacing: 0.05em; }

/* Mobile order: heading first, then visual, then CTA */
@media (max-width: 1024px) {
  .hero-grid > div:first-child { order: 1; }
  .hero-grid > div:nth-child(2) { order: 2; }
}

/* iPad-specific tweaks */
@media (min-width: 721px) and (max-width: 1024px) {
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-steps { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .flow-step { padding: 16px 12px; }
  .flow-step h4 { font-size: 15px; }
  .flow-step p { font-size: 12px; }
}

.foot-brand p { margin-top: 14px; font-size: 13px; color: var(--ink-3); max-width: 260px; line-height: 1.6; }

/* Live-page visibility overrides — mirrors index.html's injected styles
   (nav-tools / avatars hidden; language switch off-screen, auto-detect only) */
.avatars,.nav-tools,[data-i18n="hero.cta.secondary"]{display:none!important}
.lang-switch{position:fixed!important;left:-9999px!important;top:-9999px!important;opacity:0!important;pointer-events:auto!important;}

/* ── Contact page (uses site tokens; visual language = index.html cards/buttons) ── */
.contact-card { max-width: 640px; border: 1px solid var(--line); border-radius: 16px; padding: 32px; background: var(--bg); }
.contact-card .field { margin-bottom: 18px; }
.contact-card label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.contact-card input, .contact-card textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 8px;
  font: inherit; font-size: 14px; color: var(--ink); background: var(--bg);
}
.contact-card input:focus, .contact-card textarea:focus { outline: none; border-color: var(--blue); }
.contact-card textarea { min-height: 140px; resize: vertical; }
.contact-card .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .contact-card .field-row { grid-template-columns: 1fr; } }
.btn-submit { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border: none; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; font-family: var(--f); }
.btn-submit:hover { background: #0078ce; }
.contact-divider { display: flex; align-items: center; gap: 16px; margin: 28px 0 20px; color: var(--ink-3); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-divider::before, .contact-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.alt-contact { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.alt-contact:hover { border-color: var(--blue); color: var(--blue); }
.contact-success { display: none; text-align: center; padding: 28px 8px; }
.contact-success .mark { font-size: 28px; color: var(--green); margin-bottom: 12px; }
.contact-success h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.contact-success p { color: var(--ink-2); font-size: 14px; }
