/* ============================================================
   HK Yaya Limited — shared legal stylesheet
   Loaded ONLY by privacy.html and terms-of-service.html
   ============================================================ */

.legal-page {
  background-color: #100D12;
  color: #F3EFF4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #F3EFF4;
  background-color: #100D12;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: #E879F9;
  text-decoration: none;
}

a:hover {
  color: #D946EF;
}

/* ------------------------------------------------------------
   Chain-link navigation (shared with homepage)
   ------------------------------------------------------------ */
.link-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: #100D12;
  border-bottom: 2px solid #D946EF;
}

.link-nav-inner {
  width: min(1200px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 74px;
}

.link-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #F3EFF4;
  flex-shrink: 0;
}

.link-nav-brand:hover {
  color: #F3EFF4;
}

.chain-mark {
  position: relative;
  width: 24px;
  height: 42px;
  border: 3px solid #D946EF;
  border-radius: 12px;
  flex-shrink: 0;
}

.chain-mark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: 24px;
  height: 8px;
  background-color: #100D12;
  transform: translateY(-50%);
}

.brand-word {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: #F3EFF4;
}

.brand-word span {
  color: #D946EF;
}

.link-nav-links {
  list-style: none;
  display: flex;
  gap: 34px;
  margin: 0 auto;
}

.link-nav-links a {
  color: #B7A8C1;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 0;
}

.link-nav-links a:hover {
  color: #F3EFF4;
}

.link-nav-cta {
  display: inline-block;
  background-color: #D946EF;
  color: #1B0413;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.link-nav-cta:hover {
  background-color: #E879F9;
  color: #1B0413;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background-color: #F3EFF4;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   Legal page title header (must be div/header, never section)
   ------------------------------------------------------------ */
.legal-head {
  background: linear-gradient(135deg, #2B1240 0%, #1A0E28 100%);
  border-bottom: 1px solid #382A46;
  padding: 72px 0 60px;
}

.legal-head-inner {
  width: min(800px, 92%);
  margin: 0 auto;
  padding: 0 24px;
}

.legal-head h1 {
  color: #FFFFFF;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.legal-head p {
  color: #E879F9;
  font-size: 1rem;
  font-weight: 600;
}

/* ------------------------------------------------------------
   Legal content
   ------------------------------------------------------------ */
.legal-content {
  padding: 64px 0 80px;
}

.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scope isolation — legal sections must never inherit homepage
   dark section backgrounds. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* Table of contents */
.toc {
  background-color: #17111C;
  border: 1px solid #382A46;
  border-left: 4px solid #D946EF;
  border-radius: 12px;
  padding: 28px 30px;
  margin-bottom: 48px;
}

.toc h2 {
  color: #E879F9;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 26px;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  color: #B7A8C1;
  font-size: 0.92rem;
  display: inline-flex;
  gap: 10px;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: #D946EF;
  font-weight: 700;
  font-size: 0.8rem;
}

.toc a:hover {
  color: #F3EFF4;
}

/* Section headings and body copy */
.legal-content section {
  margin-bottom: 46px;
  scroll-margin-top: 90px;
}

.legal-content h2 {
  color: #E879F9;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2B2134;
}

.legal-content h3 {
  color: #F3EFF4;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 22px 0 10px;
}

.legal-content p {
  color: #C8BBCF;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: #C8BBCF;
  margin: 0 0 18px 24px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: #F3EFF4;
}

.legal-content a {
  color: #E879F9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #D946EF;
}

.back-link {
  display: inline-block;
  margin-top: 8px;
  color: #B7A8C1;
  font-weight: 600;
}

.back-link:hover {
  color: #F3EFF4;
}

/* ------------------------------------------------------------
   Footer (shared with homepage)
   ------------------------------------------------------------ */
.site-footer {
  background-color: #100D12;
  border-top: 2px solid #D946EF;
  padding: 56px 0 40px;
}

.footer-inner {
  width: min(1200px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E879F9;
  margin-bottom: 18px;
}

.footer-col p,
.footer-col a {
  color: #B7A8C1;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: #F3EFF4;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: #F3EFF4;
}

.footer-brand .chain-mark {
  width: 18px;
  height: 32px;
  border-width: 2px;
  border-radius: 9px;
}

.footer-bottom {
  width: min(1200px, 92%);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #2B2134;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  color: #8E7F9B;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .link-nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: #100D12;
    border-bottom: 2px solid #D946EF;
    padding: 8px 0 16px;
    display: none;
    margin: 0;
  }

  .link-nav-links.open {
    display: flex;
  }

  .link-nav-links li {
    width: 100%;
  }

  .link-nav-links a {
    display: block;
    padding: 14px 24px;
    color: #F3EFF4;
  }

  .link-nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}
