/* -------- GROVER CASE STUDY --------
   Values are Grover's own: category accents from the 2019 catalog data,
   menu rows from the archived November 2019 stylesheet. */
body.grover-page main h2 {
  font-size: 32px;
  margin: 24px 0 16px;
}

body.grover-page .jump {
  text-align: center;
}

.grv-stage {
  background: #f7f7f7;
  border-radius: 24px;
  padding: clamp(24px, 4vw, 56px);
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  color: #333;
}

.grv-stage img {
  border-radius: 0;
}

.grv-stage figcaption {
  font-family: "ABC Maxi Round", sans-serif;
  margin-top: 32px;
}

/* Category menu: both layers */
.grv-menu-demo {
  display: grid;
  grid-template-columns: max-content;
  justify-content: center;
  gap: 16px;
  justify-items: start;
  text-align: left;
}

.grv-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: #fff;
  font-weight: 700;
  font-size: 16px;
  width: max-content;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.13), 0px 0px 3px rgba(0, 0, 0, 0.05);
}

/* Three 6px tiles each way, so the last row and column of dots aren't
   clipped. */
.grv-dots {
  flex: none;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #333 1.6px, transparent 1.8px) 0 0 / 6px 6px;
}

.grv-menu {
  display: grid;
  grid-template-columns: 280px 280px;
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 7px 15px rgba(0, 0, 0, 0.13), 0px 0px 3px rgba(0, 0, 0, 0.05);
}

body.case-study main .grv-menu ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

body.case-study main .grv-menu li {
  margin: 0;
}

body.case-study main .grv-menu ul.grv-menu-main {
  padding-bottom: 0;
}

body.grover-page main .grv-menu a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  color: #333;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.1s cubic-bezier(0.4, 0, 0.2, 1), color 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The open category shares the panel's tint, so the row runs into it. */
body.grover-page main .grv-menu-main a[aria-current="true"],
body.grover-page main .grv-menu-main a:focus-visible {
  background: color-mix(in srgb, var(--accent) 15%, #fff);
  color: var(--accent);
  outline: none;
}

.grv-sub-panel {
  display: grid;
}

.grv-sub {
  grid-area: 1 / 1;
  background: color-mix(in srgb, var(--accent) 15%, #fff);
}

.grv-sub[hidden] {
  display: none;
}

body.grover-page main .grv-sub a:hover,
body.grover-page main .grv-sub a:focus-visible {
  color: var(--accent);
  outline: none;
}

body.grover-page main .grv-sub .grv-view-all a {
  display: inline-flex;
  min-height: 0;
  height: 36px;
  margin: 8px 16px;
  padding: 0 16px;
  border-radius: 18px;
  background: #fff;
  font-weight: 700;
}

.grv-menu img {
  width: 24px;
  height: 24px;
  flex: none;
}

.grv-swatches {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: 12px 24px;
  margin-top: 24px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
}

.grv-swatches span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grv-swatches i {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent);
  flex: none;
}

/* Icons */
/* 42 icons in full rows: 14, 7 or 6 columns. The icons grow with the
   width and the row gap matches the column gap. */
.grv-icons {
  container-type: inline-size;
  --cols: 14;
}

.grv-icon-sheet {
  --size: max(32px, calc(100cqi / var(--cols) * 0.55));
  --gap: calc((100cqi - var(--cols) * var(--size)) / (var(--cols) - 1));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--size));
  justify-content: space-between;
  row-gap: var(--gap);
}

.grv-icon-sheet img {
  width: var(--size);
  height: var(--size);
}

@media (max-width: 900px) {
  .grv-icons {
    --cols: 7;
  }
}

@media (max-width: 440px) {
  .grv-icons {
    --cols: 6;
  }
}

.grv-icons figcaption {
  margin-top: 32px;
}


/* Foundations */
.grv-foundations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 24px;
  text-align: left;
  font-size: 14px;
}

.grv-foundations > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 130px;
  padding: 14px;
  background: #fff;
  border-radius: 8px;
}

.grv-swatch {
  box-shadow: inset 0 0 0 1px #f1f1f1;
}

.grv-swatch i {
  display: block;
  height: 56px;
  border-radius: 6px;
  background: var(--c);
  margin-bottom: auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.grv-radius {
  border: 2px solid #333;
}

.grv-foundations code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  opacity: 0.6;
}

/* Quotes */
.grv-quote {
  margin: 48px auto;
  max-width: 28em;
  text-align: center;
}

.grv-quote p {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 12px;
}

.grv-quote cite {
  font-style: normal;
  opacity: 0.6;
}

@media (max-width: 700px) {
  .grv-menu-demo {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .grv-menu {
    grid-template-columns: 1fr;
  }

  .grv-swatches {
    grid-template-columns: repeat(2, max-content);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.grover-page main .grv-menu a {
    transition: none;
  }
}
