/* barsukshell.com (ADR 0015). The app's own tokens (§9 of the spec): warm paper surfaces, ink text,
   one burnt-orange accent; Unbounded for headings, Golos Text for text, JetBrains Mono for facts
   such as versions, sizes and fingerprints. Light only, like the app (§1.3.3). */
:root {
  color-scheme: light;
  --bg: #efede7;
  --surface: #ffffff;
  --surface-2: #f7f6f2;
  --surface-3: #f1efe9;
  --border: #e2dfd7;
  --border-strong: #d9d5cb;
  --ink: #1a1b1e;
  --ink-2: #45474d;
  --muted: #67696f;
  --accent: #a14a0b;
  --accent-hover: #7c3807;
  --accent-soft: #f6e7d8;
  --danger: #b42318;
  --danger-ink: #8f1c13;
  --danger-soft: #fbeae7;
  --success: #15803d;
  --primary-hover: #2e3036;
  --focus: rgba(161, 74, 11, 0.45);
  --shadow-shot: 0 1px 2px rgba(26, 27, 30, 0.06), 0 24px 56px -12px rgba(26, 27, 30, 0.22);
  --shadow-card: 0 1px 2px rgba(26, 27, 30, 0.05), 0 12px 32px -16px rgba(26, 27, 30, 0.18);

  --font-ui: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --text: 1rem;
  --text-small: 0.9375rem;
  --text-caption: 0.8125rem;
  --text-lead: 1.1875rem;
  --text-h3: 1.0625rem;
  --text-h2: clamp(1.625rem, 1.2rem + 1.5vw, 2.25rem);
  --text-h1: clamp(2.125rem, 1.3rem + 2.6vw, 3.125rem);

  --radius-control: 10px;
  --radius-card: 14px;
  --radius-dialog: 18px;
  --wrap: 1180px;
}

/* The bundled fonts have no Chinese, Japanese or Devanagari letters: system fonts follow them, as
   in the app (ADR 0013). Headings use the text face here, so Latin and CJK letters match. */
:root:lang(zh) {
  --font-ui: 'Golos Text', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  --font-display: var(--font-ui);
}
:root:lang(ja) {
  --font-ui: 'Golos Text', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo UI', 'Meiryo', 'Noto Sans CJK JP', system-ui, sans-serif;
  --font-display: var(--font-ui);
}
:root:lang(hi) {
  --font-ui: 'Golos Text', 'Kohinoor Devanagari', 'Nirmala UI', 'Noto Sans Devanagari', 'Mangal', system-ui, sans-serif;
  --font-display: var(--font-ui);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:lang(hi) body,
body:lang(hi) {
  line-height: 1.75;
}

/* Letter spacing breaks Devanagari conjuncts and loosens CJK text. */
:root:is(:lang(zh), :lang(ja), :lang(hi)) :is(.eyebrow, .site-footer h2) {
  letter-spacing: 0;
}

:lang(ja) :is(h1, h2, h3),
:lang(zh) :is(h1, h2, h3) {
  letter-spacing: 0;
  line-break: strict;
  word-break: auto-phrase;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon-check {
  width: 18px;
  height: 18px;
  color: var(--success);
}

.mono,
.mono-meta {
  font-family: var(--font-mono);
}

.mono-meta {
  font-size: var(--text-caption);
  color: var(--muted);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * 24px);
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--surface);
}

.skip:focus {
  top: 12px;
}

/* --- Buttons. -------------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 600;
  font-size: var(--text-small);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button-primary {
  background: var(--ink);
  color: var(--surface);
}

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

.button-large {
  min-height: 52px;
  padding: 0 24px;
  font-size: var(--text);
}

.text-link {
  font-weight: 600;
  font-size: var(--text-small);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
  vertical-align: middle;
}

/* --- Header. --------------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Unbounded', var(--font-ui);
  font-weight: 700;
  font-size: 1.125rem;
}

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

.logo {
  width: 34px;
  height: 34px;
  flex: none;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a {
  color: var(--ink-2);
  font-size: var(--text-small);
  font-weight: 500;
  text-decoration: none;
}

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

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  background: var(--surface-3);
  font-size: var(--text-small);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.lang-menu summary .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.lang-menu[open] .icon-chevron {
  transform: rotate(180deg);
}

.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 190px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.lang-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.lang-menu li a:hover {
  background: var(--surface-3);
}

.lang-menu li a[aria-current='page'] {
  font-weight: 600;
}

.lang-menu .icon-check {
  color: var(--accent);
}

/* --- Hero. ----------------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.lead {
  max-width: 34rem;
  font-size: var(--text-lead);
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 8px;
}

.hero-actions .icon {
  width: 18px;
  height: 18px;
}

.meta {
  margin-top: -8px;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--muted);
}

.points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--text-small);
  color: var(--ink-2);
}

.points li,
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.points .icon-check,
.checks .icon-check {
  margin-top: 0.2em;
}

.shot {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-shot);
}

.shot img {
  display: block;
  width: 100%;
}

/* --- Sections. ------------------------------------------------------------------------------- */
.section {
  padding-block: clamp(56px, 8vw, 96px);
}

