/* ecmvarts.com: holding page opening with the FootNotes artwork. */

:root {
  --bg: #0c0d0e;
  --ink: #f5f5f7;
  --muted: #8b929a; /* 6.5:1 on the page (WCAG AA needs 4.5) */
  --line: rgba(255, 255, 255, 0.12);
  --red: #ef4f55; /* the red of the FootNotes ribbon; 5.4:1 on the page */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 6vw, 72px);
}

/* Poppins, hosted with the site (SIL Open Font License) so no visitor data goes to Google */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  display: grid;
  align-content: center;
  padding: var(--gutter);
  max-width: 820px;
}

/* Opening scene: the FootNotes artwork, with the statement set beside the red notes.
   The box keeps the picture's 16:9 shape, so the statement stays in the empty space
   above the ribbon at every width. */
.stage {
  padding: clamp(12px, 3vw, 40px) var(--gutter) 0;
}

.stage-art {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  aspect-ratio: 2752 / 1536;
  background: url("../img/footnotes-hero.webp") no-repeat center / contain, var(--bg);
  background-blend-mode: screen; /* the picture's black melts into the page colour */
}

.stage-art::before {
  /* dims the picture a little so it supports the words rather than shouting over them */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 14, 0.35);
}

.stage-art .intro {
  position: absolute;
  left: 60%;
  top: 6%;
  width: 36%;
  margin: 0;
}

.intro {
  margin: 0 0 56px;
}

.intro .line {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(16px, 1.9vw, 28px);
  font-weight: 500;
  line-height: 1.25;
}

.intro .line span {
  color: var(--red);
}

.eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(48px, 11vw, 112px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.4vw, 22px);
  max-width: 30ch;
}

/* The plain naming sentence, kept so search engines describe the company correctly */
.naming {
  margin: 20px 0 40px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 14px;
}

.aims-intro {
  margin: 0 0 16px;
  max-width: 52ch;
}

.aims {
  margin-bottom: 32px;
}

.aims strong {
  color: var(--ink);
  font-weight: 500;
}

.aims li + li {
  margin-top: 14px;
}

.points {
  margin: 0 0 20px;
  padding-left: 1.1em;
  color: var(--muted);
  max-width: 52ch;
}

.points li + li {
  margin-top: 8px;
}

.button {
  margin-top: 16px;
  padding: 10px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.email-note {
  min-height: 1.6em;
  margin: 12px 0 0;
  font-size: 13px;
}

.note p {
  margin: 0;
}

.note {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

a {
  color: var(--ink);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 2px;
}

footer {
  padding: 0 var(--gutter) var(--gutter);
  color: var(--muted);
  font-size: 13px;
}

/* Wide screens: the words sit in two columns, lined up with the picture */
@media (min-width: 960px) {
  main,
  footer {
    width: 100%;
    max-width: calc(1400px + 2 * var(--gutter));
    margin: 0 auto;
  }

  main {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: clamp(48px, 7vw, 128px);
    align-items: end;
    padding-top: clamp(40px, 5vw, 72px);
  }

  .naming {
    margin-bottom: 0;
  }

  .details {
    padding-left: clamp(24px, 3vw, 40px);
    border-left: 2px solid var(--red);
  }
}

/* Phones: the picture is too small to hold the words, so they sit underneath it */
@media (max-width: 720px) {
  .stage-art .intro {
    position: static;
    width: auto;
    padding-top: calc(100% * 1536 / 2752 + 16px);
  }

  .stage-art {
    aspect-ratio: auto;
    background-position: top center, 0 0;
    background-size: 100% auto, auto;
  }

  .stage-art::before {
    bottom: auto;
    aspect-ratio: 2752 / 1536;
  }

  .intro .line {
    font-size: 21px;
  }
}

/* Read by screen readers, not shown on screen */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
