/*
 * yourbrainhealth.io: the site's stylesheet.
 *
 * Written for YBH in the contractor-free rewrite (slice 5, 2026-11-02) from the pages as they are
 * built, to draw them as the site has always looked. Vocabulary: config/theme-rename.json. The forms
 * (site/css/forms.css), the main menu (nav/css/nav.css) and what the behaviour modules draw
 * (site/css/behaviours.css) have their own sheets. Colours are Altior's brand palette.
 *
 * Contents
 *   1  tokens            6  bands: text, cards, split, pictures, media, clips, FAQ, form
 *   2  reset and base    7  posts and the post grid
 *   3  type and links    8  header and the menu drawer
 *   4  the frame         9  footer
 *   5  hero and banner  10  newsletter bar
 *
 * Breakpoints: 1599, 1399, 1239 (the arcs), 1019 (the drawer, smaller type), 767 (one column), 499.
 */

/* 1  tokens ------------------------------------------------------------------------------------ */

:root {
  --ybh-pink: #db239a;
  --ybh-blue: #4a8ec9;
  --ybh-teal: #0aaa8f;
  --ybh-yellow: #ffba00;
  --ybh-ink: #333333;
  --ybh-grey: #666666;
  --ybh-night: #111111;
  --ybh-heading: "Jost", sans-serif;
  --ybh-body: "Roboto Slab", serif;
  --ybh-ease: 0.4s ease;
}

/* 2  reset and base ---------------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--ybh-ink);
  font: 400 18px/24px var(--ybh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The drawer is open: the page behind it stays still. */
body.is-locked {
  height: 100% !important;
  overflow-y: hidden !important;
}

[hidden] {
  display: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

/* A lazily sized picture keeps a placeholder box until it loads. */
img:is([sizes="auto" i], [sizes^="auto," i]) {
  contain-intrinsic-size: 3000px 1500px;
}

/* Emoji in post copy, drawn as images the size of the text around them. */
img.emoji {
  display: inline !important;
  width: 1em !important;
  height: 1em !important;
  margin: 0 0.07em !important;
  padding: 0 !important;
  border: none !important;
  vertical-align: -0.1em !important;
  background: none !important;
  box-shadow: none !important;
}

.aligncenter {
  display: block;
  clear: both;
  margin-left: auto;
  margin-right: auto;
}

hr {
  height: 0;
  margin: 48px 0 56px;
  border-width: 0;
  border-top: 1px solid #e1e1e1;
  box-sizing: content-box;
}

small {
  font-size: 80%;
}

sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

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

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e1e1;
}

th:first-child,
td:first-child {
  padding-left: 0;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

table thead td {
  color: var(--ybh-blue);
  border-bottom: 2px solid var(--ybh-ink);
}

table tbody tr:last-child td {
  border-bottom: 1px solid var(--ybh-ink);
}

/* Controls take the type around them; buttons are bare until a component dresses them. */
button,
input,
optgroup,
select,
textarea {
  margin: 0;
  color: inherit;
  font: inherit;
}

input {
  line-height: normal;
}

button,
select {
  text-transform: none;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  color: #555;
  text-align: center;
  text-decoration: none;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

button {
  overflow: visible;
}

button[disabled],
input[disabled] {
  cursor: default;
}

input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
  padding: 6px 10px;
  background-color: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  box-shadow: none;
}

input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
  -webkit-appearance: none;
  appearance: none;
}

input:is([type="email"], [type="number"], [type="search"], [type="text"], [type="tel"], [type="url"], [type="password"]):focus,
textarea:focus,
select:focus {
  border: 1px solid #33c3f0;
  outline: 0;
}

textarea {
  min-height: 65px;
  padding-top: 6px;
  padding-bottom: 6px;
  overflow: auto;
}

input[type="checkbox"],
input[type="radio"] {
  display: inline;
  padding: 0;
}

input::placeholder {
  color: var(--ybh-grey) !important;
}

input:focus::placeholder {
  color: transparent !important;
}

