:root {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #f5f5f7;
  --surface-raised: #ffffff;
  --ink: #1d1d1f;
  --ink-secondary: #6e6e73;
  --ink-tertiary: #86868b;
  --blue: #0066cc;
  --blue-cta: #0071e3;
  --blue-cta-hover: #0077ed;
  --blue-soft: rgba(0, 113, 227, 0.08);
  --hairline: rgba(0, 0, 0, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Layout */
  --content: 980px;
  --content-wide: 1080px;
  --pad: 24px;
  --section-y: 100px;
  --section-gap: 48px;
  --nav-h: 48px;

  /* Type */
  --text-hero: clamp(40px, 5.5vw, 56px);
  --text-display: clamp(32px, 4.2vw, 40px);
  --text-title: 21px;
  --text-headline: 19px;
  --text-body: 17px;
  --text-callout: 14px;
  --text-caption: 12px;
  --leading-hero: 1.1;
  --leading-display: 1.15;
  --leading-body: 1.47059;
  --leading-tight: 1.29;
  --tracking-hero: -0.02em;
  --tracking-display: -0.016em;
  --tracking-body: -0.022em;
  --tracking-caption: -0.01em;

  /* Space scale (8pt) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 48px;
  --s-10: 64px;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-card: 20px;
  --radius-stage: 28px;
  --radius-pill: 980px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  text-wrap: balance;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}

.nowrap { white-space: nowrap; }

/* Forced breaks only on desktop; mobile reflows as continuous text */
.title-break,
.lead-break {
  display: inline;
}

@media (min-width: 735px) {
  .title-break { display: block; }
  .lead-break { display: block; }
  .lead-break + .lead-break { margin-top: 0.2em; }
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--blue-cta);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: min(var(--content), calc(100% - (var(--pad) * 2)));
  max-width: 100%;
  margin-inline: auto;
}

.shell-wide {
  width: min(var(--content-wide), calc(100% - (var(--pad) * 2)));
  max-width: 100%;
  margin-inline: auto;
}

/* ——— Type primitives ——— */
.eyebrow {
  margin: 0 0 20px;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.333;
  letter-spacing: 0.06em;
}

.section {
  padding: var(--section-y) 0;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section-head {
  max-width: 620px;
  margin: 0 auto var(--section-gap);
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: var(--text-display);
  font-weight: 600;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

.section-head p:not(.eyebrow) {
  margin: var(--s-5) 0 0;
  color: var(--ink-secondary);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
}

.section-head .eyebrow {
  margin: 0 0 20px;
}

/* ——— Icons ——— */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  display: block;
  stroke: currentColor;
  fill: none;
}

.icon-sm { width: 14px; height: 14px; }

.value-icon,
.section-icon,
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-soft);
  color: var(--blue-cta);
}

.value-icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--s-4);
  border-radius: var(--radius-sm);
}

.value-icon .icon { width: 20px; height: 20px; }

.value-icon-pair {
  gap: 8px;
  width: auto;
  min-width: 44px;
  padding: 0 12px;
}

.value-icon-pair .icon { width: 18px; height: 18px; }

.map-icon {
  width: 24px;
  height: 24px;
  margin: 0 auto var(--s-3);
  color: var(--blue-cta);
}

.section-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--s-5);
  border-radius: 12px;
}

.section-icon .icon { width: 22px; height: 22px; }

.step-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
}

.step-icon .icon { width: 17px; height: 17px; }

/* ——— Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.nav-wrap {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover { text-decoration: none; opacity: 0.88; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.nav-links {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--s-7);
}

.nav-links a {
  color: #1d1d1f;
  font-size: var(--text-caption);
  font-weight: 400;
  letter-spacing: var(--tracking-caption);
  text-decoration: none;
  opacity: 0.8;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
  opacity: 1;
}

.nav-links a.btn-primary {
  color: #fff;
  opacity: 1;
}

.nav-links a.btn-primary:hover {
  color: #fff;
  background: var(--blue-cta-hover);
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.17648;
  letter-spacing: var(--tracking-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { text-decoration: none; }
.btn .icon { width: 17px; height: 17px; }

.btn-primary {
  color: #fff;
  background: var(--blue-cta);
}

.btn-primary:hover { background: var(--blue-cta-hover); }

.btn-nav {
  min-height: 28px;
  padding: 5px 14px;
  gap: 6px;
  font-size: var(--text-caption);
  font-weight: 400;
}

.btn-nav .icon { width: 13px; height: 13px; }

.btn-link {
  min-height: auto;
  padding: 0;
  color: var(--blue);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: var(--text-body);
}

.btn-link:hover { text-decoration: underline; }
.btn-link .chevron { margin-left: 2px; }

/* ——— Hero ——— */
.hero {
  padding: var(--s-10) 0 var(--s-8);
}

