/* READMADE home: narrative proof board and Cover Lab. */

.rm-home .rm-header-tools .theme-toggle.rm-tool {
  font-size: round(nearest, max(13px, calc(1rem + 0.167rem)), 1px);
}

.rm-home .rm-tool svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.rm-home .rm-home-proof-board {
  position: relative;
  z-index: 5;
  margin-top: -32px;
}

.rm-home .rm-proof-board-surface {
  display: grid;
  grid-template-columns: minmax(190px, 0.58fr) minmax(0, 1.42fr);
  gap: clamp(16px, 2.4vw, 32px);
  align-items: center;
  padding: clamp(16px, 1.7vw, 22px);
  border: 1px solid color-mix(in srgb, var(--rm-purple) 24%, var(--rm-line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 13%, var(--rm-yellow) 0 3px, transparent 3.5px),
    radial-gradient(circle at 11% 17%, var(--rm-pink) 0 1px, transparent 1.5px),
    linear-gradient(135deg, color-mix(in srgb, var(--rm-paper) 86%, var(--rm-purple-soft)), var(--rm-paper) 63%);
  box-shadow: 0 18px 35px color-mix(in srgb, var(--rm-purple) 13%, transparent);
}

.rm-home .rm-proof-board-heading .rm-eyebrow {
  margin: 0 0 3px;
  color: var(--rm-purple);
}

.rm-home .rm-proof-board-heading h2 {
  margin: 0;
  color: var(--rm-ink);
  font-family: var(--font-ui);
  font-size: round(nearest, max(13px, clamp(1.12rem, 1.75vw, 1.6rem)), 1px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 1.18;
}

.rm-home .rm-proof-board-heading > p:last-child {
  max-width: 22rem;
  margin: 10px 0 0;
  color: var(--rm-ink-soft);
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, max(0.83rem, clamp(0.79rem, 1.1vw, 0.91rem))), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-weight: 650;
  line-height: 1.62;
}

.rm-home .rm-proof-counter-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin: 0;
}

.rm-home .rm-proof-counter {
  --proof-value-row: 3.5rem;
  --proof-accent: var(--rm-purple);
  --proof-tint: var(--rm-purple-soft);
  display: grid;
  grid-template-areas:
    "label"
    "value";
  grid-template-rows: 3.1rem minmax(var(--proof-value-row), auto);
  grid-template-columns: minmax(0, 1fr);
  row-gap: 4px;
  min-height: 0;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--proof-accent) 18%, var(--rm-line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--rm-paper) 90%, var(--proof-tint));
}

.rm-home .rm-proof-counter:nth-child(2) {
  --proof-accent: var(--rm-aqua);
  --proof-tint: var(--rm-aqua-soft);
}

.rm-home .rm-proof-counter:nth-child(3) {
  --proof-accent: var(--rm-pink);
  --proof-tint: var(--rm-pink-soft);
}

.rm-home .rm-proof-counter-icon {
  display: none;
}

.rm-home .rm-proof-counter-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.rm-home .rm-proof-counter dt {
  grid-area: label;
  display: flex;
  min-height: 3.1rem;
  align-items: flex-end;
  margin: 0;
  color: var(--rm-ink);
  font-family: var(--font-ui);
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, clamp(1rem, 1.15vw, 1.25rem)), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  word-break: keep-all;
}

.rm-home .rm-proof-counter dt a {
  display: block;
  width: 100%;
  color: inherit;
  line-height: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  word-break: keep-all;
}

.rm-home .rm-proof-counter dt a:hover,
.rm-home .rm-proof-counter dt a:focus-visible {
  color: var(--proof-accent);
  text-decoration: underline;
}

.rm-home .rm-proof-counter dd {
  grid-area: value;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 2px;
  min-height: var(--proof-value-row);
  min-width: 0;
  margin: 0;
  color: var(--rm-ink);
  font-family: var(--font-ui);
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, clamp(2rem, 3vw, 3.2rem)), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1.05;
  white-space: nowrap;
}

/* Status text is descriptive, so keep it compact instead of using the numeric display scale. */
.rm-home .rm-proof-counter dd.is-home-proof-status {
  min-width: 0;
  color: var(--rm-ink);
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, clamp(1rem, 1.15vw, 1.125rem)), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.2;
  white-space: nowrap;
}

