/* ==========================================================================
   The Major's Enterprise Ltd — Legal Policies & Data Protection Page
   Unified Luxury Editorial System (Obsidian, Embu Forest Green, Gold & Parchment)
   ========================================================================== */

/* ==========================================================================
   1. Dark Highland Forest & Gold Editorial Hero
   ========================================================================== */
.legal-hero {
  position: relative;
  padding-top: calc(var(--header-height) + clamp(3rem, 5.5vw, 4.75rem));
  padding-bottom: 0;
  color: var(--ink-on-dark);
  background:
    radial-gradient(ellipse 72% 62% at 84% 16%, rgba(200, 164, 93, 0.16), transparent 62%),
    radial-gradient(ellipse 68% 60% at 14% 78%, rgba(33, 64, 45, 0.58), transparent 66%),
    linear-gradient(155deg, #162c1f 0%, #101e16 54%, #14100d 100%);
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200, 164, 93, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 164, 93, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 85%);
  pointer-events: none;
}

.legal-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding-bottom: clamp(2.75rem, 5vw, 4rem);
}

.legal-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(200, 164, 93, 0.34);
  background: rgba(20, 16, 13, 0.42);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.legal-hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 164, 93, 0.18);
}

.legal-hero__title {
  margin-top: 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 4.6vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink-on-dark);
  letter-spacing: -0.015em;
}

.legal-hero__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-light);
}

.legal-hero__lead {
  margin-top: 1.2rem;
  max-width: 64ch;
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.75;
  color: var(--ink-on-dark-body);
}

.legal-hero__actions {
  margin-top: 1.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

/* Anchored Governance Metadata Strip */
.legal-meta-bar {
  position: relative;
  z-index: 2;
  background: rgba(14, 11, 9, 0.56);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(200, 164, 93, 0.24);
  border-bottom: 1px solid rgba(200, 164, 93, 0.16);
}

.legal-meta-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.legal-meta-bar__item {
  padding: 1.25rem 1.35rem;
  border-right: 1px solid rgba(246, 241, 233, 0.09);
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.legal-meta-bar__item:first-child {
  padding-left: 0;
}

.legal-meta-bar__item:last-child {
  border-right: 0;
  padding-right: 0;
}

.legal-meta-bar__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.legal-meta-bar__val {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-on-dark);
}

/* ==========================================================================
   2. Main Legal Workspace (2-Column Sticky Reader)
   ========================================================================== */
.legal-workspace {
  background: var(--bg-parchment);
  padding-block: clamp(3rem, 5.5vw, 4.75rem) clamp(4.5rem, 7vw, 6.25rem);
}

/* Key Principles Summary Row */
.legal-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
}

.summary-pill-card {
  background: #FCFBF8;
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--forest-deep);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.summary-pill-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.summary-pill-card h2 {
  margin-top: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.summary-pill-card p {
  margin-top: 0.5rem;
  font-size: 0.89rem;
  line-height: 1.65;
  color: var(--ink-body);
}

/* Two-Column Reader Grid */
.legal-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(2rem, 3.8vw, 3.25rem);
  align-items: start;
}

/* Left Sticky Sidebar Rail */
.legal-rail {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.legal-toc {
  background: #FCFBF8;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.legal-toc__title {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-toc__list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  padding: 0.5rem 0.68rem;
  border-radius: var(--radius-sm);
  border-left: 2.5px solid transparent;
  font-size: 0.845rem;
  font-weight: 500;
  color: var(--ink-body);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.toc-link__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-linen);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest-deep);
  flex-shrink: 0;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.toc-link:hover {
  background: rgba(200, 164, 93, 0.12);
  color: var(--forest-deep);
}

.toc-link.is-active {
  background: var(--forest-tint);
  border-left-color: var(--gold-dark);
  color: var(--forest-deep);
  font-weight: 600;
}

.toc-link.is-active .toc-link__num {
  background: var(--forest-deep);
  color: var(--gold-light);
}

.legal-toc__quick {
  margin-top: 0.78rem;
  padding-top: 0.72rem;
  border-top: 1px solid var(--border-subtle);
}

.legal-toc__quick-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.legal-toc__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.legal-toc__sublist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.785rem;
  color: var(--ink-muted);
  padding: 0.18rem 0.2rem;
  transition: color var(--transition-fast);
}

.legal-toc__sublist a:hover {
  color: var(--forest-deep);
}

