/* =========================================================
   Legal pages (Terms & Conditions / Privacy Policy)
   Design source: Figma "AI Search Present - Final" node 3803:56320
   ========================================================= */

/* Header bleeds full width; the card sits on the page container. */
.site-main > .legal-header {
  width: 100%;
}

.site-main > .legal-card {
  width: min(1164px, calc(100% - 48px));
}

/* Figma stacks the header directly above the card with a 60px gap, tighter
   than the theme's default section rhythm. */
.site-main > .legal-header + .legal-card {
  margin-top: calc(60px - var(--space-section));
}

/* ---------- Gradient header ---------- */

.legal-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  justify-content: center;
  min-height: 406px;
  padding: 40px 24px;
  background-image: linear-gradient(135deg, #1c73e9 38.87%, #2ac48b 88.955%);
  text-align: center;
}

.legal-header__title {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: 0.006em;
  color: #fff;
}

.legal-header__subtitle {
  max-width: 672px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  line-height: 1.42;
  color: #dbeafe;
}

/* ---------- White card ---------- */

.legal-card {
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: center;
  padding: 80px clamp(24px, 6vw, 100px);
  border-radius: 24px;
  background: #fff;
  filter: drop-shadow(0 8px 12.5px #f4f5fc) drop-shadow(0 20px 12.5px rgba(244, 245, 252, 0.5));
}

/* Privacy has no accept row or button — nothing to space against. */
.legal-card:has(.legal-card__sections) {
  gap: 0;
}

.legal-card__content {
  width: 100%;
  font-size: 16px;
  line-height: 1.5;
  color: #1d1d1f;
}

.legal-card__content > * {
  margin: 0;
}

.legal-card__content > * + * {
  margin-top: 24px;
}

.legal-card__content h2,
.legal-card__content h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #1d1d1f;
}

/* Figma pairs each numbered heading tightly with its paragraph. */
.legal-card__content > :is(h2, h3) + * {
  margin-top: 0;
}

.legal-card__content ul,
.legal-card__content ol {
  padding-left: 20px;
}

.legal-card__content li {
  margin: 0;
}

.legal-card__content a {
  color: var(--color-brand-blue);
  text-decoration: underline;
}

/* ---------- Icon-headed sections (Privacy Policy) ---------- */

.legal-card__sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.legal-section__title {
  display: flex;
  gap: 10.5px;
  align-items: center;
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.025em;
  color: #101828;
}

.legal-section__icon {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
}

.legal-section__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.0094em;
  color: #364153;
}

.legal-section__body > * {
  margin: 0;
}

/* Figma indents list items without markers. */
.legal-section__body ul,
.legal-section__body ol {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-left: 21px;
  list-style: none;
}

.legal-section__body strong {
  font-weight: 700;
}

.legal-section__body a {
  color: var(--color-brand-blue);
  text-decoration: underline;
}

/* Contact details block — authored as a blockquote in the editor. */
.legal-section__body blockquote {
  display: flex;
  flex-direction: column;
  gap: 10.5px;
  margin: 0;
  padding: 21px;
  border: 0;
  border-radius: 9px;
  background: #f9fafb;
  font-style: normal;
}

.legal-section__body blockquote > * {
  margin: 0;
}

/* ---------- Accept row ---------- */

.legal-card__accept {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  margin-top: -36px;
}

.legal-card__check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 16px;
  line-height: 1.5;
  color: #1d1d1f;
  cursor: pointer;
}

.legal-card__check input {
  width: 14px;
  height: 14px;
  accent-color: var(--color-brand-blue);
  cursor: pointer;
}

.legal-card__link {
  font-size: 16px;
  line-height: 1.5;
  text-decoration: underline;
  color: transparent;
  background-image: var(--gradient-brand, linear-gradient(104deg, #1c73e9 38.87%, #2ac48b 88.955%));
  background-clip: text;
  -webkit-background-clip: text;
  /* The gradient paints the glyphs, so the underline needs its own colour. */
  text-decoration-color: var(--color-brand-blue);
}

/* ---------- Agree button ---------- */

.legal-card__button {
  min-width: 110px;
  padding: 8px 24px;
  border: 0;
  border-radius: 99px;
  background-image: linear-gradient(144deg, #1c73e9 31%, #2ac48b 79.4%);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  cursor: pointer;
  transition: transform var(--duration-fast) ease;
}

.legal-card__button:hover {
  transform: translateY(-2px);
}

.legal-card__button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .legal-header {
    min-height: 280px;
  }

  .legal-card {
    padding: 48px 24px;
    gap: 40px;
  }

  .legal-card__accept {
    margin-top: -16px;
  }
}
