/* The front page's tile grid (index.html, #more): the features the scroll
   moments leave out, one tile each, between the moments so the page changes
   pace. Four columns on a laptop, two on a tablet, one on a phone. Each tile
   is a name in its colour, one sentence, and a picture or a piece of the
   app's own controls; pictures bleed off the tile's edge. */

.tiles-head {
  align-self: center;
  max-width: 780px;
  text-align: center;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(300px, auto);
  grid-auto-flow: dense;
  gap: 20px;
  width: 100%;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 30px 30px 0;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.tile.wide {
  grid-column: span 2;
}
.tile.tall {
  grid-row: span 2;
}
.tile-name {
  margin: 0;
  color: var(--c, var(--sky));
  font-size: 15px;
  font-weight: 700;
}
.tile-say {
  margin: 0;
  max-width: 30ch;
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.tile-foot {
  margin-top: auto;
  padding-bottom: 30px;
}

/* A screenshot from Demo Mode, its top-left corner rounded, off the tile's right and bottom. */
.tile-shot {
  display: block;
  width: calc(100% + 30px);
  margin-top: auto;
  border-radius: 14px 0 0 0;
  background: #ffffff;
  box-shadow: 0 -10px 40px -12px rgba(0, 0, 0, 0.5);
}
.t-quiz .tile-shot {
  margin-top: 18px;
  height: 230px;
  object-fit: cover;
  object-position: 11% 0;
}

/* A phone, its lower half off the tile's bottom. */
.tile-phone {
  align-self: center;
  width: min(250px, 82%);
  margin-top: auto;
  padding: 9px 9px 0;
  border-radius: 38px 38px 0 0;
  background: linear-gradient(180deg, #2a2f3a, #14171e 70%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 -20px 60px -20px rgba(74, 163, 255, 0.4);
}
.tile-phone img {
  display: block;
  width: 100%;
  border-radius: 30px 30px 0 0;
}
.t-observe .tile-phone {
  width: min(280px, 86%);
  height: 470px;
  overflow: hidden;
}
.t-bulletins .tile-phone {
  width: min(210px, 78%);
  height: 150px;
  overflow: hidden;
}

/* The curriculum: one big number. */
.tile-big {
  margin: auto 0 0;
  padding-bottom: 4px;
  background: linear-gradient(100deg, #7cc0ff, #34c77b 60%, #f5b843);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 96px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
}
.tile-small {
  margin: 0;
  padding-bottom: 30px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.45;
}

/* The app's own pills and choices, drawn here. */
.tile-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile-pills li {
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--p) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p) 55%, transparent);
  color: color-mix(in srgb, var(--p) 55%, #ffffff);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.tile-q {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.tile-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}
.tile-seg span {
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.tile-seg span.on {
  background: #ffffff;
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.tile-faces {
  display: flex;
  gap: 18px;
  margin-top: 16px;
}
.tile-faces span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.tile-faces i {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--f);
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.tile-faces b {
  color: var(--l);
}
.tile-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: auto 0 30px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--c);
}
.tile-icon svg {
  width: 34px;
  height: 34px;
}

@media (max-width: 1020px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .tiles {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 16px;
  }
  .tile.wide,
  .tile.tall {
    grid-column: auto;
    grid-row: auto;
  }
  .tile {
    padding: 26px 24px 0;
    border-radius: 24px;
  }
  .tile-say {
    font-size: 22px;
  }
  .tile-foot,
  .tile-small {
    padding-bottom: 26px;
  }
  .tile-icon {
    margin: 12px 0 26px;
  }
  .t-quiz .tile-shot {
    height: 180px;
    object-position: 0 0;
  }
  .t-observe .tile-phone {
    height: 340px;
  }
  .tile-big {
    margin-top: 8px;
    font-size: 80px;
  }
}
