/* =========================================================
   CORE VALUES
   ========================================================= */

.values-section {
  position: relative;
  z-index: 2;

  width: 100%;

  padding-block: clamp(3rem, 4vw, 5rem) clamp(3.5rem, 4vw, 5rem);

  overflow: hidden;
  border-top: 1px solid rgba(17, 19, 23, 0.06);
  border-bottom: 1px solid rgba(17, 19, 23, 0.06);
  background: #eef2f5;
  box-shadow:
    inset 0 18px 28px -24px rgba(17, 19, 23, 0.42),
    inset 0 -18px 28px -24px rgba(17, 19, 23, 0.42);
}

/* =========================================================
   CONTAINER
   ========================================================= */

.values-container {
  display: grid;

  gap: clamp(2.5rem, 2vw, 5.5rem);
}

/* =========================================================
   HEADING
   ========================================================= */

.values-header {
  max-width: 38rem;
}

.values-header .section-label {
  margin-bottom: 0.75rem;
}

.values-header h2 {
  margin: 0;

  font-size: clamp(2.75rem, 5vw, 4.75rem);

  font-weight: 700;

  line-height: 0.98;

  letter-spacing: -0.035em;
}

/* Small blue line under heading */

.values-heading-line {
  display: block;

  width: 4.5rem;
  height: 2px;

  margin-top: 1.25rem;

  background: var(--color-brand);
}

/* Introductory sentence */

.values-intro {
  max-width: 38rem;

  margin: 0.5rem 0 0;

  color: var(--color-muted);

  font-size: clamp(0.9rem, 1.15vw, 1rem);

  line-height: 1.75;
}

/* =========================================================
   VALUES GRID
   ========================================================= */

.values-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  width: 100%;

  border-top: 1px solid rgba(17, 19, 23, 0.1);

  border-bottom: 1px solid rgba(17, 19, 23, 0.1);
}

/* =========================================================
   VALUE CARD
   ========================================================= */

.value-card {
  position: relative;

  display: flex;
  flex-direction: column;

  align-items: flex-start;

  min-width: 0;

  padding: clamp(2rem, 3vw, 3rem) clamp(1.4rem, 2.5vw, 2.25rem)
    clamp(2.2rem, 3vw, 3rem);

  background: transparent;

  transition:
    background 220ms ease,
    transform 220ms ease;
}

/* Vertical separators */

.value-card + .value-card {
  border-left: 1px solid rgba(17, 19, 23, 0.1);
}

/* =========================================================
   ICON
   ========================================================= */

.value-icon {
  display: grid;

  place-items: center;

  width: 4.5rem;
  height: 4.5rem;

  margin-bottom: 1.8rem;

  color: var(--color-brand);

  background: rgba(7, 136, 207, 0.06);

  border: 1px solid rgba(7, 136, 207, 0.06);

  border-radius: 50%;

  transition:
    color 220ms ease,
    background 220ms ease,
    transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* SVG styling */

.value-icon svg {
  width: 2rem;
  height: 2rem;

  stroke: currentColor;

  stroke-width: 1.8;

  stroke-linecap: round;

  stroke-linejoin: round;

  overflow: visible;
}

/* =========================================================
   VALUE HEADING
   ========================================================= */

.value-card h3 {
  margin: 0;

  color: var(--color-ink);

  font-size: clamp(1.05rem, 1.5vw, 1.3rem);

  font-weight: 750;

  line-height: 1.25;

  letter-spacing: -0.015em;
}

/* =========================================================
   BLUE ACCENT
   ========================================================= */

.value-accent {
  display: block;

  width: 1.7rem;
  height: 2px;

  margin-block: 1rem 1.25rem;

  background: var(--color-brand);

  transition: width 220ms ease;
}

/* =========================================================
   DESCRIPTION
   ========================================================= */

.value-card p {
  max-width: 18rem;

  margin: 0;

  color: var(--color-muted);

  font-size: clamp(0.78rem, 1vw, 0.88rem);

  line-height: 1.7;
}

/* =========================================================
   DESKTOP HOVER
   ========================================================= */

@media (hover: hover) {
  .value-card:hover {
    background: rgba(255, 255, 255, 0.46);
  }

  .value-card:hover .value-icon {
    color: #ffffff;

    background: var(--color-brand);

    transform: translateY(-0.2rem);
  }

  .value-card:hover .value-accent {
    width: 2.75rem;
  }
}

/* =========================================================
   TABLET
   2 × 2 GRID
   ========================================================= */

@media (max-width: 980px) {
  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /*
   * Remove the desktop separator pattern.
   */

  .value-card + .value-card {
    border-left: 0;
  }

  /*
   * Vertical separator:
   * second card of each row
   */

  .value-card:nth-child(even) {
    border-left: 1px solid rgba(17, 19, 23, 0.1);
  }

  /*
   * Horizontal separator:
   * second row
   */

  .value-card:nth-child(n + 3) {
    border-top: 1px solid rgba(17, 19, 23, 0.1);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {
  .values-section {
    padding-block: 4.5rem 4rem;
  }

  .values-container {
    gap: 3rem;
  }

  .values-header {
    max-width: 30rem;
  }

  .values-header h2 {
    font-size: clamp(2.4rem, 11vw, 3.25rem);
  }

  .values-heading-line {
    margin-top: 1.25rem;
  }

  .values-intro {
    max-width: 28rem;

    margin-top: 1.1rem;

    font-size: 0.86rem;

    line-height: 1.65;
  }

  .value-card {
    padding: 2rem 1.25rem;
  }

  .value-icon {
    width: 3.8rem;
    height: 3.8rem;

    margin-bottom: 1.35rem;
  }

  .value-icon svg {
    width: 1.75rem;
    height: 1.75rem;
  }

  .value-card h3 {
    font-size: 1rem;
  }

  .value-card p {
    font-size: 0.76rem;

    line-height: 1.6;
  }

  .value-accent {
    margin-block: 0.8rem 1rem;
  }
}

/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 440px) {
  .values-grid {
    grid-template-columns: 1fr;
  }

  .value-card:nth-child(even) {
    border-left: 0;
  }

  .value-card:nth-child(n + 2) {
    border-top: 1px solid rgba(17, 19, 23, 0.1);
  }

  .value-card {
    display: grid;

    grid-template-columns:
      auto
      1fr;

    column-gap: 1rem;

    align-items: start;
  }

  .value-icon {
    grid-column: 1;
    grid-row: 1 / span 3;

    margin: 0;
  }

  .value-card h3 {
    grid-column: 2;
  }

  .value-accent {
    grid-column: 2;
  }

  .value-card p {
    grid-column: 2;

    max-width: none;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .value-card,
  .value-icon,
  .value-accent {
    transition: none;
  }
}