.legal-toc__print {
  margin-top: 0.88rem;
  width: 100%;
  padding-block: 0.52rem;
}

/* Dark Forest & Gold Legal Compliance Desk Card */
.legal-desk-card {
  background: linear-gradient(155deg, #183323 0%, #0d1d14 100%);
  border: 1px solid rgba(200, 164, 93, 0.35);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem;
  color: var(--ink-on-dark);
  box-shadow: var(--shadow-md);
}

.legal-desk-card__eyebrow {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.legal-desk-card h3 {
  margin-top: 0.32rem;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  color: var(--ink-on-dark);
}

.legal-desk-card__note {
  margin-top: 0.38rem;
  font-size: 0.79rem;
  line-height: 1.54;
  color: var(--ink-on-dark-body);
}

.legal-desk-list {
  list-style: none;
  margin: 0.82rem 0 0;
  padding: 0.78rem 0 0;
  border-top: 1px solid rgba(200, 164, 93, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.legal-desk-list li {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.legal-desk-list__role {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.legal-desk-list a,
.legal-desk-list span.legal-desk-list__val {
  font-size: 0.79rem;
  color: var(--ink-on-dark);
  word-break: break-word;
  transition: color var(--transition-fast);
}

.legal-desk-list a:hover {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   3. Legal Document Sheets & Numbered Clauses
   ========================================================================== */
.legal-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.legal-doc {
  background: #FCFBF8;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3.8vw, 3rem);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 94px;
}

.legal-doc__head {
  padding-bottom: 1.5rem;
  margin-bottom: 1.85rem;
  border-bottom: 1px solid rgba(200, 164, 93, 0.36);
}

.legal-doc__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.78rem;
  border-radius: var(--radius-pill);
  background: var(--forest-tint);
  border: 1px solid rgba(23, 46, 32, 0.16);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest-deep);
}

.legal-doc__head h2 {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.9vw, 2.45rem);
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.12;
}

.legal-doc__sub {
  margin-top: 0.65rem;
  font-size: 0.94rem;
  line-height: 1.68;
  color: var(--ink-muted);
  max-width: 66ch;
}

/* Clauses */
.clause-list {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

.clause {
  scroll-margin-top: 96px;
}

.clause__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.clause__num {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-dark);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 2rem;
}

.clause h3 {
  font-family: var(--font-sans);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink-primary);
  letter-spacing: -0.01em;
}

.clause__body {
  padding-left: 2.75rem;
  max-width: 72ch;
}

.clause__body p {
  font-size: 0.955rem;
  line-height: 1.78;
  color: var(--ink-body);
}

.clause__body p + p {
  margin-top: 0.85rem;
}

.clause__body a {
  color: var(--forest-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(200, 164, 93, 0.75);
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.clause__body a:hover {
  color: var(--gold-dark);
  text-decoration-color: var(--gold-dark);
}

.clause__list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.clause__list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.945rem;
  line-height: 1.72;
  color: var(--ink-body);
}

.clause__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-dark);
}

.clause__list strong {
  color: var(--ink-primary);
  font-weight: 600;
}

/* Data Subject Rights 2-Column Grid (Section 1.6) */
.rights-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.rights-item {
  background: var(--bg-parchment);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--forest-deep);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
}

.rights-item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin-bottom: 0.25rem;
}

.rights-item span {
  display: block;
  font-size: 0.84rem;
  line-height: 1.58;
  color: var(--ink-body);
}

/* Editorial Highlight Callouts (ODPC, Photo Removal, Biosecurity) */
.legal-callout {
  margin-top: 1.1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--forest-tint);
  border: 1px solid rgba(23, 46, 32, 0.16);
  border-left: 3.5px solid var(--forest-deep);
  font-size: 0.9rem;
  line-height: 1.68;
  color: var(--ink-primary);
}

.legal-callout strong {
  color: var(--forest-deep);
}

.legal-callout--gold {
  background: rgba(200, 164, 93, 0.11);
  border-color: rgba(155, 120, 53, 0.24);
  border-left-color: var(--gold-dark);
}

/* Cookie Disclosure Table (Section 4.1) */
.legal-table-wrap {
  margin-top: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  background: var(--bg-white);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
  font-size: 0.86rem;
}

.legal-table thead th {
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--forest-deep);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-table tbody td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--ink-body);
  vertical-align: top;
  line-height: 1.58;
}

