/* SonicLens site — matches GlassTheme.swift */
:root {
  --bg: #12141a;
  --bg-top: #1a1c21;
  --ink: rgba(255, 255, 255, 0.92);
  --ink-2: rgba(255, 255, 255, 0.62);
  --ink-3: rgba(255, 255, 255, 0.38);
  --violet: #637a99;
  --cyan: #619297;
  --pink: #ad736b;
  --lime: #8c996b;
  --ochre: #ab875c;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.065);
  --stroke: rgba(255, 255, 255, 0.09);
  --radius: 18px;
  --radius-lg: 24px;
  --max: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Noto Sans JP",
    "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(99, 122, 153, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 20%, rgba(97, 146, 151, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-top), var(--bg) 40%, #0e1014 100%);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: #7eb3b8;
}

/* ——— Shell ——— */
.page {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--violet);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.badge-lock svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

/* ——— Language switch ——— */
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  padding: 6px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-switch button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* ——— Type ——— */
.hero {
  margin-bottom: 36px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 14px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-lead {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink-2);
  max-width: 38em;
  white-space: pre-line;
}

/* ——— Cards ——— */
.card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card + .card {
  margin-top: 0;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.card h3 {
  margin: 20px 0 8px;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card p,
.card li {
  margin: 0 0 0.75em;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.card p:last-child,
.card li:last-child {
  margin-bottom: 0;
}

.card ul {
  margin: 0 0 0.75em;
  padding-left: 1.15em;
}

.card li {
  margin-bottom: 0.4em;
}

.section-label {
  margin: 36px 0 14px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ——— Features (support home) ——— */
.feature-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 8px 0 4px;
}

.feature {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: 1rem;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon.c-violet { background: rgba(99, 122, 153, 0.35); }
.feature-icon.c-cyan { background: rgba(97, 146, 151, 0.35); }
.feature-icon.c-pink { background: rgba(173, 115, 107, 0.35); }
.feature-icon.c-lime { background: rgba(140, 153, 107, 0.35); }

.feature strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.feature span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.45;
}

/* ——— FAQ ——— */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 0;
}

.faq-item:first-of-type {
  padding-top: 4px;
}

.faq-item:last-of-type {
  border-bottom: 0;
  padding-bottom: 4px;
}

.faq-q {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.faq-a {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.93rem;
}

/* ——— Contact ——— */
.contact-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 18px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  color: #fff;
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--stroke);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.note {
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* ——— Disclaimer callout ——— */
.callout {
  border-left: 3px solid var(--ochre);
  background: rgba(171, 135, 92, 0.08);
  border-radius: 0 14px 14px 0;
  padding: 14px 16px;
  margin: 16px 0;
}

.callout p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.callout strong {
  color: var(--ink);
}

/* ——— Nav links ——— */
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
}

.page-nav a {
  flex: 1 1 auto;
  min-width: 140px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 14px 16px;
  transition: background 0.15s ease;
}

.page-nav a:hover {
  background: var(--glass-strong);
  color: var(--ink);
}

.page-nav small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.page-nav span {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ——— Footer ——— */
.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-nav a {
  color: var(--ink-2);
  text-decoration: none;
}

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

/* ——— Meta list (privacy) ——— */
.meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.meta-list li {
  display: grid;
  grid-template-columns: minmax(110px, 34%) 1fr;
  gap: 10px;
  font-size: 0.9rem;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-list li:last-child {
  border-bottom: 0;
}

.meta-list dt,
.meta-list .k {
  color: var(--ink-3);
  font-size: 0.82rem;
}

.meta-list .v {
  color: var(--ink-2);
}

/* ——— TOC ——— */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 4px;
}

.toc a {
  font-size: 0.82rem;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
}

.toc a:hover {
  color: var(--ink);
  border-color: var(--stroke);
}

/* ——— Utility ——— */
.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
}

[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 28px, var(--max));
    padding-top: 16px;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .badge-lock {
    display: none;
  }

  .meta-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

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