/* Round 6: homepage refinements. Loaded last, after round5.css. */

/* ---------- 01 · Learning science: one panel with the learning engine ---------- */
#home .offwrap > details.sci { margin-top: -112px; } /* the 140px column gap becomes 28px */
#home .sci { background: #ffffff; border-radius: 30px; box-shadow: 0 20px 40px rgba(107, 2, 43, .05); overflow: hidden; }
#home .sci summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 24px 26px 24px 28px; border: 0; border-radius: 0; background: #ffffff; cursor: pointer; }
#home .sci .ls-shapes { display: flex; gap: 6px; }
#home .sci .ls-shapes i { display: block; width: 14px; height: 14px; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
#home .sci .ls-shapes i:nth-child(1) { background: #f55747; border-radius: 50%; }
#home .sci .ls-shapes i:nth-child(2) { background: #e2fb84; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
#home .sci .ls-shapes i:nth-child(3) { background: #fbbdb7; clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
#home .sci .ls-shapes i:nth-child(4) { background: #6b022b; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
#home .sci summary:hover .ls-shapes i:nth-child(odd) { transform: translateY(-4px) rotate(-12deg); }
#home .sci summary:hover .ls-shapes i:nth-child(even) { transform: translateY(3px) rotate(12deg); }
#home .sci .science-copy { gap: 6px; }
#home .sci .science-copy strong { font-size: 28px; line-height: 1.05; }
#home .sci .science-copy > span { font-size: 15px; }
#home .sci .science-action { gap: 10px; min-height: 48px; padding: 0 22px; background: #6b022b; color: #fffef5; font-size: 15px; font-weight: 700; box-shadow: 0 5px 0 #3a0014; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease; }
#home .sci summary:hover .science-action { transform: translateY(-2px); }
#home .sci summary:active .science-action { transform: translateY(4px); box-shadow: none; }
#home .sci .science-action .plus { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e2fb84; color: #2a1219; font-size: 17px; line-height: 1; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
#home .sci[open] .science-action .plus { transform: rotate(45deg); }
#home .sci .sci-body { padding: 4px 28px 30px; border-top: 1px solid #f0e6e1; }
#home .sci .sci-body > p { font-size: 15px; line-height: 1.6; color: #4a3a40; max-width: 820px; margin-top: 22px; }
#home .sci dl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
#home .sci dl div { background: #f7f3ef; border-radius: 20px; padding: 18px 18px 20px; }
#home .sci dl div.lead1 { background: #fdf0ed; box-shadow: inset 0 0 0 1.5px #fbbdb7; }
#home .sci dd { line-height: 1.5; margin-top: 6px; }

/* ---------- 02 · Teacher training: a line explaining each tab ---------- */
#home .coachcard .coach-what { font-size: 14px; line-height: 1.45; color: #6b4a52; margin: 0; }

/* ---------- 03 · REAL: definition, smaller tiles, one panel with the game ---------- */
#home .knowledge-offer .real-panel { background: #ffffff; border-radius: 36px; padding: 52px 52px 56px; box-shadow: 0 20px 40px rgba(107, 2, 43, .05); box-sizing: border-box; }
#home .knowledge-offer .real-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: end; margin: 0; }
#home .knowledge-offer .real-intro h2 { font-size: 40px; line-height: 1.05; margin: 0; }
#home .knowledge-offer .real-intro .lead { font-size: 16px; line-height: 1.6; color: #5a4148; max-width: 440px; margin: 0; }
#home .knowledge-offer .real { gap: 20px; margin-top: 44px; }
#home .knowledge-offer .real details { background: #f7f3ef; border-radius: 24px; padding: 26px 24px 28px; transition: background-color .2s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
#home .knowledge-offer .real details:hover, #home .knowledge-offer .real details[open] { background: #fdf0ed; transform: translateY(-3px); }
#home .knowledge-offer .real summary { gap: 12px; }
#home .knowledge-offer .real .letter { width: 34px; height: 34px; font-size: 22px; margin-bottom: 6px; }
#home .knowledge-offer .real details:nth-child(3) .letter { padding-top: 10px !important; }
#home .knowledge-offer .real h3 { font-size: 16px; }
#home .knowledge-offer .real p { font-size: 14px; line-height: 1.55; }
#home .knowledge-offer .real .practice { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0e0da; }
#home .knowledge-offer .real-join { display: flex; align-items: center; gap: 18px; margin: 60px 0 48px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b022b; white-space: nowrap; }
#home .knowledge-offer .real-join::before, #home .knowledge-offer .real-join::after { content: ""; flex: 1; border-top: 2px dashed #f1d5cf; }
#home .knowledge-offer .real-panel .pj { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; align-items: center; max-width: none; margin: 0; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
#home .knowledge-offer .pj-side { padding-right: 12px; }
#home .knowledge-offer .pj .pj-chips { margin-top: 0; gap: 10px; }
#home .knowledge-offer .pj .pj-text { font-size: 17px; line-height: 1.6; color: #4a3a40; margin-top: 32px; }
#home .knowledge-offer .pj-uses { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; padding-top: 24px; border-top: 1px solid #efe6e1; font-size: 13px; font-weight: 700; color: #6b4a52; }
#home .knowledge-offer .pj-uses .real-mini { font-size: 34px; gap: 6px; margin: 0; }

