/*
 * The values page, arranged as the French one is.
 *
 * Three outlines behind the opening statement, a set of ambitions, a strip of
 * the five things actually done — each opening its own account — then the
 * founder's words, then two ways on.
 */

.values {
  background: var(--ds-surface);
}

.values section {
  padding-block: var(--ds-section-gap);
}

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

.values-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--ds-line);
  background: linear-gradient(180deg, var(--ds-surface-tint), var(--ds-surface));
  text-align: center;
}

.values-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/*
 * The outlines sit behind the words at the colour of a hairline — present when
 * you look, invisible when you read. They are the first thing to go when the
 * viewport gets narrow, because there is no room for both.
 */
.values-outline {
  position: absolute;
  z-index: -1;
  color: var(--ds-line);
  pointer-events: none;
}

.values-outline--heart {
  top: 12%;
  left: 4%;
  width: clamp(96px, 12vw, 192px);
}

.values-outline--people {
  right: 2%;
  bottom: 8%;
  width: clamp(140px, 20vw, 308px);
}

.values-outline--earth {
  top: 18%;
  right: 8%;
  width: clamp(84px, 10vw, 150px);
}

@media (max-width: 999px) {
  .values-outline--earth,
  .values-outline--heart {
    display: none;
  }

  .values-outline--people {
    right: -10%;
    bottom: -4%;
    opacity: 0.6;
  }
}

/*
 * The page's name, set small: on a page whose point is a statement, the
 * statement is what should be large. The h1 stays the name.
 */
.values-label {
  margin: 0;
  color: var(--ds-muted);
  font-size: var(--ds-text-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.values-hero__title {
  max-width: 18ch;
}

.values-hero__lead {
  max-width: 62ch;
}

/* Ambitions ------------------------------------------------------------ */

.values-ambitions__lead,
.values-actions__lead {
  margin-top: 1rem;
  max-width: 68ch;
}

.values-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}

.values-topic {
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.values-topic__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-tint);
  color: var(--ds-accent-from);
}

.values-topic__icon svg {
  width: 22px;
  height: 22px;
}

.values-topic__title {
  margin: 1.1rem 0 0.6rem;
  color: var(--ds-ink);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: var(--ds-tracking-tight);
}

.values-topic p {
  margin: 0;
  color: var(--ds-body);
  font-size: var(--ds-text-small);
}

/* Actions -------------------------------------------------------------- */

.values-actions {
  border-block: 1px solid var(--ds-line);
  background: var(--ds-surface-tint);
  overflow: hidden;
}

/*
 * A scroll strip rather than a carousel: the browser already knows how to
 * scroll, snap and follow a keyboard. The padding on the ends lines the first
 * tile up with the text above it and lets the last one clear the edge.
 */
/*
 * `scroll-padding` as well as `padding`: snapping aligns an item with the
 * scrollport's edge, not with the padding edge, so without it the browser
 * scrolled the strip by exactly the inset and the first tile sat against the
 * window.
 */
.values-strip {
  --strip-inset: max(var(--ds-gutter), 50vw - var(--ds-page) / 2 + var(--ds-gutter));

  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0.5rem var(--strip-inset);
  scroll-padding-inline: var(--strip-inset);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.values-strip > li {
  flex: 0 0 clamp(240px, 30vw, 300px);
  scroll-snap-align: start;
}

.values-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
  background: var(--ds-ink);
  box-shadow: var(--ds-shadow-md);
  cursor: pointer;
  text-align: left;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.values-tile:hover {
  transform: translateY(-3px);
}

.values-tile img {
  display: block;
  width: 100%;
  height: clamp(320px, 38vw, 420px);
  object-fit: cover;
}

.values-tile__text {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(3rem, 6vw, 4.5rem) 1.25rem 1.25rem;
  background: linear-gradient(
    to top,
    oklch(0.17 0.014 268 / 0.95) 0%,
    oklch(0.17 0.014 268 / 0.85) 45%,
    oklch(0.17 0.014 268 / 0) 100%
  );
}

/* The theme colours every heading outright, so white has to be stated here. */
.values-tile__title {
  color: oklch(1 0 0);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--ds-tracking-tight);
  text-wrap: balance;
}

.values-tile__more {
  flex: none;
  color: oklch(1 0 0);
}

.values-tile__more svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* The account behind each tile ----------------------------------------- */

.values-dialog {
  width: min(680px, calc(100vw - 2 * var(--ds-gutter)));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  color: var(--ds-body);
  overflow: hidden;
}

.values-dialog::backdrop {
  background: oklch(0.17 0.014 268 / 0.6);
  backdrop-filter: blur(2px);
}

.values-dialog__panel {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
}

.values-dialog__image {
  display: block;
  width: 100%;
  height: clamp(180px, 28vw, 260px);
  object-fit: cover;
}

.values-dialog__text {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.values-dialog__text p {
  margin: 1rem 0 0;
  color: var(--ds-body);
}

.values-dialog__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.9);
  color: var(--ds-ink);
  cursor: pointer;
}

.values-dialog__close svg {
  width: 18px;
  height: 18px;
}

/* Together ------------------------------------------------------------- */

.values-together__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 860px) {
  .values-together__inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  }
}

.values-together__text p {
  margin: 1.15rem 0 0;
  max-width: 62ch;
  color: var(--ds-body);
}

.values-together__text .ds-h2 {
  margin-bottom: 1.5rem;
}

.values-author {
  margin: 0;
  text-align: center;
}

.values-author img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin-inline: auto;
  border-radius: var(--ds-radius-lg);
}

.values-author figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 1rem;
}

.values-author__name {
  color: var(--ds-ink);
  font-weight: 600;
}

.values-author__role {
  color: var(--ds-muted);
  font-size: var(--ds-text-small);
}

/* Two ways on ---------------------------------------------------------- */

.values-cta {
  border-top: 1px solid var(--ds-line);
  background: var(--ds-surface-sunk);
}

.values-cta__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.values-cta__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
}

.values-cta__card .ds-h3 {
  max-width: 22ch;
}

@media (prefers-reduced-motion: reduce) {
  .values-tile {
    transition: none;
  }

  .values-tile:hover {
    transform: none;
  }
}
