@font-face { font-family: Outfit; src: url(/fonts/outfit.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
:root { --wall: #0558f4; --deep: #0344cf; --yellow: #f6c304; --paper: #fdf3e6; --ink: #13206a; --soft: #e6efff; --link: #0448d6; --case: #0b1236; }
* { box-sizing: border-box; margin: 0; }
html { background: var(--wall); }
body {
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; overflow-x: hidden;
  background: radial-gradient(90% 70% at 35% 35%, #1b6aff, var(--wall) 55%, var(--deep));
  color: var(--paper); font: 17px/1.55 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* The complete handcrafted logo is one asset; the S is its first letter. */
.name { display: block; width: min(100%, 560px); line-height: 0; text-decoration: none; }
.name img { display: block; width: 100%; height: auto; }

.foot {
  position: relative; pointer-events: none;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 32px 24px max(32px, env(safe-area-inset-bottom)); font-size: 15px; font-weight: 500; color: var(--soft);
}
.foot a { color: inherit; text-decoration: none; pointer-events: auto; }
.foot a:hover, .foot a:focus-visible { color: #fff; }
.foot .by { margin-right: auto; font: 800 22px/1 Outfit, system-ui, sans-serif; letter-spacing: .015em; color: var(--paper); }
.legal { flex-basis: 100%; margin-top: 4px; font-size: 12px; line-height: 1.5; opacity: .8; }

/* Splendoodle's page is a wall to draw on. Only real things (the iPad, the shelves, the paper, the links) stand in
   the way of the crayon; words are painted on the wall, so a noodle runs behind them. */
.home {
  --gutter: max(24px, calc((100vw - 1180px) / 2 + 24px)); position: relative; grid-template-columns: minmax(0, 1fr); background: none;
  font-family: ui-rounded, "SF Pro Rounded", Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.home::before {
  content: ""; position: fixed; inset: 0 0 auto; height: 100vh; height: 100lvh; z-index: -1;
  background: radial-gradient(110% 85% at 32% 26%, var(--wall) 42%, var(--deep));
}
.wall { position: absolute; inset: 0; overflow: hidden; cursor: crosshair; -webkit-tap-highlight-color: transparent; }
.wall canvas { position: absolute; left: 0; width: 100%; height: 1024px; pointer-events: none; }
.wet { position: fixed; inset: 0 0 auto; width: 100%; height: 100vh; height: 100lvh; pointer-events: none; }
.home main { position: relative; pointer-events: none; }
.home main a, .home main button, .home main video, .shelf li, .reel, .pad { pointer-events: auto; }
@media (hover: hover) and (pointer: fine) { .home main, .home .foot { user-select: none; -webkit-user-select: none; } }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

/* The App Store badge is Apple's own artwork, used as it comes. */
.cta { display: flex; align-items: center; gap: 18px; }
.store { display: block; border-radius: 10px; transition: scale .25s cubic-bezier(.3, 1.4, .5, 1); }
.store:hover { scale: 1.04; }
.store:active { scale: .97; }
.store img { display: block; width: auto; height: 58px; }
.qr { display: none; width: 76px; height: 76px; border-radius: 14px; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) { .qr { display: block; } }

.bar {
  position: fixed; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: 52px;
  padding: 0 max(20px, calc((100% - 1132px) / 2)); background: rgba(3, 62, 196, .8); border-bottom: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  visibility: hidden; translate: 0 -100%; transition: translate .4s cubic-bezier(.2, .8, .2, 1), visibility 0s .4s;
}
.bar.on { visibility: visible; translate: 0; transition-delay: 0s; }
.bar a { text-decoration: none; }
.bar .app { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: #fff; }
.bar .app img { width: 28px; height: 28px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.bar .get { padding: 5px 20px; border-radius: 99px; font-size: 15px; font-weight: 800; background: var(--yellow); color: var(--ink); }
.bar .get:hover { background: #ffd83a; }

.hero {
  display: grid; grid-template-columns: minmax(0, clamp(380px, 29vw, 520px)) minmax(0, clamp(560px, 52vw, 920px)); align-items: center; justify-content: center;
  gap: clamp(56px, 7vw, 112px); min-height: 100vh; min-height: 100svh; padding: 48px 40px 168px;
}
.intro .name { width: 100%; }
.pitch span { display: block; }
.pitch { margin-top: 26px; font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; line-height: 1.06; letter-spacing: -.015em; color: #fff; }
.intro .cta { margin-top: 30px; }
.note { margin-top: 18px; font-size: 16px; font-weight: 600; color: var(--soft); }

/* The trailer plays on an iPad, with the iPhone app leaning on its corner. */
.kit { position: relative; container-type: inline-size; }
.ipad, .iphone { background: var(--case); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 44px 90px -34px rgba(2, 16, 80, .85); }
.ipad { position: relative; padding: 13px; padding: 1.75cqw; border-radius: 30px; border-radius: 4.1cqw; }
.ipad video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 17px; border-radius: 2.4cqw; background: var(--wall); }
.iphone { position: absolute; left: -8%; bottom: -10%; width: 22.5%; padding: 6px; padding: .85cqw; border-radius: 30px; border-radius: 4.3cqw; }
.iphone video { display: block; width: 100%; height: auto; aspect-ratio: 444 / 962; border-radius: 25px; border-radius: 3.5cqw; background: var(--wall); }
.sound {
  position: absolute; right: 3.4%; bottom: 4.4%; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; color: #fff; background: rgba(11, 18, 54, .55); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.sound svg { width: 19px; height: 19px; }
.sound .on, .sound[aria-pressed="true"] .off { display: none; }
.sound[aria-pressed="true"] .on { display: block; }

.ways, .tour, .try, .promise, .coda { margin-top: clamp(96px, 13vw, 176px); }
.home h2 {
  padding: 0 24px; font-size: clamp(34px, 5.2vw, 62px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em;
  text-align: center; text-wrap: balance; color: #fff;
}

/* The app's bookcase. Every picture is the same height, with its toy standing at 92% of the way down and its shadow
   falling on the shelf below that, so the boards are one striped background: `--h` is how tall a picture is, `--n`
   how many stand on a shelf, `--face` how deep a board's front is and `--gap` the wall between shelves. */
.ways { margin-top: 0; }
.shelf {
  --h: min(104px, 8.6vw); --n: 8; --face: 27px; --gap: calc(var(--h) * .4); --top: calc(var(--h) * .92); --edge: calc(var(--h) * .986);
  display: flex; flex-wrap: wrap; justify-content: center; row-gap: var(--gap);
  margin-top: clamp(40px, 6vw, 76px); padding: 0 max(12px, calc((100% - 1200px) / 2)) 18px; list-style: none;
  background: linear-gradient(
    transparent var(--top), #ecc820 var(--top), #ffe44a var(--edge),
    #f8c714 var(--edge), #f4ba02 calc(var(--edge) + var(--face) - 3px),
    #d79c00 calc(var(--edge) + var(--face) - 3px), #d79c00 calc(var(--edge) + var(--face)),
    rgba(2, 22, 96, .34) calc(var(--edge) + var(--face)), transparent calc(var(--edge) + var(--face) + 16px)
  ) 0 0 / 100% calc(var(--edge) + var(--face) + var(--gap)) repeat-y;
}
.shelf li {
  position: relative; flex: 0 0 calc(100% / var(--n) - .01px); min-width: 0; display: grid; grid-template-columns: 100%; justify-items: center; align-content: start;
  height: calc(var(--edge) + var(--face)); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.shelf img {
  display: block; width: auto; max-width: none; height: var(--h); transform-origin: 50% 92%;
  transition: translate .35s cubic-bezier(.3, 1.6, .5, 1), rotate .35s cubic-bezier(.3, 1.6, .5, 1);
}
.shelf b {
  position: absolute; left: 50%; bottom: 4px; translate: -50%; padding: 1px 9px 2px; border-radius: 7px; white-space: nowrap;
  font-size: 13.5px; font-weight: 800; line-height: 1.3; background: var(--paper); color: var(--ink);
  box-shadow: 0 1.5px 0 rgba(140, 92, 0, .5);
}
@media (hover: hover) { .shelf li:hover img { translate: 0 -6%; rotate: -3deg; } }
.shelf li.hop img { animation: hop .6s cubic-bezier(.3, .7, .4, 1); }
@keyframes hop {
  20% { translate: 0 2%; scale: 1.07 .9; }
  50% { translate: 0 -22%; scale: .95 1.07; rotate: 4deg; }
  78% { translate: 0 0; scale: 1.05 .94; }
}
/* Eight on the top shelf and seven on each of the rest makes 29; so does 10 10 9, and 6 6 6 6 5. */
@media (min-width: 1000px) and (max-width: 1499px) { .shelf li:nth-child(n + 9) { flex-basis: calc(100% / 7 - .01px); } }
@media (min-width: 1500px) { .shelf { --n: 10; --h: 100px; padding-inline: calc((100% - 1440px) / 2); } }
@media (max-width: 999px) { .shelf { --n: 6; --h: 11.6vw; } }
@media (max-width: 639px) {
  /* Shelves of four and three in turn: 4 3 4 3 4 3 4 4 makes 29. */
  .shelf { --n: 4; --h: 17.4vw; --face: 22px; --gap: calc(var(--h) * .46); padding-inline: 10px; }
  .shelf li:nth-child(7n + 5):nth-child(-n + 21), .shelf li:nth-child(7n + 6):nth-child(-n + 21), .shelf li:nth-child(7n):nth-child(-n + 21) { flex-basis: calc(100% / 3 - .01px); }
  .shelf b { bottom: 3px; padding: 0 6px 1px; border-radius: 6px; font-size: 11px; }
}

/* A look inside: iPad screens, or iPhone ones on a phone. */
.reel {
  display: flex; gap: 32px; margin: -24px 0 -40px; padding: 24px var(--gutter) 40px; list-style: none; overflow-x: auto;
  overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }
.reel:focus-visible { outline-offset: -3px; }
.reel li { flex: none; width: clamp(420px, 44vw, 620px); scroll-snap-align: start; }
.reel picture {
  display: block; padding: 10px; border-radius: 26px; background: var(--case);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 30px 50px -30px rgba(2, 16, 80, .85);
}
.reel img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 16px; background: var(--wall); }
.reel figcaption { margin-top: 22px; padding-right: 12px; }
.reel b { display: block; font-size: 23px; font-weight: 800; line-height: 1.18; letter-spacing: -.01em; color: #fff; text-wrap: balance; }
.reel span { display: block; margin-top: 6px; font-size: 17px; font-weight: 500; line-height: 1.4; color: var(--soft); }
.paddles { display: none; justify-content: flex-end; gap: 14px; margin-top: 32px; padding: 0 var(--gutter); }
.paddles button {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  color: var(--ink); background: var(--yellow); cursor: pointer; transition: background .2s, opacity .2s;
}
.paddles button:hover { background: #ffd83a; }
.paddles button:disabled { opacity: .4; cursor: default; background: var(--yellow); }
.paddles svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .paddles { display: flex; } }

/* A sheet of the app's paper and a corner of its yellow tray. */
.pad {
  display: grid; grid-template-columns: minmax(0, min(520px, 60vh)) auto; align-items: start; justify-content: center; gap: 16px;
  margin-top: clamp(36px, 5vw, 60px); padding: 0 20px;
}
.sheet {
  display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 24px; background: #fcfbf8; touch-action: none; cursor: crosshair;
  box-shadow: 0 34px 60px -32px rgba(2, 16, 80, .85);
}
.tray {
  display: grid; grid-template-columns: repeat(2, 46px); gap: 12px; padding: 14px; border-radius: 24px; background: var(--yellow);
  box-shadow: inset 0 -4px 0 #d79c00, inset 0 2px 0 #ffe44a, 0 28px 50px -30px rgba(2, 16, 80, .85);
}
.tray button {
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--ink); background: var(--paper); box-shadow: 0 2px 0 rgba(140, 92, 0, .45); transition: scale .2s cubic-bezier(.3, 1.6, .5, 1);
}
.tray button:active { scale: .9; }
.tray .ink { background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .55), transparent 42%), var(--c); }
.tray .ink[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.tray svg { width: 22px; height: 22px; }

.promise { padding: 0 24px; text-align: center; }
.plain { max-width: 640px; margin: 24px auto 0; font-size: clamp(22px, 2.7vw, 30px); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: var(--yellow); text-wrap: balance; }
.fine { max-width: 480px; margin: 20px auto 0; font-size: 17px; font-weight: 500; color: var(--soft); text-wrap: balance; }

.coda { display: grid; justify-items: center; margin-bottom: clamp(56px, 8vw, 104px); }
.coda .icon { width: 112px; height: 112px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 30px 50px -24px rgba(2, 16, 80, .85); }
.coda h2 { margin-top: 32px; }
.coda .cta { margin-top: 32px; }

@media (max-width: 899px) {
  .hero { grid-template-columns: minmax(0, 580px); justify-items: center; gap: 40px; min-height: 0; padding: 40px 20px 132px; text-align: center; }
  .intro .name { width: min(78vw, 380px); margin: 0 auto; }
  .pitch { margin-top: 20px; }
  .intro .cta { justify-content: center; margin-top: 24px; }
  .store img { height: 54px; }
  .note { margin-top: 14px; font-size: 15px; }
  .kit { width: 100%; }
}
@media (max-width: 699px) {
  .home { --gutter: 20px; }
  .hero { padding-bottom: 112px; }
  .iphone { display: none; }
  .reel { gap: 16px; }
  .reel li { width: min(58vw, 260px); }
  .reel picture { padding: 6px; border-radius: 13.5% / 6.3%; }
  .reel img { aspect-ratio: 780 / 1696; border-radius: 12.4% / 5.7%; }
  .reel figcaption { margin-top: 16px; padding-right: 4px; }
  .reel b { font-size: 19px; }
  .reel span { font-size: 15px; }
  .pad { grid-template-columns: minmax(0, 440px); gap: 12px; }
  .tray { display: flex; justify-content: space-between; gap: 0; padding: 11px 13px 14px; border-radius: 20px; }
  .tray button { width: min(40px, 9vw); height: min(40px, 9vw); }
  .tray .ink[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
  .tray svg { width: 19px; height: 19px; }
  .sound { width: 34px; height: 34px; }
  .sound svg { width: 16px; height: 16px; }
  .plain { text-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .bar, .store, .shelf img, .tray button { transition: none; }
}

/* Support and privacy: a sheet of paper on the wall */
.doc { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 16px 8px; }
.doc .name { width: min(100%, 320px); margin: 0 0 28px 12px; }
.paper {
  padding: clamp(28px, 5vw, 52px) clamp(20px, 5vw, 56px); border-radius: 24px; background: var(--paper); color: var(--ink);
  box-shadow: 0 1px 0 1px rgba(255, 255, 255, .1), 0 30px 60px -30px rgba(2, 16, 80, .75);
}
.paper a { color: var(--link); }
.paper h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.01em; margin-bottom: 8px; }
.paper h2 { font-size: 20px; line-height: 1.3; margin: 34px 0 8px; }
.paper p + p { margin-top: 12px; }
.paper .lede { color: #4b5590; }
.paper .contact { margin-top: 40px; padding: 18px 20px; border-radius: 16px; background: #f8e7c4; }
.paper footer { margin-top: 44px; color: #4b5590; font-size: 15px; }
