:root {
  --bg: #f5f5f7;
  --bg-tint: #eef1f6;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #4b4b51;
  --ink-mute: #86868b;
  --blue: #4a90ff;
  --blue-deep: #2f6fe0;
  --blue-soft: #dce8ff;
  --line: #e3e3e8;
  --radius: 20px;
  --shadow: 0 12px 40px rgba(40, 60, 110, 0.10);
  --shadow-soft: 0 4px 18px rgba(40, 60, 110, 0.07);
  /* Latin core; each language appends its own CJK font below so a page never
     pulls glyphs from another language's font (which caused mixed weights —
     e.g. shared Han glyphs rendering bold via Hiragino on the Chinese page). */
  --font-latin: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", system-ui;
  --font: var(--font-latin), "PingFang SC", "Hiragino Sans",
    "Apple SD Gothic Neo", sans-serif;
}

/* Put the page language's own CJK font first so shared glyphs aren't
   hijacked by another locale's font. */
:lang(zh) {
  --font: var(--font-latin), "PingFang SC", "Microsoft YaHei", sans-serif;
}
:lang(ja) {
  --font: var(--font-latin), "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", sans-serif;
}
:lang(ko) {
  --font: var(--font-latin), "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 64px);
  background: rgba(245, 245, 247, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.nav__brand img { border-radius: 8px; }
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  color: var(--ink-soft);
}
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 14px; margin-left: 24px; }
/* Language menu — globe trigger + popover, scales cleanly to many languages */
.lang-menu { position: relative; }
.lang-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.lang-menu__btn:hover { color: var(--ink); background: rgba(0, 0, 0, 0.07); }
.lang-menu__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.lang-menu__globe { width: 16px; height: 16px; flex: none; }
.lang-menu__current { white-space: nowrap; }
.lang-menu__chev {
  width: 11px;
  height: 11px;
  flex: none;
  opacity: 0.55;
  transition: transform 0.2s ease;
}
.lang-menu.is-open .lang-menu__chev { transform: rotate(180deg); }

.lang-menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
}
.lang-menu.is-open .lang-menu__list {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.14s ease;
}
.lang-menu__item:hover,
.lang-menu__item:focus-visible { background: var(--bg-tint); outline: none; }
.lang-menu__item.is-active { font-weight: 500; }
.lang-menu__check {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--blue);
  opacity: 0;
}
.lang-menu__item.is-active .lang-menu__check { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .lang-menu__chev,
  .lang-menu__list { transition: none; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__right { margin-left: auto; }
  .lang-menu__current { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 16px;
  border-radius: 980px;
  padding: 13px 26px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn--small { font-size: 14px; padding: 8px 18px; min-width: 104px; background: var(--ink); color: #fff; }
.btn--small:hover { background: #000; }
.btn--primary {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(74, 144, 255, 0.35);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(74, 144, 255, 0.42); }
.btn--block { display: flex; width: 100%; margin-top: 6px; }

/* ===== Official Mac App Store badge =====
   Apple guidelines: use the unmodified official badge, min 40px tall onscreen,
   with clear space of at least 1/4 the badge height around it. Do not skew,
   recolor or animate the artwork itself — so the hover affects only the link. */
.mas-badge {
  display: inline-flex;
  padding: 10px; /* clear space: 1/4 of the 40px badge height */
  border-radius: 14px;
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.mas-badge img { display: block; height: 52px; width: auto; }
.mas-badge:hover { transform: translateY(-1px); opacity: 0.85; }
.mas-badge:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(64px, 11vw, 128px) 20px clamp(48px, 7vw, 80px);
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  max-width: 120vw;
  height: 560px;
  background: radial-gradient(ellipse at center, rgba(74, 144, 255, 0.22), transparent 62%);
  filter: blur(20px);
  z-index: 0;
}
.hero > *:not(.hero__glow) { position: relative; z-index: 1; }
.hero__icon {
  border-radius: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.hero__title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero__tagline {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  color: var(--ink);
  max-width: 660px;
  margin: 16px auto 0;
  letter-spacing: -0.01em;
}
.hero__sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--ink-soft);
  max-width: 600px;
  margin: 18px auto 0;
}
.hero__cta { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero__meta { font-size: 13px; color: var(--ink-mute); }

/* ===== Trust strip ===== */
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 4vw, 48px);
  padding: 28px 20px 8px;
  max-width: 720px;
  margin: 0 auto;
}
.strip__item { text-align: center; min-width: 0; }
.strip__item strong {
  display: block;
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 700;
  color: var(--blue-deep);
  letter-spacing: -0.02em;
}
.strip__item span { font-size: 14px; color: var(--ink-mute); }

/* ===== Screenshot gallery ===== */
.section--gallery {
  max-width: none;
  overflow: hidden; /* contain the full-bleed track */
}
.section--gallery > .section__title,
.section--gallery > .section__lead {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
.shots {
  position: relative;
  margin-top: 52px;
}
/* Soft edge fades hint that the row scrolls horizontally. */
.shots::before,
.shots::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(20px, 5vw, 64px);
  z-index: 2;
  pointer-events: none;
}
.shots::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.shots::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

.shots__track {
  list-style: none;
  display: flex;
  gap: clamp(16px, 2.5vw, 28px);
  /* Center the first/last card with the page content while allowing full bleed. */
  padding: 14px clamp(20px, calc((100vw - 1080px) / 2 + 20px), 50vw);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* momentum scrolling on iOS */
  overscroll-behavior-x: contain;
  scrollbar-width: none; /* Firefox */
  cursor: grab;
}
.shots__track::-webkit-scrollbar { display: none; } /* Safari/Chrome */
.shots__track.is-dragging { cursor: grabbing; }
/* While dragging, stop child clicks/selection from fighting the drag. */
.shots__track.is-dragging .shot__btn { cursor: grabbing; }
.shots__track.is-dragging img { pointer-events: none; user-select: none; }

.shot {
  flex: 0 0 auto;
  width: clamp(260px, 76vw, 720px);
}
.shot__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.shot__btn:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.shot__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.shot__btn img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2000 / 1250;
}

/* Round arrow controls, floating over the peeking edges (pointer devices). */
.shots__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}
.shots__nav:hover { background: #fff; }
.shots__nav:active { transform: translateY(-50%) scale(0.94); }
.shots__nav:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.shots__nav svg { width: 20px; height: 20px; }
.shots__nav--prev { left: clamp(8px, 2vw, 24px); }
.shots__nav--next { right: clamp(8px, 2vw, 24px); }
.shots__nav[disabled] { opacity: 0; pointer-events: none; }

@media (hover: none) {
  .shots__nav { display: none; } /* touch devices swipe instead */
}

/* ===== Lightbox (screenshot zoom) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 28, 0.74);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.lightbox__stage {
  position: relative;
  z-index: 1;
  display: flex;
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__img {
  display: block;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: clamp(12px, 1.4vw, 18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.24s ease;
}
.lightbox.is-open .lightbox__img { transform: scale(1); }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.18s ease, transform 0.18s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox__close:active,
.lightbox__nav:active { transform: scale(0.92); }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__close {
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  width: 44px;
  height: 44px;
}
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
}
.lightbox__nav:active { transform: translateY(-50%) scale(0.92); }
.lightbox__nav svg { width: 24px; height: 24px; }
.lightbox__nav--prev { left: clamp(10px, 3vw, 28px); }
.lightbox__nav--next { right: clamp(10px, 3vw, 28px); }

@media (max-width: 560px) {
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__img { max-width: 96vw; }
}

@media (prefers-reduced-motion: reduce) {
  .shot__btn,
  .shots__nav,
  .lightbox,
  .lightbox__img { transition: none; }
  .shots__track { scroll-behavior: auto; }
}

/* ===== Sections ===== */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 112px) clamp(20px, 5vw, 48px);
}
.section--tint {
  max-width: none;
  background: var(--bg-tint);
}
.section--tint > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.section__title {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}
.section__lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  text-align: center;
  max-width: 600px;
  margin: 16px auto 0;
}

