/* ============================================================
   Little Activities — Styles
   Converted from SASS to modern CSS (CSS nesting)
   ============================================================ */

/* === RESET ===
   http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126 | License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, main {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}


/* === VARIABLES === */

:root {
  /* Fonts */
  --font-family-text: 'Open Sans', sans-serif;
  --font-family-headings: 'Young Serif', serif;

  /* Colour */
  --color-gray-10: #f1f4f4;
  --color-gray-30: #989898;
  --color-gray-50: #747474;
  --color-gray-70: #4d4d4d;
  --color-text: #000000;

  --color-highlight: #4df1c7;
  --color-background: #ffffff;
  --color-subtle-background: #f4fffd;
  --color-visited: #afc7c4;
}


/* === TYPOGRAPHY === */

@font-face {
  font-family: 'Young Serif';
  src: url(/assets/fonts/little-activities/YoungSerif-Regular.woff2) format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


/* === BASE === */

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-text);
  background-color: var(--color-background);
  color: var(--color-text);
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
  background-color: var(--color-background);
}

.grid {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

.title {
  font-family: var(--font-family-headings);
  font-size: 60px;
  color: black;
}

.subtitle {
  font-size: 28px;
  font-weight: 600;
  color: black;
  line-height: 36px;
  letter-spacing: 0.5px;
}

h2,
.h2 {
  font-family: var(--font-family-headings);
  font-size: 36px;
}

h3,
.h3 {
  font-family: var(--font-family-headings);
  font-size: 24px;
  margin-bottom: 16px;
}

h4,
.h4 {
  font-size: 18px;
  font-weight: 700;
}

h5,
.h5,
.group-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-gray-30);
}

p.large {
  font-size: 18px;
  font-weight: 600;
}

p.subtle {
  font-size: 12px;
  color: var(--color-gray-50);
}

a {
  color: var(--color-text);
  /* Custom underline via box-shadow for cross-browser compatibility */
  text-decoration: none;
  box-shadow: inset 0 -0.15em var(--color-highlight);
  transition: box-shadow 0.1s ease-in-out;
  /* Extend underline before and after text */
  padding-left: 1px;
  padding-right: 1px;

  &:hover, &.hover {
    box-shadow: inset 0 -0.55em var(--color-highlight);
  }

  &:visited, &.visited {
    box-shadow: inset 0 -0.15em var(--color-visited);
  }
}

.icon {
  background-position: left 0px bottom 2px;
  background-repeat: no-repeat;
  padding-left: 25px;
}

.icon--download {
  background-image: url(/assets/img/little-activities/icons/download.svg);
  background-size: 10px;
}


/* === HEADER === */

body > header {
  width: 100%;
}

nav[role="navigation"]:not(.breadcrumb) {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
  margin-bottom: 40px;
  font-size: 24px;
  font-weight: 600;

  & a:not(:last-child) {
    margin-right: 50px;
  }

  @media only screen and (max-width: 736px) {
    justify-content: center;
  }

  @media only screen and (max-width: 550px) {
    font-size: 16px;
    margin-top: 24px;
    margin-bottom: 24px;

    & a:not(:last-child) {
      margin-right: 24px;
    }
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 600;

  @media only screen and (max-width: 550px) {
    margin-top: 24px;
    margin-bottom: 24px;
  }
}


/* === FOOTER === */

footer {
  background-color: var(--color-subtle-background);
  padding: 65px 0;
  margin-top: 150px;
  border-top: 1px solid var(--color-gray-10);
}

.footer {
  display: flex;
  flex-direction: row;
}

.footer__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 24px;
  font-size: 12px;
  color: var(--color-gray-50);

  & a {
    color: var(--color-gray-50);
  }

  & h3 {
    color: var(--color-text);
  }
}

