/* TabTin 官网共享样式 — 与 index.html 设计系统对齐 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
html.i18n-pending body { opacity: 0; }
html.i18n-switching body { opacity: 0.78; }
html:not(.i18n-pending) body { transition: opacity 160ms ease; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:root {
  /* 对齐 Electron 默认 blue 品牌色（globals.css data-color-scheme=blue, hsl 215 65% 52%） */
  --brand: #3478c4;
  --brand-deep: #2563a8;
  --brand-bright: #5294d9;
  --brand-soft: #9ec5e8;
  --brand-muted: #d4e6f5;
  --brand-rgb: 52, 120, 196;
  --brand-bright-rgb: 82, 148, 217;
  --accent-surface: #f3f8fd;
  --accent-surface-deep: #e8f2fa;
  --lime: var(--accent-surface);
  --lime-soft: var(--brand-soft);
  --paper: #ffffff;
  --paper-warm: #f6f9fc;
  --ink: #0A0A0A;
  --ink-72: rgba(10, 10, 10, 0.72);
  --ink-48: rgba(10, 10, 10, 0.48);
  --ink-24: rgba(10, 10, 10, 0.24);
  --cream: #ffffff;
  --font: "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --mono: "SF Mono", "JetBrains Mono", "Menlo", monospace;
  --shot-radius: 12px;
  --shot-border: 1px solid rgba(10, 10, 10, 0.06);
  --shot-shadow:
    0 2px 8px rgba(10, 10, 10, 0.04),
    0 16px 48px rgba(var(--brand-rgb), 0.07);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-x: clamp(22px, 5vw, 48px);
  --max: 1120px;
  --nav-h: 72px;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

html[lang="ja"] {
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  --font-serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
}
html[lang="ko"] {
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-serif: "AppleMyungjo", "Noto Serif KR", Georgia, serif;
}
html[lang="en"],
html[lang="fr"],
html[lang="de"] {
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

/* 日文标题同等字数的实际字面宽度更大；桌面端轻微收字，保持预设的两行节奏。 */
html[data-locale="ja"] .splash__title {
  font-size: clamp(46px, 4.25vw, 60px);
  letter-spacing: 0.005em;
}

html[data-locale="fr"] .splash__title {
  font-size: clamp(46px, 4.25vw, 60px);
}

/* 法文、德文按钮文案更长；桌面端给行动区留足一行宽度。 */
@media (min-width: 901px) {
  html[data-locale="fr"] .splash__copy,
  html[data-locale="de"] .splash__copy {
    width: min(760px, 72vw);
  }
}

@media (max-width: 900px) {
  html[data-locale="ja"] .splash__title,
  html[data-locale="fr"] .splash__title {
    font-size: clamp(30px, 8vw, 38px);
    letter-spacing: 0.03em;
  }
}

@media (max-width: 600px) {
  html[data-locale="ja"] .splash__title,
  html[data-locale="fr"] .splash__title {
    font-size: clamp(26px, 7.2vw, 32px);
    letter-spacing: 0.025em;
  }
}

@media (max-width: 340px) {
  html[data-locale="fr"] .splash__title {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  html .splash__actions-row {
    grid-template-columns: minmax(0, 1fr);
    max-width: 248px;
    margin-inline: auto;
  }

  html .splash__actions-row .pill {
    min-height: 42px;
  }
}

.canvas-bg {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 110% 85% at 0% 0%, rgba(var(--brand-rgb), 0.07), transparent 86%),
    radial-gradient(ellipse 95% 80% at 100% 100%, rgba(var(--brand-bright-rgb), 0.05), transparent 84%);
}

.dot-field {
  background-color: var(--accent-surface);
  background-image:
    radial-gradient(circle, rgba(var(--brand-rgb), 0.09) 0.8px, transparent 0.8px);
  background-size: 20px 20px;
}

.brand-mark { height: 24px; width: auto; flex-shrink: 0; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 24px; border-radius: 999px; font-size: 13px; font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--brand-bright) 0%, var(--brand) 100%);
  color: #fff;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  white-space: nowrap;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--brand-rgb), 0.28); }
.pill--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(10,10,10,0.22);
}
.pill--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pill--light { background: var(--cream); color: var(--ink); }

