/* The Syllabee pages' theme: the app's colours (its brand purple, the white picture cards and the amber syllable bar
   of the store's feature graphic), rounded Nunito headings, over the shared /assets/site.css. Hand-written; the
   approved mockup is the reference for the layout.
   The font rules come from Fontsource (_build/site/vendor/fonts/nunito-800.css): Nunito 800 in the latin, latin-ext and
   cyrillic subsets, each loaded only for the characters it covers. */

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

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../../assets/fonts/nunito-latin-ext-800-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: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../../assets/fonts/nunito-latin-800-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: #6D3FC8;  /* the app's brand purple */
  --wall: #44259A;
  --floor: #2E1A6E;
  --heading: #FFFFFF;
  --text: #EFE9FA;
  --muted: #D6C7F5;  /* the syllable bar's lilac */
  --link: #FFE08A;
  --accent: #FFB300;  /* the active syllable bar */
  --rule: rgba(214, 199, 245, .18);
  --edge: rgba(214, 199, 245, .3);
  --control-edge: rgba(239, 233, 250, .5);
  --menu-edge: rgba(214, 199, 245, .5);
  --accent-wash: rgba(255, 179, 0, .15);
  --heading-font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --card: #FFFBFF;  /* the app's surface */
  --ink: #1C1B1E;
  --ink-soft: #4A4552;
  --lock-ink: #4A2A00;
  --free-wash: #E4F3E8;
  --free-ink: #1D5B2C;
  --bezel: #0B0F18;
}

/* The hero's tilted cards stay inside the page by geometry; the clip is the safety net if a size changes. */
body { overflow-x: clip; }
h1, h2, h3, .brand { font-weight: 800; }
.brand img { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55); }  /* the purple icon on the purple wall */
.sub { color: var(--muted); }

/* Hero: the name, the word split as the app splits it, and the themes screen among the feature graphic's cards */
.hero h1 { font-size: clamp(3rem, 2rem + 4.5vw, 5rem); letter-spacing: .5px; }
.word { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0 4px; }
.syl {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--heading);
  font: 800 clamp(2rem, 1.4rem + 2.6vw, 3rem)/1 var(--heading-font);
  letter-spacing: 1px;
}
.syl::after { content: ""; height: 12px; border-radius: 6px; background: rgba(214, 199, 245, .55); }
.syl.on::after { background: var(--accent); }
.hy { width: 14px; height: 5px; margin-top: .7em; border-radius: 3px; background: rgba(214, 199, 245, .7); }
.hero .lead { max-width: 26em; color: var(--text); }
/* isolation keeps the phone's and cards' z-indexes inside the stage, under the top bar's language menu */
.stage { position: relative; isolation: isolate; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 1; }
.stage .phone {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 46%;
  border-width: clamp(5px, 1.2vw, 8px);
  border-radius: clamp(20px, 5vw, 30px);
  transform: translate(-50%, -50%);
}
.pic {
  position: absolute;
  display: grid;
  place-items: center;
  width: 27%;
  aspect-ratio: 1;
  background: var(--card);
  border-radius: 22%;
  box-shadow: 0 16px 36px rgba(20, 8, 60, .35);
}
.pic img { width: 80%; }
.pic-1 { top: 6%; left: 0; transform: rotate(-7deg); }
.pic-2 { bottom: 6%; left: 3%; transform: rotate(6deg); }
.pic-3 { top: 10%; right: 0; z-index: 3; transform: rotate(7deg); }
.pic-4 { right: 4%; bottom: 3%; z-index: 3; transform: rotate(-5deg); }

/* Four games, each on a panel in its own colour (the app's game backgrounds) */
.game-list { display: grid; gap: 32px 26px; margin: 0; padding: 0; list-style: none; }
.panel {
  display: flex;
  justify-content: center;
  height: 300px;
  padding: 22px 22px 0;
  overflow: hidden;
  border-radius: 26px;
}
.panel.syllables { background: #EFE9FA; }
.panel.memo { background: #E4F3E8; }
.panel.build { background: #FBEBDF; }
.panel.colouring { background: #EAF3EC; }
.panel .phone {
  width: 78%;
  max-width: 220px;
  height: max-content;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -2px 18px rgba(20, 8, 60, .18);
}
.game-list h3 { margin: 18px 0 6px; font-size: 1.3rem; }
.game-list p { font-size: .9375rem; }

/* Themes: a tile per theme with one of its drawings; the full version's carry a lock */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  --tile-pad: 10px;
  padding: 16px var(--tile-pad) 0;
  overflow: hidden;
  color: var(--ink);
  text-align: center;
  background: var(--card);
  border-radius: 20px;
}
.tile img { width: 60px; height: 60px; }
.tile .name { margin: 8px 0 12px; font: 800 1rem/1.2 var(--heading-font); overflow-wrap: anywhere; hyphens: auto; }
.tile .note { margin: -8px 0 12px; color: var(--ink-soft); font-size: .8125rem; line-height: 1.3; }
.tile::after {
  content: "";
  align-self: stretch;
  height: 7px;
  margin: auto calc(-1 * var(--tile-pad)) 0;
  background: var(--bar);
}
.lock {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
}
.lock svg { fill: var(--lock-ink); }
.legend { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; color: var(--muted);
  font-size: .9375rem; }
.legend .lock { position: static; }

/* Colouring's own themes, beside its shapes screen */
.colouring-group { display: grid; gap: 28px; margin-top: 56px; }
.colouring-group > .phone { margin: 0 auto; }
.group { font-size: 1.6rem; }
.gsub { margin: 6px 0 20px; color: var(--muted); }
.ctiles { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ctile {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  background: var(--card);
  border-left: 8px solid var(--bar);
  border-radius: 20px;
}
.ctile img { width: 64px; height: 64px; }
.ctile h4 { margin: 0 0 3px; font: 800 1.1rem/1.2 var(--heading-font); }
.ctile p { color: var(--ink-soft); font-size: .9375rem; line-height: 1.35; }
.free-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  color: var(--free-ink);
  font: 600 .75rem var(--sans);
  vertical-align: 2px;
  background: var(--free-wash);
  border-radius: 999px;
}

/* Free and full version: the full version in a deeper purple, edged in the syllable bar's amber */
.plan { border-radius: 20px; }
.plan.free .note { color: var(--muted); }
.plan.full { background: linear-gradient(160deg, #5A2FB8, var(--floor)); border: 2px solid var(--accent); }

/* Two tiles a row on small phones keep long names whole (Инструменты, Grøntsager); three from 480 px. */
@media (min-width: 480px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 640px) {
  .game-list { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .tile img { width: 76px; height: 76px; }
  .ctiles { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 760px) {
  .colouring-group { grid-template-columns: 220px minmax(0, 1fr); gap: 44px; align-items: center; }
}

@media (min-width: 960px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 40px; }
  .game-list { grid-template-columns: repeat(4, 1fr); }
}

/* Eight tiles a row are about 115 px wide each: smaller type and padding keep Инструменты and Вперемешку
   whole. */
@media (min-width: 1060px) {
  .tiles { grid-template-columns: repeat(8, 1fr); }
  .tile { --tile-pad: 6px; }
  .tile .name { font-size: .875rem; }
}
