/*
 * "Why ALTI TRADING".
 *
 * The page's job is to convince someone that a real company is behind the
 * courses, and the proof it holds is photographic, not verbal. So the layout is
 * sized to the photographs: they are 600px wide at source, and every column
 * that carries one is sized so none of them is ever scaled up.
 */

.why {
  background: var(--sg-ground);
}

.why .why-band {
  background: var(--sg-sunk);
  border-block: 1px solid var(--sg-line);
}

/* Hero -------------------------------------------------------------------- */

.why .why-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2.25rem, 4vw, 3.75rem) clamp(2.25rem, 4vw, 3.5rem);
}

.why .why-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 600px;
  gap: clamp(2rem, 4.5vw, 3.5rem);
  align-items: center;
}

.why .why-hero__title {
  margin-top: 1rem;
  max-width: 13ch;
}

.why .why-hero__lead {
  max-width: 46ch;
}

.why .why-hero__shot {
  margin: 0;
}

.why .why-hero__caption {
  margin: 0.625rem 0 0;
  font-size: 0.78rem;
  color: var(--sg-soft);
}

.why .why-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 2.125rem 0 0;
}

.why .why-figures dt {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: var(--sg-track-display);
  line-height: 1.1;
  color: var(--sg-ink);
}

.why .why-figures dd {
  margin: 0;
  font-size: 0.78rem;
  color: var(--sg-soft);
}

.why .why-figures > div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--sg-line);
}

/* The story --------------------------------------------------------------- */

.why .why-story__head {
  margin-bottom: 1.25rem;
}

.why .why-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
 * Three columns: the year in the margin, the words, the photograph. Two left a
 * third of the page empty, which is the austerity this redesign undoes.
 */
.why .why-event {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 470px;
  gap: 2.75rem;
}

.why .why-event__year {
  position: relative;
  margin: 0;
  padding: 2.125rem 0 2.125rem 1.875rem;
  font-size: 2.125rem;
  font-weight: 700;
  letter-spacing: var(--sg-track-display);
  line-height: 1;
  color: var(--sg-ink);
  font-variant-numeric: tabular-nums;
}

/* One hairline down the whole list, stopped at the first and last markers. */
.why .why-event__year::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--sg-line);
}

.why .why-event:first-child .why-event__year::before {
  top: 2.25rem;
}

.why .why-event:last-child .why-event__year::before {
  bottom: auto;
  height: 2.5rem;
}

/* A candle rather than a bullet: a timeline on this site can look like the
   thing the site is about. */
.why .why-event__year::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 2rem;
  width: 9px;
  height: 22px;
  border-radius: 2px;
  background: var(--sg-up);
}

.why .why-event__body {
  padding-block: 2.125rem;
  max-width: 52ch;
}

.why .why-event__title {
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: var(--sg-track-tight);
}

.why .why-event__body p {
  margin: 0.625rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sg-body);
}

.why .why-event__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  margin-top: 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.why .why-event__link svg {
  width: 15px;
  height: 15px;
}

.why .why-event__photos {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-block: 2.125rem;
}

.why .why-event__photos:empty {
  padding: 0;
}

.why .why-shot {
  margin: 0;
}

.why .why-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.why .why-shot figcaption {
  padding: 0.5625rem 0.75rem;
  border-top: 1px solid var(--sg-line);
  font-size: 0.75rem;
  color: var(--sg-soft);
}

/*
 * The 2016 photograph is a still from a YouTube video: the player chrome sits
 * along the bottom and the caption bar under it is in French. The crop keeps
 * the part that is a photograph of the founder at his desk.
 */
.why .why-crop {
  aspect-ratio: 600 / 234;
  overflow: hidden;
}

.why .why-crop img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 27%;
}

/* What we commit to -------------------------------------------------------- */

/*
 * Four statements on rules. They were four identical icon cards, which is the
 * arrangement that makes four different commitments read as one product's
 * feature list.
 */
.why .why-commitments {
  margin: 0;
  padding: 0;
  list-style: none;
}

.why .why-commitments li {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 3.5rem;
  padding-block: 1.875rem;
  border-bottom: 1px solid var(--sg-line);
}

.why .why-commitments li:first-child {
  border-top: 2px solid var(--sg-ink);
}

.why .why-commitments h3 {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.026em;
  line-height: 1.15;
}

.why .why-commitments p {
  margin: 0;
  align-self: center;
  max-width: 60ch;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--sg-body);
}

/* Results ------------------------------------------------------------------ */

.why .why-results {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem 3.5rem;
}

.why .why-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3.5rem;
  margin: 0;
}

.why .why-stats > div {
  padding-top: 0.875rem;
  border-top: 1px solid var(--sg-line);
}

.why .why-stats dt {
  font-size: 2.625rem;
  font-weight: 700;
  letter-spacing: var(--sg-track-display);
  line-height: 1.05;
  color: var(--sg-ink);
}

.why .why-stats dd {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--sg-soft);
}

.why .why-results > .sg-btn {
  margin-left: auto;
}

/* Close --------------------------------------------------------------------- */

.why .why-close {
  padding-block: clamp(3.25rem, 6vw, 5rem);
  text-align: center;
}

.why .why-close__lead {
  margin-inline: auto;
  max-width: 46ch;
}

.why .why-close__go {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Narrow --------------------------------------------------------------------- */

@media (max-width: 1099px) {
  .why .why-hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  /*
   * The photograph goes under the words rather than beside them, and the year
   * column narrows: at this width a 470px photo column leaves the prose in a
   * ribbon nobody can read.
   */
  .why .why-event {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .why .why-event__body {
    padding-bottom: 0;
  }

  .why .why-event__photos {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 1.125rem;
  }

  .why .why-event__photos .why-shot {
    flex: 1 1 260px;
  }

  .why .why-commitments li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 599px) {
  .why .why-event {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* With one column the rail has nothing to run down, so the year simply reads
     as the heading it is. */
  .why .why-event__year {
    padding: 1.75rem 0 0;
    font-size: 1.75rem;
  }

  .why .why-event__year::before,
  .why .why-event__year::after {
    content: none;
  }

  .why .why-event__body {
    padding-block: 0.625rem 0;
  }

  .why .why-event__photos {
    grid-column: 1;
  }

  .why .why-stats dt {
    font-size: 2rem;
  }
}
