/* The Mip & Friends website: the apps' "sticker book" look (Sunshine
   skin). The whole site's styles, in this one file. No outside fonts: the
   system's rounded font where there is one. */
:root {
  --line: #EADFC6;
  /* Layout: content never wider than --max; 16px side margins on phones. */
  --max: 1080px;
  --gutter: 16px;

  --paper: #FFF1D6;
  --dot: #F2D9A8;
  --ink: #2A1F3D;
  --soft: #5E5470;
  --white: #FFFFFF;
  --yellow: #FFD84D;
  --orange: #F26B3A;
  --blue: #3D7AE0;
  --green: #1E9E80;
  --pink: #E0368A;
  --purple: #8B4FD6;
  --shadow: 0 6px 18px rgba(42, 31, 61, 0.14);
  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (min-width: 700px) {
  :root { --gutter: 32px; }
}

* { box-sizing: border-box; }

/* The column every section sits in. */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* "Skip to content" link, shown only when reached with the keyboard. */
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--white); color: var(--ink);
  padding: 8px 14px; border-radius: 10px; font-weight: 700;
}
.skip:focus { left: var(--gutter); }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 2px, transparent 2.5px);
  background-size: 26px 26px;
  color: var(--ink);
  font: 18px/1.55 var(--round);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--purple); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap.narrow { max-width: 760px; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem;
}
.brand img { width: 48px; height: 48px; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 700;
  background: var(--white); border-radius: 999px; padding: 8px 16px;
  box-shadow: var(--shadow);
}
.nav a[aria-current="page"] { background: var(--yellow); }
.brand { white-space: nowrap; }
.nav-short { display: none; }
/* Phones: Mip alone is the home link (the name is just below on the home
   page), and the apps' names shorten, so the four buttons fit on one line. */
