/* Privacy, Terms and Support pages. Builds on tokens.css + components.css + sections.css. */

/* ---------- Page header ---------- */

.doc-hero {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding-top: clamp(40px, 7vw, 80px);
  text-align: center;
}

.doc-hero__title {
  font-size: clamp(2.5rem, 5vw + 0.8rem, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.doc-hero__lede {
  max-width: 40rem;
  color: var(--clay-muted);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
}

.doc-hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--clay-well);
  box-shadow: var(--shadow-pressed);
  color: var(--clay-muted);
  font-size: 0.9375rem;
  font-weight: 700;
}

.doc-hero__meta svg {
  width: 16px;
  height: 16px;
  color: var(--clay-accent);
}

/* Segmented switcher between the three pages */
.doc-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--clay-card-bg);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.doc-switch a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 18px;
  color: var(--clay-foreground);
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
  transition:
    transform var(--t-fast) var(--ease-bounce),
    background var(--t-fast) ease,
    color var(--t-fast) ease;
}

.doc-switch a:hover {
  color: var(--clay-accent);
  transform: translateY(-2px);
}

.doc-switch a[aria-current="page"] {
  background: var(--clay-well);
  box-shadow: var(--shadow-pressed);
  color: var(--clay-accent);
  transform: none;
}

.doc-switch svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 420px) {
  .doc-switch a {
    padding: 0 12px;
    font-size: 0.9375rem;
  }

  .doc-switch svg {
    display: none;
  }
}

/* ---------- Document layout ---------- */

.doc {
  display: grid;
  gap: 28px;
  align-items: start;
  padding-top: clamp(40px, 6vw, 72px);
}

@media (min-width: 980px) {
  .doc {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
  }
}

/* Table of contents */
.toc {
  border-radius: var(--r-card);
  background: var(--clay-card-bg);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 0 20px 0 24px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay-accent);
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-card);
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  background: var(--clay-card-solid);
  box-shadow: var(--shadow-button-soft);
  transition: transform var(--t-med) var(--ease-bounce);
}

.toc[open] summary svg {
  transform: rotate(180deg);
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 12px 16px;
  list-style: none;
  counter-reset: toc;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 16px;
  color: var(--clay-foreground);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  counter-increment: toc;
  transition:
    background var(--t-fast) ease,
    color var(--t-fast) ease;
}

.toc a::before {
  content: counter(toc);
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--clay-well);
  box-shadow: var(--shadow-pressed);
  color: var(--clay-muted);
  font: 900 0.75rem var(--font-display);
  transition:
    background var(--t-fast) ease,
    color var(--t-fast) ease;
}

.toc a:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--clay-accent);
}

.toc a.is-active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--clay-accent);
}

.toc a.is-active::before {
  background: var(--grad-primary);
  box-shadow: var(--shadow-orb);
  color: #fff;
}

@media (min-width: 980px) {
  .toc {
    position: sticky;
    top: 124px;
    max-height: calc(100vh - 148px);
    overflow: auto;
  }

  .toc summary {
    pointer-events: none;
  }

  .toc summary svg {
    display: none;
  }
}

/* The document card */
.doc__body {
  display: grid;
  gap: 18px;
}

.doc-section {
  scroll-margin-top: 120px;
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--r-card);
  background: var(--clay-card-bg);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.doc-section__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.doc-section__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  font: 900 1.125rem var(--font-display);
  box-shadow: var(--shadow-orb);
}

.doc-section h2 {
  font-size: clamp(1.375rem, 1vw + 1.1rem, 1.75rem);
  font-weight: 900;
  line-height: 1.2;
}

.prose {
  display: grid;
  gap: 14px;
  max-width: 44rem;
  color: var(--clay-muted);
  font-size: 1.0625rem;
}

.prose ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prose li {
  position: relative;
  padding-left: 30px;
}

.prose li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow:
    2px 2px 4px rgba(124, 58, 237, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.prose a {
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Contact card closes every document */
.contact-card {
  display: grid;
  gap: 18px;
  justify-items: start;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.3), transparent 50%),
    linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #db2777 120%);
  color: #fff;
  box-shadow:
    20px 24px 48px rgba(124, 58, 237, 0.3),
    -12px -12px 32px rgba(255, 255, 255, 0.85),
    inset 8px 8px 20px rgba(255, 255, 255, 0.22),
    inset -10px -10px 20px rgba(0, 0, 0, 0.12);
  scroll-margin-top: 120px;
}

.contact-card h2 {
  font-size: clamp(1.625rem, 1.5vw + 1.2rem, 2.25rem);
  font-weight: 900;
}

.contact-card p {
  max-width: 36rem;
  font-size: 1.0625rem;
  opacity: 0.95;
}

.contact-card .btn {
  max-width: 100%;
  color: var(--clay-accent);
  box-shadow:
    12px 14px 28px rgba(51, 47, 58, 0.25),
    -6px -6px 14px rgba(255, 255, 255, 0.2),
    inset 4px 4px 8px rgba(255, 255, 255, 0.9),
    inset -4px -4px 8px rgba(124, 58, 237, 0.15);
}

.contact-card .btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-card__note {
  font-size: 0.9375rem;
}

.contact-card__note strong {
  font-family: var(--font-display);
  font-weight: 800;
}

@media (max-width: 480px) {
  .contact-card .btn {
    width: 100%;
    padding: 0 18px;
    font-size: 1rem;
  }
}

/* ---------- Support page ---------- */

.support {
  display: grid;
  gap: clamp(56px, 8vw, 88px);
  padding-top: clamp(40px, 6vw, 72px);
}

.support__block-title {
  margin-bottom: 24px;
  font-size: clamp(1.625rem, 2vw + 1rem, 2.25rem);
  font-weight: 900;
  text-align: center;
}

.issues {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .issues {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .issues {
    grid-template-columns: repeat(3, 1fr);
  }
}

.issue {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--clay-card-bg);
  box-shadow: var(--shadow-card);
  color: var(--clay-foreground);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition:
    transform var(--t-med) var(--ease-bounce),
    box-shadow var(--t-med) ease;
}

.issue:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.issue:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-pressed);
}

.issue .orb-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.issue .orb-icon svg {
  width: 24px;
  height: 24px;
}

.issue__go {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: var(--clay-accent);
  transform: rotate(-90deg);
}

.help-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 820px) {
  .help-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.help-card {
  scroll-margin-top: 120px;
}

.help-card .card__inner {
  gap: 14px;
}

.help-card h3 {
  font-size: 1.5rem;
  font-weight: 900;
}

.help-card .prose {
  font-size: 1rem;
}

.help-card:target {
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.25),
    var(--shadow-card-hover);
}