.footer__volumes {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

@media only screen and (max-device-width: 736px) {
  .footer {
    flex-direction: column;
  }

  .footer__meta {
    margin-bottom: 40px;
    align-items: center;

    p {
      text-align: center;
    }
  }
}

@media only screen and (max-device-width: 400px) {
  .footer__volumes {
    flex-direction: column;

    a:not(:last-child) {
      margin-bottom: 40px;
    }
  }
}


/* === HOME PAGE === */

.feature {
  position: relative;
  padding: 40px;
  padding-block: 120px;

  & > * {
    position: relative;
    z-index: 1;
  }
}

.feature--hero {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  margin-top: 0;
  padding-block: 120px;
  overflow: hidden;

  .feature--hero__content {
    flex: 1;
  }

  .title {
    padding-bottom: 30px;
  }

  .subtitle {
    line-height: 1.5;
    text-wrap: pretty;
  }

  & figure {
    flex: 1;

    & img {
      width: 100%;
    }
  }

  @media only screen and (max-width: 736px) {
    flex-direction: column;
    gap: 30px;
    margin-top: 0;
    padding-block: 60px 80px;

    .title {
      font-size: 48px;
    }
  }

  @media only screen and (max-width: 550px) {
    margin-top: 0;

    .title {
      font-size: 32px;
    }
  }
}

.feature--why {
  display: flex;
  align-items: center;
  gap: 80px;

  &::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -35%;
    width: 110%;
    height: 200%;
    background-image: url(/assets/img/little-activities/blob-left-1.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 0;
  }
}

.feature--why__image {
  flex: 1;
  max-width: 380px;

  & img {
    width: 100%;
  }
}

.feature--why__inline-image {
  display: none;
}

.feature--why__content {
  flex: 1;

  & h2 {
    margin-bottom: 40px;
  }

  & p {
    margin: 30px 0;
    line-height: 1.5em;
  }
}

@media only screen and (max-width: 736px) {
  .feature--why {
    display: block;
  }

  .feature--why__image {
    display: none;
  }

  .feature--why__inline-image {
    display: block;
    float: left;
    width: clamp(120px, 35vw, 220px);
    margin: 0 24px 16px 0;
    shape-outside: margin-box;
  }

  .subtitle {
    font-size: 22px;
    line-height: 1.5;
  }

  h2, .h2 {
    font-size: 30px;
  }

  h3, .h3 {
    font-size: 20px;
  }

  h4, .h4 {
    font-size: 16px;
  }
}

@media only screen and (max-width: 550px) {
  .subtitle {
    font-size: 20px;
  }

  h2, .h2 {
    font-size: 24px;
  }

  h3, .h3 {
    font-size: 18px;
  }

  h4, .h4 {
    font-size: 15px;
  }

  .feature--why::before {
    width: 160%;
    left: -50%;
  }

  .feature--volumes::before {
    width: 160%;
    right: -60%;
  }

  .feature--contact::before {
    width: 140%;
    left: -55%;
  }
}

.feature--volumes {
  display: flex;
  justify-content: center;

  &::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -45%;
    width: 120%;
    height: 220%;
    background-image: url(/assets/img/little-activities/blob-right-1.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 0;
  }

  & h2 {
    margin-bottom: 80px;
    text-align: center;
  }
}


.feature__volume {
  --face-icon-size: 70px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 50px;

  .h5 {
    position: relative;

    & img {
      position: absolute;
    }
  }

  & > a { margin-bottom: 15px; }
  & > h5 { margin-bottom: 10px; }
  & > h4 { margin-bottom: 20px; }
}

.feature--contact {
  &::before {
    content: '';
    position: absolute;
    top: -20%;
    bottom: 0;
    left: -40%;
    width: 100%;
    background-image: url(/assets/img/little-activities/blob-left-2.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 0;
  }

  & h2 {
    text-align: center;
    margin-bottom: 60px;
  }

  & iframe {
    min-height: 850px;
  }
}


/* === VOLUME I PAGE === */

.volume-index__introduction {
  margin-bottom: 0;

  .group-heading {
    margin-bottom: 12px;
  }

  .title {
    background-image: url(/assets/img/little-activities/icons/face--baby.svg);
    background-size: 45px;
    background-repeat: no-repeat;
    background-position: top 5px left 5px;
    padding-left: 75px;
    margin-left: -75px;
  }

  .title-flex-container {
    margin-bottom: 16px;

    & img {
      display: none;
      padding-right: 10px;
    }
  }

  @media only screen and (max-width: 1400px) {
    .title {
      background-image: none;
      padding-left: 0;
      margin-left: 0;
    }

    .title-flex-container {
      display: flex;
      align-items: flex-start;

      & img {
        display: initial;
      }
    }
  }

  @media only screen and (max-width: 736px) {
    .title {
      font-size: 40px;
    }
  }

  @media only screen and (max-width: 550px) {
    .title {
      font-size: 32px;
    }
  }
}

.volume-cover-strip {
  width: 100%;
  height: 40px;
  background-image: url(/assets/img/little-activities/volume-1-cover.jpg);
  background-repeat: repeat-x;
  background-size: auto;
  background-position: top;
  margin: 40px 0;
}

.volume-index__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;

  @media only screen and (max-width: 736px) {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.volume-index__intro-text {
  & h2 {
    margin-bottom: 30px;
  }

  & p {
    line-height: 1.6;
    margin-bottom: 12px;
  }
}

.volume-index__contents {
  & h2 {
    margin-bottom: 30px;
  }

  & ul li {
    margin-bottom: 30px;
  }

  & a.h4 {
    display: inline-block;
    margin-bottom: 12px;
  }
}


/* === ACTIVITY PAGE === */

.activity-page__header {
  margin-bottom: 40px;

  .group-heading {
    margin-bottom: 12px;
  }
}

.activity-page__layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
}

.activity-page__main {
  & p {
    line-height: 1.6;
    margin-bottom: 12px;
  }

  & h3 {
    margin-top: 32px;
  }

  & h4 {
    margin-top: 24px;
    margin-bottom: 8px;
  }

  & ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;

    & li {
      line-height: 1.6;
      margin-bottom: 8px;
    }
  }
}

.activity-page__materials {
  background-color: var(--color-subtle-background);
  border: 1px solid var(--color-gray-10);
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 24px;

  & h3 {
    margin-bottom: 16px;
  }

  & ul {
    list-style: disc;
    padding-left: 20px;

    & li {
      line-height: 1.6;
      margin-bottom: 6px;
    }
  }

  & .subtle {
    margin-bottom: 8px;
  }
}

@media only screen and (max-width: 736px) {
  .activity-page__layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .activity-page__materials {
    order: -1;
    position: static;
  }

}