/* ── Nav ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s;
}
.nav--sub {
  position: sticky;
}
.nav--solid,
.nav--sub {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--ink-24);
}
.nav__row {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav__brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav__menu {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 32px);
}
.nav__links {
  display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px);
}
.nav__links a {
  font-size: 13px; font-weight: 500; color: var(--ink-72);
  transition: color 0.15s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); font-weight: 600; }

.locale-picker { position: relative; flex: 0 0 auto; }
.locale-picker__trigger {
  min-width: 62px; height: 36px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--ink-72); background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(10, 10, 10, 0.1); border-radius: 999px;
  font: 600 11px/1 var(--font); letter-spacing: 0.02em; cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.locale-picker__trigger:hover,
.locale-picker.is-open .locale-picker__trigger {
  color: var(--ink); border-color: rgba(10, 10, 10, 0.22); background: #fff;
}
.locale-picker__trigger svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.locale-picker__trigger i {
  width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg); transition: transform 150ms ease;
}
.locale-picker.is-open .locale-picker__trigger i { transform: translateY(1px) rotate(225deg); }
.locale-picker__menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 174px; padding: 7px;
  display: grid; gap: 2px; background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(10, 10, 10, 0.1); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(10, 10, 10, 0.14); backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transform: translateY(-5px) scale(0.98); transform-origin: 85% 0;
  transition: opacity 140ms ease, visibility 140ms ease, transform 140ms ease;
}
.locale-picker.is-open .locale-picker__menu { opacity: 1; visibility: visible; transform: none; }
.locale-picker__menu button {
  width: 100%; min-height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between;
  border: 0; border-radius: 9px; color: var(--ink-72); background: transparent;
  font: 500 12px/1.25 var(--font); text-align: left; cursor: pointer;
}
.locale-picker__menu button:hover,
.locale-picker__menu button:focus-visible { color: var(--ink); background: var(--accent-surface); outline: none; }
.locale-picker__menu button i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.locale-picker__menu button[aria-selected="true"] { color: var(--brand-deep); font-weight: 650; }
.locale-picker__menu button[aria-selected="true"] i { background: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.12); }

.nav__toggle {
  display: none;
  width: 40px; height: 40px; padding: 0; border: 0; background: transparent;
  cursor: pointer; margin-left: auto;
}
.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  display: block; width: 20px; height: 2px; background: var(--ink);
  border-radius: 1px; transition: transform 0.2s, opacity 0.2s;
}
.nav__toggle-bar { position: relative; margin: 0 auto; }
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: ""; position: absolute; left: 0;
}
.nav__toggle-bar::before { top: -6px; }
.nav__toggle-bar::after { top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 20px var(--pad-x) 28px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ink-24);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .nav.is-open .nav__menu {
    transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto;
  }
  .nav__links {
    flex-direction: column; align-items: flex-start; gap: 0;
    padding-bottom: 16px; margin-bottom: 16px;
    border-bottom: 1px solid var(--ink-24);
  }
  .nav__links a { display: block; padding: 10px 0; font-size: 15px; }
  .locale-picker { width: 100%; margin: 0 0 16px; align-self: stretch; }
  .locale-picker__menu {
    position: static; inset: auto; width: min(100%, 280px); max-height: 0;
    margin-top: 0; padding-block: 0; overflow: hidden;
    border-width: 0; box-shadow: none; transform: none;
    transition: max-height 180ms ease, margin 180ms ease, padding 180ms ease, opacity 140ms ease, visibility 140ms ease;
  }
  .locale-picker.is-open .locale-picker__menu {
    max-height: 320px; margin-top: 8px; padding-block: 7px; border-width: 1px;
  }
  .nav__menu .pill { align-self: flex-start; }
}

/* ── Footer ── */
.footer {
  padding: 56px var(--pad-x) 36px; background: var(--paper);
  border-top: 1px solid var(--ink-24);
}
.footer__grid {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer__tagline { margin-top: 12px; font-size: 13px; color: var(--ink-48); max-width: 220px; line-height: 1.55; }
.footer__links { display: flex; gap: 56px; }
.footer__col h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-48); margin-bottom: 14px;
}
.footer__col a { display: block; font-size: 13px; color: var(--ink-72); padding: 4px 0; }
.footer__col a:hover { color: var(--ink); }
.footer__ceo-note {
  margin-left: 0.35em; font-size: 12px; color: var(--ink-48); font-weight: 400;
}
.footer__legal {
  max-width: var(--max); margin: 36px auto 0; padding-top: 24px;
  border-top: 1px solid var(--ink-24);
  font-family: var(--mono); font-size: 11px; color: var(--ink-48);
}

/* ── Subpage shell ── */
.page-main { min-height: calc(100vh - var(--nav-h)); }

.page-hero {
  padding: clamp(48px, 8vh, 88px) var(--pad-x) clamp(32px, 5vh, 56px);
  text-align: center;
}
.page-hero--lime {
  background-color: var(--accent-surface);
  background-image:
    radial-gradient(ellipse 110% 85% at 0% 0%, rgba(var(--brand-rgb), 0.12), transparent 86%),
    radial-gradient(circle, rgba(var(--brand-rgb), 0.08) 0.8px, transparent 0.8px);
  background-size: auto, 20px 20px;
}
.page-hero__badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink); font-weight: 600;
  margin-bottom: 20px;
}
.page-hero__title {
  font-size: clamp(36px, 6vw, 64px); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.05;
  min-width: 0; max-width: 100%; overflow-wrap: anywhere;
}
.page-hero__sub {
  max-width: 560px; margin: 20px auto 0;
  font-size: clamp(15px, 1.8vw, 18px); line-height: 1.65; color: var(--ink-72);
}

