/* Year-level landing pages (Prep to Year 6). Layout for these long pages.
   Colours, type and the header come from home.css.
   At 900px and wider the hero, each learning area and the questions use two
   columns. Narrower than that, everything is one column. */

.year-page{overflow-wrap:break-word}
.year-page p{max-width:68ch;color:var(--ink-2)}
.year-page p+p{margin-top:12px}
.year-page h1,.year-page h2,.year-page h3,.year-page h4{color:var(--ink)}
.year-page h2{margin-bottom:12px}

.year-page > section{padding:36px 0}
.year-page > section.year-hero{padding:48px 0 32px}
.year-hero h1{font-size:clamp(36px,5.4vw,58px)}
.h1-sub{display:block;font-size:.5em;font-weight:700;color:var(--ink-2);margin-top:10px}
.year-hero p{font-size:18px}
.year-hero .year-tagline{font-family:'Baloo 2',sans-serif;font-weight:700;font-size:20px;color:var(--ink);margin:12px 0 0}
.year-page .cta-row{margin-top:24px}

/* One picture frame for the hero and the learning areas, matching the homepage clips.
   A figcaption is optional. None are used yet. */
.year-pic{margin:16px 0;min-width:0;max-width:100%}
.year-pic img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;background:var(--cream-2);border:3px solid var(--ink);border-radius:16px;overflow:hidden}
.year-pic figcaption{margin-top:8px;font-size:14px;line-height:1.4;color:var(--ink-2)}

.area{margin-top:22px;padding:26px}
.area h3{font-size:clamp(24px,3vw,30px);margin-bottom:6px}
.area h4{font-family:'Baloo 2',sans-serif;font-weight:800;font-size:19px;color:var(--ink);margin:20px 0 6px}

.try-home{background:#E3F6EA;border:2px solid #3F8A4C;border-radius:16px;padding:4px 18px 16px;margin-top:20px}

/* Games line stays body size, in the main ink colour. The label is the bold part.
   Curriculum codes, and the price note under the closing button, stay smaller. */
.year-page p.area-games{color:var(--ink)}
.area-games strong{font-weight:700}
.year-page p.area-codes{font-size:14px;color:var(--ink-2);margin-top:14px}
.year-page p.cta-note{font-size:15px;color:var(--ink-2);margin-top:14px;text-align:center}

/* Why and help stay one left-aligned column at a readable measure, inside the wide .wrap.
   The final section stays centred. */
.year-why .wrap > *,
.year-help .wrap > *{max-width:68ch}

.year-why h3{margin-top:26px;margin-bottom:8px}
.year-faq h3{font-size:22px;margin-top:22px;margin-bottom:8px}

.year-final{text-align:center}
.year-final p{margin-left:auto;margin-right:auto}
.year-final .cta-row{justify-content:center}

@media (min-width:900px){
  .year-hero .wrap{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,44%);
    grid-template-areas:
      "copy pic"
      "cta pic";
    column-gap:36px;
    row-gap:0;
    align-items:start;
  }
  .year-hero .hero-copy{grid-area:copy;min-width:0}
  .year-hero .cta-row{grid-area:cta}
  .year-hero .year-pic{grid-area:pic;margin:0;align-self:start}

  .area{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,44%);
    grid-template-areas:
      "title title"
      "text pic";
    column-gap:32px;
    row-gap:14px;
    align-items:start;
  }
  .area > h3{grid-area:title;margin-bottom:0}
  .area > .area-text{grid-area:text;min-width:0}
  .area > .year-pic{
    grid-area:pic;
    margin:0;
    align-self:start;
    position:sticky;
    top:90px;
  }
  .area-text > :first-child{margin-top:0}

  /* Even areas: the picture column is on the left. */
  .area:nth-of-type(even){
    grid-template-columns:minmax(0,44%) minmax(0,1fr);
    grid-template-areas:
      "title title"
      "pic text";
  }

  /* No game picture yet: add class "no-pic" and leave out the figure.
     "What is your child learning?" stays in the text column. "Try it at home"
     takes the picture column and sticks the same way a picture would. */
  .area.no-pic{grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "text"}
  .area.no-pic > .area-text{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,44%);
    column-gap:32px;
    align-items:start;
  }
  .area.no-pic:nth-of-type(even) > .area-text{grid-template-columns:minmax(0,44%) minmax(0,1fr)}
  .area.no-pic .area-text > :not(.try-home){grid-column:1}
  .area.no-pic:nth-of-type(even) .area-text > :not(.try-home){grid-column:2}
  .area.no-pic .try-home{
    grid-column:2;
    grid-row:1 / span 40;
    align-self:start;
    position:sticky;
    top:90px;
    margin-top:0;
  }
  .area.no-pic:nth-of-type(even) .try-home{grid-column:1}

  .year-faq .wrap{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    column-gap:40px;
    row-gap:26px;
    align-items:start;
  }
  .year-faq .wrap > h2{grid-column:1 / -1;margin-bottom:0}
  .year-faq .faq-item h3{margin-top:0}
}

@media (max-width:640px){
  .area{padding:18px}
}