label,
legend {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

legend {
  padding: 0;
  border: 0;
}

fieldset {
  margin: 0 2px;
  padding: 0;
  border: 0 solid #c0c0c0;
}

/* 3  type and links ---------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  padding: 0;
  font-family: var(--ybh-heading);
  font-style: normal;
  font-weight: 600;
}

h1 {
  padding-bottom: 20px;
  font-size: 60px;
  line-height: 70px;
}

h2 {
  padding-bottom: 30px;
  font-size: 50px;
  line-height: 60px;
}

h3 {
  padding: 10px 0;
  font-size: 24px;
  line-height: 34px;
}

p {
  margin: 0;
  padding-bottom: 15px;
}

p:last-child {
  padding: 0 !important;
}

b,
strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

ul {
  list-style: circle inside;
}

li {
  margin: 0;
  padding: 0;
}

/* Numbered lists draw their own counter, flush with the text. */
ol {
  margin: 0 0 10px;
  list-style: none;
  counter-reset: item;
}

ol li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 20px;
  counter-increment: item;
}

ol li::before {
  position: absolute;
  top: 0;
  left: 0;
  content: counter(item);
}

a {
  color: #000;
  text-decoration: none;
}

a:hover {
  color: #000;
}

/* A link the pointer is on, or pressing, draws no outline (as the site always has). */
a:active,
a:hover {
  outline: 0;
}

h2 a,
p a {
  text-decoration: underline;
}

h2 a:hover,
p a:hover {
  text-decoration: none;
}

/* The call-to-action link: a coloured block that slides wider, and darkens, under the pointer. */
.button {
  position: relative;
  z-index: 0;
  display: inline-block;
  margin: 20px 0 0;
  padding: 12px 24px;
  color: #fff;
  font: normal 600 26px/26px var(--ybh-heading);
  text-decoration: none;
  transition: all 0.4s ease-in-out;
}

.button::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  content: "";
  background: var(--ybh-pink);
  transition: all 0.4s ease-in-out;
}

.button:hover {
  color: #fff;
}

.button:hover::before {
  left: -5%;
  width: 110%;
  color: #fff;
  background: var(--ybh-ink);
}

/* The colour tones a band, a card or a post hero takes. On every tone but yellow the words are white. */
.tone-magenta,
.tone-brain {
  background-color: var(--ybh-pink);
}

.tone-blue,
.tone-technology {
  background-color: var(--ybh-blue);
}

.tone-green,
.tone-education {
  background-color: var(--ybh-teal);
}

.tone-yellow,
.tone-research {
  background-color: var(--ybh-yellow);
}

:is(.tone-magenta, .tone-brain, .tone-blue, .tone-technology, .tone-green, .tone-education)
  :is(h1, h2, h3, h4, p, li, p a, li a, .faq-list .faq-item h3) {
  color: #fff !important;
}

:is(.tone-magenta, .tone-brain, .tone-blue, .tone-technology, .tone-green, .tone-education) :is(p, li) a {
  text-decoration: underline;
}

:is(.tone-magenta, .tone-brain, .tone-blue, .tone-technology, .tone-green, .tone-education) .go-arrow {
  background-image: url("/static/site/images/icons/arrow-light.437248d2.svg") !important;
}

:is(.tone-magenta, .tone-brain, .tone-blue, .tone-technology, .tone-green, .tone-education) .faq-list .faq-item {
  border-color: #fff !important;
}

:is(.tone-magenta, .tone-brain, .tone-blue, .tone-technology, .tone-green, .tone-education) .faq-list .faq-item h3::after {
  background-image: url("/static/site/images/icons/faq-arrow-light.53e58590.svg") !important;
}

