/* Website stylesheet: Apple-led minimalism with Microsoft-style section flow.
   White and light-grey bands, large bold headlines, generous whitespace,
   rounded cards without heavy shadows, pill buttons, and one configurable
   accent colour (overridden inline by the server via --accent*). */

:root {
  --accent: #2f6bff;
  --accent-hover: #2850d9;
  --accent-ink: #ffffff;
  --accent-text: #2f6bff;
  --accent-soft: rgba(47, 107, 255, .1);
  --accent-border: rgba(47, 107, 255, .28);
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: #d2d2d7;
  --line-soft: rgba(0, 0, 0, .06);
  --card-bg: var(--bg-alt);
  --card-border: rgba(0, 0, 0, .04);
  --radius-card: 22px;
  --radius-pill: 980px;
  --container: 980px;
  --container-narrow: 720px;
  --header-h: 52px;
  /* Height of the bars above <main> (preview, announcement, header); site.js
     measures it, the fallbacks assume the header alone (two rows on phones). */
  --masthead-h: calc(var(--header-h) + 1px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; transition: color .18s ease, opacity .18s ease; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; 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: 14px; top: -56px; z-index: 120;
  padding: 9px 18px; border-radius: var(--radius-pill);
  background: var(--text); color: #ffffff; font-size: 14px; font-weight: 500;
}
.skip-link:focus { top: 10px; text-decoration: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--container-narrow); }

/* Preview and announcement bars */
.preview-banner {
  padding: 9px 24px; text-align: center; font-size: 13px; font-weight: 500;
  background: #1d1d1f; color: #f5f5f7;
}
.announcement {
  background: var(--bg-alt); border-bottom: 1px solid var(--line-soft);
  font-size: 13px; line-height: 1.5; text-align: center; color: var(--text);
}
.announcement__inner { max-width: var(--container); margin: 0 auto; padding: 10px 24px; }
.announcement__link { color: var(--accent-text); font-weight: 500; }
.announcement__link::after { content: " ›"; }

/* Sticky translucent header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .22s ease, background-color .22s ease;
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .88); border-bottom-color: rgba(0, 0, 0, .08); }
.site-header__inner {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--container); min-height: var(--header-h); margin: 0 auto; padding: 0 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; opacity: .84; }
.brand__logo { height: 26px; width: auto; object-fit: contain; }
.site-nav { flex: 1; min-width: 0; }
.site-nav__list { display: flex; justify-content: center; align-items: center; gap: 32px; margin: 0; padding: 0; list-style: none; }
.site-nav__link { display: inline-block; padding: 4px 0; color: var(--text); font-size: 14px; font-weight: 400; opacity: .78; white-space: nowrap; }
.site-nav__link:hover { opacity: 1; color: var(--text); text-decoration: none; }
.site-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; margin-left: auto; font-size: 14px; }
.site-actions__signin { color: var(--text); font-weight: 500; opacity: .86; white-space: nowrap; }
.site-actions__signin:hover { opacity: 1; color: var(--accent-text); text-decoration: none; }
.account-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 4px;
  border-radius: var(--radius-pill); background: var(--bg-alt); color: var(--text); font-weight: 500;
}
.account-link:hover { text-decoration: none; background: #ebebef; }
.account-link__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg); color: var(--text-2);
}
.account-link__avatar .icon { width: 16px; height: 16px; }

/* Pill buttons */
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 11px 28px; border-radius: var(--radius-pill);
  border: 1px solid transparent; font-size: 17px; font-weight: 500; line-height: 1.25;
  white-space: nowrap; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .14s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

/* Home bands: alternate pure white and Apple light grey (#f5f5f7) */
.section { padding: 108px 0; text-align: center; }
.site-home .site-main > .section:nth-of-type(even) {
  background: var(--bg-alt); --card-bg: var(--bg); --card-border: rgba(0, 0, 0, .05);
}
.section__header { max-width: 720px; margin: 0 auto 56px; }
.section__title {
  margin: 0; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.16;
  font-weight: 700; letter-spacing: -.02em; text-wrap: balance;
}
.section__subtitle {
  margin: 18px auto 0; max-width: 640px; font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65; color: var(--text-2); text-wrap: pretty;
}

/* Hero: when it opens the page it fills the first screen, content centred */
.section--hero { padding: 132px 0 120px; }
.site-main > .section--hero:first-child {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100vh - var(--masthead-h));
  min-height: calc(100svh - var(--masthead-h));
}
.hero__title {
  margin: 0 auto; max-width: 920px; font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.14; font-weight: 700; letter-spacing: -.026em; text-wrap: balance;
}
.hero__subtitle {
  margin: 24px auto 0; max-width: 660px; font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.68; color: var(--text-2); text-wrap: pretty;
}
.section--hero .actions { margin-top: 40px; }
.hero__next {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--text-3);
  transition: color .18s ease, background-color .18s ease;
}
.hero__next:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }

/* Products wall (Microsoft-inspired grid, Apple card finish) */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin: 0; padding: 0; list-style: none;
}
.product-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 26px 32px; border-radius: var(--radius-card);
  background: var(--card-bg); border: 1px solid var(--card-border);
  transition: transform .22s ease, border-color .22s ease;
}
.product-card:hover { transform: translateY(-2px); border-color: rgba(0, 0, 0, .12); }
.product-card__icon {
  width: 60px; height: 60px; border-radius: 16px; object-fit: contain;
  background: var(--bg); border: 1px solid rgba(0, 0, 0, .06); padding: 6px;
}
.product-card__icon--letter {
  display: flex; align-items: center; justify-content: center; padding: 0; border: none;
  background: var(--accent-soft); color: var(--accent-text); font-size: 26px; font-weight: 700;
}
.product-card__name { margin: 8px 0 0; font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.product-card__tagline { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.product-card__link { margin-top: auto; padding-top: 10px; font-size: 15px; font-weight: 500; color: var(--accent-text); }
.product-card__link::after { content: " ›"; display: inline-block; transition: transform .18s ease; }
.product-card__link:hover::after { transform: translateX(2px); }

/* Feature & security cards (2-up bento on desktop, 3-up for 3 or 6 items) */
.card-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; margin: 0; padding: 0; list-style: none; text-align: left;
}
.card-grid:has(> :nth-child(3):last-child),
.card-grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid:has(> :only-child) { grid-template-columns: minmax(0, 520px); justify-content: center; }
.card {
  display: flex; flex-direction: column; padding: 34px 32px;
  border-radius: var(--radius-card); background: var(--card-bg); border: 1px solid var(--card-border);
}
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text);
}
.card__icon .icon { width: 24px; height: 24px; }
.card__icon--image {
  width: 48px; height: 48px; padding: 8px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line-soft); object-fit: contain;
}
.card__title { margin: 22px 0 0; font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.card__body { margin: 10px 0 0; font-size: 16px; line-height: 1.72; color: var(--text-2); }

/* FAQ accordion (<details>) */
.faq { text-align: left; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__question {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px; font-size: 19px; font-weight: 600; line-height: 1.45;
  color: var(--text); cursor: pointer; list-style: none; transition: color .18s ease;
}
.faq__question:hover { color: var(--accent-text); }
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after {
  content: "+"; flex: none; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 300; font-size: 26px; line-height: 1; color: var(--text-2);
  transition: transform .24s ease, color .18s ease;
}
.faq__item[open] > .faq__question::after { transform: rotate(45deg); color: var(--text); }
.faq__answer { padding: 0 36px 24px 4px; font-size: 16px; line-height: 1.75; color: var(--text-2); }
.faq__item[open] > .faq__answer { animation: faqReveal .22s ease; }
@keyframes faqReveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.section--faq .actions { margin-top: 44px; }

/* Help center */
.section--page-header { padding: 88px 0 44px; }
.page-title {
  margin: 0; font-size: clamp(32px, 5vw, 48px); line-height: 1.15;
  font-weight: 700; letter-spacing: -.022em; text-wrap: balance;
}
.page-subtitle { margin: 16px auto 0; max-width: 640px; font-size: clamp(17px, 2vw, 20px); line-height: 1.65; color: var(--text-2); }
.help-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.help-nav__link {
  display: inline-flex; align-items: center; padding: 7px 16px; border-radius: var(--radius-pill);
  background: var(--bg-alt); color: var(--text); font-size: 14px; font-weight: 500;
}
.help-nav__link:hover { background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }
.section--help { padding: 20px 0 104px; text-align: left; }
.faq-group + .faq-group { margin-top: 64px; }
.faq-group__title { margin: 0 0 18px; font-size: 24px; font-weight: 700; letter-spacing: -.012em; }
.contact { margin-top: 64px; padding: 36px 34px; border-radius: var(--radius-card); background: var(--bg-alt); }
.contact__title { margin: 0 0 12px; font-size: 22px; font-weight: 700; }
.contact__text { margin: 0; white-space: pre-line; font-size: 16px; color: var(--text-2); }
.contact__list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 20px 0 0; font-size: 15px; }
.contact__list dt { color: var(--text-2); font-weight: 500; }
.contact__list dd { margin: 0; word-break: break-word; }

/* Legal and custom long-form pages */
.legal, .custom-page { padding: 84px 0 104px; }
.legal__header { margin-bottom: 44px; padding-bottom: 32px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.legal__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin: 20px 0 0; font-size: 13px; color: var(--text-2); }
.legal__version, .legal__date, .legal__pending {
  display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: var(--radius-pill); background: var(--bg-alt);
}
.legal__pending { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.legal__others { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; }
.legal__others-title { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.legal__others ul { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.custom-page .page-title { margin-bottom: 44px; text-align: center; }
.section--notfound { padding: 156px 0; }

/* Long-form Markdown typography */
.prose { text-align: left; font-size: 16px; line-height: 1.82; color: var(--text); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin: 44px 0 14px; font-size: 24px; font-weight: 700; line-height: 1.35; letter-spacing: -.012em; }
.prose h3 { margin: 32px 0 10px; font-size: 19px; font-weight: 600; line-height: 1.45; }
.prose h4, .prose h5, .prose h6 { margin: 24px 0 8px; font-size: 17px; font-weight: 600; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: 6px; }
.prose blockquote {
  padding: 16px 20px; border-radius: 12px; border-left: 3px solid var(--accent-border);
  background: var(--bg-alt); color: var(--text-2);
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose code {
  padding: .14em .42em; border-radius: 6px; background: var(--bg-alt);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .88em;
}
.prose pre { padding: 18px 20px; border-radius: 14px; background: var(--bg-alt); overflow-x: auto; line-height: 1.6; }
.prose pre code { padding: 0; background: none; }
.prose hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line); }
.prose img { height: auto; border-radius: 14px; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-alt); font-weight: 600; color: var(--text); white-space: nowrap; }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 13px; line-height: 1.65; }
.site-footer__inner { max-width: var(--container); margin: 0 auto; padding: 48px 24px 36px; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); }
.footer-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px 32px; }
.footer-group__title { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.footer-group__links, .footer-pages { margin: 0; padding: 0; list-style: none; }
.footer-group__links li + li { margin-top: 7px; }
.footer-pages { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.footer-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--text-3);
}
.footer-meta a { color: var(--text-3); }
.footer-meta a:hover { color: var(--text); }
.footer-psb { display: inline-flex; align-items: center; gap: 5px; }
.footer-psb__icon { display: inline-flex; color: var(--text-2); }
.footer-psb__icon .icon { width: 15px; height: 15px; }

