/* Analog Click support site */
:root {
  --bg: #0e0f10;
  --bg-raised: #17181a;
  --bg-sunken: #0a0a0b;
  --line: #2a2c2f;
  --line-strong: #3b3d41;
  --text: #ececea;
  --text-muted: #a3a5a8;
  --text-faint: #74777b;
  --accent: #f0a63c;
  --accent-soft: #f5c886;
  --radius: 16px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.7 var(--sans);
  background-color: var(--bg);
  /* fine horizontal grain, like the brushed metal in the app */
  background-image:
    radial-gradient(1200px 600px at 70% -10%, rgba(255, 255, 255, 0.07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 15, 16, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; flex: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line-strong); }
.brand span { color: var(--text-faint); font-weight: 400; }
.nav { margin-left: auto; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-size: 14px; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.09); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 16px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(240, 166, 60, 0.7); }
h1 { font-size: clamp(40px, 6.5vw, 68px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 20px; }
.hero h1 { background: linear-gradient(180deg, #ffffff 20%, #9a9c9f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-muted); margin: 0 0 28px; max-width: 34em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); border-color: #55585d; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, #ffffff, #cfd0d1); color: #111; border-color: transparent; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 #fff; }
.btn-primary:hover { background: linear-gradient(180deg, #ffffff, #e2e3e4); color: #000; border-color: transparent; }
.btn svg { width: 16px; height: 16px; flex: none; }

.phones { display: flex; justify-content: center; align-items: center; gap: clamp(8px, 1.6vw, 18px); }
.phone {
  flex: 1 1 0; min-width: 0; max-width: 220px; margin: 0;
  padding: 5px; border-radius: clamp(20px, 3vw, 34px);
  background: linear-gradient(160deg, #4a4c50, #1b1c1e 40%, #0a0a0b);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px #000;
}
.phone img { width: 100%; border-radius: clamp(16px, 2.6vw, 29px); }
.phone:nth-child(2) { transform: translateY(-22px); }
.phone:nth-child(odd) { transform: translateY(22px); }

/* ---------- Sections ---------- */
.section { padding: clamp(28px, 5vw, 56px) 0; }
.section-title { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 8px; font-weight: 650; }
.section-sub { color: var(--text-muted); margin: 0 0 28px; max-width: 46em; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.release { display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: center; }
.release .version { font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.release .label { display: block; color: var(--text-faint); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.release p { margin: 0; color: var(--text-muted); }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.features li { display: flex; gap: 14px; align-items: flex-start; grid-column: span 2; }
.features li:nth-child(n+4) { grid-column: span 3; }
.features .icon {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #4b4d51, #1d1e20 70%);
  border: 1px solid var(--line-strong); color: var(--accent-soft);
}
.features .icon svg { width: 20px; height: 20px; }
.features p { margin: 6px 0 0; color: var(--text); line-height: 1.5; }

.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.contact h2 { margin: 0 0 2px; font-size: 20px; letter-spacing: -0.01em; }
.contact p { margin: 0; color: var(--text-muted); }

.ja { border-top: 1px solid var(--line); }
.ja .lead { max-width: 40em; }
.lang-tag { display: inline-block; font-size: 12px; color: var(--text-muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; margin-bottom: 14px; }

/* ---------- Document pages ---------- */
.page-head { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 14px; }
.page-head .lead { margin-bottom: 0; }

.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: 72px; }
.doc-layout.single { grid-template-columns: minmax(0, 760px); }

.toc { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto; font-size: 14px; padding-right: 4px; }
.toc summary { display: none; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--accent); }
.toc .sub a { padding-left: 28px; font-size: 13px; color: var(--text-faint); }
.toc .sub a.active, .toc .sub a:hover { color: var(--text); }

.doc { min-width: 0; max-width: 760px; }
.doc > :first-child { margin-top: 0; }
.doc h2 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.25; margin: 64px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 18px; letter-spacing: -0.01em; margin: 40px 0 10px; }
.doc p, .doc li { color: #d3d4d2; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--text-faint); }
.doc code { font-family: var(--mono); font-size: 0.86em; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 5px; color: #f1e3c8; overflow-wrap: anywhere; }
.doc pre { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; color: #dcdcd8; }
.doc pre code { background: none; border: 0; padding: 0; }
.doc img { border-radius: 14px; border: 1px solid var(--line); margin: 14px 0; }
.doc img.portrait { width: min(260px, 60%); }
.doc .note { color: var(--text-muted); font-size: 14px; }

.samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 18px 0; }
.sample { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease; }
.sample:hover { color: var(--text); border-color: #55585d; transform: translateY(-2px); }
.sample strong { font-size: 17px; letter-spacing: -0.01em; }
.sample span { color: var(--text-muted); font-size: 14px; line-height: 1.5; flex: 1; }
.sample em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent-soft); display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.sample em svg { width: 14px; height: 14px; }

.callout { display: flex; gap: 12px; align-items: baseline; border: 1px solid rgba(240, 166, 60, 0.3); background: rgba(240, 166, 60, 0.07); border-radius: var(--radius-sm); padding: 12px 16px; margin: 20px 0; }
.callout p { margin: 0; color: var(--text); }
.callout::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }

.policy h2 { font-size: 19px; border: 0; padding: 0; margin: 36px 0 6px; }
.policy p { margin: 0 0 8px; }
.policy .lang-block + .lang-block { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.policy .statement { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.4; letter-spacing: -0.015em; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.policy .dates { color: var(--text-faint); font-size: 14px; margin-top: 32px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--text-faint); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .spacer { margin-left: auto; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { margin-top: 28px; }
  .features { grid-template-columns: 1fr 1fr; }
  .features li, .features li:nth-child(n+4) { grid-column: span 1; }
  .features li:last-child { grid-column: span 2; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; background: var(--bg-raised); }
  .toc summary { display: block; cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--text); }
  .toc ul { border-left: 0; padding: 0 6px 10px; }
  .toc a.active { border-left-color: transparent; }
}
@media (max-width: 560px) {
  .brand { font-size: 0; gap: 0; } /* icon only; the text stays for screen readers */
  .site-header .wrap { gap: 8px; }
  .nav a { padding: 7px 9px; font-size: 13px; }
  .release { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .features li:last-child { grid-column: span 1; }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .sample { transition: none; }
}
