/* Colors follow the app: amber #FFB300 and the dark key cap #261A00 from the launcher icon.
   Amber is too light for text on white, so --accent (links, headings, icons) is a dark amber in the
   light theme; --amber with --amber-ink fills buttons and badges in both themes.
   No inline styles anywhere: the Content-Security-Policy in site/Caddyfile allows only this file.
   Layout copied from the Rate site (currency-convert repo, site/www/style.css). */
:root {
  --bg: #faf8f3;
  --bg-alt: #f4efe3;
  --surface: #ffffff;
  --text: #1d1708;
  --muted: #5e5646;
  --accent: #8a5c00;
  --accent-soft: #fdefc8;
  --amber: #ffb300;
  --amber-ink: #261a00;
  --border: #e8e0cd;
  --shadow: 0 1px 2px rgb(38 26 0 / 0.05), 0 8px 24px rgb(38 26 0 / 0.06);
  --phone-shadow: 0 30px 60px -20px rgb(60 40 0 / 0.45), 0 12px 24px -12px rgb(0 0 0 / 0.3);
  --glow-1: rgb(255 179 0 / 0.22);
  --glow-2: rgb(38 26 0 / 0.07);
  --radius: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100d07;
    --bg-alt: #16120a;
    --surface: #1c170e;
    --text: #f2ede3;
    --muted: #b4ab99;
    --accent: #ffc233;
    --accent-soft: #352a10;
    --border: #2f281a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    --phone-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 255 255 / 0.06);
    --glow-1: rgb(255 179 0 / 0.14);
    --glow-2: rgb(255 179 0 / 0.05);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* The icon sprite: out of the layout, but its symbols stay usable for <use>. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

/* The language switch: a small outlined pill, so it reads as a control, not a section link. */
.nav .lang {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
}

.nav .lang:hover {
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .nav .optional {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 10%, var(--glow-1), transparent 70%),
    radial-gradient(45% 55% at 5% 40%, var(--glow-2), transparent 70%);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.6vw, 62px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--accent);
}

.lead {
  margin: 0 0 28px;
  max-width: 32em;
  color: var(--muted);
  font-size: 19px;
}

.checks {
  display: grid;
  gap: 10px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.checks .icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  stroke-width: 3;
}

/* Download: the APK button, then small facts about the file. */

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

.download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px -8px rgb(255 179 0 / 0.8);
}

.download:hover {
  background: #ffc233;
}

.download .icon {
  stroke-width: 2.5;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta li {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
}

.meta a {
  color: inherit;
}

.hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Phone frames */

.phone {
  margin: 0;
  padding: 9px;
  border-radius: 38px;
  background: #15110a;
  box-shadow: var(--phone-shadow);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 30px;
  background: #1b1f22;
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  height: 600px;
}

.hero-visual .phone {
  position: absolute;
  width: 290px;
}

.hero-visual .front {
  z-index: 2;
  top: 0;
  left: 0;
}

.hero-visual .back {
  top: 70px;
  right: 0;
  transform: rotate(6deg);
  opacity: 0.92;
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .hero-visual {
    width: 100%;
    max-width: 400px;
    height: auto;
  }

  .hero-visual .front {
    position: relative;
    width: 72%;
    margin: 0 auto;
  }

  .hero-visual .back {
    display: none;
  }
}

/* Sections */

.section {
  padding: 88px 0;
}

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

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }
}

/* Feature tiles */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tiles {
    grid-template-columns: 1fr;
  }
}

.tile {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tile-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.tile p {
  margin: 0;
  color: var(--muted);
}

/* Screenshot gallery: a row on wide screens, a swipeable strip on phones. */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery figure {
  margin: 0;
}

.gallery figcaption {
  margin-top: 18px;
  text-align: center;
}

.gallery figcaption strong {
  display: block;
  font-size: 17px;
}

.gallery figcaption span {
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 40%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-right: -24px;
    margin-left: -24px;
    padding: 8px 24px 24px;
    scroll-padding: 0 24px;
    scrollbar-width: none;
  }

  .gallery li {
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-auto-columns: 64%;
  }
}

/* Install and privacy */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.panel {
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 800;
}

.panel h2 .icon {
  color: var(--accent);
  width: 28px;
  height: 28px;
}

.panel > p {
  margin: 0 0 20px;
  color: var(--muted);
}

.points {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  display: flex;
  gap: 12px;
}

.points .icon {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  color: var(--accent);
  stroke-width: 2.5;
}

.panel .more {
  display: inline-block;
  margin-top: 24px;
  font-weight: 600;
}

/* Install steps: numbered amber circles instead of list markers. */

.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  gap: 12px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 14px;
  font-weight: 700;
}

.panel .note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Text pages (privacy) */

.page {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 80px;
}

.page h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 6vw, 46px);
  /* "конфиденциальности" does not fit a 320 px screen in one piece. */
  hyphens: auto;
  font-weight: 800;
}

.page h2 {
  margin: 40px 0 10px;
  font-size: 22px;
}

.page .date {
  margin: 0 0 32px;
  color: var(--muted);
}

.page .summary {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.page .summary p {
  margin: 0;
}

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 40px;
}

.footer .brand {
  font-size: 17px;
}

.footer .brand img {
  width: 28px;
  height: 28px;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a {
  color: var(--muted);
}
