/* Typing Paw site: one stylesheet for every page. The font and every picture are served
   from this site, so a visit sends nothing to anyone but this host. */

@font-face {
  font-family: "Paw Sans";
  src: url("/fonts/GoogleSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --sky: #a9defa;
  --sky-pale: #e6f6ff;
  --cream: #fffaf0;
  --mint: #e2f6ef;
  --white: #ffffff;
  --blue: #1b5faa;
  --blue-soft: #4a9df0;
  --teal: #17a07c;
  --teal-dark: #0e7a5e;
  --yellow: #ffc93c;
  --yellow-dark: #e2a100;
  --ink: #2c4258;
  --ink-soft: #5b7186;
  --wood: #5a3a22;
  --line: #d9ece6;
  --shadow: 0 8px 22px rgba(27, 95, 170, .12);
  --radius: 22px;
  --display: "Paw Sans", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; position: relative; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; text-decoration: none; line-height: 1;
  border-radius: 999px; padding: 13px 24px; font-size: 16px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.yellow { background: var(--yellow); color: var(--wood); box-shadow: 0 4px 0 var(--yellow-dark); }
.btn.yellow:hover { color: var(--wood); box-shadow: 0 6px 0 var(--yellow-dark); }
.btn.green { background: var(--teal); color: #fff; box-shadow: 0 4px 0 var(--teal-dark); }
.btn.green:hover { color: #fff; box-shadow: 0 6px 0 var(--teal-dark); }
.btn.ghost { background: #fff; color: var(--blue); box-shadow: 0 4px 0 #cfe3f5; }
.btn.small { padding: 10px 18px; font-size: 14px; }
.btn.big { padding: 17px 32px; font-size: 19px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------------------------------------------------------------- top bar */

.nav { position: sticky; top: 0; z-index: 50; background: #fff; }
/* The bar's bottom edge is a row of little clouds. */
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; pointer-events: none;
  background: radial-gradient(circle at 14px 0, #fff 12px, transparent 12.5px) 0 0 / 28px 12px repeat-x;
  filter: drop-shadow(0 3px 3px rgba(27, 95, 170, .10));
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--blue); text-decoration: none; font-family: var(--display); font-size: 21px; }
.brand img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 2px 6px rgba(27, 95, 170, .2); }
.brand:hover { color: var(--blue); }
.links { display: flex; gap: 26px; font-family: var(--display); font-size: 15px; }
.links a { color: var(--ink); text-decoration: none; }
.links a:hover, .links a[aria-current] { color: var(--teal); }
.nav-cta { display: flex; gap: 10px; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-pale) 62%, #f4fbe9 100%);
  padding: 46px 0 250px;
}
.hero-inner { position: relative; z-index: 3; max-width: 640px; margin: 0 auto; }
.hero .logo { width: min(330px, 78%); margin: 0 auto 6px; filter: drop-shadow(0 8px 14px rgba(27, 95, 170, .18)); }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.01em; }
.hero h1 span { display: block; }
.hero h1 .l1 { color: var(--blue); }
.hero h1 .l2 { color: var(--teal); }
.hero p { font-size: 19px; margin: 0 auto 24px; max-width: 26em; color: var(--ink); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.cloud { position: absolute; fill: #fff; opacity: .9; z-index: 1; animation: float 14s ease-in-out infinite alternate; }
.cloud.c1 { width: 190px; left: 4%; top: 60px; }
.cloud.c2 { width: 130px; left: 24%; top: 190px; opacity: .7; animation-duration: 18s; }
.cloud.c3 { width: 210px; right: 5%; top: 90px; animation-duration: 16s; }
.cloud.c4 { width: 120px; right: 26%; top: 30px; opacity: .7; animation-duration: 20s; }
@keyframes float { from { transform: translateX(-14px); } to { transform: translateX(14px); } }

/* A word on its paper scroll, as it falls in the game. */
.word {
  position: absolute; z-index: 2; left: var(--x); top: var(--y);
  width: 150px; aspect-ratio: 360 / 162; display: grid; place-items: center;
  background: url("/img/words/plain.webp") center / 100% 100% no-repeat;
  font-family: var(--display); font-size: 27px; color: var(--wood); padding-bottom: 3px;
  filter: drop-shadow(0 6px 8px rgba(27, 95, 170, .18));
  animation: bob var(--t, 6s) ease-in-out infinite alternate;
}
.word.blue { background-image: url("/img/words/blue.webp"); color: #2456a6; }
.word.red { background-image: url("/img/words/red.webp"); color: #b23a22; }
.word.purple { background-image: url("/img/words/purple.webp"); color: #6a3fb0; }
.word.green { background-image: url("/img/words/green.webp"); color: #2c7a45; }
@keyframes bob {
  from { transform: translateY(-10px) rotate(var(--r, -4deg)); }
  to { transform: translateY(12px) rotate(calc(var(--r, -4deg) * -1)); }
}

.hills { position: absolute; left: 0; bottom: -1px; width: 100%; height: 230px; z-index: 2; }
.critter { position: absolute; z-index: 3; bottom: 34px; filter: drop-shadow(0 10px 10px rgba(40, 90, 40, .22)); }
.critter.a { left: max(2%, calc(50% - 600px)); width: 250px; }
.critter.b { left: max(18%, calc(50% - 410px)); width: 170px; bottom: 24px; z-index: 4; }
.critter.c { right: max(2%, calc(50% - 600px)); width: 250px; }
.critter.d { right: max(18%, calc(50% - 410px)); width: 170px; bottom: 24px; z-index: 4; }

.perks {
  position: relative; z-index: 6; list-style: none; margin: -40px auto 0; padding: 14px 10px;
  max-width: 860px; width: calc(100% - 40px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-radius: 999px; box-shadow: var(--shadow);
  font-family: var(--display); font-size: 15px; color: var(--ink);
}
.perks li { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 6px 10px; border-left: 2px solid #e8f0f6; }
.perks li:first-child { border-left: 0; }
.perks svg { width: 26px; height: 26px; flex: none; }

/* ---------------------------------------------------------------- sections */

section { position: relative; padding: 70px 0; }
.band { background: var(--mint); margin: 46px 0; }
.wave { position: absolute; left: 0; width: 100%; height: 46px; fill: var(--mint); }
.wave.top { bottom: calc(100% - 1px); }
.wave.bottom { top: calc(100% - 1px); transform: scaleY(-1); }

.title {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; color: var(--blue); margin: 0 0 8px; text-align: center;
}
.title::before, .title::after {
  content: ""; width: 22px; height: 22px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffc93c' d='M12 0c1 7 5 11 12 12-7 1-11 5-12 12-1-7-5-11-12-12 7-1 11-5 12-12z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sub { text-align: center; color: var(--ink-soft); margin: 0 auto 36px; max-width: 34em; }

.tag {
  display: inline-block; font-family: var(--display); font-size: 12px; line-height: 1;
  padding: 6px 10px; border-radius: 999px; background: #dff3ea; color: var(--teal-dark);
}
.tag.gold { background: #fff0c2; color: #8a6100; }

/* Power-ups: pastel tiles, with a friend and the game's two signs either side. */
.powers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 800px; margin: 0 auto; }
.power {
  background: var(--tint); border: 4px solid #fff; border-radius: var(--radius);
  padding: 20px 14px 18px; text-align: center; box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.power:hover { transform: translateY(-5px) rotate(-1deg); }
.power img { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 18px; }
.power b { display: block; font-family: var(--display); font-size: 22px; letter-spacing: .05em; color: var(--tone); }
.power span { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.45; margin-top: 4px; }
.power.ice { --tint: #dcedff; --tone: #2b6fd6; }
.power.fire { --tint: #ffe4d8; --tone: #d9482b; }
.power.slash { --tint: #ece3ff; --tone: #7a48cf; }
.power.slow { --tint: #dcf5e1; --tone: #2e8a4e; }
.mascot { position: absolute; bottom: -70px; z-index: 2; filter: drop-shadow(0 8px 8px rgba(23, 160, 124, .2)); }
.mascot.left { left: 8px; width: 150px; }
.mascot.right { right: 0; display: flex; gap: 6px; align-items: flex-end; }
.mascot.right img { height: 132px; width: auto; }

/* Friends: a row to swipe, one card per animal in its own room. */
.rail-head { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 26px; }
.rail-head .title { margin: 0; }
.rail-head .count { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.count { font-family: var(--display); font-size: 14px; color: var(--teal-dark); border: 2px solid var(--teal); border-radius: 999px; padding: 7px 16px; background: #fff; }
.rail-box { position: relative; }
.rail {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 22px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.friend {
  flex: none; width: 236px; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); scroll-snap-align: start;
}
.friend img { width: 100%; aspect-ratio: 520 / 409; object-fit: cover; }
.friend div { padding: 12px 14px 14px; }
.friend b { display: block; font-family: var(--display); font-size: 17px; color: var(--blue); margin-bottom: 6px; }
.arrow {
  position: absolute; top: 40%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blue-soft); color: #fff; box-shadow: 0 4px 0 #2f7ed0;
  display: grid; place-items: center;
}
.arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.arrow.prev { left: -18px; }
.arrow.next { right: -18px; }
.arrow:hover { background: var(--blue); }

/* Keyboards: each theme's frame on its own tile. */
.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.key {
  flex: 0 1 calc(25% - 14px); background: #fff; border-radius: 20px; padding: 8px 8px 12px; text-align: center;
  box-shadow: var(--shadow); transition: transform .18s ease;
}
.key:hover { transform: translateY(-4px); }
.key img { width: 100%; aspect-ratio: 520 / 420; object-fit: cover; border-radius: 14px; }
.key b { display: block; font-family: var(--display); font-size: 16px; color: var(--ink); margin-top: 10px; }

/* The wide banner: words on one side, the game on the other. */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; overflow: hidden;
  background: linear-gradient(120deg, #cfeeff 0%, #e9f8ff 55%, #fff3d6 100%);
  border-radius: 30px; box-shadow: var(--shadow); padding: 0 44px 0 20px; min-height: 380px;
}
.feature h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin: 0 0 10px; color: var(--blue); }
.feature h3 em { font-style: normal; color: var(--teal); }
.feature p { margin: 0 0 22px; color: var(--ink); }
.phones { position: relative; height: 380px; }
.phone {
  position: absolute; width: 190px; border-radius: 30px; overflow: hidden;
  border: 7px solid #24384c; background: #24384c; box-shadow: 0 18px 34px rgba(27, 95, 170, .25);
}
.phone.one { left: 4%; top: 58px; transform: rotate(-8deg); }
.phone.two { left: 50%; top: 26px; transform: translateX(-50%); z-index: 2; }
.phone.three { right: 4%; top: 58px; transform: rotate(8deg); }

/* How to play: three cards, each with a friend. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: start; }
.avatar { position: relative; width: 76px; height: 76px; border-radius: 50%; background: var(--tint, #ffe9c9); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; border-radius: 50%; }
.avatar i {
  position: absolute; right: -6px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--yellow); color: var(--wood); font: 700 15px/30px var(--display); text-align: center;
  border: 3px solid #fff; font-style: normal;
}
.steps h3 { margin: 2px 0 4px; font-size: 19px; color: var(--blue); }
.steps p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* Get the game. */
.get { text-align: center; background: linear-gradient(180deg, var(--cream) 0%, #d8f1fb 100%); padding: 70px 0 120px; overflow: hidden; }
.get h2 { font-size: clamp(26px, 3.4vw, 36px); color: var(--blue); margin: 0 0 8px; }
.get p { margin: 0 auto 22px; max-width: 26em; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.store {
  display: inline-flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 20px; border-radius: 14px; min-width: 186px;
  background: #1d2b3a; color: #fff; text-decoration: none;
  font-family: var(--display); font-size: 18px; line-height: 1.15;
}
.store small { display: block; font-family: var(--body); font-weight: 600; font-size: 11.5px; opacity: .8; }
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store[aria-disabled="true"] { cursor: default; }
.store:not([aria-disabled="true"]):hover { color: #fff; transform: translateY(-2px); }
.get .note { margin: 16px auto 0; font-size: 14.5px; color: var(--ink-soft); }
.get .pal { position: absolute; bottom: -62px; width: 200px; filter: drop-shadow(0 8px 8px rgba(27, 95, 170, .2)); }
.get .pal.left { left: 3%; transform: rotate(-4deg); }
.get .pal.right { right: 3%; transform: rotate(4deg); }

/* ---------------------------------------------------------------- footer */

footer { position: relative; background: var(--teal); color: #e9fff8; padding: 34px 0 26px; font-size: 15px; }
footer .wave { fill: var(--teal); }
.foot { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.foot .brand { color: #fff; margin-bottom: 10px; }
.foot p { margin: 0; max-width: 20em; opacity: .9; }
.foot h4 { font-family: var(--display); font-size: 15px; color: var(--yellow); margin: 6px 0 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 5px 0; }
footer a { color: #e9fff8; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.copy { text-align: center; margin: 26px 0 0; font-size: 13.5px; opacity: .85; }

/* ---------------------------------------------------------------- text pages */

.page { padding: 56px 0 110px; background: linear-gradient(180deg, var(--sky-pale) 0, var(--cream) 320px); }
.page .card { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: clamp(22px, 4vw, 48px); max-width: 780px; margin: 0 auto; }
.page h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 0 0 6px; color: var(--blue); }
.page .date { color: var(--ink-soft); margin: 0 0 28px; font-size: 15px; }
.page h2 { font-size: 21px; margin: 32px 0 8px; color: var(--teal-dark); }
.page ul { padding-left: 22px; }
.page li { margin: 6px 0; }
.page .note { background: var(--mint); border-radius: 16px; padding: 14px 18px; }
.mail { font-family: var(--display); font-size: 19px; }

/* ---------------------------------------------------------------- smaller screens */

@media (max-width: 1240px) {
  .word.far { display: none; }
}

@media (max-width: 1180px) {
  .arrow.prev { left: 4px; }
  .arrow.next { right: 4px; }
  .mascot, .mascot.right { display: none; }
}

@media (max-width: 1020px) {
  .word { display: none; }
  .critter.b, .critter.d { display: none; }
  .critter.a, .critter.c { width: 200px; }
  .key { flex-basis: calc(33.333% - 12px); }
  .get .pal { width: 160px; bottom: -48px; }
}

@media (max-width: 860px) {
  .links { display: none; }
  .hero { padding: 30px 0 210px; }
  .critter.a, .critter.c { width: 150px; bottom: 44px; }
  .critter.a { left: 4%; }
  .critter.c { right: 4%; }
  .cloud.c2, .cloud.c4 { display: none; }
  .perks { grid-template-columns: repeat(2, 1fr); border-radius: 26px; row-gap: 6px; margin-top: -30px; }
  .perks li { justify-content: flex-start; padding-left: 16px; }
  .perks li:nth-child(odd) { border-left: 0; }
  section { padding: 54px 0; }
  .powers { grid-template-columns: repeat(2, 1fr); }
  .rail-head { flex-direction: column; gap: 12px; }
  .rail-head .count { position: static; transform: none; }
  .arrow { display: none; }
  .keys { gap: 14px; }
  .key { flex-basis: calc(50% - 7px); }
  .feature { grid-template-columns: 1fr; padding: 32px 22px 0; text-align: center; }
  .phones { height: 300px; max-width: 400px; width: 100%; margin: 6px auto 0; order: 2; }
  .phone { width: 160px; border-width: 6px; border-radius: 26px; }
  .phone.one, .phone.three { top: 50px; }
  .phone.two { top: 20px; }
  .steps { grid-template-columns: 1fr; }
  .get { padding-bottom: 150px; }
  .get .pal { width: 130px; bottom: -36px; }
  .get .pal.left { left: 8%; }
  .get .pal.right { right: 8%; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .nav .brand span { display: none; }
  .nav-cta .btn.yellow { display: none; }
  .critter.a, .critter.c { width: 120px; }
  .perks { font-size: 13.5px; }
  .perks li { padding-left: 8px; gap: 7px; }
  .power b { font-size: 19px; }
  .friend { width: 210px; }
  .store { min-width: 0; flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud, .word { animation: none; }
  .btn, .power, .key { transition: none; }
}