.hero-copy {
  max-width: 720px;
  margin: 0 auto var(--s-9);
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: var(--leading-hero);
  letter-spacing: var(--tracking-hero);
}

.hero-lead {
  max-width: 540px;
  margin: var(--s-6) auto 0;
  color: var(--ink-secondary);
  font-size: clamp(17px, 1.8vw, 19px);
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: 0.004em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-5) var(--s-7);
  margin-top: var(--s-7);
}

.product-stage {
  position: relative;
  width: min(960px, 100%);
  max-width: 100%;
  margin: 0 auto;
  min-height: clamp(300px, 48vw, 520px);
  padding: var(--s-8) var(--s-6) var(--s-5);
  border-radius: var(--radius-stage);
  background: var(--surface);
  overflow: hidden;
}

.product-shot-mac {
  width: 84%;
  max-width: 100%;
  margin-left: auto;
  margin-right: 0;
}

.product-shot-ipad {
  position: absolute;
  left: 2%;
  bottom: 4%;
  width: 54%;
  max-width: 100%;
}

/* ——— Values ——— */
.values {
  padding: var(--s-8) 0 var(--s-2);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}

.value-item {
  padding: var(--s-6);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.value-item h3 {
  margin: 0 0 var(--s-2);
  font-size: var(--text-headline);
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.25;
}

.value-item p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: var(--text-callout);
  line-height: 1.45;
  letter-spacing: -0.012em;
}

/* ——— Connection ——— */
.connection-panel {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--s-8) var(--s-7);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.connection-map {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-5);
}

.map-device {
  min-height: 108px;
  display: grid;
  place-content: center;
  padding: var(--s-5) var(--s-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-raised);
  text-align: center;
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.map-device span {
  display: block;
  margin-top: var(--s-2);
  color: var(--ink-tertiary);
  font-size: var(--text-caption);
  font-weight: 400;
  letter-spacing: var(--tracking-caption);
}

.map-line {
  width: 48px;
  height: 1px;
  background: var(--hairline);
}

/* ——— Gestures ——— */
.gesture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}

.gesture-card {
  padding: var(--s-6) var(--s-6) var(--s-5);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.gesture-card-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.gesture-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-cta);
  color: #fff;
  font-size: var(--text-callout);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.gesture-card h3 {
  margin: 0;
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: var(--tracking-display);
  line-height: 1.2;
}

.gesture-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gesture-list li {
  display: grid;
  gap: 3px;
  padding: var(--s-4) 0;
  border-top: 1px solid var(--hairline);
}

.gesture-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.gesture-list li:last-child {
  padding-bottom: 0;
}

.gesture-list strong {
  display: block;
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: var(--tracking-body);
  line-height: 1.3;
}

.gesture-list span {
  display: block;
  color: var(--ink-secondary);
  font-size: var(--text-callout);
  line-height: 1.45;
  letter-spacing: -0.012em;
  word-break: keep-all;
  line-break: strict;
}

.gesture-tip {
  max-width: 580px;
  margin: var(--s-7) auto 0;
  color: var(--ink-tertiary);
  font-size: var(--text-callout);
  line-height: 1.45;
  letter-spacing: -0.012em;
  text-align: center;
  word-break: keep-all;
  line-break: strict;
}

/* ——— Privacy ——— */
.privacy {
  background: var(--surface);
}

.privacy .section-head {
  margin-bottom: 0;
}

/* ——— Guide ——— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 0 var(--s-7) 0 0;
}

.steps li + li {
  border-left: 1px solid var(--hairline);
  padding-left: var(--s-7);
  padding-right: 0;
}

.steps li::before { display: none; }

.step-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.step-num {
  display: block;
  margin: 0;
  color: var(--ink-tertiary);
  font-size: var(--text-callout);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.steps h3 {
  margin: 0 0 var(--s-3);
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: var(--tracking-display);
  line-height: 1.25;
}

.steps p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: var(--text-callout);
  line-height: 1.5;
  letter-spacing: -0.012em;
}

/* ——— Download ——— */
.download {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
}

.download-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.download-steps li {
  padding: 0 var(--s-7) 0 0;
}

.download-steps li + li {
  border-left: 1px solid var(--hairline);
  padding-left: var(--s-7);
  padding-right: 0;
}

