/* ==================================================================
   Ready-Made Quizzes — kwizzbit/ready-made (whole-file segment)
   Faithful slice of /HTML/ready-made.html. Globals (reset/body/font-face/:root)
   dropped; tokens canonical (theme.json). Full-bleed via the .kwb-segment wrapper.
   ================================================================== */

.ready-made {
  background: #F0E3D9;
  padding-block: 8rem 14rem;
  overflow-x: clip;
}

.ready-made__inner {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--wp--custom--layout--gutter);
}

/* ── HEADER ── */
.ready-made__header {
  text-align: center;
  margin-bottom: 3rem;
}

.ready-made__eyebrow {
  font-family: var(--wp--preset--font-family--pixel);
  font-size: 1.1875rem;
  color: var(--wp--preset--color--coral);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.ready-made__title {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 400;
  font-size: 4.0625rem; /* 65px — matches how-it-works headline (was 4.5rem/72px) */
  line-height: 0.889;
  letter-spacing: -0.10769em;
  color: var(--wp--preset--color--ink);
  margin-bottom: 1.5rem;
}

.ready-made__title-line2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  color: var(--wp--preset--color--coral);
}

.ready-made__title-line2 .verified-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
  position: relative;
  top: 0.04em;
}

.ready-made__lead {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.412;
  color: var(--wp--preset--color--ink);
  max-width: 44ch;
  margin-inline: auto;
}

/* ── FORMAT PILLS ── */
.ready-made__formats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  align-items: center;
  gap: 0.75rem 2.25rem;
  margin-bottom: 3rem;
}

.format-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--ink);
}



/* ── CARD GRID ── */
.ready-made__grid {
  display: grid;
  grid-template-columns: repeat(3, 376px);
  gap: 1rem;
  align-items: start;
  justify-content: center;
}

.quiz-panel {
  background: #FFFAF5;
  border-radius: 0;
  box-shadow: 0 20px 50px rgba(255,54,35,0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 376 / 346;
  min-width: 0;
}

.quiz-panel__header {
  padding: 1.375rem 1.375rem 0.75rem;
}

.quiz-panel__title-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.2rem;
}

.quiz-panel__title {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.091em;
  line-height: 1.2;
  color: var(--wp--preset--color--ink);
  flex: 1;
  min-width: 0;
}

.quiz-panel__arrow-svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.format-item__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.quiz-panel__subtitle {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.9375rem;
  color: #473531;
  line-height: 1.3;
}

.quiz-panel--community .coming-soon-badge { border-radius: 0; }

.coming-soon-badge {
  display: inline-block;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--cream);
  border: 1px solid var(--wp--preset--color--cream-soft);
  border-radius: var(--wp--custom--radius--pill);
  padding: 0.25rem 0.625rem;
  margin-left: 11px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.quiz-panel__media {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.panel-image-wrap {
  margin-top: 24px;
  margin-left: 1.375rem;
  margin-right: 0;
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  line-height: 0;
}

.panel-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top left;
}

/* Library panel — hashtag grid */
.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0 1.375rem 1.375rem;
}

.library-tag {
  background: var(--wp--preset--color--ink);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-height: 3.5rem;
  justify-content: flex-end;
}

.library-tag--image {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 5rem;
}

.library-tag--image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29,11,9,0.72) 0%, transparent 60%);
  border-radius: 0.5rem;
}

.library-tag__name {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--wp--preset--color--white);
  position: relative;
  z-index: 1;
}

.library-tag__count {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.65);
  position: relative;
  z-index: 1;
}

/* Featured panel — quiz cards */
.featured-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 1.375rem 1.375rem;
}

.featured-card {
  border-radius: 0.5rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 5.5rem;
}

.featured-card__half {
  position: relative;
  overflow: hidden;
}

.featured-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29,11,9,0.75) 0%, rgba(29,11,9,0.2) 60%);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured-card__tag {
  display: inline-block;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.625rem;
  background: var(--wp--preset--color--coral);
  color: var(--wp--preset--color--white);
  border-radius: var(--wp--custom--radius--pill);
  padding: 0.15rem 0.4rem;
  margin-bottom: 0.2rem;
  width: fit-content;
}

.featured-card__name {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--wp--preset--color--white);
  line-height: 1.2;
}

.featured-card__meta {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.625rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.15rem;
}

/* Community panel — mosaic grid */
.community-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.25rem;
  padding: 0 1.375rem 1.375rem;
}

.community-card {
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  height: 5.5rem;
}

.community-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.community-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29,11,9,0.8) 0%, rgba(29,11,9,0.1) 55%);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.community-card__avatar {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.5);
}

.community-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card__title {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--wp--preset--color--white);
  line-height: 1.25;
}

.community-card__meta {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.5625rem;
  color: rgba(255,255,255,0.65);
  margin-top: 0.1rem;
}



/* ── TABLET ── */
@media (max-width: 1023px) {
  .ready-made {
    padding-block: 6rem 9rem;
  }
  .ready-made__title {
    font-size: 3.25rem;
  }
  .ready-made__eyebrow {
    font-size: 1.1875rem;
  }
  .ready-made__grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .quiz-panel {
    width: min(376px, 100%);
  }
  .ready-made__formats {
    grid-template-columns: repeat(2, auto);
    justify-items: center;
  }
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  .ready-made {
    padding-block: 6.75rem 5.625rem;
  }
  .ready-made__eyebrow {
    font-size: 18px;
  }
  .ready-made__title {
    font-size: clamp(1.875rem, 10.13vw, 2.375rem);
    line-height: 0.8421;
    letter-spacing: -0.10763em;
  }
  .ready-made__lead {
    font-size: 1rem;
    max-width: min(300px, 88vw);
  }
  .ready-made__formats {
    grid-template-columns: repeat(2, auto);
    justify-items: center;
    gap: 0.625rem 1.25rem;
  }
  .format-item {
    font-size: 0.8125rem;
  }
  .quiz-panel {
    width: min(376px, 100%);
  }
}

/* ── SCROLL REVEAL ── */
.ready-made__header,
.ready-made__formats {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.ready-made__header.is-visible,
.ready-made__formats.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ready-made__formats { transition-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  .ready-made__header,
  .ready-made__formats {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Verified badge wobble ── */
@keyframes stamp-in {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg);  opacity: 1; }
  80%  { transform: scale(0.92) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg);    opacity: 1; }
}

.verified-wobble {
  display: inline-flex;
  align-items: center;
  transform-origin: center;
  opacity: 0;
}

.ready-made__header.is-visible .verified-wobble {
  animation: stamp-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

/* ── Cursor blink on period ── */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.title-cursor {
  animation: cursor-blink 1.1s step-end infinite;
}

/* ── Panel hover lift ── */
.quiz-panel {
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  .quiz-panel:hover {
    transform: translateY(-6px);
  }
}

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .verified-wobble { animation: none; opacity: 1; }
  .title-cursor    { animation: none; }
  .quiz-panel      { transition: none; }
}

.verified-text { display: inline; }

/* ── Arrow hover circle ── */
.arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-left: 8px;
  flex-shrink: 0;
  transition: background 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  .arrow-btn:hover {
    background: #D4C4B4;
    cursor: pointer;
  }
}
