/* InvoiceFlash — static marketing site (Firebase Hosting) */

:root {
  --bg: #f5f7fa;
  --bg-elevated: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-dark: #0058b0;
  --teal: #2db8a8;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --radius-lg: 20px;
  --radius-md: 12px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #0a84ff;
    --accent-dark: #409cff;
    --teal: #3dd9c5;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

html.zh body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.only-en,
.only-zh {
  display: none;
}

/* 强制互斥：避免其它样式提高优先级后两种语言同时露出 */
html:not(.zh) .only-zh {
  display: none !important;
}

html.zh .only-en {
  display: none !important;
}

/* 英文界面：展示 .only-en */
html:not(.zh) .only-en {
  display: inline;
}

html:not(.zh) p.only-en,
html:not(.zh) div.only-en,
html:not(.zh) .only-en.block {
  display: block;
}

/* 中文界面：展示 .only-zh */
html.zh .only-zh {
  display: inline;
}

html.zh p.only-zh,
html.zh div.only-zh,
html.zh .only-zh.block {
  display: block;
}

html:not(.zh) .audience-card .only-en,
html.zh .audience-card .only-zh {
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  z-index: 1000;
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

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

.logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--teal) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
}

.lang-toggle button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.btn-primary:active {
  transform: scale(0.98);
}

main {
  overflow-x: hidden;
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 72px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 auto 32px;
  max-width: 560px;
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}

.hero-visual {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px 24px 32px;
  text-align: left;
}

.invoice-preview {
  font-size: 14px;
}

.invoice-preview .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.invoice-preview .title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.invoice-preview .big {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.invoice-preview table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 13px;
}

.invoice-preview th {
  text-align: left;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.invoice-preview td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.invoice-preview .total-row td {
  border-bottom: none;
  font-weight: 700;
  font-size: 15px;
  padding-top: 16px;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-intro {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 14px;
}

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

.feature-card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.cta-band {
  margin: 24px 24px 64px;
  max-width: calc(var(--max) + 48px);
  margin-left: auto;
  margin-right: auto;
  padding: 40px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--bg)) 0%, color-mix(in srgb, var(--teal) 18%, var(--bg)) 100%);
  border: 1px solid var(--border);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.cta-band p {
  margin: 0 0 20px;
  color: var(--text-secondary);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px 40px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  margin-bottom: 16px;
}

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

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

.footer-note {
  margin: 0;
  font-size: 13px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 500;
  justify-content: center;
  flex: 1 1 200px;
  max-width: 100%;
}

@media (max-width: 640px) {
  .header-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    padding-top: 4px;
    border-top: 1px solid var(--border);
  }
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

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

.section-alt {
  background: color-mix(in srgb, var(--bg-elevated) 65%, var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  text-align: center;
  padding: 20px 16px;
}

.step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--teal) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: grid;
  place-items: center;
}

.step p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}

.audience-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 15px;
  color: var(--text-secondary);
}

.audience-card strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 1rem;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  margin-bottom: 12px;
  padding: 0 16px;
  box-shadow: var(--shadow);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list details[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.faq-list .faq-body {
  padding-bottom: 16px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.faq-list .faq-body p {
  margin: 0 0 10px;
}

.faq-list .faq-body p:last-child {
  margin-bottom: 0;
}

.seo-block {
  max-width: 640px;
  margin: 0 auto;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.seo-block p {
  margin: 0 0 12px;
}

.seo-block p:last-child {
  margin-bottom: 0;
}