@media only screen and (max-width: 1019px) {
  body {
    font-size: 16px;
    line-height: 22px;
  }

  h1 {
    font-size: 50px;
    line-height: 60px;
  }

  h2 {
    font-size: 40px;
    line-height: 50px;
  }

  h3 {
    font-size: 24px;
    line-height: 32px;
  }

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

@media only screen and (max-width: 767px) {
  h1 {
    font-size: 30px;
    line-height: 40px;
  }

  h2 {
    padding-bottom: 20px;
    font-size: 26px;
    line-height: 30px;
  }

  h3 {
    font-size: 20px;
    line-height: 24px;
  }

  .button {
    font-size: 20px;
    line-height: 20px;
  }
}

/* 4  the frame --------------------------------------------------------------------------------- */

/* Every page's content column. */
.frame {
  position: relative;
  width: 90%;
  max-width: 1192px;
  margin: 0 auto;
  padding: 0;
}

.frame::after {
  display: table;
  clear: both;
  content: "";
}

/* A row of cells, spread across its width. */
.row {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

/* The page under the fixed header. */
.site-main {
  padding-top: 90px;
  overflow: hidden;
}

/* The two brand arcs at the page's edges, drifting as it scrolls (drift.js). */
.page-arc {
  position: absolute;
  z-index: 120;
}

#page-arc-left {
  top: 100px;
  left: 0;
}

#page-arc-right {
  top: 400px;
  right: 0;
}

@media only screen and (max-width: 1599px) {
  .page-arc {
    width: 200px;
  }
}

@media only screen and (max-width: 1399px) {
  .page-arc {
    width: 160px;
  }
}

@media only screen and (max-width: 1239px) {
  .page-arc {
    width: 120px;
  }
}

@media only screen and (max-width: 1019px) {
  .frame {
    width: 100%;
    padding: 0 25px;
  }

  .site-main {
    padding-top: 60px;
  }

  .page-arc {
    width: 100px;
  }
}

@media only screen and (max-width: 767px) {
  .page-arc {
    width: 50px;
  }
}

/* 5  hero and banner --------------------------------------------------------------------------- */

.hero,
.banner {
  position: relative;
}

.hero .inset,
.banner .inset {
  position: relative;
  min-height: 700px;
  padding: 80px 0;
  overflow: hidden;
}

.hero.hero-short .inset,
.banner.hero-short .inset {
  min-height: 350px;
}

.hero.hero-tall .inset,
.banner.hero-tall .inset {
  min-height: 700px;
}

.hero-video {
  position: relative;
}

.hero-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:is(.hero, .banner) :is(.hero-backdrop, .hero-video, .hero-shade) {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
}

/* The picture settles from a slight zoom as the page opens. */
:is(.hero, .banner) :is(.hero-backdrop, .hero-video) {
  transform-origin: center center;
  animation: hero-settle 20s ease;
}

.hero .hero-shade,
.banner .hero-shade {
  background: rgba(0, 0, 0, 0.15);
}

.hero .hero-headline,
.banner .hero-headline {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  max-width: 800px;
  color: #fff;
  font: normal 600 40px/46px var(--ybh-heading);
  text-align: center;
  transform: translate(-50%, -50%);
}

.banner {
  padding: 0 !important;
}

.banner .inset {
  min-height: 350px;
}

.banner :is(.hero-backdrop, .hero-video) {
  animation: none;
}

@keyframes hero-settle {
  from {
    transform: scale(1.1);
  }

  to {
    transform: scale(1);
  }
}

#site-blog .hero.hero-tall .inset,
#site-post .hero.hero-tall .inset {
  min-height: 200px;
}

@media only screen and (max-width: 767px) {
  .hero .hero-headline,
  .banner .hero-headline {
    font-size: 30px;
    line-height: 38px;
  }

  .hero .inset {
    min-height: 300px;
    padding: 30px 0;
  }

  .hero.hero-tall .inset,
  .hero.hero-short .inset,
  .banner.hero-short .inset {
    min-height: 300px;
  }

  #site-blog .hero.hero-tall .inset,
  #site-post .hero.hero-tall .inset {
    min-height: inherit;
  }
}

/* 6  bands ------------------------------------------------------------------------------------- */

.bands .band {
  padding: 80px 0;
}

/* Text */
.bands .text-band .inset {
  padding: 0 8%;
  text-align: center;
}

.bands .text-band .inset p,
.bands .text-band .inset ul {
  font-size: 26px;
  line-height: 40px;
}

.bands .text-band .inset ul {
  margin: 0 0 25px;
  padding: 0 0 0 20px;
  list-style: disc;
}

.bands .text-band .inset ul li {
  margin-bottom: 10px;
}

/* Cards: a row of linked boxes, each a picture over a tinted panel of words with an arrow. */
.bands .card-band .inset .lede {
  text-align: center;
}

