/* The Mip & Friends website: the apps' "sticker book" look (Sunshine
   skin), inside the Lumiose family frame (lumiose-frame.css, linked
   first). No outside fonts: the system's rounded font where there is one. */
:root {
  /* The frame's colours, to match the paper. */
  --lm-ink: #2A1F3D;
  --lm-soft: #5E5470;
  --lm-line: #EADFC6;

  --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;
}

* { box-sizing: border-box; }

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; }

.lm-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; }
/* Phones: Pip alone is the home link (the name is just below on the home
   page), so the three buttons fit on one line. */
@media (max-width: 520px) {
  .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: 1fr; gap: 16px; align-items: center;
}
.meet .pair { display: flex; justify-content: center; gap: 8px; }
.meet .pair img { width: min(170px, 40vw); }
@media (min-width: 820px) { .meet { grid-template-columns: 1fr 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-maths img { border-radius: 0; }
.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);
}
.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 Lumiose 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; }
.lm-foot { margin-top: 24px; }

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