/* 乐道译官网 — tokens follow flutter/lib/src/theme/app_theme.dart (light) and DESIGN.md (dark). */

:root {
  color-scheme: light;
  --page: #f9fafc;
  --card: #ffffff;
  --sunken: #f0f4f7;
  --ink: #1a212b;
  --ink-soft: #49515b;
  --muted: #69717b;
  --border: #dee2e6;
  --border-soft: #eaedf0;
  --brand: #006a9b;
  --brand-hover: #01538c;
  --brand-wash: #e6f7fe;
  --on-brand: #ffffff;
  --accent: #007756;
  --accent-wash: #e6f9f1;
  --danger: #c72d31;
  --navy: #063d66;
  --navy-ink: #ffffff;
  --navy-soft: rgb(255 255 255 / 0.78);
  --focus: #006a9b;

  /* The phone mock always renders the app's light theme. */
  --app-page: #f9fafc;
  --app-card: #ffffff;
  --app-ink: #1a212b;
  --app-soft: #49515b;
  --app-muted: #69717b;
  --app-border: #dee2e6;
  --app-brand: #006a9b;
  --app-brand-wash: #e6f7fe;
  --app-accent: #007756;
  --app-danger: #c72d31;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --shadow-float: 0 24px 60px rgb(18 33 52 / 0.16), 0 4px 14px rgb(18 33 52 / 0.08);
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0e1621;
    --card: #151f2b;
    --sunken: #121b26;
    --ink: #eef3f8;
    --ink-soft: #c3ccd6;
    --muted: #98a3b0;
    --border: #2b3846;
    --border-soft: #223040;
    --brand: #3cb8dc;
    --brand-hover: #67c9e6;
    --brand-wash: #10303f;
    --on-brand: #0b1520;
    --accent: #7ed9a4;
    --accent-wash: #113526;
    --danger: #f0726c;
    --navy: #0f2d47;
    --navy-ink: #eef3f8;
    --navy-soft: rgb(238 243 248 / 0.76);
    --focus: #67c9e6;
    --shadow-float: 0 24px 60px rgb(0 0 0 / 0.45), 0 4px 14px rgb(0 0 0 / 0.3);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-hover);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus {
  outline: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite {
  position: absolute;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon .fill,
.icon--store {
  fill: currentColor;
  stroke: none;
}

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

.icon--xs {
  width: 15px;
  height: 15px;
}

.icon--lg {
  width: 24px;
  height: 24px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.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: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 650;
  text-decoration: none;
  transition: top 160ms var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: var(--on-brand);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 650;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease);
}

.button--primary {
  background: var(--brand);
  color: var(--on-brand);
}

.button--primary:hover {
  background: var(--brand-hover);
  color: var(--on-brand);
}

.button--ghost {
  border-color: var(--border);
  background: var(--card);
  color: var(--ink);
}

.button--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 9px 20px 9px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--page);
  text-decoration: none;
  line-height: 1.2;
  font-weight: 650;
  font-size: 1rem;
  transition:
    background-color 180ms var(--ease),
    transform 180ms var(--ease);
}

.store-button:hover {
  color: var(--page);
  background: color-mix(in srgb, var(--ink) 86%, var(--brand));
}

.store-button:active {
  transform: translateY(1px);
}

.store-button span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-button small {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.78;
}

.icon--store {
  width: 24px;
  height: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.text-link .icon {
  transition: transform 180ms var(--ease);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--page);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand__logo {
  border-radius: 9px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 1.125rem;
  font-weight: 720;
  letter-spacing: 0.02em;
}

.brand__en {
  font-size: 0.6875rem;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.site-nav a:not(.button):hover {
  color: var(--ink);
}

.site-nav a.is-active:not(.button) {
  color: var(--brand);
}

.site-nav__cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(28px, 5vw, 64px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 650;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.75rem, 6.4vw, 5rem);
  line-height: 1.08;
  font-weight: 780;
  letter-spacing: -0.01em;
}

.hero__lead {
  max-width: 34em;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.7;
}

.hero .store-row {
  margin-top: 32px;
}

.hero .text-link {
  margin-top: 14px;
}

.hero__demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Phone mock */

.demo {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.phone {
  width: min(340px, 100%);
  padding: 10px;
  border-radius: 46px;
  background: #121821;
  box-shadow: var(--shadow-float);
}

.phone__screen {
  display: flex;
  flex-direction: column;
  height: 600px;
  overflow: hidden;
  border-radius: 37px;
  background: var(--app-page);
  color: var(--app-ink);
}

.phone__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 26px 4px;
  font-size: 0.8125rem;
  font-weight: 650;
}

.phone__status-icons {
  display: inline-flex;
  gap: 4px;
}

.phone__status-icons i {
  display: block;
  width: 14px;
  height: 8px;
  border-radius: 2px;
  background: var(--app-ink);
  opacity: 0.8;
}

.phone__status-icons i:last-child {
  width: 20px;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 8px;
}

.app-bar img {
  border-radius: 7px;
}

.app-bar strong {
  font-size: 1rem;
  font-weight: 720;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--app-brand-wash);
  color: var(--app-brand);
  font-size: 0.75rem;
  font-weight: 650;
}

