/* Public beta page. Selvage — the app's own design system
   (skein/packages/skein_design/lib/src/tokens/selvage_colors.dart), so the page
   reads as a continuation of the app rather than a separate brochure.
   Kept apart from site.css, which dresses the legal pages. */

@font-face {
  font-family: 'Fraunces';
  src: url('fonts/Fraunces-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken';
  src: url('fonts/HankenGrotesk-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken';
  src: url('fonts/HankenGrotesk-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'MartianMono';
  src: url('fonts/MartianMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f3ecdd;
  --surface: #fcfaf4;
  --sunken: #efe8da;
  --ink: #2a241f;
  --ink-2: #5c5147;
  --ink-3: #6e6456;
  --border: #e0d6c4;
  --border-strong: #cfc2ac;
  --madder: #ae3a4e;
  --madder-press: #8e2c3d;
  --on-madder: #fcfaf4;
  --woad: #2c3e63;
  --weld: #c98a1e;
  --myrtle: #5e7b53;
  --weave: rgba(42, 36, 31, 0.055);
  --shadow: 0 1px 2px rgba(42, 36, 31, 0.06), 0 8px 24px rgba(42, 36, 31, 0.08);
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1611;
    --surface: #251d16;
    --sunken: #16110c;
    --ink: #f1e9db;
    --ink-2: #c2b6a4;
    --ink-3: #9a8e7c;
    --border: #3e332a;
    --border-strong: #50443a;
    --madder: #d86073;
    --madder-press: #c2475a;
    --on-madder: #1c1611;
    --woad: #7e93c4;
    --weld: #e7b84e;
    --myrtle: #8aaa77;
    --weave: rgba(241, 233, 219, 0.05);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.45);
  }
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Hanken', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Language switch: Russian renders with no JS at all, English swaps in when the
   reader (or the browser) asks for it. */
html[data-lang='ru'] [lang='en'],
html[data-lang='en'] [lang='ru'] {
  display: none;
}

.weave {
  background-image:
    repeating-linear-gradient(to right, var(--weave) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(to bottom, var(--weave) 0 1px, transparent 1px 22px);
}

.wrap {
  width: min(100% - 2.5rem, 60rem);
  margin-inline: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
  max-width: var(--measure);
}

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

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

.eyebrow {
  margin: 0;
  color: var(--ink-3);
  font-family: 'MartianMono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Language toggle ─────────────────────────────────────────────────────── */
.langbar {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.25rem;
}

.langs {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.langs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: 'MartianMono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.langs button[aria-pressed='true'] {
  background: var(--madder);
  color: var(--on-madder);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.mark {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}

h1 {
  font-size: clamp(2.75rem, 2rem + 3.4vw, 4.25rem);
}

.lede {
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  max-width: 33rem;
}

.rule {
  width: 84px;
  height: 4px;
  border-radius: 2px;
  background: var(--madder);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
}

.btn-primary {
  background: var(--madder);
  color: var(--on-madder);
}

.btn-primary:hover {
  background: var(--madder-press);
}

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-quiet:hover {
  background: var(--sunken);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-family: 'MartianMono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Sections ────────────────────────────────────────────────────────────── */
section {
  padding-block: clamp(2.75rem, 6vw, 4.25rem);
}

section + section {
  border-top: 1px solid var(--border);
}

.head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.head h2 {
  font-size: clamp(1.6rem, 1.35rem + 1vw, 2.1rem);
}

.prose {
  max-width: 44rem;
  color: var(--ink-2);
}

/* ── Features ────────────────────────────────────────────────────────────── */
.features {
  display: grid;
  gap: 1.75rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.35rem 0.85rem;
}

.feature svg {
  grid-row: span 2;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.15rem;
}

.feature h3 {
  font-family: 'Hanken', system-ui, sans-serif;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0;
}

.feature p {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ── Screenshot rail ─────────────────────────────────────────────────────── */
.rail {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(1.25rem, calc(50vw - 30rem));
}

.shot {
  flex: 0 0 auto;
  width: 15rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  /* Captions line up along the bottom even though the shelf capture is a
     shorter frame than the rest. */
  justify-content: space-between;
  gap: 0.7rem;
  scroll-snap-align: start;
}

.shot img {
  align-self: start;
}

.shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.shot figcaption {
  color: var(--ink-3);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ── Install steps ───────────────────────────────────────────────────────── */
.steps {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.4rem 1rem;
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.step::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--madder);
  font-family: 'MartianMono', ui-monospace, monospace;
  font-size: 0.95rem;
}

.step h3 {
  align-self: center;
  font-family: 'Hanken', system-ui, sans-serif;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0;
}

.step p {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 40rem;
}

.step a {
  font-weight: 600;
  word-break: break-word;
}

/* ── Notes ───────────────────────────────────────────────────────────────── */
.notes {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  max-width: 44rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

.note svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.28rem;
}

.note strong {
  color: var(--ink);
  font-weight: 600;
}

footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 3.5rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