.rm-home .rm-proof-counter dd > span:last-child {
  color: var(--proof-accent);
  font-size: round(nearest, max(13px, max(0.83rem, 0.51em)), 1px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.rm-home .rm-cover-promo {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 4.5vw, 64px) 0;
  border-bottom: 1px solid var(--rm-line);
  background: linear-gradient(118deg, color-mix(in srgb, var(--rm-purple-soft) 82%, var(--rm-paper)) 0 49%, color-mix(in srgb, var(--rm-paper) 94%, var(--rm-aqua-soft)) 49% 77%, var(--rm-paper) 77%);
}

.rm-home .rm-cover-promo::before {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.rm-home .rm-cover-promo::before {
  right: max(-100px, calc((100vw - 1320px) / 2 - 130px));
  bottom: -170px;
  width: 430px;
  height: 380px;
  border: 1px solid color-mix(in srgb, var(--rm-purple) 28%, transparent);
  border-radius: 48px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rm-purple) 18%, transparent), color-mix(in srgb, var(--rm-pink) 11%, transparent));
  transform: rotate(-12deg);
}

.rm-home .rm-cover-promo-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(350px, 1.05fr);
  gap: clamp(30px, 4.7vw, 68px);
  align-items: center;
}

.rm-home .rm-cover-promo-copy .rm-eyebrow {
  margin: 0 0 9px;
  color: var(--rm-purple);
}

.rm-home .rm-cover-promo-copy h2 {
  margin: 0;
  color: var(--rm-ink);
  font-family: var(--font-ui);
  font-size: round(nearest, max(13px, clamp(1.7rem, 3vw, 2.75rem)), 1px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 1.13;
}

.rm-home .rm-cover-promo-copy h2 em {
  color: var(--rm-purple);
  font-style: normal;
}

.rm-home .rm-cover-promo-copy > p {
  max-width: 31rem;
  margin: 16px 0 0;
  color: var(--rm-ink-soft);
  font-family: var(--font-ui);
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, clamp(0.88rem, 1.28vw, 1rem)), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-weight: 650;
  line-height: 1.7;
}

.rm-home .rm-cover-promo-cta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 11px 15px 11px 18px;
  border-radius: 999px;
  background: var(--rm-purple);
  color: #fff;
  font-family: var(--font-ui);
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, 0.84rem), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-weight: 850;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.rm-home .rm-cover-promo-cta b {
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, 1.08rem), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  line-height: 1;
}

.rm-home .rm-cover-promo-cta:hover {
  box-shadow: 0 9px 18px color-mix(in srgb, var(--rm-purple) 28%, transparent);
  transform: translateY(-2px);
}

.rm-home .rm-cover-promo-cta:focus-visible {
  outline: 3px solid var(--rm-yellow);
  outline-offset: 3px;
}

.rm-home .rm-cover-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 19px);
  align-items: end;
  max-width: 620px;
  margin: 0 0 0 auto;
  padding: 28px 20px 25px;
  border: 1px solid color-mix(in srgb, var(--rm-purple) 32%, var(--rm-line));
  border-radius: 22px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--rm-purple) 16%, transparent) 0 1px, transparent 1px 100%) 0 0 / 18px 18px,
    linear-gradient(color-mix(in srgb, var(--rm-purple) 16%, transparent) 0 1px, transparent 1px 100%) 0 0 / 18px 18px,
    color-mix(in srgb, var(--rm-paper) 84%, transparent);
  box-shadow: 12px 14px 0 color-mix(in srgb, var(--rm-pink) 16%, transparent), 0 19px 34px color-mix(in srgb, var(--rm-purple) 12%, transparent);
}

.rm-home .rm-cover-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--rm-ink) 23%, transparent);
  border-radius: 8px;
  background: var(--rm-paper);
  box-shadow: 6px 8px 0 color-mix(in srgb, var(--rm-purple) 19%, transparent);
}

.rm-home .rm-cover-card:nth-child(1) {
  z-index: 1;
  transform: translateY(13px) rotate(-5deg);
}

.rm-home .rm-cover-card:nth-child(2) {
  z-index: 3;
  transform: translateY(-9px);
  box-shadow: 8px 10px 0 color-mix(in srgb, var(--rm-pink) 27%, transparent);
}