.live-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.direction-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 16px 10px;
  padding: 10px 14px;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  background: var(--app-card);
  color: var(--app-soft);
  font-size: 0.875rem;
  font-weight: 650;
}

.direction-bar .icon {
  color: var(--app-muted);
}

.direction-bar__target {
  color: var(--app-brand);
}

.transcript {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  margin: 0;
  padding: 6px 18px 12px;
  list-style: none;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
}

.line {
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: line-in 260ms var(--ease) both;
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.line__src {
  color: var(--app-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.line__dst {
  color: var(--app-accent);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.45;
}

.line.is-partial .line__src {
  color: var(--app-muted);
}

.line.is-partial .line__src::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--app-brand);
  animation: caret 1s steps(1) infinite;
}

.line__state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--app-muted);
  font-size: 0.6875rem;
  font-weight: 650;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.dock {
  padding: 10px 16px 18px;
  border-top: 1px solid var(--app-border);
  background: var(--app-card);
}

.dock__usage {
  color: var(--app-muted);
  font-size: 0.75rem;
  text-align: center;
}

.dock__usage b {
  color: var(--app-ink);
  font-weight: 650;
}

.dock__actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.dock__mute,
.dock__stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: var(--radius-md);
}

.dock__mute {
  width: 46px;
  flex: none;
  background: var(--app-page);
  border: 1px solid var(--app-border);
  color: var(--app-soft);
}

.dock__stop {
  flex: 1;
  gap: 8px;
  background: var(--app-danger);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 650;
}

.dock__stop .icon {
  fill: currentColor;
  stroke: none;
}

/* Scenes */

.scenes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(560px, 100%);
}

.scene {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms var(--ease),
    background-color 180ms var(--ease);
}

.scene b {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink);
}

.scene span {
  font-size: 0.75rem;
  color: var(--muted);
}

.scene:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
}

.scene[aria-selected="true"] {
  border-color: var(--brand);
  background: var(--brand-wash);
}

.scene[aria-selected="true"] span {
  color: var(--brand);
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(48px, 7vw, 88px) 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats > div {
  padding: 22px 24px;
}

.stats > div + div {
  border-left: 1px solid var(--border);
}

.stats dt {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.stats dd {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}

.stats dd small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.stats dd .tabular {
  font-size: 2.25rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-right: 2px;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section--tight {
  padding-top: 0;
}

.section--sunken {
  background: var(--sunken);
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2,
.features__head h2,
.faq__head h2 {
  margin-top: 10px;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  font-weight: 750;
}

.section-head > p,
.section-head--split > p,
.features__head > p,
.faq__head > p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  max-width: 36em;
}

.section-head--split {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.section-head--split > p {
  max-width: 30em;
  margin-top: 0;
}

.kicker {
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 2px solid var(--border);
}

.step:first-child {
  border-top-color: var(--brand);
}

.step__num {
  display: block;
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 750;
}

.step h3 {
  margin-top: 10px;
  font-size: 1.375rem;
  font-weight: 700;
}

.step p {
  margin-top: 10px;
  color: var(--ink-soft);
}

/* Features */

.features {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.features__head {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 26px 0 30px;
  border-top: 1px solid var(--border);
}

.feature-list__icon {
  width: 26px;
  height: 26px;
  color: var(--brand);
}

.feature-list h3 {
  margin-top: 14px;
  font-size: 1.125rem;
  font-weight: 680;
}

.feature-list p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.9688rem;
}

/* Languages */

.lang-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}

.segmented button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.segmented button[aria-checked="true"] {
  background: var(--brand);
  color: var(--on-brand);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 340px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--muted);
  transition: border-color 160ms var(--ease);
}

.search:focus-within {
  border-color: var(--brand);
  outline: 2px solid color-mix(in srgb, var(--brand) 25%, transparent);
  outline-offset: 0;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.search input:focus {
  outline: none;
}

.search input::placeholder {
  color: var(--muted);
}

.lang-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 20px;
}

.lang-legend__note {
  color: var(--muted);
  font-size: 0.8125rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--audio {
  border-color: transparent;
  background: var(--accent-wash);
  color: var(--accent);
}

.lang-results {
  margin-top: 28px;
  display: grid;
  gap: 28px;
}

.lang-group__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.lang-group__head h3 {
  font-size: 1.0625rem;
  font-weight: 680;
}

.lang-group__head span {
  color: var(--muted);
  font-size: 0.875rem;
}

.lang-group__desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.lang-more {
  margin-top: 14px;
}

.lang-subhead {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 650;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.lang-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--card);
}

.lang-item__name {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.lang-item__name b {
  font-size: 0.9375rem;
  font-weight: 620;
}

.lang-item__name small {
  color: var(--muted);
  font-size: 0.75rem;
}

.lang-item .badge {
  padding: 2px 7px;
}

.lang-item mark {
  background: var(--brand-wash);
  color: inherit;
  border-radius: 3px;
}

.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.lang-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--card);
  line-height: 1.3;
}

.lang-chip b {
  font-size: 0.9375rem;
  font-weight: 620;
}

.lang-chip small {
  color: var(--muted);
  font-size: 0.75rem;
}

.lang-chip mark {
  background: var(--brand-wash);
  color: inherit;
  border-radius: 3px;
}

.lang-pairs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.lang-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--card);
  font-weight: 650;
}