.legal-table tbody td:first-child {
  font-weight: 600;
  color: var(--ink-primary);
  white-space: nowrap;
}

/* Formal Corporate Notice Block (Section 4.4) */
.notice-card {
  margin-top: 1rem;
  background: linear-gradient(155deg, #183323 0%, #0e1e15 100%);
  border: 1px solid rgba(200, 164, 93, 0.36);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.75rem;
  color: var(--ink-on-dark);
}

.notice-card__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem 1.5rem;
}

.notice-field__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}

.notice-field__val {
  display: block;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-on-dark);
}

.notice-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.85rem;
}

.notice-phones a {
  white-space: nowrap;
}

.notice-card a {
  color: var(--ink-on-dark);
  text-decoration: underline;
  text-decoration-color: rgba(200, 164, 93, 0.55);
  text-underline-offset: 3px;
}

.notice-card a:hover {
  color: var(--gold-light);
}

/* Bottom Governance Action Banner */
.legal-cta-banner {
  margin-top: 0.5rem;
  background: linear-gradient(145deg, #162c1f 0%, #14100d 100%);
  border: 1px solid rgba(200, 164, 93, 0.32);
  border-radius: var(--radius-lg);
  padding: clamp(1.85rem, 3.8vw, 2.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--ink-on-dark);
  box-shadow: var(--shadow-md);
}

.legal-cta-banner__copy {
  max-width: 560px;
}

.legal-cta-banner__copy h2 {
  margin-top: 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  color: var(--ink-on-dark);
}

.legal-cta-banner__copy p {
  margin-top: 0.65rem;
  font-size: 0.94rem;
  line-height: 1.68;
  color: var(--ink-on-dark-body);
}

.legal-cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ==========================================================================
   4. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .legal-meta-bar__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .legal-meta-bar__item {
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(246, 241, 233, 0.08);
  }
  .legal-meta-bar__item:nth-child(2n) {
    border-right: 0;
  }
  .legal-meta-bar__item:first-child {
    padding-left: 1rem;
  }
  .legal-summary-grid {
    grid-template-columns: 1fr;
  }
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 680px) {
  .clause__body {
    padding-left: 0;
  }
  .rights-grid,
  .notice-card__grid {
    grid-template-columns: 1fr;
  }
  .legal-meta-bar__grid {
    grid-template-columns: 1fr;
  }
  .legal-meta-bar__item {
    border-right: 0;
    padding: 0.9rem 0;
  }
  .legal-meta-bar__item:first-child {
    padding-left: 0;
  }
  .legal-meta-bar__item:last-child {
    border-bottom: 0;
  }
  .legal-hero__actions .btn,
  .legal-cta-banner__actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   5. Print / Save as PDF Executive Document Styles
   ========================================================================== */
@media print {
  body {
    background: #FFFFFF;
    color: #111111;
    font-size: 10.5pt;
  }

  .site-header,
  .mobile-drawer,
  .skip-link,
  .legal-hero__actions,
  .legal-rail,
  .legal-cta-banner,
  .site-footer {
    display: none !important;
  }

  .legal-hero {
    background: #FFFFFF !important;
    color: #111111 !important;
    padding-top: 0 !important;
    border-bottom: 2px solid #172E20;
  }

  .legal-hero::before {
    display: none;
  }

  .legal-hero__eyebrow,
  .legal-hero__title,
  .legal-hero__title em,
  .legal-hero__lead,
  .legal-meta-bar__val {
    color: #111111 !important;
  }

  .legal-meta-bar {
    background: #F4F4F2 !important;
    border: 1px solid #CCCCCC !important;
  }

  .legal-meta-bar__label {
    color: #172E20 !important;
  }

  .legal-workspace {
    background: #FFFFFF !important;
    padding-block: 16pt !important;
  }

  .legal-layout {
    display: block !important;
  }

  .legal-doc,
  .summary-pill-card {
    box-shadow: none !important;
    border: 1px solid #D4D4D4 !important;
    background: #FFFFFF !important;
    margin-bottom: 16pt;
    page-break-inside: auto;
  }

  .clause {
    break-inside: avoid;
  }

  .notice-card {
    background: #F7F7F5 !important;
    color: #111111 !important;
    border: 1px solid #999999 !important;
  }

  .notice-field__label {
    color: #172E20 !important;
  }

  .notice-field__val,
  .notice-card a {
    color: #111111 !important;
  }
}
