/*
 * /:lang/support (components/site/pages/SupportPage.tsx), over site.css and guides.css (the search box .gs-box, the
 * suggestions .gs-res, the tiles .guide-mosaic). The search first, on a soft glow; then the guides about MacWashing;
 * then «Didn't find the answer?» with the email.
 */

/* ---------- Hero: the question and the search ---------- */

.sp-hero {
  position: relative;
  /* The suggestions lie over the tiles below. */
  z-index: 2;
  padding-block: clamp(56px, 9vw, 112px) clamp(40px, 6vw, 72px);
  overflow-x: clip;
}

.sp-hero::before {
  content: "";
  position: absolute;
  top: -280px;
  left: 50%;
  width: 1200px;
  height: 820px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--junk) 14%, transparent), transparent);
  pointer-events: none;
  z-index: -1;
}

.sp-head {
  max-width: calc(720px + 2 * var(--gutter));
  text-align: center;
}

.sp-title {
  font-size: clamp(38px, 5.6vw, 68px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}

.sp-head .lead {
  margin-top: 18px;
  text-wrap: pretty;
}

.sp-form {
  margin-top: 32px;
}

.sp-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.sp-topic {
  padding: 6px 13px;
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.sp-topic:hover,
.sp-topic:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--junk) 50%, transparent);
  background: color-mix(in srgb, var(--junk) 8%, transparent);
}

.sp-count {
  margin-top: 16px;
}

.sp-down {
  color: var(--muted);
  font-weight: 600;
}

.sp-down:hover {
  color: var(--text);
}

.sp-down::after {
  content: " ↓";
}

/* ---------- The guides about MacWashing ---------- */

.sp-articles {
  padding-block: clamp(24px, 4vw, 48px);
}

.sp-articles .lead {
  margin-top: 12px;
  max-width: 720px;
}

/* ---------- «Didn't find the answer?»: the email ---------- */

.sp-contact-wrap {
  padding-block: clamp(40px, 6vw, 72px) clamp(64px, 9vw, 112px);
  scroll-margin-top: var(--header-h);
}

.sp-contact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}

.sp-contact::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -160px;
  width: 560px;
  height: 480px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
  pointer-events: none;
}

.sp-contact-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.sp-contact-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sp-contact .lead {
  margin-top: 14px;
  text-wrap: pretty;
}

.sp-contact-mail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: rgba(11, 12, 16, 0.45);
}

.sp-contact-mail p {
  color: var(--muted);
  line-height: 1.55;
}

.sp-mail {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--t1);
}

.sp-mail:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .sp-contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sp-hero .gs-box kbd {
    display: none;
  }
}
