/* Nunito is the closest web match to the rounded system font of the app. One variable file covers every weight. */
@font-face{font-family:Nunito;src:url(/fonts/nunito-latin-wght-normal.woff2) format("woff2");font-weight:200 1000;font-display:swap}

/* Colors come from the SwiftUI source of the app. */
:root{
  --bg:#FFF8EA;        /* app background */
  --ink:#1F2E4F;       /* app ink */
  --accent:#2B4796;    /* app tint */
  --muted:#4A5468;
  --line:rgba(31,46,79,.13);
  --t1:#CFE8FF;--t2:#FFE097;--t3:#CFEDC4;--t4:#F0DBFA; /* the four emoji tiles */
  --bezel:#23262D;
  --wrap:1120px;
  --gap:32px;
  --section:clamp(72px,8vw,112px);
}
*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{background:var(--bg);color:var(--ink);font:500 18px/1.6 Nunito,ui-rounded,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
img{display:block;max-width:100%;height:auto}
a{color:var(--accent);text-underline-offset:3px}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:6px}
.wrap{max-width:var(--wrap);margin-inline:auto;padding-inline:24px}
h1,h2,h3{font-weight:800;color:var(--ink);text-wrap:balance}
h2{font-size:clamp(30px,3.6vw,42px);line-height:1.1;letter-spacing:-.02em}
h3{font-size:20px;line-height:1.3;letter-spacing:-.005em}
p{text-wrap:pretty}

