/* ==========================================================================
   Legal Pages — Privacy Policy / Terms of Use / Cookie Policy
   Depends on: mam-shared.css (tokens, header, footer)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sub-navigation
   -------------------------------------------------------------------------- */

.mam-legal-subnav {
  background: var(--mam-sand);
  border-bottom: 1px solid var(--mam-border-light);
}

.mam-legal-subnav__inner {
  max-width: var(--mam-max-w);
  margin-inline: auto;
  padding-inline: var(--mam-gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 48px);
  height: 48px;
}

.mam-legal-subnav__item {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mam-text-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.mam-legal-subnav__item:hover {
  color: var(--mam-text);
  text-decoration: none;
}

.mam-legal-subnav__item.is-active {
  color: var(--mam-text);
  font-weight: 600;
  border-bottom-color: var(--mam-accent);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.mam-legal-hero {
  background: var(--mam-bg);
}

.mam-legal-hero__inner {
  max-width: var(--mam-max-w);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 56px) var(--mam-gutter);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mam-legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mam-text-muted);
}

.mam-legal-breadcrumb a {
  color: var(--mam-text-muted);
  text-decoration: none;
}

.mam-legal-breadcrumb a:hover {
  color: var(--mam-text);
  text-decoration: none;
}

.mam-legal-breadcrumb span {
  color: var(--mam-border-light);
}

.mam-legal-hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(42px, 6vw, 80px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--mam-text);
  margin: 0;
}

.mam-legal-hero__meta {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--mam-text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mam-legal-hero__sep {
  color: var(--mam-border-light);
}

.mam-legal-hero__intro {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: var(--mam-text-body);
  max-width: 720px;
  margin: 4px 0 0;
}

/* --------------------------------------------------------------------------
   Shared divider
   -------------------------------------------------------------------------- */

.mam-legal-divider {
  height: 1px;
  background: var(--mam-border-light);
}

/* --------------------------------------------------------------------------
   Table of Contents
   -------------------------------------------------------------------------- */

.mam-legal-toc {
  background: var(--mam-sand);
  padding: clamp(24px, 3vw, 32px) var(--mam-gutter);
}

.mam-legal-toc__inner {
  max-width: var(--mam-max-w);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mam-legal-toc__label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mam-accent);
  margin: 0;
}

.mam-legal-toc__rule {
  width: 40px;
  height: 2px;
  background: var(--mam-accent);
}

.mam-legal-toc__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px clamp(24px, 5vw, 80px);
}

/* Hide the whole TOC section if JS finds no headings */
.mam-legal-toc.is-hidden {
  display: none;
}

.mam-legal-toc__item {
  display: flex;
}

.mam-legal-toc__link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: var(--mam-text-body);
  text-decoration: none;
  line-height: 1.5;
  padding: 3px 0;
  transition: color 0.15s;
}

.mam-legal-toc__link:hover {
  color: var(--mam-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Content body
   -------------------------------------------------------------------------- */

.mam-legal-content {
  background: var(--mam-bg);
  padding: clamp(40px, 5vw, 64px) var(--mam-gutter) clamp(56px, 7vw, 96px);
}

.mam-legal-content__inner {
  max-width: 720px;
  margin-inline: auto;
  counter-reset: legal-section;
}

/* Headings — numbered + gold rule */

.mam-legal-content__inner h2 {
  counter-increment: legal-section;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--mam-text);
  margin: clamp(40px, 5vw, 56px) 0 0;
  padding-bottom: 12px;
  position: relative;
}

.mam-legal-content__inner h2:first-child {
  margin-top: 0;
}

/* "01 — " counter prefix */
.mam-legal-content__inner h2::before {
  content: counter(legal-section, decimal-leading-zero) " \2014\00a0";
  font-family: 'DM Mono', monospace;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--mam-accent);
  display: block;
  margin-bottom: 6px;
}

/* Gold underline rule */
.mam-legal-content__inner h2::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--mam-accent);
}

/* h3 subheadings */
.mam-legal-content__inner h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--mam-text);
  margin: 28px 0 8px;
}

/* Paragraphs */
.mam-legal-content__inner p {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.75;
  color: var(--mam-text-body);
  margin: 16px 0 0;
}

.mam-legal-content__inner h2 + p,
.mam-legal-content__inner h3 + p {
  margin-top: 16px;
}

/* Lists */
.mam-legal-content__inner ul,
.mam-legal-content__inner ol {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.75;
  color: var(--mam-text-body);
  margin: 14px 0 0 20px;
  padding: 0;
}

.mam-legal-content__inner ul li,
.mam-legal-content__inner ol li {
  margin-bottom: 6px;
}

/* Horizontal rules — section dividers */
.mam-legal-content__inner hr {
  border: none;
  border-top: 1px solid var(--mam-border);
  margin: clamp(32px, 4vw, 48px) 0;
}

/* Links within content */
.mam-legal-content__inner a {
  color: var(--mam-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--mam-accent);
}

.mam-legal-content__inner a:hover {
  color: var(--mam-accent);
  text-decoration: none;
}

/* Strong / bold */
.mam-legal-content__inner strong,
.mam-legal-content__inner b {
  font-weight: 700;
  color: var(--mam-text);
}

/* --------------------------------------------------------------------------
   Responsive — tablet
   -------------------------------------------------------------------------- */

@media ( max-width: 768px ) {
  .mam-legal-toc__grid {
    grid-template-columns: 1fr;
  }

  .mam-legal-hero__title {
    font-size: clamp(36px, 9vw, 54px);
  }
}

/* --------------------------------------------------------------------------
   Responsive — mobile
   -------------------------------------------------------------------------- */

@media ( max-width: 480px ) {
  .mam-legal-subnav__inner {
    gap: 16px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-inline: var(--mam-gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mam-legal-subnav__inner::-webkit-scrollbar {
    display: none;
  }

  .mam-legal-subnav__item {
    flex-shrink: 0;
    font-size: 9px;
  }

  .mam-legal-hero__title {
    font-size: clamp(32px, 10vw, 48px);
  }

  .mam-legal-content__inner {
    max-width: 100%;
  }
}