/* Restrained scroll reveal (classes toggled by site.js; pure CSS stagger) */
.reveal-pending { opacity: 0; transform: translateY(18px); }
.reveal-pending.is-visible {
  opacity: 1; transform: none;
  transition: opacity .58s var(--ease-out), transform .58s var(--ease-out);
}
.reveal-pending.is-visible:nth-child(2) { transition-delay: .05s; }
.reveal-pending.is-visible:nth-child(3) { transition-delay: .1s; }
.reveal-pending.is-visible:nth-child(4) { transition-delay: .15s; }

/* First-screen hero entrance, played once on load: CSS only so the text never
   waits for site.js, keyframes end at the normal state, opacity and transform
   only (no layout shift); switched off with the other motion below. */
@keyframes heroRise { from { opacity: 0; transform: translateY(12px); } }
@keyframes heroFade { from { opacity: 0; } }
.site-main > .section--hero:first-child .hero__title,
.site-main > .section--hero:first-child .hero__subtitle,
.site-main > .section--hero:first-child .actions { animation: heroRise .62s var(--ease-out) both; }
.site-main > .section--hero:first-child .hero__subtitle { animation-delay: .08s; }
.site-main > .section--hero:first-child .actions { animation-delay: .16s; }
.hero__next { animation: heroFade .6s ease-out .3s both; }

/* Responsive down to 360px */
@media (max-width: 734px) {
  :root { --masthead-h: 104px; }
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .site-header__inner { flex-wrap: wrap; gap: 0 12px; padding: 0 20px; min-height: 52px; }
  .brand { min-height: 52px; font-size: 16px; }
  .site-actions { min-height: 52px; gap: 12px; }
  .site-nav {
    order: 3; flex-basis: 100%; margin: 0 -20px; padding: 0 20px;
    border-top: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav__list { justify-content: flex-start; gap: 22px; padding: 8px 0 10px; }
  .section { padding: 68px 0; }
  .section--hero { padding: 76px 0 68px; }
  .hero__next { bottom: 18px; }
  .section--page-header { padding: 56px 0 32px; }
  .section--help { padding: 12px 0 72px; }
  .section__header { margin-bottom: 36px; }
  .hero__title { font-size: clamp(32px, 8.8vw, 40px); }
  .section__title, .page-title { font-size: clamp(28px, 7.6vw, 36px); }
  .card-grid,
  .card-grid:has(> :nth-child(3):last-child),
  .card-grid:has(> :nth-child(6):last-child) { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 26px 22px; }
  .product-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-card { padding: 28px 22px; }
  .faq__question { font-size: 17px; padding: 18px 2px; }
  .faq__answer { padding: 0 4px 20px; }
  .contact { padding: 26px 22px; }
  .contact__list { grid-template-columns: 1fr; gap: 4px; }
  .contact__list dd { margin-bottom: 10px; }
  .legal, .custom-page { padding: 52px 0 68px; }
  .actions { flex-direction: column; align-items: stretch; margin-top: 28px; }
  .btn { width: 100%; }
  .site-footer__inner { padding: 36px 20px 28px; }
  .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
}