.section-alt {
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.section-lead {
  max-width: 40rem;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

.section-lead.mono-meta {
  font-size: var(--text-caption);
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 36px;
  margin-top: 44px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature p,
.security-list p {
  color: var(--ink-2);
  font-size: var(--text-small);
}

.platforms {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-small);
}

/* --- Security. ------------------------------------------------------------------------------- */
.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.security-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.security-list li {
  display: flex;
  gap: 14px;
}

.security-list li > .icon {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--accent);
}

.security-list li > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dialog {
  margin: 0;
  min-width: 0;
}

.dialog figcaption {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--muted);
}

.dialog-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-dialog);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.0625rem;
}

.dialog-head .icon {
  box-sizing: content-box;
  width: 22px;
  height: 22px;
  padding: 9px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
}

.dialog dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.dialog dt {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--text-caption);
}

.dialog dt:first-child {
  margin-top: 0;
}

.dialog dd {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: var(--text-caption);
  overflow-wrap: anywhere;
}

.dialog dd.changed {
  background: var(--danger-soft);
  color: var(--danger-ink);
}

.dialog-warn {
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--danger-soft);
  color: var(--danger-ink);
  font-size: var(--text-small);
}

/* --- Pricing. -------------------------------------------------------------------------------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.plan header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.plan-main {
  border-color: var(--ink);
  box-shadow: var(--shadow-card);
}

.plan-for {
  color: var(--ink-2);
  font-size: var(--text-small);
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.amount {
  font-family: 'Unbounded', var(--font-ui);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.plan-soon .amount {
  color: var(--ink-2);
}

.per {
  color: var(--muted);
  font-size: var(--text-small);
}

.plan-note {
  margin-top: -8px;
  color: var(--muted);
  font-size: var(--text-caption);
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: var(--text-small);
}

.plan .button {
  margin-top: auto;
}

.fine {
  margin-top: 20px;
  color: var(--muted);
  font-size: var(--text-caption);
}

/* --- Download. ------------------------------------------------------------------------------- */
.downloads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.download h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.download p {
  color: var(--ink-2);
  font-size: var(--text-small);
}

.download .mono-meta {
  color: var(--muted);
  font-size: var(--text-caption);
}

.download .button {
  margin-top: auto;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.store-buttons .button {
  margin-top: 0;
}

.download > .icon-big {
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  color: var(--ink-2);
}

.download-soon {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
}

/* --- FAQ. ------------------------------------------------------------------------------------ */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px clamp(32px, 5vw, 64px);
  align-items: start;
}

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

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary .icon-chevron {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq details[open] .icon-chevron {
  transform: rotate(180deg);
}

.faq details p {
  max-width: 65ch;
  padding-bottom: 20px;
  color: var(--ink-2);
}

/* --- Text pages (privacy policy). ---------------------------------------------------------- */
.doc-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: calc(760px + 2 * 24px);
}

.doc h1 {
  font-size: var(--text-h2);
}

.doc section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.doc h2 {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}

.doc ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 1.25em;
  list-style: disc;
  color: var(--ink-2);
}

.doc-contact {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--ink-2);
}

.doc-contact a,
.doc-wrap li {
  overflow-wrap: anywhere;
}

/* --- Footer. --------------------------------------------------------------------------------- */
.site-footer {
  padding-block: 48px;
  background: var(--surface-3);
  border-top: 1px solid var(--border);
  font-size: var(--text-small);
  color: var(--ink-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer h2 {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contacts span {
  color: var(--muted);
}

.contacts a {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  overflow-wrap: anywhere;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Narrow screens. ------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .lang-menu {
    margin-left: auto;
  }

  .hero-grid,
  .security-grid,
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .plans {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }

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

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

@media (max-width: 600px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

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

  .features {
    gap: 32px;
  }

  .plan,
  .download,
  .dialog-card {
    padding: 22px;
  }

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

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

  * {
    transition: none !important;
  }
}
