/* The homepage: the family photo, a small puzzle, meet the family, two doors, Causal Blocks Kids, what you didn't learn at school. */
.wrap > section { margin-block: 28px; }
.wrap h2 { margin: 0 0 10px; font: 800 clamp(26px, 3.2vw, 34px)/1.1 var(--font-display); }

/* Hero: the lineup wall at full size, the line and one button. */
.hero { display: grid; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.hero-lineup {
  display: flex; justify-content: center; align-items: flex-end;
  padding: 18px clamp(12px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--line);
  /* The family photo: a soft backdrop, and a floor to stand on. */
  background: linear-gradient(to top, #e8ecf0 0 12px, transparent 12px), linear-gradient(#eef6fd, #f6f8fa);
}
.hero-lineup img { display: block; width: 100%; max-width: 1120px; height: auto; margin-bottom: 4px; }
.hero-text { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding: 24px clamp(18px, 4vw, 48px) 26px; }
.hero h1 { margin: 0; font: 800 clamp(30px, 4.4vw, 52px)/1.05 var(--font-display); }
.hero h1 span { display: block; color: var(--accent); }
.big-button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: 16px;
  background: var(--ink); color: #fff; text-decoration: none;
  font: 800 22px/1 var(--font-display);
  box-shadow: 0 6px 20px rgba(31, 41, 51, 0.18); transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.big-button:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(217, 115, 31, 0.28); }
.big-button:active { transform: translateY(1px); }

/* The taste: one small puzzle to solve on the page */
.taste { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px 40px; align-items: center; padding: clamp(18px, 3vw, 32px); border: 1px solid var(--line); border-radius: 22px; }
@media (max-width: 860px) {
  .taste { grid-template-columns: minmax(0, 1fr); }
  .taste-result { min-height: 0; }
}
.taste p { margin: 0 0 10px; font-size: 18px; }
.taste-result { min-height: 3.2em; font: 800 21px/1.25 var(--font-display) !important; }
.taste-result.won { color: var(--good); }
.taste-result.nope { color: var(--mistake); }
.taste-result img { width: 64px; height: auto; vertical-align: middle; margin-right: 8px; float: left; }
.taste-board { max-width: 520px; width: 100%; justify-self: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
#taste { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none;
  background-color: var(--surface); background-image: radial-gradient(var(--grid) 1.1px, transparent 1.2px); background-size: 22px 22px; }
#taste .together { fill: none; stroke: #f1b40f; stroke-width: 6; stroke-dasharray: 2 10; stroke-linecap: round; transition: opacity 0.8s; }
#taste .together-label { font: 800 15px var(--font-display); fill: #b8860b; transition: opacity 0.8s; }
#taste.solved .together, #taste.solved .together-label { opacity: 0; }
.link-button { font: 600 15px var(--font-ui); background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* Meet the family: eight characters, four to a line. */
.family-sub { margin: 0; color: var(--muted); }
.family ul { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .family ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.member { display: grid; justify-items: center; align-content: start; text-align: center; gap: 4px; padding: 16px 12px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); }
.member img { width: 96px; height: auto; }
.member strong { font: 800 20px/1.1 var(--font-display); }
.member span { font-size: 15px; color: var(--muted); }
.member.cause { --c: var(--role-treatment); }
.member.effect { --c: var(--role-outcome); }
.member.confounder { --c: var(--role-confounder); }
.member.mediator { --c: var(--role-mediator); }
.member.bouncer { --c: var(--role-collider); }
.member.bystander { --c: #c3ccd1; }
.member.nudge { --c: #ffc61a; }
.member.wobble { --c: #ff9ec4; }
.more { margin: 8px 0 0; font: 700 17px var(--font-ui); }

/* Two doors (the worksheets door is off until they come back) */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .doors { grid-template-columns: minmax(0, 1fr); } }
.door { display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: 18px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.door:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 41, 51, 0.1); border-color: #d3d9df; }
.door-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); font-size: 26px; }
.door.play .door-icon { background: var(--ink); color: #fff; }
.door strong { font: 800 26px/1.1 var(--font-display); }
.door span:last-child { color: var(--muted); }

/* The big advert for Causal Blocks Kids: a warm card, the words and a button, three of the family. */
.kids { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px 32px; align-items: center;
  padding: clamp(22px, 4vw, 44px); border-radius: 26px; background: #fff4dc; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
@media (max-width: 860px) { .kids { grid-template-columns: minmax(0, 1fr); } }
.kids-kicker { margin: 0 0 6px; font: 800 14px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); }
.wrap .kids h2 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 12px; }
.kids-text p:not(.kids-kicker) { margin: 0 0 20px; font-size: 19px; max-width: 46ch; }
.kids-button { background: var(--role-treatment); color: var(--ink); }
.kids-button:hover { background: var(--ink); color: #fff; }
.kids-cast { display: flex; justify-content: center; align-items: flex-end; min-width: 0; }
.kids-cast img { width: clamp(90px, 13vw, 160px); height: auto; }
.kids-cast .k1 { transform: rotate(-8deg) translateY(10px); }
.kids-cast .k2 { width: clamp(100px, 15vw, 180px); margin-inline: -10px; }
.kids-cast .k3 { transform: rotate(8deg) translateY(10px); }

/* What you didn't learn at school */
.school { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px 32px; padding-top: 28px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .school { grid-template-columns: minmax(0, 1fr); } }
.school h2 { font-size: 26px; }
.school p { margin: 0; }
.school ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: center; }
.school li a { font-weight: 700; }
.school li span { display: block; font-size: 15px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .big-button, .door { transition: none; } }