/* Header */
.bar{display:flex;align-items:center;gap:8px;padding-block:14px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:20px;color:var(--ink);text-decoration:none;margin-right:auto;padding-block:6px}
.brand img{width:40px;height:40px;border-radius:10px;box-shadow:0 0 0 1px rgba(31,46,79,.2)}
.bar nav{display:flex}
.bar nav a{color:var(--ink);text-decoration:none;font-weight:600;font-size:16px;padding:12px 14px}
.bar nav a:hover{color:var(--accent)}
/* The store link in the header: the one filled element up there. */
.store{margin-left:12px;font-weight:700;font-size:15px;color:#fff;background:var(--accent);text-decoration:none;white-space:nowrap;padding:10px 16px;border-radius:12px}
.store:hover,.cta:hover{background:#233C80}
/* The main action: same blue, larger. */
.cta{display:inline-block;margin-top:28px;font-weight:700;font-size:17px;color:#fff;background:var(--accent);text-decoration:none;padding:14px 22px;border-radius:14px}

/* Hero: the promise left, a live copy of the app in an iPad right. */
.hero{display:grid;grid-template-columns:1fr 420px;gap:72px;align-items:center;padding-top:clamp(20px,3vw,44px)}
h1{font-size:clamp(44px,5.6vw,72px);line-height:1.02;letter-spacing:-.03em}
.lede{font-size:clamp(19px,1.7vw,22px);line-height:1.5;max-width:24em;margin-top:24px}
.points{list-style:none;padding:0;margin-top:32px;display:grid;gap:10px}
.points li{display:flex;gap:12px;align-items:center}
/* A check in the app's tint, drawn with a mask. */
.points li::before{content:"";flex:none;width:18px;height:18px;background:var(--accent);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center/contain no-repeat}

.ipad{background:var(--bezel);border-radius:32px;padding:8px;box-shadow:0 24px 48px -28px rgba(31,46,79,.35),0 1px 3px rgba(31,46,79,.1)}
.screen{background:var(--bg);border-radius:24px;padding:18px 20px 20px;display:flex;flex-direction:column;align-items:center;gap:14px}
.screen .title{font-weight:800;font-size:16px;color:var(--accent)}
.tiles{width:100%;display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.tile{aspect-ratio:1;border:0;border-radius:16px;font-size:34px;line-height:1;cursor:pointer;display:grid;place-items:center;transition:transform .12s,box-shadow .12s,filter .12s}
.tile:hover{filter:brightness(.97)}
.tile:active{transform:scale(.94)}
.tile[aria-pressed=true]{box-shadow:inset 0 0 0 3px var(--accent)}
.tile:nth-child(1){background:var(--t1)}.tile:nth-child(2){background:var(--t2)}
.tile:nth-child(3){background:var(--t3)}.tile:nth-child(4){background:var(--t4)}
.tile.more{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.tile.more svg{width:40%;height:40%}
.sheet{position:relative;width:80%;aspect-ratio:2/3;background:#fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.08),0 6px 16px -8px rgba(0,0,0,.16)}
/* The padding keeps the drawing off the paper edge, like a printed page. */
.sheet img{position:absolute;inset:0;width:100%;height:100%;padding:5%;object-fit:contain;transition:opacity .25s}
.sheet.drawing img{opacity:0}
/* The waiting state of the app: a pencil draws a wavy line, then the picture appears. */
.wait{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-weight:800;font-size:17px}
.sheet.drawing .wait{display:flex}
.wait svg{width:72%;overflow:visible}
.print{display:inline-flex;align-items:center;justify-content:center;width:64px;height:46px;border:0;border-radius:12px;background:#DCE4F6;color:var(--accent);cursor:pointer;transition:opacity .2s,background .12s}
.print:hover{background:#CFD9F2}
.print:disabled{opacity:.35;cursor:default}
.print svg{width:26px;height:26px}
.demo-note{margin-bottom:8px;text-align:center;font-size:14px;color:var(--muted)}

section{padding-top:var(--section)}
.head{max-width:680px}
.head p{margin-top:10px;font-size:19px;color:var(--muted)}

/* Steps: the same frame of the iPad screen in every step, so only the sheet changes. */
.steps{list-style:none;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap);margin-top:40px}
.shot{border-radius:16px;overflow:hidden;box-shadow:0 0 0 1px var(--line),0 12px 28px -18px rgba(31,46,79,.3);background:var(--bg)}
.shot img{width:100%}
.steps h3{margin-top:20px;display:flex;align-items:baseline;gap:10px}
.steps .n{color:var(--accent);font-variant-numeric:tabular-nums}
.steps p{margin-top:6px;color:var(--muted)}

/* Wishes: what a child said, and the page that came out. Quotes sit on a shared baseline above the pages. */
.wishes{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap);margin-top:40px}
.wishes figure{display:flex;flex-direction:column}
.wishes blockquote{font-weight:800;font-size:20px;line-height:1.3;min-height:2.6em;display:flex;align-items:flex-end;text-wrap:balance}
.wishes img{margin-top:14px;aspect-ratio:2/3;object-fit:contain;padding:5%;background:#fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.08),0 12px 28px -16px rgba(31,46,79,.3)}

/* Heading left, content right. The first rule of the content lines up with the top of the heading. */
.split{display:grid;grid-template-columns:1fr 2fr;gap:var(--gap);align-items:start}
.split>:last-child{margin-top:6px}
@media (min-width:861px){.split .head{position:sticky;top:32px}}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;vertical-align:top;padding:14px 0;border-top:1px solid var(--line);font-weight:500}
tr:last-child :is(th,td){border-bottom:1px solid var(--line)}
th{font-weight:700;width:200px;padding-right:24px}
td{color:var(--muted)}

details{border-top:1px solid var(--line)}
details:last-of-type{border-bottom:1px solid var(--line)}
summary{cursor:pointer;font-weight:700;padding:14px 36px 14px 0;list-style:none;position:relative}
summary::-webkit-details-marker{display:none}
/* Anchored to the first line, so the sign stays put when the answer opens or the question wraps. */
summary::before,summary::after{content:"";position:absolute;right:4px;top:28px;width:14px;height:2px;margin-top:-1px;border-radius:1px;background:var(--accent)}
summary::after{rotate:90deg;transition:rotate .15s}
details[open] summary{padding-bottom:6px}
details[open] summary::after{rotate:0deg}
summary:hover{color:var(--accent)}
details p{padding:0 36px 16px 0;color:var(--muted);max-width:60ch}

/* Closing: the icon, the name and when it comes, as one unit. */
.end{padding-block:var(--section) 80px;display:flex;flex-direction:column;align-items:center;text-align:center}
.end img{width:80px;height:80px;border-radius:18px;box-shadow:0 0 0 1px rgba(31,46,79,.16),0 12px 24px -14px rgba(31,46,79,.35);margin-bottom:18px}
.end p{color:var(--muted);font-size:19px;margin-top:6px}
.end .cta{margin-top:24px}
/* The rule spans the content width only, so it lines up with everything above it. */
footer{padding-inline:24px}
footer .wrap{max-width:calc(var(--wrap) - 48px);display:flex;gap:0 24px;flex-wrap:wrap;padding:12px 0 30px;border-top:1px solid var(--line);font-size:15px;color:var(--muted)}
footer a,footer span{color:inherit;padding-block:10px}
footer span{margin-left:auto}

@media (max-width:980px){
  .hero{grid-template-columns:1fr 380px;gap:48px}
}
@media (max-width:860px){
  .bar nav{display:none}
  .hero{grid-template-columns:1fr;gap:0;padding-top:12px}
  .hero>:first-child{display:contents}
  .lede{margin-top:14px}
  .demo{order:1;margin-top:20px}
  .points{order:2;margin-top:28px;gap:6px}
  br.wide{display:none}
  .sheet{width:69%}
  .hero .ipad{width:100%;max-width:400px;margin-inline:auto}
  /* The header already carries the store link on phones; this keeps the tab order equal to the visual order. */
  .hero .cta{display:none}
  .steps,.wishes{grid-template-columns:1fr;gap:44px;margin-top:28px}
  /* Steps: the screen beside its text, so three tall screens don't fill three screens of scrolling. */
  .steps{gap:28px}
  .steps li{display:grid;grid-template-columns:min(46%,240px) 1fr;grid-template-rows:auto 1fr;column-gap:16px;align-items:start}
  .steps .shot{grid-row:1/-1;border-radius:12px}
  .steps h3{grid-row:1;margin-top:0;font-size:18px;line-height:1.25}
  .steps p{grid-row:2;font-size:16px;line-height:1.5}
  .wishes figure{align-items:center;text-align:center}
  .wishes blockquote{min-height:0;justify-content:center}
  .wishes{gap:32px}
  .wishes img{width:100%;max-width:240px}
  .split{grid-template-columns:1fr;gap:20px}
  .split>:last-child{margin-top:0}
  footer span{margin-left:0;width:100%}
}
/* On phones each fact stacks its label over its value, so values keep the full width. */
@media (max-width:600px){
  .wrap,footer{padding-inline:20px}
  footer .wrap{padding-inline:0}
  table,tbody,tr,th,td{display:block;width:auto}
  tr{border-top:1px solid var(--line);padding-block:12px}
  tr:last-child{border-bottom:1px solid var(--line)}
  th,td,tr:last-child :is(th,td){border:0;padding:0}
  td{margin-top:2px}
  details p{padding-right:0}
}
@media (max-width:420px){
  .screen{padding:14px 12px 16px;gap:12px}
  .sheet{width:65%}
  .demo{margin-top:12px}
  .tiles{gap:6px}
  .tile{font-size:27px;border-radius:13px}
  .ipad{padding:6px;border-radius:28px}
  .screen{border-radius:22px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.sheet img,.tile,.print,summary::after{transition:none}}

/* Printing the home page prints only the coloring page of the demo, full size on A4. */
@media print{
  @page{size:A4 portrait;margin:10mm}
  body{background:#fff}
  .home>:not(main),.home main>:not(.hero),.hero>:not(.demo),.demo>:not(.ipad),.screen>:not(.sheet),.wait{display:none!important}
  .hero{display:block;padding:0}
  .ipad,.screen{background:none;box-shadow:none;padding:0;border-radius:0}
  .sheet{box-shadow:none;width:100%;height:270mm;aspect-ratio:auto}
}

/* Legal pages: aligned with the header, text in a readable measure. */
.legal{padding-block:clamp(32px,5vw,64px) clamp(64px,8vw,112px)}
.legal>*{max-width:62ch}
.legal h1{font-size:clamp(36px,4.4vw,52px)}
.legal h1+p{margin-top:20px}
.legal h2{font-size:22px;letter-spacing:-.01em;margin-top:40px}
.legal p,.legal ul{margin-top:12px}
.legal ul{padding-left:20px}
.legal li+li{margin-top:6px}
