/* Giftcade's home and search pages. Brand: Night Plum, Gift Pink, Bow Gold, Cream. */
:root {
  --plum: #1d0f22;
  --plum-0: #170b1b;
  --plum-2: #261329;
  --plum-3: #3a1d40;
  --plum-4: #55295d;
  --cream: #fff6ea;
  --dim: #d6bccb;
  --mute: #b593a7;
  --pink: #ff5c8a;
  --pink-d: #c93a66;
  --gold: #ffc857;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pixel: 'Jersey 15', 'Nunito', system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--plum);
  background-image: radial-gradient(1200px 500px at 85% -10%, #3a1d4066, transparent 60%), radial-gradient(900px 400px at -10% 10%, #c93a6622, transparent 60%);
  color: var(--cream);
  font: 17px/1.55 var(--font);
  overflow-x: hidden;
}
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--pixel); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: clamp(34px, 8vw, 58px); }
h2 { font-size: clamp(26px, 5vw, 36px); margin-bottom: 18px; }
h3 { font-size: 20px; margin-bottom: 6px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 50; background: var(--cream); color: var(--plum); padding: 8px 12px; border-radius: 8px; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; min-height: 60px;
  background: #1d0f22ee; backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--plum-3);
}
.brand { display: inline-flex; flex: none; }
.brand img { display: block; height: 34px; width: auto; image-rendering: pixelated; }
.top nav { display: none; gap: 18px; }
.top nav a, .lang { color: var(--dim); text-decoration: none; font-weight: 700; font-size: 15px; }
.top nav a:hover, .lang:hover { color: var(--cream); }
.lang { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--plum-4); white-space: nowrap; }
.grow { flex: 1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px; border-radius: 14px;
  background: var(--pink); color: var(--plum); font-weight: 800; font-size: 17px; text-decoration: none;
  box-shadow: 0 4px 0 var(--pink-d); white-space: nowrap;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--pink-d); }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 15px; border-radius: 999px; box-shadow: 0 3px 0 var(--pink-d); }
