/* How We Work, from the Figma Continuum frame (Values / how we work): header, then a 3×2 grid of five value tiles and
   a gradient detail tile. Figma's detail tile shows value 01's tags and body; here it follows the hovered or focused
   tile so every value's body stays on the page. Below 64rem there is no hover, so each tile shows its own body and
   the detail tile is hidden. */

.lp-values__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 4rem 0 0;
}

/* The grid sits on the section divider, which closes it; bottom borders on the last row would leave an empty band.
   Below 64rem the hidden detail tile is last, so the last visible tile is the second-to-last child. */
.lp-values__tile:nth-last-child(2) {
  border-bottom: none;
}

.lp-values__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
  padding: 0 1rem;
}

.lp-values__title {
  font-size: 1.875rem;
  line-height: 2.375rem;
  font-weight: 400;
  color: var(--lp-ui-text-primary);
}

.lp-values__lead {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--lp-ui-text-tertiary);
}

/* The tiles have their own background, which would hide the section rails along the grid's outer edges, so the grid
   draws its own left and right edges exactly on the rails. */
.lp-values__grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--lp-ui-border-primary);
  border-right: 1px solid var(--lp-ui-border-primary);
  border-left: 1px solid var(--lp-ui-border-primary);
}

.lp-values__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 1rem 2.5rem;
  border: none;
  border-bottom: 1px solid var(--lp-ui-border-primary);
  background: var(--lp-ui-bg-primary);
  font: inherit;
  text-align: left;
  color: inherit;
  transition: background-color 150ms ease;
}

button.lp-values__tile {
  cursor: pointer;
}

button.lp-values__tile:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--ring) 50%, transparent);
  outline-offset: -3px;
}

.lp-values__num {
  font-size: 3rem;
  line-height: 3.75rem;
  letter-spacing: -0.02em;
  color: var(--lp-ui-text-quaternary);
}

.lp-values__copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.lp-values__name {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 500;
  color: var(--lp-ui-text-primary);
}

.lp-values__desc,
.lp-values__body {
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--lp-ui-text-tertiary);
}

.lp-values__detail {
  display: none;
  padding: 0.75rem;
}

.lp-values__backdrop {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: var(--radius-ui-3xl);
  background: linear-gradient(180deg, #FFFFFF 0%, #D5D9EB 55%, #6C9FE5 100%);
}

.lp-values__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-ui-2xl);
  background: var(--lp-ui-bg-primary);
  box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
}

.lp-values__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.lp-values__card-text {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--lp-ui-text-secondary);
}

/* Untitled UI badge (sm, modern, with dot) */
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--lp-ui-border-primary);
  border-radius: 0.375rem;
  background: var(--lp-ui-bg-primary);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  font-size: 0.75rem;
  line-height: 1.125rem;
  font-weight: 500;
  color: var(--lp-ui-text-secondary);
}

.lp-badge__dot {
  width: 0.375rem;
  height: 0.375rem;
  margin: 0 0.0625rem;
  border-radius: 50%;
  background: var(--primary);
}

@media (min-width: 48rem) {
  .lp-values__inner { padding: 6rem 0 0; }
  .lp-values__header { padding: 0 1.5rem; }
  .lp-values__title { font-size: 2.25rem; line-height: 2.75rem; letter-spacing: -0.02em; }
  .lp-values__tile { padding: 2rem 1.5rem 2.5rem; }
}

@media (min-width: 64rem) {
  .lp-values__grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 20rem; }
  .lp-values__tile:not(:nth-child(3n + 1)) { border-left: 1px solid var(--lp-ui-border-primary); }
  .lp-values__tile:not(:nth-last-child(-n + 3)) .lp-grid-node--bl,
  .lp-values__tile:not(:nth-last-child(-n + 3)) .lp-grid-node--br { display: none; }
  button.lp-values__tile.is-active { background: var(--lp-ui-bg-secondary); }
  .lp-values__body { display: none; }
  .lp-values__detail { display: flex; }
  .lp-values__tile:nth-last-child(-n + 3) { border-bottom: none; }
}