.page-content {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--pad-x) clamp(64px, 10vh, 96px);
}

@media (max-width: 480px) {
  html[data-locale="de"] .page-hero__title {
    font-size: 27px;
  }
}

/* ── Policy / prose ── */
.prose-card {
  max-width: 780px; margin: 0 auto;
  padding: clamp(32px, 5vw, 48px);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--ink-24);
  box-shadow: 0 16px 48px rgba(10,10,10,0.06);
}
.prose-card__meta {
  margin-bottom: 28px; font-size: 14px; color: var(--ink-48);
}
.prose-card h2 {
  margin: 32px 0 12px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
}
.prose-card h2:first-of-type { margin-top: 0; }
.prose-card p, .prose-card li { color: var(--ink-72); font-size: 15px; line-height: 1.75; }
.prose-card p + p { margin-top: 12px; }
.prose-card ul { margin: 10px 0 0 1.2em; list-style: disc; }
.prose-card li + li { margin-top: 8px; }
.prose-card a {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ── Contact popover ── */
.contact-cta { position: relative; display: inline-block; }
.contact-cta__pop {
  position: absolute; right: 0; bottom: calc(100% + 12px);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  background: #fff; padding: 12px; border-radius: 8px;
  border: 1.5px solid var(--ink-24); box-shadow: 0 20px 48px rgba(10,10,10,0.16);
  z-index: 80; text-align: center; width: max-content; min-width: 168px;
}
.contact-cta__pop img {
  width: 168px; height: auto; max-width: none;
  aspect-ratio: 1; object-fit: contain; border-radius: 4px;
}
.contact-cta__pop-txt { display: block; margin-top: 8px; font-size: 11px; color: var(--ink-48); }
.contact-cta__trigger { border: none; font: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .contact-cta:hover .contact-cta__pop { opacity: 1; visibility: visible; transform: translateY(0); }
}
@media (hover: none) { .contact-cta__pop { display: none; } }

/* Contact QR modal (mobile tap + desktop click) */
.contact-qr-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.contact-qr-modal[hidden] { display: none; }
.contact-qr-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(10,10,10,0.52);
}
.contact-qr-modal__panel {
  position: relative; z-index: 1;
  background: #fff; border-radius: 12px;
  padding: 24px 20px 20px;
  border: 1.5px solid var(--ink-24);
  box-shadow: 0 24px 64px rgba(10,10,10,0.2);
  text-align: center; max-width: 280px; width: 100%;
}
.contact-qr-modal__panel img {
  width: 200px; height: 200px;
  object-fit: contain; border-radius: 6px;
}
.contact-qr-modal__hint {
  margin-top: 12px; font-size: 13px; color: var(--ink-72); line-height: 1.5;
}
.contact-qr-modal__hint--mobile {
  display: none;
  margin-top: 8px; font-size: 12px; color: var(--ink-48);
}
@media (hover: none) {
  .contact-qr-modal__hint--desktop { display: none; }
  .contact-qr-modal__hint--mobile { display: block; }
}
.contact-qr-modal__close {
  position: absolute; top: 6px; right: 8px;
  width: 32px; height: 32px; border: none; background: transparent;
  font-size: 22px; line-height: 1; color: var(--ink-48); cursor: pointer;
}
body.is-contact-qr-open { overflow: hidden; }

.screen-id {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-48);
}

@media (max-width: 720px) {
  html .footer__grid { flex-direction: column; }
  html .footer__grid > * { width: 100%; min-width: 0; max-width: 100%; }
  html .footer__links {
    width: 100%; min-width: 0; display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  }
  html .footer__col { min-width: 0; }
  html .footer__col a { overflow-wrap: anywhere; }
  html .footer__ceo-note { display: block; margin: 2px 0 0; line-height: 1.35; }
  html .cta__inner,
  html .cta__inner > *,
  html .cta__actions,
  html .cta__actions-row { min-width: 0; max-width: 100%; }
  html .cta__actions-row .pill {
    max-width: 100%; white-space: normal; text-align: center; line-height: 1.3;
  }
  html .cta__title,
  html .cta__title em { overflow-wrap: anywhere; word-break: break-word; }
  html .cta__actions-row .pill__badge { min-width: 0; flex-shrink: 1; }
  html .contact-cta__pop {
    left: 0; right: auto; width: max-content; max-width: calc(100vw - (var(--pad-x) * 2));
  }
  html .contact-cta__pop img { width: min(168px, 100%); max-width: 100%; }
}