.lang-pair .icon {
  color: var(--brand);
}

.lang-empty {
  padding: 32px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  text-align: center;
}

.fine-print {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Devices */

.devices {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.device {
  display: flex;
  gap: 24px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.device--phone {
  grid-column: span 4;
  align-items: center;
  justify-content: space-between;
}

.device--watch {
  grid-column: span 2;
  flex-direction: column;
}

.device--web {
  grid-column: span 3;
  flex-direction: column-reverse;
  justify-content: flex-end;
}

.device--mac {
  grid-column: span 3;
  flex-direction: column;
  justify-content: space-between;
  background: var(--sunken);
}

.device__copy {
  max-width: 34em;
}

.device__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
}

.device h3 {
  margin-top: 8px;
  font-size: 1.375rem;
  font-weight: 700;
}

.device__copy > p:not(.device__tag) {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9688rem;
}

.device__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 14px;
}

.device__links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-weight: 650;
  text-decoration: none;
}

.soon {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand);
  font-size: 0.75rem;
}

/* mini app home */
.mini-home {
  flex: none;
  width: 236px;
  padding: 16px 14px 20px;
  border: 1px solid var(--app-border);
  border-radius: 22px;
  background: var(--app-page);
  color: var(--app-ink);
  text-align: center;
}

.mini-home__dir {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  background: var(--app-card);
}

.mini-home__dir span {
  display: flex;
  flex-direction: column;
  font-size: 1.0625rem;
  font-weight: 720;
  line-height: 1.25;
}

.mini-home__dir small {
  color: var(--app-muted);
  font-size: 0.6875rem;
  font-weight: 500;
}

.mini-home__dir b {
  color: var(--app-brand);
}

.mini-home__dir i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--app-brand-wash);
  color: var(--app-brand);
}

.mini-home__mic {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 26px auto 0;
  border-radius: 50%;
  background: var(--app-brand);
  color: #ffffff;
}

.mini-home__mic .icon {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.mini-home__label {
  margin-top: 12px;
  font-weight: 700;
}

/* watch */
.watch {
  align-self: center;
  width: 188px;
  padding: 10px;
  border-radius: 46px;
  background: #2a2f36;
}

.watch__face {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 196px;
  padding: 16px 14px 12px;
  border-radius: 38px;
  background: #000000;
  color: #ffffff;
}

.watch__live {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #5fd0ef;
  font-size: 0.75rem;
  font-weight: 650;
}

.watch__src {
  margin-top: 4px;
  color: #c4ccd5;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.watch__dst {
  color: #7ed9a4;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.watch__stop {
  margin-top: auto;
  padding: 7px 0;
  border-radius: 999px;
  background: #d43c3c;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

/* browser */
.browser {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--page);
  overflow: hidden;
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--sunken);
}

.browser__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.browser__bar span {
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.75rem;
}

.browser__body {
  padding: 16px 18px 18px;
}

.browser__src {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.browser__dst {
  margin-top: 4px;
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 650;
}

/* mac floating subtitle */
.floating-sub {
  align-self: stretch;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgb(14 22 33 / 0.92);
  color: #c3ccd6;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-float);
}

.floating-sub b {
  color: #7ed9a4;
  font-size: 1.0625rem;
  font-weight: 650;
}

/* Points flow */

.points-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.points-flow li {
  position: relative;
  padding: 24px 24px 26px;
}

.points-flow li + li {
  border-left: 1px solid var(--border);
}

.points-flow li + li::before {
  content: "";
  position: absolute;
  top: 34px;
  left: -7px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--card);
  transform: rotate(45deg);
}

.points-flow__step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-wash);
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 750;
}

.points-flow li:last-child .points-flow__step {
  background: var(--accent-wash);
  color: var(--accent);
}

.points-flow h3 {
  margin-top: 14px;
  font-size: 1.0625rem;
  font-weight: 680;
}

