/* Wordle "How to play" section, directly below the hero. Scoped to body.wordle-body. */

body.wordle-body .wordle-howto {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 96px 0 120px;
  background: radial-gradient(ellipse at 50% 20%, rgba(124, 58, 237, 0.08), transparent 60%);
}

body.wordle-body .wordle-howto__decor {
  position: absolute;
  width: clamp(220px, 22vw, 360px);
  height: auto;
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

body.wordle-body .wordle-howto__decor--left {
  left: -90px;
  top: 120px;
}

body.wordle-body .wordle-howto__decor--right {
  right: -90px;
  top: 100px;
}

body.wordle-body .wordle-howto__content {
  position: relative;
  z-index: 2;
  width: min(1300px, calc(100% - 96px));
  margin: 0 auto;
}

body.wordle-body .wordle-howto__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
  align-items: stretch;
}

body.wordle-body .wordle-howto__card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(24px, 2.4vw, 32px);
  border-radius: 22px;
  background: rgba(12, 15, 35, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Scroll-reveal: starts hidden/offset, JS flips .is-visible once per card as
   it enters the viewport (see the script at the bottom of wordle.html).
   Falls back to always-visible below if JS never runs or motion is reduced. */
body.wordle-body .wordle-howto__card.wordle-reveal {
  opacity: 0;
  transform: translateY(28px);
}

body.wordle-body .wordle-howto__card.wordle-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.wordle-body .wordle-howto__card:hover {
  border-color: rgba(139, 92, 246, 0.32);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  body.wordle-body .wordle-howto__card {
    transition: none;
  }
  body.wordle-body .wordle-howto__card.wordle-reveal {
    opacity: 1;
    transform: none;
  }
}

body.wordle-body .wordle-howto__pill {
  justify-self: start;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(124, 58, 237, 0.12);
  color: #c084fc;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.wordle-body .wordle-howto__title {
  margin: 4px 0 0;
  color: #f8fafc;
  font-size: clamp(2.2rem, 3vw, 2.9rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.wordle-body .wordle-howto__title span {
  color: #8b5cf6;
}

body.wordle-body .wordle-howto__title--small {
  font-size: clamp(1.7rem, 2.2vw, 2.1rem);
}

body.wordle-body .wordle-howto__copy {
  margin: 0;
  color: #a7a9c5;
  font-size: 1rem;
  line-height: 1.55;
}

body.wordle-body .wordle-howto__features {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

body.wordle-body .wordle-howto__features li,
body.wordle-body .wordle-howto__tip {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.wordle-body .wordle-howto__feature-icon,
body.wordle-body .wordle-howto__tip-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #c084fc;
}

body.wordle-body .wordle-howto__feature-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.wordle-body .wordle-howto__tip-icon img {
  width: 26px;
  height: 26px;
  display: block;
}

body.wordle-body .wordle-howto__features strong,
body.wordle-body .wordle-howto__tip strong {
  display: block;
  color: #f8fafc;
  font-size: 0.98rem;
  font-weight: 700;
}

body.wordle-body .wordle-howto__features small,
body.wordle-body .wordle-howto__tip small {
  display: block;
  color: #a7a9c5;
  font-size: 0.86rem;
  line-height: 1.45;
}

body.wordle-body .wordle-howto__tip-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

body.wordle-body .wordle-howto__card-title {
  margin: 0;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.wordle-body .wordle-howto__card-sub {
  margin: -6px 0 6px;
  color: #a7a9c5;
  font-size: 0.92rem;
}

body.wordle-body .wordle-howto__example {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(139, 92, 246, 0.14);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

body.wordle-body .wordle-howto__example:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(255, 255, 255, 0.035);
  transform: translateY(-2px);
}

body.wordle-body .wordle-howto__tip {
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

body.wordle-body .wordle-howto__tip:hover {
  background: rgba(124, 58, 237, 0.08);
  transform: translateX(3px);
}

body.wordle-body .wordle-howto__tip-icon {
  transition: transform 0.2s ease, background 0.2s ease;
}

body.wordle-body .wordle-howto__tip:hover .wordle-howto__tip-icon {
  transform: scale(1.08);
  background: rgba(124, 58, 237, 0.26);
}

@media (prefers-reduced-motion: reduce) {
  body.wordle-body .wordle-howto__example,
  body.wordle-body .wordle-howto__tip,
  body.wordle-body .wordle-howto__tip-icon {
    transition: none;
  }
}

body.wordle-body .wordle-example-row {
  display: block;
  width: 100%;
  max-width: 370px;
  height: auto;
}

body.wordle-body .wordle-howto__state {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #a7a9c5;
  font-size: 0.9rem;
  line-height: 1.45;
}

body.wordle-body .wordle-howto__state img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 1px;
}

body.wordle-body .wordle-howto__state strong {
  margin-right: 4px;
  font-weight: 700;
}

/* Feedback colors: muted, distinct from the purple UI accent. */
body.wordle-body .is-correct { color: #86efac; }
body.wordle-body .is-present { color: #fcd34d; }
body.wordle-body .is-absent { color: #94a3b8; }

@media (max-width: 1100px) {
  body.wordle-body .wordle-howto__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  body.wordle-body .wordle-howto {
    padding: 64px 0 88px;
  }
  body.wordle-body .wordle-howto__content {
    width: calc(100% - 32px);
  }
  body.wordle-body .wordle-howto__decor {
    display: none;
  }
  body.wordle-body .wordle-howto__card {
    padding: 22px;
  }
}

body.wordle-body .wordle-howto__tip-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #c084fc;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