.download-steps h3 {
  margin: 0 0 var(--s-3);
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: var(--tracking-display);
  line-height: 1.25;
}

.download-steps p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: var(--text-callout);
  line-height: 1.5;
  letter-spacing: -0.012em;
}

.download-action {
  margin-top: var(--s-9);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  text-align: center;
}

.download-action .btn-primary {
  min-width: 200px;
}

.download-note {
  display: block;
  margin: 0;
  color: var(--ink-tertiary);
  font-size: var(--text-caption);
  line-height: 1.4;
  letter-spacing: var(--tracking-caption);
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
  padding: var(--s-7) 0 var(--s-9);
}

.footer-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5) var(--s-7);
}

.footer-brand {
  color: var(--ink);
  font-size: var(--text-caption);
  font-weight: 600;
}

.footer-copy {
  margin-top: var(--s-2);
  color: var(--ink-tertiary);
  font-size: var(--text-caption);
  line-height: 1.4;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
}

.footer-links a {
  color: var(--ink-secondary);
  font-size: var(--text-caption);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ——— Responsive ——— */
@media (max-width: 1068px) {
  :root {
    --section-y: 84px;
    --section-gap: 40px;
    --pad: 22px;
  }

  .product-stage {
    min-height: clamp(280px, 52vw, 440px);
  }
}

@media (max-width: 734px) {
  :root {
    --pad: 16px;
    --section-y: 72px;
    --section-gap: 32px;
    --text-hero: clamp(32px, 8.2vw, 38px);
    --text-display: clamp(26px, 6.5vw, 32px);
    --nav-h: 48px;
  }

  .nav-links a[data-i18n="nav.features"],
  .nav-links a[data-i18n="nav.support"] {
    display: none;
  }

  .nav-links { gap: var(--s-3); }
  .brand { font-size: 15px; gap: 8px; }
  .brand img { width: 24px; height: 24px; }

  @media (max-width: 360px) {
    .nav-links a[data-i18n="nav.guide"] { display: none; }
    .brand span,
    .brand {
      font-size: 14px;
    }
  }

  .hero { padding: var(--s-8) 0 var(--s-6); }
  .hero-copy {
    margin-bottom: var(--s-7);
    max-width: 100%;
    padding-inline: 0;
    text-align: left;
  }
  .hero h1 {
    max-width: 100%;
    text-wrap: pretty;
  }
  .hero-lead {
    font-size: 16px;
    line-height: 1.5;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    text-wrap: pretty;
    overflow-wrap: normal;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--s-4);
    width: 100%;
  }
  .hero-actions .btn-primary {
    width: 100%;
    max-width: none;
  }

  .product-stage {
    min-height: 0;
    padding: var(--s-5) var(--s-3) var(--s-4);
    border-radius: 22px;
  }
  .product-shot-mac {
    width: 100%;
    margin-inline: auto;
  }
  .product-shot-ipad {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(58%, 200px);
    margin: -18% auto 0;
    display: block;
  }

  .values { padding-top: var(--s-6); }
  .values-grid {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .value-item { min-width: 0; }

  .section-head {
    text-align: left;
    max-width: 100%;
  }
  .section-icon { margin-left: 0; margin-right: auto; }

  .connection-panel {
    padding: var(--s-6) var(--s-5);
    max-width: 100%;
  }
  .connection-map {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .map-line {
    width: 1px;
    height: 24px;
    margin-inline: auto;
  }

  .gesture-grid,
  .steps {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .gesture-card { min-width: 0; }

  .gesture-tip { text-align: left; margin-top: var(--s-5); }

  .steps li,
  .steps li + li {
    border-left: 0;
    padding: 0;
    min-width: 0;
  }

  .steps li + li {
    padding-top: var(--s-6);
    border-top: 1px solid var(--hairline);
  }

  .download-steps {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }

  .download-steps li,
  .download-steps li + li {
    border-left: 0;
    padding: 0;
    min-width: 0;
  }

  .download-steps li + li {
    padding-top: var(--s-6);
    border-top: 1px solid var(--hairline);
  }

  .download-action { align-items: stretch; }
  .download-action .btn-primary {
    width: 100%;
    min-width: 0;
  }

  .site-footer .footer-wrap { flex-direction: column; }
}

html.i18n-pending body {
  visibility: hidden;
}

.lang-switch {
  color: #1d1d1f;
  font-size: var(--text-caption);
  font-weight: 400;
  letter-spacing: var(--tracking-caption);
  text-decoration: none;
  opacity: 0.8;
  white-space: nowrap;
}

.lang-switch:hover {
  opacity: 1;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; }
}