.points-flow p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.trust-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.trust-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1875rem;
  font-weight: 700;
}

.trust-card h3 .icon {
  color: var(--brand);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.trust-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 18px;
}

.trust-card__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
}

/* FAQ */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.faq__head .button {
  margin-top: 22px;
}

.faq__list {
  border-top: 1px solid var(--border);
}

.faq__list details {
  border-bottom: 1px solid var(--border);
}

.faq__list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 4px;
  font-size: 1.0625rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.faq__list summary .icon {
  color: var(--muted);
  transition: transform 200ms var(--ease);
}

.faq__list details[open] summary .icon {
  transform: rotate(180deg);
}

.faq__list summary:hover {
  color: var(--brand);
}

.faq__list details p {
  max-width: 40em;
  padding: 0 4px 22px;
  color: var(--ink-soft);
}

/* Download band */

.download {
  background: var(--navy);
  color: var(--navy-ink);
}

.download__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding-block: clamp(48px, 7vw, 80px);
}

.download__logo {
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18);
}

.download h2 {
  color: var(--navy-ink);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 750;
}

.download__copy p {
  margin-top: 8px;
  color: var(--navy-soft);
}

.store-row--inverse .store-button {
  background: #ffffff;
  color: #1a212b;
}

.store-row--inverse .store-button:hover {
  background: #e6f7fe;
  color: #1a212b;
}

.store-row--inverse .store-button--plain {
  background: transparent;
  color: var(--navy-ink);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4);
}

.store-row--inverse .store-button--plain:hover {
  background: rgb(255 255 255 / 0.1);
  color: var(--navy-ink);
}

/* Footer */

.site-footer {
  padding-top: 56px;
  border-top: 1px solid var(--border);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.site-footer__brand p {
  max-width: 24em;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-footer nav h2 {
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--brand);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8125rem;
}

.site-footer__legal a {
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .devices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device--phone {
    grid-column: span 2;
  }

  .device--watch,
  .device--web,
  .device--mac {
    grid-column: span 1;
  }

  .device--mac {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
  }

  .device--mac .floating-sub {
    align-self: center;
    flex: 0 1 320px;
  }
}

@media (max-width: 960px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px var(--gutter) 20px;
    border-bottom: 1px solid var(--border);
    background: var(--page);
    box-shadow: 0 18px 30px rgb(18 33 52 / 0.08);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition:
      opacity 180ms var(--ease),
      transform 180ms var(--ease),
      visibility 0s linear 180ms;
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 180ms var(--ease),
      transform 180ms var(--ease);
  }

  .site-nav a:not(.button) {
    min-height: 48px;
    padding: 0 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
  }

  .site-nav__cta {
    margin: 14px 0 0;
    min-height: 48px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    max-width: 640px;
  }

  .features,
  .faq {
    grid-template-columns: 1fr;
  }

  .features__head {
    position: static;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats > div:nth-child(3) {
    border-left: 0;
  }

  .stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .points-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .points-flow li:nth-child(3) {
    border-left: 0;
  }

  .points-flow li:nth-child(3)::before {
    display: none;
  }

  .points-flow li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .download__inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .download .store-row {
    grid-column: 1 / -1;
  }

  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .section-head--split {
    display: block;
  }

  .section-head--split > p {
    margin-top: 14px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step {
    padding: 22px 0 26px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .devices {
    grid-template-columns: 1fr;
  }

  .device--phone,
  .device--watch,
  .device--web,
  .device--mac {
    grid-column: auto;
  }

  .device--phone,
  .device--mac {
    flex-direction: column;
    align-items: stretch;
  }

  .device--mac .floating-sub {
    align-self: stretch;
    flex: none;
  }

  .mini-home {
    align-self: center;
    width: min(260px, 100%);
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .lang-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search {
    flex: none;
  }
}

@media (max-width: 520px) {
  :root {
    --header-h: 60px;
  }

  .brand__en {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.25rem);
  }

  .store-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .store-button {
    justify-content: flex-start;
  }

  .phone {
    width: min(320px, 100%);
    border-radius: 42px;
  }

  .phone__screen {
    height: 540px;
    border-radius: 33px;
  }

  .scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats > div {
    padding: 18px 14px;
  }

  .stats dd {
    font-size: 0.9375rem;
  }

  .stats dd .tabular {
    font-size: 1.875rem;
  }

  .points-flow {
    grid-template-columns: 1fr;
  }

  .points-flow li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px 18px 20px;
  }

  .points-flow li > :not(.points-flow__step) {
    grid-column: 2;
  }

  .points-flow h3 {
    margin-top: 2px;
  }

  .points-flow li + li {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .points-flow li + li::before {
    display: none;
  }

  .lang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lang-item {
    padding: 8px 10px;
  }

  .download__inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .download__logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__legal {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