.bands .card-band .cards {
  width: calc(100% + 16px);
  margin: 18px 0 0 -8px;
  justify-content: center;
}

.bands .card-band .cards .card {
  width: calc(25% - 16px);
  margin: 8px;
  background: #000;
}

.bands .card-band .card a {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.bands .card-band .card .media {
  background: #000;
  border-right: 5px solid #fff;
  border-left: 5px solid #fff;
}

.bands .card-band .card .media img {
  transition: opacity var(--ybh-ease);
}

.bands .card-band .card .prose {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 30px 20px;
  text-align: center;
  transition: opacity var(--ybh-ease);
}

.bands .card-band .card .prose h3 {
  padding-bottom: 30px;
  color: var(--ybh-ink);
}

.bands .card-band .card .prose p {
  color: var(--ybh-ink);
}

.bands .card-band .card .prose .card-text {
  margin-bottom: 20px;
}

.bands .card-band .card .go-arrow {
  width: 33px;
  height: 27px;
  margin: auto 0 0 auto;
  background: url("/static/site/images/icons/arrow-dark.db952425.svg") 0 0 no-repeat;
  transition: all var(--ybh-ease);
}

.bands .card-band .card a:hover .media img,
.bands .card-band .card a:hover .prose {
  opacity: 0.9;
}

.bands .card-band .card a:hover .go-arrow {
  margin-right: -6px;
}

/* Each card in a row carries one of four loops of the brand mark, faintly, behind its words. */
.bands .card-band .card:nth-child(1) .prose {
  background-image: url("/static/site/images/card-loop-1.11d33c98.svg");
  background-size: cover;
}

.bands .card-band .card:nth-child(2) .prose {
  background-image: url("/static/site/images/card-loop-2.c96d6165.svg");
  background-size: cover;
}

.bands .card-band .card:nth-child(3) .prose {
  background-image: url("/static/site/images/card-loop-3.143c394f.svg");
  background-size: cover;
}

.bands .card-band .card:nth-child(4) .prose {
  background-image: url("/static/site/images/card-loop-4.a5aaccf9.svg");
  background-size: cover;
}

/* Split: words beside a picture, over a large faint loop of the brand mark. */
.bands .split-band {
  position: relative;
  overflow: hidden;
}

.bands .split-band .panel-arc {
  position: absolute;
  top: 40px;
  right: 0;
  width: 50%;
  height: 130%;
  background: url("/static/site/images/panel-loop-1.4d9de35f.svg") right center / auto 100% no-repeat;
}

.bands .split-band.tone-white .panel-arc {
  right: auto;
  left: 0;
  background-image: url("/static/site/images/panel-loop-2.b60b9745.svg");
  background-position: left center;
}

.bands .split-band .inset .lede {
  text-align: center;
}

.bands .split-band .split {
  margin: 18px 0 0;
}

.bands .split-band .split .prose,
.bands .split-band .split .media {
  width: calc(50% - 20px);
}

.bands .split-band .split .prose p {
  font-size: 26px;
  line-height: 40px;
}

.bands .split-band.tone-green .button::before,
.bands .split-band.tone-white .button::before {
  background-color: var(--ybh-blue);
}

.bands .split-band.tone-green .button:hover::before,
.bands .split-band.tone-white .button:hover::before {
  background-color: var(--ybh-ink);
}

/* A picture band: a picture moving behind its window (parallax-picture.js). */
.bands .picture-band {
  height: 500px;
}

/* Pictures: one, or a pair, or a gallery of four across. */
.bands .image-band .lede {
  margin: 0 0 48px;
  text-align: center;
}

.bands .image-band .media-row {
  flex-wrap: wrap;
  justify-content: center;
}

.bands .image-band .media-row .media-cell {
  width: calc(50% - 20px);
  margin: 10px;
}

.bands .image-band .media-row .media {
  margin-bottom: 10px;
}

.bands .image-band .media-row.media-solo .media-cell {
  width: 100%;
  margin: 0;
}

.bands .gallery-band .lede {
  text-align: center;
}

.bands .gallery-band .media-row {
  width: calc(100% + 20px);
  margin: 48px 0 0 -10px;
  flex-wrap: wrap;
  justify-content: center;
}

.bands .gallery-band .media-row .media-cell {
  width: calc(25% - 10px);
  margin: 10px;
}

.bands .gallery-band .media-row .media {
  margin-bottom: 10px;
}

/* Clips: a still with a play badge, opening the video in the lightbox (lightbox.js). */
.bands .video-band .lede {
  text-align: center;
}

.bands .video-band .clip-frame {
  max-width: 788px;
  margin: 18px auto 0;
}

.bands .video-band .clip-frame a.clip {
  position: relative;
  display: block;
  margin-bottom: 10px;
}

.bands .video-band .clip-frame a.clip .clip-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 106px;
  height: 115px;
  overflow: hidden;
  text-indent: -9999px;
  background: url("/static/site/images/icons/play.a6197b8b.svg") 0 0 no-repeat;
  transform: translate(-50%, -50%);
}

