/* Styles shared by the site's generated pages: the home page and every app's page. Hand-written (not generated); the
   pages are generated by _build/site/build.py. Each app's page adds its own /<app>/assets/theme.css, which may
   override the tokens in :root and adds the app's own components.
   The font rules below come from Fontsource (_build/site/vendor/fonts/*.css): Playfair Display 600 and
   Source Sans 3 400/600 in the latin, latin-ext and cyrillic subsets, each loaded only for the characters it covers. */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/playfair-display-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: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/playfair-display-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/playfair-display-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-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: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --wall-top: #2C5282;
  --wall: #132841;
  --floor: #0D1D31;
  --heading: #FFF6E0;
  --text: #E9D9B4;
  --muted: #B9C3D6;
  --link: #F8DE94;  /* links, the focus ring, notes */
  --accent: #D9A441;  /* rules above items, card and button borders */
  --rule: rgba(217, 164, 65, .25);  /* between sections */
  --edge: rgba(233, 217, 180, .25);  /* card borders */
  --control-edge: rgba(233, 217, 180, .5);  /* the language button's border */
  --menu-edge: rgba(217, 164, 65, .5);  /* the language menu's border */
  --accent-wash: rgba(217, 164, 65, .15);  /* a button's background on hover */
  --heading-font: "Playfair Display", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--wall) linear-gradient(var(--wall-top), var(--wall) 760px) no-repeat;
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--sans);
}

img, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  color: var(--heading);
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: break-word;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--link); text-decoration: underline; text-underline-offset: .15em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Top bar: the app's name, and the language menu */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font: 600 1.125rem/1 var(--heading-font);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.lang { position: relative; }
.lang summary {
  padding: 4px 12px;
  border: 1px solid var(--control-edge);
  border-radius: 6px;
  font-size: .9375rem;
  list-style: none;
  cursor: pointer;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " \25BE"; }
.lang[open] summary::after { content: " \25B4"; }
.lang ul {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 2;
  min-width: 160px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--wall);
  border: 1px solid var(--menu-edge);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.lang li a { display: block; padding: 8px 16px; color: var(--text); text-decoration: none; }
.lang li a:hover { background: rgba(255, 255, 255, .06); color: var(--heading); }

/* Sections */
main > section { max-width: 1080px; margin: 0 auto; padding: 48px 20px; }
main > section + section { border-top: 1px solid var(--rule); }
h2 { margin-bottom: 8px; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem); text-align: center; }
.sub { margin-bottom: 32px; text-align: center; }

/* Hero: the app's name, pitch and badge beside its picture (each theme draws the picture) */
.hero { display: grid; gap: 40px; padding-top: 32px; }
.hero h1, .home-hero h1 { font-size: clamp(2.75rem, 2rem + 3.5vw, 3.75rem); line-height: 1.05; }
.lead { margin: 12px 0 24px; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.375rem); line-height: 1.35; }
.play { display: inline-block; border-radius: 10px; }
.play img { width: auto; height: 54px; }
.facts { margin-top: 12px; color: var(--muted); font-size: .875rem; }

/* How it works: three phones */
.steps { display: grid; gap: 40px; margin: 0; padding: 0; list-style: none; text-align: center; }
.steps img {
  width: 200px;
  margin: 0 auto 16px;
  border: 6px solid #0B0F18;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
.steps h3 { margin-bottom: 4px; font-size: 1.1875rem; }
.steps p { max-width: 30ch; margin: 0 auto; font-size: .9375rem; }

/* Video, in the same phone frame */
.video { display: grid; gap: 28px; justify-items: center; text-align: center; }
.phone {
  width: 220px;
  overflow: hidden;
  background: #0B0F18;
  border: 6px solid #0B0F18;
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
.phone video { width: 100%; aspect-ratio: 9 / 16; }
.phone video:focus-visible { outline-offset: -4px; }  /* .phone clips anything outside the video */
.video-text p { max-width: 42ch; }

/* Features */
.grid { display: grid; gap: 24px 28px; margin: 0; padding: 0; list-style: none; }
.grid li { padding-top: 12px; border-top: 2px solid var(--accent); font-size: .9375rem; }
.grid h3 { margin-bottom: 4px; font-size: 1.125rem; }

/* Free and full version */
.plans { display: grid; gap: 24px; max-width: 760px; margin: 24px auto 0; }
.plan, .app {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--edge);
  border-radius: 12px;
}
.plan { padding: 22px 24px; }
.plan.full {
  background: linear-gradient(160deg, rgba(138, 44, 67, .55), rgba(74, 17, 35, .55));
  border-color: var(--accent);
}
.plan h3 { font-size: 1.375rem; }
.note { margin: 2px 0 12px; color: var(--link); font-size: .875rem; }
.plan ul { margin: 0; padding-left: 18px; font-size: .9375rem; line-height: 1.6; }

/* Privacy and the closing call */
.privacy p { max-width: 620px; margin: 0 auto; text-align: center; }
.cta { text-align: center; }
.cta h2 { margin-bottom: 20px; }

/* Footer */
.foot { padding: 28px 20px 36px; background: var(--floor); color: var(--muted); font-size: .875rem; }
.foot > * { max-width: 1080px; margin: 0 auto; }
.foot > * + * { margin-top: 8px; }
.langs ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 4px; padding: 0; list-style: none; }
.langs a { color: var(--text); text-decoration: none; }
.langs a[aria-current="page"] { color: var(--link); text-decoration: underline; }

/* The site's home page (index.html): a card per app */
.home-hero { padding-top: 40px; text-align: center; }
.home-hero .lead { margin: 12px auto 0; max-width: 32ch; }
.apps { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px;
  border-top: 2px solid var(--accent);
}
.app img { width: 96px; height: 96px; border-radius: 20px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.app h2 { margin: 6px 0 0; font-size: 1.5rem; text-align: left; }
.app p { font-size: .9375rem; }
.aka { color: var(--muted); }
.app-link { margin-top: auto; }
.app-link {
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
}
.app-link:hover { background: var(--accent-wash); }
.policy { font-size: .875rem; }

@media (min-width: 760px) {
  .apps { grid-template-columns: repeat(3, 1fr); }
  .nav { padding: 20px 32px 0; }
  main > section { padding: 64px 32px; }
  .steps, .grid { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: 1fr 1fr; }
  .video { grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; max-width: 760px;
    text-align: left; }
  .video h2 { text-align: left; }
  .foot { padding: 28px 32px 36px; }
}

@media (min-width: 960px) {
  .hero { grid-template-columns: 1fr 1.15fr; align-items: center; gap: 32px; padding-top: 48px; }
}
