/* Divi Dinos. Colours are the Divi panda palette (divi_dino_3d/sketches/draw.py). */
:root {
  --red: #E32624;
  --red-shade: #A10E29;
  --red-deep: #5E111E;
  --cream: #F8F7F5;
  --cream-shade: #CCBCC5;
  --ink: #070405;
  --sky: #DFF3FF;
  --grass: #BFE8A6;
  --sun: #FFD25A;
  --page: #FFF9EE;
  --card: #FFFFFF;
  --text: #2A1A1C;
  --muted: #6B5357;
  --radius: 28px;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Comic Sans MS", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.55;
}

a { color: var(--red-shade); font-weight: 700; }
a:focus-visible, button:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

header.top {
  background: var(--red);
  color: var(--cream);
  border-bottom: 6px solid var(--red-shade);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-size: 1.5rem; font-weight: 900; letter-spacing: .5px; }
.logo img { height: 46px; width: auto; }
nav a { color: var(--cream); margin-left: 16px; text-decoration: none; font-size: 1.05rem; }
nav a:hover { text-decoration: underline; }

.hero {
  background: linear-gradient(var(--sky) 0 70%, var(--grass) 70% 100%);
  padding: 32px 0 24px;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; margin: 0 0 12px; color: var(--red-deep); }
.hero p { font-size: 1.3rem; margin: 0 0 12px; }
.hero img { width: 100%; max-width: 440px; height: auto; justify-self: center; animation: bob 3.2s ease-in-out infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .hero img { animation: none; } }

.bubble {
  display: inline-block;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 4px 4px 0 var(--ink);
}

section { padding: 36px 0; }
section h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); color: var(--red-deep); margin: 0 0 16px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 5px 5px 0 var(--ink);
  text-align: center;
}
.card img { width: 130px; height: 130px; object-fit: contain; }
.card h3 { margin: 6px 0 4px; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); }

.story {
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 22px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
}
.story img { width: 140px; height: 140px; object-fit: contain; }
.story h3 { margin: 0 0 6px; font-size: 1.6rem; }
.story p { margin: 0 0 8px; }
.tag { display: inline-block; background: var(--red); color: var(--cream); font-weight: 800; border-radius: 999px; padding: 2px 12px; font-size: .95rem; }

.prose { max-width: 720px; }
.prose h1 { color: var(--red-deep); font-size: clamp(2rem, 5vw, 2.8rem); margin: 28px 0 12px; }
.prose h2 { margin-top: 28px; }
.prose li { margin-bottom: 6px; }

/* Story pages: one picture and a few lines per "page", pictures alternating sides. */
.book { max-width: 860px; padding-top: 24px; }
.book h1 { color: var(--red-deep); font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; margin: 10px 0 6px; }
.byline { color: var(--muted); margin: 0 0 24px; }
.page {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 20px 24px;
  margin: 0 0 22px;
  font-size: 1.3rem;
  line-height: 1.6;
}
.page:nth-of-type(even) { grid-template-columns: 1fr 220px; background: var(--sky); }
.page:nth-of-type(even) > :first-child { order: 2; }
.page img { width: 100%; height: auto; }
.page p { margin: 0 0 10px; }
.page p:last-child { margin-bottom: 0; }
.page .emoji { font-size: 140px; line-height: 1; text-align: center; background: var(--sun); border: 3px solid var(--ink); border-radius: 50%; width: 200px; height: 200px; display: grid; place-items: center; justify-self: center; }
.chest-says { font-weight: 800; color: var(--red-deep); background: var(--sun); border-radius: 16px; padding: 8px 14px; }
.the-end { font-size: 1.8rem; font-weight: 900; color: var(--red-deep); }
.big-idea { background: var(--sun); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); padding: 18px 24px; margin: 30px 0 22px; font-size: 1.35rem; }
.talk { background: var(--grass); border: 3px solid var(--ink); border-radius: var(--radius); padding: 18px 24px; margin: 0 0 22px; }
.big-idea h2, .talk h2 { margin: 0 0 8px; color: var(--red-deep); }
.talk li { margin-bottom: 8px; }
.grown-up-note { border-top: 3px dashed var(--cream-shade); padding-top: 12px; color: var(--muted); font-size: 1rem; }
.grown-up-note h2 { font-size: 1.2rem; margin: 0 0 6px; color: var(--red-deep); }
.story h3 a { color: var(--text); }
.story .read { display: inline-block; background: var(--red); color: var(--cream); text-decoration: none; border: 3px solid var(--ink); border-radius: 999px; padding: 6px 18px; box-shadow: 3px 3px 0 var(--ink); }

footer { background: var(--red-deep); color: var(--cream); padding: 22px 0; margin-top: 24px; font-size: 1rem; }
footer a { color: var(--cream); }

@media (max-width: 680px) {
  .hero { background: linear-gradient(var(--sky) 0 88%, var(--grass) 88% 100%); }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero img { max-width: 300px; grid-row: 1; }
  .story { grid-template-columns: 1fr; text-align: center; }
  .story img { justify-self: center; }
  .page, .page:nth-of-type(even) { grid-template-columns: 1fr; font-size: 1.2rem; padding: 16px; }
  .page:nth-of-type(even) > :first-child { order: 0; }
  .page img { max-width: 220px; justify-self: center; }
  .page .emoji { width: 160px; height: 160px; font-size: 110px; }
  nav a { margin-left: 10px; }
  .logo span { font-size: 1.25rem; }
}
.card .mini-emoji { font-size: 84px; line-height: 1; width: 130px; height: 130px; display: grid; place-items: center; margin: 0 auto; background: var(--sky); border-radius: 50%; }