/* FAQ: questions that open and close their answers (faq.js), an arrow turning with each. */
.bands .faq-band h2 {
  margin: 0 0 18px;
}

.bands .faq-band .faq-list .faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ybh-ink);
}

.bands .faq-band .faq-list .faq-item h3 {
  position: relative;
  padding: 0 50px 0 0;
  cursor: pointer;
}

.bands .faq-band .faq-list .faq-item h3::after {
  position: absolute;
  top: 5px;
  right: 0;
  display: block;
  width: 25px;
  height: 25px;
  content: "";
  background: url("/static/site/images/icons/faq-arrow-dark.44e9c2f0.svg") center center no-repeat;
}

.bands .faq-band .faq-list .faq-item h3.is-open::after {
  transform: rotate(90deg);
}

.bands .faq-band .faq-list .faq-item .prose {
  padding: 20px 50px 0 0;
}

.bands .faq-band .faq-list .faq-item:last-child {
  margin: 0;
  padding: 0;
  border: none;
}

/* A band holding a form. */
.bands .form-band {
  padding: 80px;
}

.bands .form-band .lede {
  margin: 0 0 30px;
  padding: 0 8%;
  text-align: center;
}

.bands .form-band .lede p {
  font-size: 26px;
  line-height: 40px;
}

@media only screen and (max-width: 1019px) {
  .bands .text-band .inset p,
  .bands .split-band .split .prose p,
  .bands .form-band .lede p {
    font-size: 24px;
    line-height: 32px;
  }
}

@media only screen and (max-width: 767px) {
  .bands .text-band .inset p,
  .bands .split-band .split .prose p,
  .bands .form-band .lede p {
    font-size: 18px;
    line-height: 26px;
  }

  .bands .band {
    padding: 40px 0;
  }

  .bands .card-band .cards {
    margin: 30px 0 0 -8px;
    flex-wrap: wrap;
  }

  .bands .card-band .cards .card {
    width: calc(50% - 16px);
  }

  .bands .card-band .card .prose h3 {
    padding-bottom: 15px;
  }

  .bands .split-band .split {
    margin: 30px 0 0;
    flex-wrap: wrap;
  }

  .bands .split-band .split .media {
    width: 100%;
    margin-bottom: 20px;
  }

  .bands .split-band .split .prose {
    width: 100%;
  }

  .bands .picture-band {
    height: 200px;
  }

  .bands .image-band .lede {
    margin: 0 0 30px;
  }

  .bands .image-band .media-row {
    display: block;
  }

  .bands .image-band .media-row .media-cell {
    width: 100%;
    margin-bottom: 30px;
  }

  .bands .image-band .media-row .media-cell:last-child {
    margin-bottom: 0;
  }

  .bands .gallery-band .media-row {
    margin: 30px 0 0 -10px;
  }

  .bands .gallery-band .media-row .media-cell {
    width: calc(50% - 20px);
  }

  .bands .video-band .clip-frame {
    margin: 0;
  }

  .bands .video-band .clip-frame a.clip .clip-play {
    width: 56px;
    height: 65px;
    background-size: 100% auto;
  }

  .bands .form-band .lede {
    margin-bottom: 30px;
  }
}

@media only screen and (max-width: 499px) {
  .bands .card-band .cards {
    width: 100%;
    margin: 30px 0 0;
  }

  .bands .card-band .cards .card {
    width: 100%;
    margin: 8px 0;
  }
}