@media (max-width: 520px) {
  .nav-long {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .nav-short { display: inline; }
  .brand-name {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .nav a { padding: 7px 13px; font-size: 0.95rem; }
}

/* Sticker: white edge, rounded, a slight tilt. */
.sticker {
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.tilt-l { transform: rotate(-1.2deg); }
.tilt-r { transform: rotate(1deg); }
@media (prefers-reduced-motion: no-preference) {
  .sticker, .shot { transition: transform 0.25s ease; }
  .sticker:hover, .shot:hover { transform: rotate(0) scale(1.01); }
}

/* Home */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center;
  padding: 24px 0 40px; text-align: center;
}
.hero .pip { width: min(300px, 70vw); margin: 0 auto; }
.hero .friends { width: min(460px, 92vw); margin: 0 auto; }
.tagline { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 800; margin-bottom: 0.3em; }
.devices { color: var(--soft); font-weight: 700; }
.intro { max-width: 560px; margin-left: auto; margin-right: auto; }
@media (min-width: 820px) {
  .hero { grid-template-columns: 1fr 1.15fr; text-align: left; padding-top: 40px; }
  .hero .pip { width: 340px; }
  .hero .friends { width: 480px; }
  .intro { margin-left: 0; }
}

.store {
  display: inline-block; margin-top: 8px;
  background: var(--ink); color: var(--white); text-decoration: none;
  font-weight: 800; border-radius: 999px; padding: 12px 22px;
  border: 4px solid var(--white); box-shadow: var(--shadow);
}
.store.soon { background: var(--white); color: var(--ink); border-color: var(--yellow); }

section { padding: 28px 0; }
.center { text-align: center; }

.shots {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  max-width: 520px; margin: 0 auto;
}
@media (min-width: 820px) { .shots { grid-template-columns: repeat(4, 1fr); max-width: none; } }
.shot {
  border: 6px solid var(--white); border-radius: 30px; overflow: hidden;
  box-shadow: var(--shadow); background: var(--white);
}
.shot:nth-child(odd) { transform: rotate(-1.5deg); }
.shot:nth-child(even) { transform: rotate(1.5deg); }
.ipad { max-width: 460px; margin: 36px auto 0; border-radius: 26px; transform: rotate(-0.8deg); }
.ipad img { border-radius: 20px; }
.caption { color: var(--soft); max-width: 620px; margin: 14px auto 0; text-align: center; }

.cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards.three { grid-template-columns: repeat(3, 1fr); } .cards.four { grid-template-columns: repeat(4, 1fr); } }
.cards .sticker:nth-child(3n+1) { transform: rotate(-0.8deg); }
.cards .sticker:nth-child(3n+2) { transform: rotate(0.6deg); }
.cards .sticker h3::before {
  content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  margin-right: 8px; vertical-align: 2px; background: var(--orange);
}
.cards .sticker:nth-child(4n+2) h3::before { background: var(--blue); }
.cards .sticker:nth-child(4n+3) h3::before { background: var(--green); }
.cards .sticker:nth-child(4n+4) h3::before { background: var(--pink); }
.cards p { margin: 0; }

.meet {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center;
}
/* Pip in the middle, Mip and Kip smaller at her sides, facing her. Sized
   as shares of their column, so they shrink rather than spill onto the text. */
.meet .pair { display: flex; justify-content: center; align-items: flex-end; gap: 2%; min-width: 0; }
.meet .pair img { width: 40%; max-width: 160px; min-width: 0; }
.meet .pair img.friend { width: 28%; max-width: 110px; }
.meet .pair img.flip { transform: scaleX(-1); }
@media (min-width: 820px) { .meet { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }

/* Text pages */
.page { padding: 12px 0 40px; }
.page .sticker { padding: 28px clamp(20px, 4vw, 40px); }
.page h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.page h2 { font-size: 1.35rem; margin-top: 1.4em; }
.updated { color: var(--soft); font-weight: 700; }
.summary {
  background: #FFF8E6; border: 3px dashed var(--yellow); border-radius: 22px;
  padding: 16px 20px; margin: 18px 0 8px;
}
.summary h2 { margin-top: 0; }
.page-head { display: flex; align-items: center; gap: 16px; }
.page-head img { width: 96px; flex: none; }

details {
  border-top: 2px solid #F3EAD6; padding: 12px 0;
}
details:last-of-type { border-bottom: 2px solid #F3EAD6; }
summary {
  cursor: pointer; font-weight: 800; font-size: 1.08rem; list-style: none;
  display: flex; justify-content: space-between; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--orange); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; }

/* The apps on the home page. */
.apps { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 820px) { .apps { grid-template-columns: repeat(3, 1fr); } }
.app { display: flex; gap: 16px; align-items: flex-start; }
.app img { width: 84px; height: 84px; flex: none; border-radius: 20px; }
.app-blank {
  width: 84px; height: 84px; flex: none; border-radius: 20px;
  border: 3px dashed var(--dot); display: grid; place-items: center;
  font-size: 2rem; font-weight: 800; color: var(--soft);
}
/* The text column fills the card's height, and the status and link sit at
   its foot, so the three cards line up whatever their text length. */
.app-text { align-self: stretch; display: flex; flex-direction: column; }
.app-foot { margin-top: auto; padding-top: 0.4em; }
.app-foot p:last-child { margin-bottom: 0; }
.app h3 { margin-bottom: 0.2em; }
.app p { margin: 0 0 0.4em; }
.app .status {
  display: inline-block; font-weight: 800; font-size: 0.9rem;
  background: #FFF8E6; border: 2px solid var(--yellow); border-radius: 999px; padding: 2px 10px;
}
.apps .app:nth-child(1) { transform: rotate(-0.8deg); }
.apps .app:nth-child(2) { transform: rotate(0.6deg); }

/* Our own links above the footer. */
.site-links { padding-top: 32px; color: var(--soft); font-size: 0.95rem; }
.site-links .links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.site-links .links a { color: var(--ink); font-weight: 700; }
.site-links p { margin: 0 0 6px; }
.langs a { margin-right: 10px; }
.site-foot {
  margin-top: 24px;
  font: 0.9rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--soft);
}
.site-foot-in {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
}
.site-foot p { margin: 0; }

.notfound { text-align: center; padding: 40px 0 60px; }
.notfound img { width: 220px; margin: 0 auto 16px; }

/* The founder's note on the home page: their photo beside their words. */
.founder {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start;
  margin: 28px 0; padding: 26px clamp(20px, 4vw, 40px);
}
.founder-frame { position: relative; width: min(260px, 70%); margin: 0 auto 18px; }
.founder-photo {
  width: min(260px, 70%); margin: 0 auto; border-radius: 24px;
  border: 8px solid var(--white); box-shadow: var(--shadow), 0 0 0 3px var(--yellow); transform: rotate(-2deg);
}
.founder-frame .founder-photo { width: 100%; }
/* Mip at the bottom corner, facing the photo. */
.founder-mip { position: absolute; width: 34%; right: -16%; bottom: -10%; transform: rotate(6deg); }
.founder .signature { font-weight: 800; margin: 1.2em 0 0; }
.founder .signature span { display: block; color: var(--soft); font-weight: 700; font-size: 0.95rem; }
@media (min-width: 820px) {
  .founder { grid-template-columns: 280px minmax(0, 1fr); gap: 36px; }
  .founder-photo, .founder-frame { width: 100%; }
}
/* The preview copy only: where the founder's photo and words will go. */
.founder-missing {
  border: 3px dashed var(--orange); border-radius: 20px; padding: 16px;
  color: var(--soft); font-weight: 700; background: #FFF8E6;
}
div.founder-photo.founder-missing { aspect-ratio: 4 / 5; display: grid; place-items: center; text-align: center; font-size: 0.9rem; }