/* ---------- Schools can start: the one persimmon moment ---------- */
#home .offwrap > .nx-bridge { margin-top: -36px; } /* 104px of space, then a hairline, then 72px */
#home .nx-bridge .rule { border-top: 1px solid #e6dcd6; margin-bottom: 72px; }
#home .nx-bridge .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 34px 36px; border-radius: 30px; background: #f55747; }
#home .nx-bridge .bar .serif { font-size: 32px; line-height: 1.1; max-width: 640px; color: #ffffff; margin: 0; }
#home .nx-bridge .dbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; background: #6b022b; color: #fffef5; font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 5px 0 #3a0014; transition: transform .12s ease, box-shadow .12s ease; white-space: nowrap; }
#home .nx-bridge .dbtn:hover { transform: translateY(-2px); }
#home .nx-bridge .dbtn:active { transform: translateY(4px); box-shadow: none; }
#home .nx-bridge .dbtn:focus-visible { outline: 3px solid #2a1219; outline-offset: 3px; }
#home .nx-bridge .dbtn .arw { color: #e2fb84; }

/* ---------- Equal space above the questions banner and above the quote ---------- */
#home #approach { padding-bottom: 104px !important; }
#home #project-learning { padding-top: 72px !important; padding-bottom: 112px !important; }
#home-end #founder-quote { padding-top: 112px !important; }

@media (max-width: 1100px) {
  #home .sci dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #home .sci summary { grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; flex-direction: initial; }
  #home .sci .science-action { justify-content: center; }
  #home .knowledge-offer .real-intro { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #home .knowledge-offer .real-panel .pj { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  #home .knowledge-offer .pj-side { padding-right: 0; }
  #home .nx-bridge .bar { grid-template-columns: minmax(0, 1fr); padding: 28px 24px; gap: 22px; }
  #home .nx-bridge .bar .serif { font-size: 26px; }
  #home .nx-bridge .dbtn { justify-content: center; }
}
@media (max-width: 700px) {
  #home .offwrap > details.sci { margin-top: -52px; } /* the 80px column gap becomes 28px */
  #home .sci summary { padding: 22px; }
  #home .sci .science-copy strong { font-size: 24px; }
  #home .sci .sci-body { padding: 4px 22px 24px; }
  #home .sci dl { grid-template-columns: minmax(0, 1fr); }
  #home .knowledge-offer .real-panel { padding: 28px 22px 32px; border-radius: 28px; }
  #home .knowledge-offer .real-intro h2 { font-size: 32px; }
  #home .knowledge-offer .real { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
  #home .knowledge-offer .real details { padding: 20px 18px 22px; }
  #home .knowledge-offer .real-join { margin: 40px 0 32px; font-size: 12px; letter-spacing: .1em; white-space: normal; text-align: center; }
  #home .knowledge-offer .pj .pj-text { margin-top: 24px; }
  #home .offwrap > .nx-bridge { margin-top: 0; }
  #home .nx-bridge .rule { margin-bottom: 48px; }
  /* On phones every home section already uses 72px; keep the quote the same so both gaps match. */
  #home-end #founder-quote { padding-top: 72px !important; }
}
@media (max-width: 420px) {
  #home .knowledge-offer .real { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  #home .sci .ls-shapes i, #home .sci .science-action, #home .sci .science-action .plus, #home .knowledge-offer .real details, #home .nx-bridge .dbtn { transition: none; }
}

/* ---------- About · team: the photo springs into a new shape of solid colour ---------- */
.g3 .av.portrait-sophie { --r1: 50%; }
.g3 .av.portrait-mel { --r1: 6px 30px 6px 30px; }
.g3 .av.portrait-ali { --r1: 32px 32px 6px 6px; }
.g3 .av.portrait-ben { --r1: 50%; }
.g3 .av.portrait-joshua { --r1: 18px; }
.g3 .av.portrait-laura { --r1: 50%; }
.g3 .av.portrait-mica { --r1: 32px 32px 6px 6px; }
.g3 .av.portrait-phoebe { --r1: 6px 30px 6px 30px; }
.g3 .av.has-photo { transition: border-radius .5s cubic-bezier(.3, 1.6, .5, 1), transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.g3 .av.has-photo .portrait-frame { transition: opacity .25s ease, border-radius .5s cubic-bezier(.3, 1.6, .5, 1); }
@media (hover: hover) {
  .g3 .person:hover .av.has-photo { border-radius: var(--r1, 50%) !important; transform: rotate(-8deg) scale(1.06); }
  .g3 .person:hover .av.has-photo .portrait-frame { opacity: 0; }
}
@media (hover: none) {
  /* Phones keep a sticky :hover after a tap, so only the .flip class (set by js/round6.js) changes the shape. */
  .g3 .person:not(.flip) .av.has-photo { border-radius: var(--r0) !important; transform: none; }
  .g3 .person:not(.flip) .av[data-hi]::after { opacity: 0 !important; }
}
.g3 .person.flip .av.has-photo { border-radius: var(--r1, 50%) !important; transform: rotate(-8deg) scale(1.06); }
.g3 .person.flip .av.has-photo .portrait-frame { opacity: 0; }
.g3 .person.flip .av[data-hi]::after { opacity: 1; transform: translate(-50%, 0) scale(1); }
.g3 .av.has-photo { cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .g3 .av.has-photo, .g3 .av.has-photo .portrait-frame { transition: none; }
  .g3 .person:hover .av.has-photo, .g3 .person.flip .av.has-photo { transform: none; }
}
