/* Planet Me. Direction A: "Punctuation".
   Brand colours are exact from the old site and logo. The two greys used for
   text and the "get involved" band were darkened to pass WCAG AA (agreed). */

@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/roboto-latin-700-normal.woff2") format("woff2"); }

:root {
  --dark: #2d2d2d;
  --grey: #a0a0a0;
  --cyan: #00c4dc;
  --lime: #9ded37;
  --pink: #f32971;
  --light: #d8d8d8;
  --text: #6b6b6b;      /* was #818181: 3.9:1 on white, now 5.3:1 */
  --band: #6b6b6b;      /* was #909090: white text 3.2:1, now 5.3:1 */
  --white: #fff;

  --head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Roboto", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 78rem;
  --bar-h: 4.5rem; /* mobile section bar */
  /* Full-bleed bands keep their content on the same column as the centred sections. */
  --inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 300 1.1875rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: 1.5rem; }
svg { display: block; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--white); color: var(--dark); padding: .75rem 1rem; font-weight: 400;
}
.skip:focus { top: 1rem; }

/* ---------- Masthead ---------- */
.masthead {
  background: var(--dark);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.75rem var(--inline) 0;
}
.masthead__logo { display: block; width: clamp(9.5rem, 16vw, 12.5rem); }
.masthead__logo svg { width: 100%; height: auto; }

.sections ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem 1.75rem; }
.sections a { text-decoration: none; }
.sections__link {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--light); font: 400 1rem/1 var(--head); padding: .75rem 0;
}
.sections__link:hover span:last-child, .sections__link[aria-current] span:last-child { color: var(--white); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }
.dot { width: .6rem; height: .6rem; flex: none; }
.sections__link--pink .dot { background: var(--pink); }
.sections__link--cyan .dot { background: var(--cyan); }
.sections__link--lime .dot { background: var(--lime); }
.sections__link--pink[aria-current] span:last-child { text-decoration-color: var(--pink); }
.sections__link--cyan[aria-current] span:last-child { text-decoration-color: var(--cyan); }
.sections__link--lime[aria-current] span:last-child { text-decoration-color: var(--lime); }
.sections__email a {
  display: inline-block; background: var(--cyan); color: var(--dark);
  font: 700 1rem/1 var(--head); padding: .85rem 1.2rem;
}
.sections__email a:hover { background: var(--white); }

