/* iApps by Elibekyan. The first screen is the app's icon opened up: apricot field, dark ink. */
@font-face { font-family: Unbounded; font-weight: 600; font-display: swap; src: url(/fonts/unbounded-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; font-weight: 600; font-display: swap; src: url(/fonts/unbounded-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Golos; font-weight: 400 900; font-display: swap; src: url(/fonts/golos-text-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Golos; font-weight: 400 900; font-display: swap; src: url(/fonts/golos-text-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  color-scheme: light dark;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --text: #15181E;
  --muted: #59606E;
  --border: #DDE1E7;
  --accent-ink: #8A4805;
  --tint: #FDEBD5;
  --hero: #F59A3C;
  --hero-ink: #2B1506;
  --hero-soft: #4A2A0E;
  --tile: rgba(43, 21, 6, .1);
  --tile-done: #2B1506;
  --tile-text: #FFC27A;
  --wipe: rgba(43, 21, 6, .92);
  --button: #2B1506;
  --button-text: #FFE3BE;
  --focus: #15181E;
  --hero-focus: #2B1506;
  --shadow: 0 1px 2px rgba(15, 18, 24, .08), 0 24px 56px rgba(15, 18, 24, .16);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --page: min(1180px, 100% - 2 * clamp(16px, 4vw, 48px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171C;
    --surface: #1E2128;
    --text: #F2F3F5;
    --muted: #A3AAB8;
    --border: #2E333D;
    --accent-ink: #F9BE7A;
    --tint: #3A2A17;
    --hero: #241708;
    --hero-ink: #FFD3A0;
    --hero-soft: #E2C3A0;
    --tile: rgba(255, 194, 122, .1);
    --tile-done: #F7A94F;
    --tile-text: #241002;
    --wipe: rgba(247, 169, 79, .95);
    --button: #F7A94F;
    --button-text: #241002;
    --focus: #F2F3F5;
    --hero-focus: #FFD3A0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 24px 56px rgba(0, 0, 0, .55);
  }
}

@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 Golos, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, dl, figure, pre { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
code, pre { font-family: "JetBrains Mono", Consolas, ui-monospace, monospace; font-weight: 500; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 50; padding: 8px 14px; border-radius: 8px; background: var(--surface); color: var(--text); }
.skip:focus { top: 12px; }

/* MARK: First screen */

.hero { background: var(--hero); color: var(--hero-ink); padding-bottom: clamp(120px, 20vw, 260px); }
.hero :focus-visible { outline-color: var(--hero-focus); }
.top { width: var(--page); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-height: 44px; }
.logo > img { border-radius: 9px; }
.logo-text { display: flex; flex-direction: column; gap: 2px; font-size: .72rem; line-height: 1.2; color: var(--hero-soft); }
.wordmark { width: 60px; height: 18px; }
.top nav { display: flex; gap: clamp(12px, 2.4vw, 28px); font-size: .95rem; }
.top nav a { color: inherit; text-decoration: none; padding-block: 10px; border-bottom: 2px solid transparent; }
@media (hover: hover) and (pointer: fine) { .top nav a:hover { border-bottom-color: currentColor; } }

.hero-grid {
  width: var(--page);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(24px, 5vw, 64px);
}
h1 {
  font: 600 clamp(2rem, 1.1rem + 3.5vw, 3.75rem)/1.08 Unbounded, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.lead { margin-top: 24px; max-width: 54ch; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.5; color: var(--hero-soft); text-wrap: pretty; }
.downloads { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 12px; }
.download { flex: 0 1 262px; min-width: 0; }
.download .button { width: 100%; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .14s var(--ease-out), background-color .14s;
}
.button:active { transform: scale(.97); }
.button-solid { background: var(--button); color: var(--button-text); }
.button-line { box-shadow: inset 0 0 0 2px var(--hero-ink); color: var(--hero-ink); }
@media (hover: hover) and (pointer: fine) {
  .button-solid:hover { filter: brightness(1.18); }
  .button-line:hover { background: var(--tile); }
}
.download-meta { margin-top: 8px; font-size: .84rem; line-height: 1.35; color: var(--hero-soft); font-variant-numeric: tabular-nums; }
.phone-note { margin-top: 16px; font-size: .95rem; color: var(--hero-soft); }

/* The signature: a home screen filling up, one version at a time. */
.shelf-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.4vw, 18px); width: min(100%, 420px); }
.tile { position: relative; aspect-ratio: 1; border-radius: 23%; background: var(--tile); overflow: hidden; display: grid; place-items: center; }
.tile::before { content: ""; position: absolute; inset: 0; background: conic-gradient(var(--wipe) calc(var(--p) * 360deg), transparent 0); }
.tile.is-running::before { transition: --p 1.5s linear; }
.tile.is-done { background: var(--tile-done); }
.tile.is-done::before { display: none; }
.tile span { position: relative; color: var(--tile-text); font: 500 clamp(.72rem, .55rem + .55vw, 1rem)/1 "JetBrains Mono", Consolas, ui-monospace, monospace; opacity: 0; transition: opacity .2s linear; }
.tile.is-done span { opacity: 1; }
.shelf-pause {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--hero-soft);
  font: inherit;
  font-size: .84rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* MARK: Screens */

main { position: relative; }
.main-shot { width: var(--page); margin: clamp(-240px, -18vw, -100px) auto 0; }
.main-shot img, .shot img { width: 100%; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }

.block { width: var(--page); margin-inline: auto; padding-top: clamp(64px, 9vw, 112px); }
h2 { font: 600 clamp(1.45rem, 1.1rem + 1.5vw, 2.25rem)/1.15 Unbounded, "Segoe UI", system-ui, sans-serif; letter-spacing: -.02em; text-wrap: balance; }
.block-lead { margin-top: 14px; max-width: 62ch; color: var(--muted); text-wrap: pretty; }

.steps { list-style: none; display: grid; gap: clamp(40px, 6vw, 80px); margin-top: clamp(32px, 4vw, 56px); }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.step:nth-child(even) .step-text { order: 2; }
.step-number {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 23%;
  background: var(--tint);
  color: var(--accent-ink);
  font: 500 1rem/1 "JetBrains Mono", Consolas, ui-monospace, monospace;
  margin-bottom: 14px;
}
h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); font-weight: 650; line-height: 1.25; letter-spacing: -.005em; text-wrap: balance; }
.step p { margin-top: 10px; color: var(--muted); text-wrap: pretty; max-width: 46ch; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
.fact h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); }
.fact p { margin-top: 12px; color: var(--muted); max-width: 52ch; text-wrap: pretty; }

.tabs { margin-top: 28px; max-width: 760px; }
.tab-list { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.tab { min-height: 44px; min-width: 112px; padding: 0 18px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--tint); color: var(--accent-ink); }
.tab-panel { margin-top: 24px; }
.howto { list-style: none; counter-reset: step; display: grid; gap: 14px; }
.howto li { counter-increment: step; position: relative; padding-left: 40px; text-wrap: pretty; }
.howto li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 23%;
  background: var(--tint);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font: 500 .84rem/1 "JetBrains Mono", Consolas, ui-monospace, monospace;
}
.howto code { font-size: .92em; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; overflow-wrap: anywhere; }
.howto-note { margin-top: 20px; color: var(--muted); }
.command { margin-top: 8px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; overflow-x: auto; }

.notes { list-style: none; margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(32px, 5vw, 72px); }
.notes li { color: var(--muted); text-wrap: pretty; }
.notes strong { display: block; color: var(--text); font-weight: 650; margin-bottom: 4px; }
.hashes { margin-top: 36px; font-size: .92rem; color: var(--muted); }
.hashes summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.hashes dt { margin-top: 10px; color: var(--text); font-weight: 600; }
.hashes dd { margin: 2px 0 0; font: 500 .8rem/1.5 "JetBrains Mono", Consolas, ui-monospace, monospace; overflow-wrap: anywhere; }

.foot { width: var(--page); margin: clamp(64px, 9vw, 112px) auto 0; padding-block: 28px 40px; border-top: 1px solid var(--border); font-size: .92rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot strong { color: var(--text); font-weight: 650; }
#foot-version { font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .shelf-wrap { align-items: flex-start; }
  .shelf { width: min(100%, 360px); grid-template-columns: repeat(6, 1fr); width: 100%; }
  .shelf .tile:nth-child(n + 13) { display: none; }
  .step, .facts, .notes { grid-template-columns: minmax(0, 1fr); }
  .step:nth-child(even) .step-text { order: 0; }
  .top nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile.is-running::before, .tile span, .button { transition: none; }
  .button:active { transform: none; }
}

@media (forced-colors: active) {
  .tile { border: 1px solid CanvasText; }
  .tab[aria-selected="true"] { outline: 2px solid Highlight; }
}

@media print {
  .hero { background: none; padding-bottom: 24px; }
  .shelf-wrap { display: none; }
}

/* MARK: Pictures beside the facts */

.fact-shot { display: block; margin-bottom: 20px; }
.fact-shot img { width: 100%; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
