/* Contact page: dark hero, help shortcuts beside the message card. */

/* ---------- hero ---------- */
.contact-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
}

.contact-hero__sun {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(209 149 74 / 0.28), transparent 65%);
  inset-inline-end: -180px;
  top: -240px;
  pointer-events: none;
}

.contact-hero__inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-block: 88px 132px;
}

.contact-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
}

.contact-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.contact-page .contact-hero h1 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.2;
  text-wrap: balance;
}

.contact-hero p {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.8;
  color: rgb(254 247 224 / 0.82);
  text-wrap: pretty;
}

.contact-hero__mascot {
  flex-shrink: 0;
  width: clamp(120px, 14vw, 190px);
  height: auto;
  margin-bottom: -40px;
}

/* ---------- body ---------- */
.contact-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
  padding-bottom: 110px;
}

.contact-ways {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 56px;
}

.contact-page .contact-ways h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.contact-way {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}

.contact-way[hidden] {
  display: none;
}

.contact-way:hover,
.contact-way:focus-visible {
  border-color: var(--ink);
  background: rgb(245 223 174 / 0.45);
  color: var(--ink);
}

.contact-way:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.contact-way__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--honey);
  color: var(--ink);
}

.contact-way__icon--sun {
  background: var(--sun);
}

.contact-way__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-way__text strong {
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-way__text small {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.contact-way__go {
  margin-inline-start: auto;
  display: grid;
  transition: translate 0.2s;
}

.contact-way__go .icon {
  width: 20px;
  height: 20px;
}

.contact-way:hover .contact-way__go {
  translate: -4px 0;
}

html:not([dir="rtl"]) .contact-way:hover .contact-way__go {
  translate: 4px 0;
}

/* ---------- card ---------- */
.contact-card {
  margin-top: -96px;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: 32px;
  background: #fffcf3;
  box-shadow:
    0 0 0 1.5px var(--line),
    0 32px 64px -32px rgb(57 49 42 / 0.4);
}

.contact-card__head {
  margin-bottom: 24px;
}

.contact-page .contact-card h2 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 34px);
}

.contact-card__head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Order references are Latin; keep them readable in Arabic pages too. */

/* topics */

/* foot */

/* feedback, sent and closed states */

.contact-closed  {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-block: 24px;
  text-align: center;
}

.contact-closed__mascot  {
  width: 150px;
  height: auto;
}

.contact-closed p  {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact-closed__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.contact-closed__actions .button {
  gap: 10px;
}

.contact-closed__actions .icon {
  width: 18px;
  height: 18px;
}

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .contact-hero__inner {
    padding-block: 64px 112px;
  }

  .contact-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 80px;
  }

  .contact-card {
    order: -1;
  }

  .contact-ways {
    padding-top: 0;
  }
}

@media (max-width: 599px) {
  .contact-hero__mascot {
    width: 96px;
    margin-bottom: -24px;
  }

  .contact-card {
    margin-top: -72px;
    border-radius: 26px;
  }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .contact-hero__copy > *,
  .contact-card,
  .contact-way {
    animation: contact-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .contact-hero__copy > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .contact-hero__copy > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .contact-card {
    animation-delay: 0.15s;
  }

  .contact-way:nth-of-type(2) {
    animation-delay: 0.2s;
  }

  .contact-way:nth-of-type(3) {
    animation-delay: 0.25s;
  }

  .contact-way:nth-of-type(n + 4) {
    animation-delay: 0.3s;
  }

  .contact-hero__mascot {
    animation: edu-float 3.8s ease-in-out infinite alternate;
  }

  @keyframes contact-in {
    from {
      opacity: 0;
      translate: 0 18px;
    }

    to {
      opacity: 1;
      translate: 0 0;
    }
}
}