/* 7  posts and the post grid ------------------------------------------------------------------- */

/* The blog's category filter (commented out in the page today; blog-grid.js runs it if it returns). */
#post-filter {
  margin: 0 0 60px;
}

#post-filter ul {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#post-filter li {
  margin: 0 10px;
}

#post-filter li a {
  display: block;
  padding: 8px 16px;
  font: normal 600 20px/20px var(--ybh-heading);
  text-decoration: none;
  border: 1px solid var(--ybh-ink);
  transition: all var(--ybh-ease);
}

#post-filter li a.is-active,
#post-filter li a:hover {
  color: #fff;
  background: var(--ybh-ink);
}

#post-filter li a.chip-magenta { border-color: var(--ybh-pink); }
#post-filter li a.chip-blue { border-color: var(--ybh-blue); }
#post-filter li a.chip-green { border-color: var(--ybh-teal); }
#post-filter li a.chip-yellow { border-color: var(--ybh-yellow); }
#post-filter li a.chip-magenta:is(.is-active, :hover) { color: #fff; background: var(--ybh-pink); }
#post-filter li a.chip-blue:is(.is-active, :hover) { color: #fff; background: var(--ybh-blue); }
#post-filter li a.chip-green:is(.is-active, :hover) { color: #fff; background: var(--ybh-teal); }
#post-filter li a.chip-yellow:is(.is-active, :hover) { color: var(--ybh-ink); background: var(--ybh-yellow); }

/* Post cards: the blog grid (#post-grid, laid out by blog-grid.js) and a post's related posts. */
#post-grid,
.related-list {
  margin: 0 0 80px;
  padding: 0;
  list-style: none;
}

#post-grid .grid-column,
.related-list .grid-column {
  width: calc(33.33% - 16px);
  margin: 0 8px;
}

#post-grid .post-card,
.related-list .post-card {
  width: calc(33.33% - 16px);
  margin: 16px 8px;
  background: #000;
}

#post-grid .post-card a,
#post-grid .post-card .inset,
.related-list .post-card a,
.related-list .post-card .inset {
  display: flex;
  height: 100%;
  flex-direction: column;
}

#post-grid .post-card .media,
.related-list .post-card .media {
  background: #000;
  border-right: 5px solid #fff;
  border-left: 5px solid #fff;
}

#post-grid .post-card .media img,
.related-list .post-card .media img {
  transition: opacity var(--ybh-ease);
}

#post-grid .post-card .prose,
.related-list .post-card .prose {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 20px;
  text-align: center;
  background-color: var(--ybh-ink);
  transition: opacity var(--ybh-ease);
}

#post-grid .post-card .prose h3,
.related-list .post-card .prose h3 {
  padding-bottom: 30px;
  color: #fff;
}

#post-grid .post-card .prose .post-excerpt,
.related-list .post-card .prose .post-excerpt {
  color: #fff;
}

#post-grid .post-card .go-arrow,
.related-list .post-card .go-arrow {
  width: 33px;
  height: 27px;
  margin: 10px 0 0 auto;
  background: url("/static/site/images/icons/arrow-light.437248d2.svg") 0 0 no-repeat;
  transition: all var(--ybh-ease);
}

#post-grid .post-card a:hover .media img,
#post-grid .post-card a:hover .prose,
.related-list .post-card a:hover .media img,
.related-list .post-card a:hover .prose {
  opacity: 0.9;
}

#post-grid .post-card a:hover .go-arrow,
.related-list .post-card a:hover .go-arrow {
  margin-right: -6px;
}

#post-grid .post-card.brain .prose,
.related-list .post-card.brain .prose {
  background-color: var(--ybh-pink);
}

#post-grid .post-card.education .prose,
.related-list .post-card.education .prose {
  background-color: var(--ybh-teal);
}

#post-grid .post-card.technology .prose,
.related-list .post-card.technology .prose {
  background-color: var(--ybh-blue);
}

#post-grid .post-card.research .prose,
.related-list .post-card.research .prose {
  background-color: var(--ybh-yellow);
}