/* ===== Feature grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 52px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--blue-soft), #eaf1ff);
  color: var(--blue-deep);
  margin-bottom: 18px;
  transition: transform 0.18s ease;
}
.card__icon svg { width: 24px; height: 24px; }
.card:hover .card__icon { transform: scale(1.06); }
.card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin-top: 10px; font-size: 15px; color: var(--ink-soft); }

/* ===== Hosts ===== */
.hosts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}
.hosts li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hosts li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.host__logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: none;
}
.host__sep {
  color: var(--line);
  font-weight: 400;
  margin: 0 -2px;
}

/* ===== Privacy pillars ===== */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 52px;
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: 1fr; }
}
.pillar {
  padding: 26px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar__head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
}
.pillar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--blue-soft), #eaf1ff);
  color: var(--blue-deep);
}
.pillar__icon svg { width: 21px; height: 21px; }
.pillar h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pillar p { font-size: 15px; color: var(--ink-soft); }
.pillar code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  background: var(--bg-tint);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ===== Legal / privacy page ===== */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 40px) 72px;
}
.legal__title {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.legal__updated { margin-top: 10px; color: var(--ink-mute); font-size: 14px; }
.legal__intro {
  margin-top: 24px;
  font-size: 18px;
  color: var(--ink-soft);
}
.legal h2 {
  margin-top: 44px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.legal p { margin-top: 12px; color: var(--ink-soft); }
.legal ul { margin: 12px 0 0 20px; color: var(--ink-soft); }
.legal li { margin-top: 8px; }
.legal a { color: var(--blue-deep); }
.legal a:hover { text-decoration: underline; }
.legal code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  background: var(--bg-tint);
  padding: 1px 6px;
  border-radius: 5px;
}
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 15px;
  color: var(--ink-soft);
}
.legal__back:hover { color: var(--ink); }

/* ===== Support page ===== */
.contact-card {
  margin-top: 28px;
  padding: 32px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.contact-card h2 { margin-top: 0; font-size: 20px; font-weight: 600; }
.contact-card p { margin-top: 8px; color: var(--ink-soft); }
.contact-card__email { color: var(--blue-deep); font-weight: 500; }
.contact-card__email:hover { text-decoration: underline; }
.contact-card__hint { margin-top: 14px; font-size: 14px; color: var(--ink-mute); }
.support-q { font-size: 18px; }

/* ===== Footer ===== */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 56px 20px 64px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 17px;
}
.footer__brand img { border-radius: 7px; }
.footer__links { display: flex; gap: 26px; font-size: 14px; color: var(--ink-soft); }
.footer__links a:hover { color: var(--ink); }
.footer__copy { font-size: 13px; color: var(--ink-mute); }
.footer__legal {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 560px;
  opacity: 0.8;
}