.btn.big { min-height: 58px; padding: 14px 30px; font-size: 20px; font-family: var(--pixel); font-weight: 500; }
main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
section { padding: 44px 0; }
section + section { border-top: 1px solid var(--plum-3); }
.lede { color: var(--dim); font-size: 19px; max-width: 46em; }
.note { color: var(--mute); font-size: 14px; }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 22px 0 0; }
.hero { display: grid; gap: 30px; padding-top: 34px; align-items: center; }
.hero-text h1 { margin-bottom: 16px; }
.hero-show { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: flex-start; }
.hero-show .note { flex-basis: 100%; text-align: center; margin: 0; }
.phone {
  width: 168px; aspect-ratio: 9 / 16; flex: none;
  border-radius: 20px; border: 4px solid var(--plum-4); background: #120a14;
  overflow: hidden; box-shadow: 0 14px 34px #0009;
}
.phone iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.show-row { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 20px; scrollbar-width: none; }
.show-row::-webkit-scrollbar { display: none; }
.steps { display: grid; gap: 14px; counter-reset: none; }
.steps li, .cards li, .games li {
  background: var(--plum-2); border: 2px solid var(--plum-3); border-radius: 14px; padding: 18px;
}
.steps p, .cards p, .games p { color: var(--dim); margin: 0; }
.steps .n {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px;
  border-radius: 10px; background: var(--gold); color: var(--plum); font-family: var(--pixel); font-size: 20px;
}
.cards, .games { display: grid; gap: 14px; }
.games h3 { font-size: 18px; color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  background: var(--plum-2); border: 2px solid var(--plum-4); color: var(--cream); font-weight: 700; text-decoration: none;
}
.chips a:hover { border-color: var(--pink); }
.more { font-weight: 800; }
.faq details { border-bottom: 1px solid var(--plum-3); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 18px; }
.faq p { color: var(--dim); margin: 10px 0 0; max-width: 48em; }
.last { text-align: center; }
.last .cta { align-items: center; }
.page-head { padding-top: 30px; }
.crumbs { color: var(--mute); font-size: 14px; }
.crumbs a { color: var(--mute); }
.split { display: grid; gap: 28px; align-items: start; }
.ticks li { position: relative; padding: 0 0 12px 28px; color: var(--dim); }
.ticks li::before { content: '♥'; position: absolute; left: 0; color: var(--pink); }
.split h2 { font-size: 24px; margin: 8px 0 12px; }
.foot { border-top: 1px solid var(--plum-3); padding: 28px 20px 40px; text-align: center; color: var(--dim); font-size: 15px; }
.foot a { color: var(--dim); }
.muted { color: var(--mute); }
@media (min-width: 620px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cards, .games { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .top nav { display: flex; }
  .hero { grid-template-columns: 1.05fr 1fr; padding-top: 56px; }
  .cards, .games { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.1fr 1fr; }
  .phone { width: 190px; }
  .show-row { justify-content: center; }
}
@media (max-width: 420px) {
  .top { gap: 8px; padding: 8px 12px; }
  .brand img { height: 28px; }
  .phone { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* a game's own page */
.kind { color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 6px; }
.games h3 a { color: var(--gold); text-decoration: none; }
.games h3 a:hover { text-decoration: underline; }
.games .more { font-size: 15px; }
.how { margin: 0 0 14px; padding-left: 22px; color: var(--cream); }
.how li { padding: 0 0 8px; }
.phone.land { width: 300px; aspect-ratio: 16 / 9; }
@media (max-width: 420px) { .phone.land { width: 260px; } }

/* the list of all games: every game with its own live preview, two to a row, in the builder's groups */
.group { scroll-margin-top: 64px; }
.group-nav { margin: 22px 0 10px; }
.group-nav .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.group-nav .chips::-webkit-scrollbar { display: none; }
.group-nav a { white-space: nowrap; }
.group-nav .n { color: var(--gold); margin-left: 4px; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.game-grid > li {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--plum-2); border: 2px solid var(--plum-3); border-radius: 14px; padding: 10px;
}
.game-grid p { color: var(--dim); margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.game-grid .kind { color: var(--gold); font-size: 12px; margin: 0 0 4px; }
.game-grid h3 { font-size: 18px; margin: 0 0 6px; }
.game-grid h3 a { color: var(--gold); text-decoration: none; }
.game-grid h3 a:hover { text-decoration: underline; }
.game-grid .yours { display: none; margin-top: 8px; font-size: 14px; }
.game-grid .yours b { color: var(--cream); }
.game-grid .go { margin-top: auto; padding-top: 10px; }
.stage {
  display: grid; place-items: center; aspect-ratio: 9 / 16; margin-bottom: 12px;
  border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--plum-3) 0, #150b18 78%);
}
.stage .phone { width: 100%; border-width: 3px; border-radius: 12px; box-shadow: none; }
.stage .phone.land { width: 100%; }
/* on a narrow screen a game played sideways has a small picture: say why */
.stage { align-content: center; row-gap: 10px; text-decoration: none; }
.turn { color: var(--mute); font-size: 12px; line-height: 1.3; text-align: center; padding: 0 4px; }
@media (min-width: 620px) {
  .turn { display: none; }
  .group-nav .chips { flex-wrap: wrap; }
  .game-grid { gap: 18px; }
  .game-grid > li { padding: 16px; }
  .game-grid p { font-size: 16px; }
  .game-grid h3 { font-size: 21px; }
  .game-grid .kind { font-size: 13px; }
  .game-grid .yours { display: block; }
  .stage { aspect-ratio: auto; height: 344px; }
  .stage .phone { width: auto; height: 320px; border-width: 4px; border-radius: 18px; box-shadow: 0 10px 26px #0008; }
  .stage .phone.land { width: min(100% - 24px, 520px); height: auto; }
}
@media (min-width: 900px) {
  /* room enough: a game played upright has its words beside the phone; one played sideways keeps them under its wide picture */
  .game-grid > li.up {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto auto 1fr;
    column-gap: 20px; align-content: start;
  }
  .game-grid > li.up .stage { grid-row: 1 / span 5; width: 208px; margin-bottom: 0; }
  .game-grid > li.up .kind { margin-top: 6px; }
  .game-grid > li.up .go { align-self: end; padding-bottom: 6px; }
  .game-grid > li.wide .stage { height: auto; padding: 12px 0; }
  .game-grid > li.wide .stage .phone.land { width: calc(100% - 24px); }
}

/* the bar at the top never runs off a narrow phone: the logo gives way first */
.top .btn.sm { white-space: nowrap; }
@media (max-width: 420px) {
  .brand { flex: 0 1 124px; min-width: 60px; }
  .brand img { width: 100%; height: auto; }
  .top .btn.sm { padding: 6px 11px; font-size: 14px; }
  .lang { padding: 6px 8px; font-size: 14px; }
}