/* ---------- Hero: the punctuation ---------- */
.hero {
  background: var(--dark);
  padding: clamp(3rem, 8vw, 6rem) var(--inline) clamp(3.5rem, 8vw, 6.5rem);
}
.hero h1 {
  max-width: 22ch;
  color: var(--grey);
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.p { display: inline-block; transform: scale(1.25); transform-origin: 30% 80%; margin-left: .02em; }
.p--cyan { color: var(--cyan); }
.p--lime { color: var(--lime); }
.p--light { color: var(--light); }
.p--pink { color: var(--pink); }

/* ---------- planetme in a nutshell ---------- */
.nutshell {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; row-gap: 2rem;
}
.nutshell h2 {
  grid-column: 1 / span 4; align-self: start; position: sticky; top: 2rem;
  color: var(--pink);
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.05;
}
.nutshell__text { grid-column: 6 / -1; max-width: 40rem; }
.lead { font: 400 clamp(1.3rem, 1.1rem + .7vw, 1.6rem)/1.5 var(--body); color: var(--dark); }
.callout {
  font: 700 clamp(1.15rem, 1rem + .5vw, 1.35rem)/1.45 var(--head); color: var(--dark);
  border-left: .4rem solid var(--pink); padding: .2rem 0 .2rem 1.1rem; margin: 2rem 0;
}
.nhs { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #e3e3e3; }

/* ---------- what is planetme? (dark, mirrored) ---------- */
.what { background: var(--dark); color: var(--light); }
.what {
  padding: clamp(4rem, 10vw, 8rem) var(--inline);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; row-gap: 2rem;
}
.what h2 {
  grid-column: 9 / -1; grid-row: 1; align-self: start; position: sticky; top: 2rem;
  color: var(--cyan); text-align: right;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.05;
}
.what h2::after { content: ""; display: block; width: 3.5rem; height: .35rem; background: var(--lime); margin: 1.1rem 0 0 auto; }
.what__text { grid-column: 1 / span 7; grid-row: 1; max-width: 42rem; }
.what .lead { color: var(--white); }

/* ---------- get involved ---------- */
.involved {
  background: var(--band); color: var(--white);
  padding: clamp(4rem, 10vw, 7.5rem) var(--inline);
}
.involved h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.05; margin-bottom: 1.5rem; }
.involved__line { font: 400 clamp(1.1rem, 1rem + .4vw, 1.3rem)/1.4 var(--head); margin: 0 0 .4rem; }
.involved__email { margin: 0; }
.involved__email a {
  font: 700 clamp(1.375rem, 1rem + 1.6vw, 2.25rem)/1.3 var(--head); letter-spacing: -0.01em;
  text-decoration: underline; text-decoration-color: var(--lime);
  text-decoration-thickness: .09em; text-underline-offset: .22em;
  overflow-wrap: anywhere;
}
.involved__email a:hover { text-decoration-color: var(--white); }

/* ---------- footer ---------- */
.footer {
  background: var(--dark); color: var(--light);
  padding: 3.5rem var(--inline) 3rem;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem 2rem;
  font-size: 1rem;
}
.footer__logo { width: 8.5rem; }
.footer__logo svg { width: 100%; height: auto; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; justify-self: end; grid-column: 3; }
.social a { display: grid; place-items: center; width: 3rem; height: 3rem; color: var(--light); }
.social a:hover { color: var(--white); }
.social svg { width: 1.35rem; height: 1.35rem; fill: currentColor; }
.footer__copy { grid-column: 1 / 3; margin: 0; font-weight: 700; color: var(--white); }
.footer__credit { grid-column: 3; justify-self: end; margin: 0; }
.footer__credit a { color: var(--light); }

/* ---------- tablet and phone ---------- */
@media (max-width: 60rem) {
  .nutshell h2, .what h2 { position: static; }
  .nutshell h2 { grid-column: 1 / -1; }
  .nutshell__text { grid-column: 1 / -1; }
  .what h2 { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .what h2::after { margin-left: 0; }
  .what__text { grid-column: 1 / -1; grid-row: 2; }
}

/* Phones and small tablets: the section bar moves to the bottom of the screen. */
@media (max-width: 47.5rem) {
  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
  .masthead { padding-top: 1.25rem; }
  .sections {
    position: fixed; z-index: 10; left: 0; right: 0; bottom: 0;
    background: var(--dark); border-top: 1px solid #444;
    padding: 0 .5rem env(safe-area-inset-bottom);
  }
  .sections ul { display: grid; grid-template-columns: 1fr 1fr 1fr 1.15fr; gap: .25rem; height: var(--bar-h); }
  .sections li { height: 100%; }
  .sections__link {
    flex-direction: column; justify-content: center; gap: .45rem;
    width: 100%; height: 100%; padding: .4rem .2rem;
    font-size: .8125rem; line-height: 1.15; text-align: center;
  }
  .sections__link .dot { width: .75rem; height: .75rem; transition: transform .2s; }
  .sections__link[aria-current] .dot { transform: scale(1.35); }
  .sections__link[aria-current] span:last-child, .sections__link:hover span:last-child { text-decoration: none; color: var(--white); font-weight: 700; }
  .sections__email { display: flex; align-items: center; }
  .sections__email a { width: 100%; text-align: center; padding: 1rem .4rem; font-size: .9375rem; }
  [id] { scroll-margin-top: 1rem; }

  .footer { grid-template-columns: 1fr; justify-items: start; }
  .social, .footer__copy, .footer__credit { grid-column: 1; justify-self: start; }
  .social { margin-left: -.75rem; }
}

/* ---------- 404 ---------- */
.notfound { background: var(--dark); min-height: 100vh; padding-bottom: 0; }
.notfound .hero { padding-top: 2rem; }
.notfound h1 { color: var(--grey); font-size: clamp(2.5rem, 1rem + 6vw, 5.5rem); line-height: 1.05; margin: clamp(3rem, 10vw, 7rem) 0 2rem; max-width: 14ch; }
.notfound__text { color: var(--light); font-size: 1.25rem; }
.notfound__text a { color: var(--white); text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: .2em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