#post-grid .post-card.research .prose h3,
#post-grid .post-card.research .prose .post-excerpt,
.related-list .post-card.research .prose h3,
.related-list .post-card.research .prose .post-excerpt {
  color: var(--ybh-ink);
}

#post-grid .post-card.research .go-arrow,
.related-list .post-card.research .go-arrow {
  background: url("/static/site/images/icons/arrow-dark.db952425.svg") 0 0 no-repeat;
}

/* A post: its title block, its words in a narrower measure, its related posts. */
#site-post .hero.hero-flush .inset {
  min-height: inherit;
  padding-bottom: 0;
}

#site-post .lede {
  text-align: center;
}

#site-post h1 {
  max-width: 80%;
  margin: 0 auto;
  padding-bottom: 0;
}

#site-post h2 {
  font-size: 40px;
  line-height: 44px;
}

#site-post h3 {
  padding: 10px 0 15px;
  font-size: 28px;
  line-height: 32px;
}

#site-post .post-image .media {
  padding: 0 8%;
}

#site-post .bands .text-band .inset {
  padding: 0 8%;
  text-align: left;
}

#site-post .bands .text-band .inset p,
#site-post .bands .text-band .inset ul,
#site-post .bands .text-band .inset ol {
  font-size: 18px;
  line-height: 24px;
}

#site-post .bands .faq-band .inset {
  padding: 0 8%;
}

#site-post .bands .faq-band .faq-list .faq-item h3 {
  padding-right: 50px;
}

#site-post .related-band {
  padding: 80px 0;
}

#site-post .related-band .related-list {
  display: flex;
  width: calc(100% + 16px);
  margin: 30px 0 0 -8px;
}

@media only screen and (max-width: 767px) {
  #site-post .bands .text-band .inset p {
    font-size: 16px;
    line-height: 22px;
  }

  #site-post h2 {
    padding-bottom: 20px;
    font-size: 26px;
    line-height: 30px;
  }

  #site-post h3 {
    font-size: 20px;
    line-height: 24px;
  }

  #site-post h1 {
    max-width: 100%;
  }

  #site-post .related-band {
    padding: 30px 0;
  }

  #site-post .related-band .related-list {
    margin-top: 10px;
  }

  #post-grid .grid-column,
  #post-grid .post-card,
  .related-list .grid-column,
  .related-list .post-card {
    width: calc(50% - 16px);
  }

  #post-grid .post-card .prose,
  .related-list .post-card .prose {
    padding: 20px;
  }

  #post-grid .post-card .prose h3,
  .related-list .post-card .prose h3 {
    padding-bottom: 15px;
  }

  #post-filter {
    margin: 0 0 30px;
  }

  #post-filter ul {
    flex-wrap: wrap;
  }

  #post-filter li {
    margin: 10px;
  }

  #post-filter li a {
    font-size: 18px;
    line-height: 18px;
  }
}

@media only screen and (max-width: 499px) {
  #post-grid .grid-column,
  #post-grid .post-card,
  .related-list .grid-column,
  .related-list .post-card {
    width: 100%;
    margin: 10px 0;
  }
}

/* 8  header and the menu drawer ---------------------------------------------------------------- */

header {
  position: fixed;
  z-index: 150;
  top: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease-in-out;
}

header .inset {
  display: flex;
  height: 90px;
  align-items: center;
  justify-content: space-between;
  transition: height var(--ybh-ease);
}

/* Once the page has scrolled the bar is shorter (header.js). */
header.is-scrolled .inset {
  height: 60px;
}

header .brand-logo {
  width: 210px;
}

/* The drawer's trigger: three bars that cross into an X while the drawer is open (nav.js). */
#menu-toggle,
#menu-drawer {
  display: none;
}