.rm-home .rm-cover-card:nth-child(3) {
  z-index: 2;
  transform: translateY(8px) rotate(5deg);
  box-shadow: 6px 8px 0 color-mix(in srgb, var(--rm-aqua) 22%, transparent);
}

.rm-home .rm-cover-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rm-home .rm-cover-card picture {
  display: block;
  width: 100%;
  height: 100%;
}

.rm-home .rm-genre-card picture {
  display: block;
  width: 100%;
  height: 148px;
}

.rm-home .rm-cover-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 21px 9px 9px;
  background: linear-gradient(transparent, rgba(17, 14, 31, 0.86));
  color: #fff;
  font-family: var(--font-ui);
}

.rm-home .rm-cover-card figcaption strong,
.rm-home .rm-cover-card figcaption span {
  display: block;
}

.rm-home .rm-cover-card figcaption strong {
  overflow: hidden;
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, max(0.83rem, clamp(0.62rem, 1.15vw, 0.82rem))), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-home .rm-cover-card figcaption span {
  margin-top: 2px;
  color: color-mix(in srgb, #fff 78%, var(--rm-yellow));
  font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, 0.83rem), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  font-weight: 750;
  letter-spacing: -0.025em;
}

[data-theme="dark"] .rm-home .rm-proof-board-surface,
[data-theme="dark"] .rm-home .rm-cover-showcase {
  box-shadow: none;
}

@media (max-width: 1100px) {
  .rm-home .rm-cover-promo-layout {
    grid-template-columns: minmax(250px, 0.82fr) minmax(310px, 1.18fr);
    gap: 34px;
  }
}

@media (max-width: 860px) {
  .rm-home .rm-proof-board-surface {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 700px) {
  .rm-home .rm-genre-card picture {
    height: 118px;
  }

  .rm-home .rm-home-proof-board {
    margin-top: 0;
  }

  .rm-home .rm-proof-board-surface {
    margin-top: 0;
    padding: 16px 14px 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .rm-home .rm-proof-counter-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .rm-home .rm-proof-counter {
    --proof-value-row: 2.75rem;
    grid-template-areas: "label value";
    grid-template-columns: minmax(0, 1fr) minmax(7rem, auto);
    grid-template-rows: minmax(2.75rem, auto);
    column-gap: 8px;
    min-height: 0;
    padding: 7px 10px;
    border-radius: 12px;
  }

  .rm-home .rm-proof-counter-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    border-radius: 9px;
  }

  .rm-home .rm-proof-counter-icon svg {
    width: 17px;
    height: 17px;
  }

  .rm-home .rm-proof-counter dt {
    min-height: 2.75rem;
    align-items: center;
    font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, clamp(0.875rem, 3.9vw, 1rem)), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  }

  .rm-home .rm-proof-counter dd {
    justify-content: flex-end;
    font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, clamp(1.65rem, 7.2vw, 2rem)), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
  }

  .rm-home .rm-proof-counter dd.is-home-proof-status {
    min-width: 7rem;
    font-size: round(nearest, max(var(--rm-ui-type-min, 0px), calc((round(nearest, max(13px, clamp(0.875rem, 3.9vw, 1rem)), 1px)) * var(--rm-ui-type-scale, 1.2))), 1px);
    text-align: right;
  }

  .rm-home .rm-cover-promo {
    padding: 38px 0 42px;
  }

  .rm-home .rm-cover-promo-layout {
    grid-template-columns: 1fr;
    gap: 31px;
  }

  .rm-home .rm-cover-promo-copy > p {
    margin-top: 13px;
  }

  .rm-home .rm-cover-showcase {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 19px 13px 17px;
    border-radius: 18px;
  }

  .rm-home .rm-cover-card:nth-child(1) {
    transform: translateY(8px) rotate(-4deg);
  }

  .rm-home .rm-cover-card:nth-child(2) {
    transform: translateY(-7px);
  }

  .rm-home .rm-cover-card:nth-child(3) {
    transform: translateY(6px) rotate(4deg);
  }
}

@media (min-width: 701px) and (max-width: 1040px) {
  .rm-home .rm-genre-card picture {
    height: 128px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rm-home .rm-cover-promo-cta {
    transition: none;
  }
}
