/* Features pages (hub and the four RSVP ways): header and brand come from signup.css, tokens and buttons from base.css */

.feat {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  max-width: 52rem;
  padding-block: 0.5rem 4rem;
}

.feat > section {
  animation: fade-up 0.7s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.feat__intro,
.feat__all {
  text-align: center;
}

.feat__icon {
  display: block;
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1rem;
}

.feat__title {
  margin: 0 0 1rem;
  font: 800 clamp(2rem, 6vw, 3rem)/1.15 var(--font-display);
}

/* short red line under the page title */
.feat__title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 4px;
  margin: 0.9rem auto 0;
  border-radius: var(--radius-pill);
  background: var(--red);
}

.feat__lead {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 600;
  line-height: 1.4;
}

.feat__h2 {
  margin: 0 0 1rem;
  font: 800 clamp(1.4rem, 4vw, 1.9rem)/1.25 var(--font-display);
}

.feat__text {
  margin: 0 0 1.5rem;
  color: #333;
  font-size: 1.05rem;
  line-height: 1.7;
}

.feat__more {
  margin: 1.25rem 0 0;
}

.feat__link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.3em;
}

.feat__link:hover {
  color: var(--red);
}

/* ---------- Hub: the four ways ---------- */
.ways {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ways > li {
  animation: fade-up 0.6s calc(0.35s + var(--i, 0) * 0.08s) ease-out both;
}

.way {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 1rem;
  align-items: center;
  height: 100%;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, translate 0.2s;
}

.way:hover {
  border-color: var(--red);
  color: var(--red);
  translate: 0 -4px;
}

.way__icon {
  grid-row: 1 / span 3;
  width: 4rem;
  height: 4rem;
}

.way__name {
  font: 700 1.2rem/1.3 var(--font-display);
}

.way__text {
  color: #444;
  line-height: 1.5;
}

.way:hover .way__text {
  color: inherit;
}

.way__more {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-block-start: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.way__arrow {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: var(--red);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: scaleX(var(--dir));
}

/* ---------- How it works: numbered steps ---------- */
.how {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how__item {
  position: relative;
  padding: 1.25rem 1.5rem;
  padding-inline-start: 4.5rem;
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  counter-increment: step;
  animation: fade-up 0.6s calc(0.35s + var(--i, 0) * 0.08s) ease-out both;
}

/* red number circle at the start side */
.how__item::before {
  content: counter(step);
  position: absolute;
  inset-block-start: 1.15rem;
  inset-inline-start: 1.1rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font: 800 1.1rem/1 var(--font-display);
}

.how__title {
  margin: 0 0 0.3rem;
  font: 700 1.15rem/1.3 var(--font-display);
}

.how__text {
  margin: 0;
  color: #444;
  line-height: 1.6;
}

/* ---------- What you get: cards ---------- */
.feat__cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feat-card {
  padding: 1.5rem;
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: border-color 0.2s, translate 0.2s;
}

.feat-card:hover {
  border-color: var(--red);
  translate: 0 -4px;
}

.feat-card__title {
  margin: 0 0 0.5rem;
  font: 700 1.15rem/1.3 var(--font-display);
}

.feat-card__text {
  margin: 0;
  color: #444;
  line-height: 1.6;
}

/* ---------- Other ways (same look as the About explore list) ---------- */
.explore {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.explore__link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.explore__name {
  font: 700 1.1rem/1.3 var(--font-display);
}

.explore__text {
  grid-column: 1;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
}

.explore__arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: var(--red);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: scaleX(var(--dir)); /* points to the end side in both languages */
  transition: translate 0.2s;
}

.explore__link:hover {
  border-color: var(--red);
  color: var(--red);
}

.explore__link:hover .explore__text {
  color: inherit;
}

.explore__link:hover .explore__arrow {
  translate: calc(4px * var(--dir)) 0;
}

@media (min-width: 48rem) {
  .ways,
  .feat__cards {
    grid-template-columns: 1fr 1fr;
  }

  .feat__cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Arabic / RTL ---------- */
[lang="ar"] {
  --dir: -1;
}

[lang="ar"] .feat__title,
[lang="ar"] .feat__h2,
[lang="ar"] .way__name,
[lang="ar"] .how__title,
[lang="ar"] .feat-card__title,
[lang="ar"] .explore__name {
  line-height: 1.5;
}

[lang="ar"] .feat__text,
[lang="ar"] .how__text,
[lang="ar"] .feat-card__text {
  line-height: 1.9;
}