@media only screen and (max-width: 1019px) {
  header .inset {
    height: 60px;
  }

  #menu-toggle {
    position: absolute;
    z-index: 100;
    top: 50%;
    right: 30px;
    display: block;
    width: 30px;
    height: 26px;
    margin: -3px 0 0;
    color: var(--ybh-ink);
    cursor: pointer;
    transform: translateY(-50%);
    transition: transform 0.5s ease;
  }

  #menu-toggle .burger,
  #menu-toggle .burger::before,
  #menu-toggle .burger::after {
    position: absolute;
    display: block;
    width: 30px;
    height: 3px;
    background: var(--ybh-ink);
  }

  #menu-toggle .burger {
    top: 50%;
    transition: background 0.5s ease;
  }

  #menu-toggle .burger::before,
  #menu-toggle .burger::after {
    content: "";
    transition: transform 0.5s ease, top 0.3s ease, bottom 0.3s ease;
  }

  #menu-toggle .burger::before {
    top: -8px;
  }

  #menu-toggle .burger::after {
    top: auto;
    bottom: -8px;
  }

  #menu-toggle.is-open .burger {
    background: 0 0;
    transition: none;
  }

  #menu-toggle.is-open .burger::before {
    top: 0;
    background: #000;
    transform: rotate(45deg);
  }

  #menu-toggle.is-open .burger::after {
    top: 8px;
    bottom: auto;
    background: #000;
    transform: translateY(-8px) rotate(-45deg);
  }

  /* The drawer drops from behind the bar, as tall as the window below it. */
  #menu-drawer {
    position: fixed;
    z-index: 130;
    top: -100%;
    left: 0;
    display: block;
    width: 100%;
    height: calc(100vh - 60px);
    padding: 30px;
    background: var(--ybh-pink);
    transition: top var(--ybh-ease);
  }

  #menu-drawer.is-open {
    top: 60px;
  }
}

/* 9  footer ------------------------------------------------------------------------------------ */

.site-footer {
  position: relative;
  color: #fff;
  font-family: var(--ybh-heading);
  font-style: normal;
}

.site-footer a,
.site-footer a:hover {
  color: #fff;
}

.site-footer__main {
  padding: 48px 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
  background: var(--ybh-ink);
}

.site-footer__logo {
  display: block;
  width: 146px;
  margin: 0 auto 20px;
}

.site-footer__social {
  display: flex;
  justify-content: center;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer__social li {
  margin: 10px;
}

/* Each network as its mark; the name stays the link's text, for screen readers and search. */
.site-footer__social a {
  display: block;
  width: 28px;
  height: 28px;
  overflow: hidden;
  white-space: nowrap;
  text-indent: 100%;
  background: center / 28px 28px no-repeat;
}

.site-footer__social .facebook { background-image: url("/static/site/images/social/facebook.0bfea902.svg"); }
.site-footer__social .instagram { background-image: url("/static/site/images/social/instagram.03a59191.svg"); }
.site-footer__social .linkedin { background-image: url("/static/site/images/social/linkedin.a4248601.svg"); }
.site-footer__social .tiktok { background-image: url("/static/site/images/social/tiktok.cd9bea36.svg"); }
.site-footer__social .x { background-image: url("/static/site/images/social/x.ff117998.svg"); }

.site-footer__legal {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  background: var(--ybh-night);
}

.site-footer__links {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 16px 0;
  list-style: none;
}

.site-footer__links li {
  margin: 0 20px;
}

.site-footer__links a:hover,
.site-footer__links a[aria-current="page"] {
  text-decoration: underline;
}

@media only screen and (max-width: 767px) {
  .site-footer__main {
    padding: 30px 0;
  }
}

@media only screen and (max-width: 499px) {
  .site-footer__links li {
    margin: 0 10px;
  }
}

/* 10  newsletter bar --------------------------------------------------------------------------- */

/* Fixed along the bottom of the window; it rises into view two seconds after the page opens
   (newsletter-bar.js) and stays down once dismissed or once its form is sent. */
.signup-bar {
  position: fixed;
  z-index: 9999;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 20px;
  background-color: var(--ybh-pink);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.signup-bar.is-hidden {
  transform: translateY(100%);
}

.signup-bar__body {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.signup-bar__pitch {
  color: #fff;
  font: 15px/1.4 var(--ybh-body);
}

.signup-bar__pitch strong {
  font-family: var(--ybh-heading);
  font-weight: 600;
}

.signup-bar__close {
  flex-shrink: 0;
  margin-left: 10px;
  padding: 5px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.signup-bar__close:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .signup-bar {
    padding: 15px 40px 15px 15px;
  }

  .signup-bar__body {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .signup-bar__close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
  }
}
