/* =============================================
   PRIVACY NOTICE (privacy.php) — "Adatkezelési tájékoztató"
   A long legal text, so the page is built for reading and scanning:
   a sticky contents list on the left, one 65ch column of text on the
   right, every section opened by a number + serif title. Only the head
   block reveals; the sections themselves are there when an anchor
   jump lands on them.
   Below 1024px the contents list folds into a <details> above the text.
   ============================================= */

.page-privacy {
  background-color: var(--color-parchment);
}

.privacy {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(56px, 8vh, 96px) clamp(48px, 6vw, 96px) clamp(80px, 12vh, 140px);
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  column-gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

/* ---- Contents list ---- */

.privacy__toc {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
  max-height: calc(100vh - var(--nav-height) - 2 * var(--space-md));
  /* Fits without scrolling on any laptop height; a very short window still
     scrolls it, just without a visible bar beside the list. */
  overflow-y: auto;
  scrollbar-width: none;
}

.privacy__toc::-webkit-scrollbar {
  display: none;
}

.privacy__toc-summary {
  display: none;
}

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

.privacy__toc-label,
.privacy__toc-summary {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}

.privacy__toc-label {
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid color-mix(in oklch, var(--color-clay) 30%, transparent);
}

.privacy__toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.privacy__toc-link {
  display: grid;
  grid-template-columns: 2.5em 1fr;
  gap: 4px;
  padding: 4px 0;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-charcoal);
  transition: color 0.2s ease-out;
}

.privacy__toc-link:hover,
.privacy__toc-link:focus-visible {
  color: var(--color-terracotta);
}

.privacy__toc-num {
  font-weight: 500;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--color-clay);
}

/* ---- Document column ---- */

.privacy__doc {
  max-width: 720px;
  min-width: 0;
}

.privacy__head {
  padding-bottom: clamp(28px, 4vh, 44px);
  margin-bottom: clamp(40px, 6vh, 64px);
  border-bottom: 1px solid color-mix(in oklch, var(--color-clay) 30%, transparent);
}

.privacy__head.animate-pending {
  opacity: 0;
}

.privacy__head.in-view {
  animation: fade-up var(--anim-base) var(--ease-spring) both;
}

.privacy__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}

.privacy__controller {
  margin: 14px 0 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.1;
  color: var(--color-charcoal);
}

.privacy__address {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  font-weight: 400;
  color: var(--color-clay);
}

.privacy__intro-heading {
  margin-bottom: clamp(20px, 3vh, 32px);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.25;
  color: var(--color-charcoal);
}

.privacy__lede {
  margin-bottom: clamp(16px, 2.4vh, 24px);
  font-family: var(--font-sans);
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-charcoal);
}

.privacy__p {
  margin-bottom: clamp(16px, 2.4vh, 24px);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-charcoal);
}

.privacy__doc strong {
  font-weight: 500;
}

.privacy__doc a {
  color: var(--color-terracotta);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklch, var(--color-terracotta) 40%, transparent);
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.2s ease-out, color 0.2s ease-out;
}

.privacy__doc a:hover {
  color: var(--color-charcoal);
  text-decoration-color: currentColor;
}

/* ---- Sections ---- */

.privacy__section {
  margin-top: clamp(40px, 6vh, 64px);
  padding-top: clamp(40px, 6vh, 64px);
  border-top: 1px solid color-mix(in oklch, var(--color-clay) 25%, transparent);
  scroll-margin-top: calc(var(--nav-height) + var(--space-sm));
}

.privacy__section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(20px, 3vh, 32px);
}

.privacy__num {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--color-terracotta);
}

.privacy__title {
  max-width: 34ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.25;
  color: var(--color-charcoal);
  text-wrap: balance;
}

.privacy__sub {
  margin: clamp(32px, 5vh, 48px) 0 clamp(12px, 2vh, 18px);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h4);
  line-height: 1.3;
  color: var(--color-charcoal);
}

.privacy__label {
  margin: clamp(24px, 3.5vh, 32px) 0 12px;
  font-family: var(--font-sans);
  font-size: var(--fs-label-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}

/* Bullets: a short terracotta rule instead of a dot. */
.privacy__list {
  list-style: none;
  max-width: 65ch;
  margin: 0 0 clamp(16px, 2.4vh, 24px);
  padding: 0;
}

.privacy__list li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-charcoal);
  text-wrap: pretty;
}

.privacy__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 0.9em;
  height: 1px;
  background-color: var(--color-terracotta);
}

/* ---- Label / value pairs ---- */

.privacy__facts {
  max-width: 65ch;
  margin: 4px 0 clamp(24px, 3.5vh, 32px);
  border-top: 1px solid color-mix(in oklch, var(--color-clay) 25%, transparent);
}

.privacy__fact {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  gap: 4px 20px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in oklch, var(--color-clay) 25%, transparent);
}

.privacy__fact dt {
  padding-top: 0.25em;
  font-family: var(--font-sans);
  font-size: var(--fs-label-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--color-clay);
}

.privacy__fact dd {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-charcoal);
}

/* ---- Processing records (section 5) ---- */

.privacy__records {
  display: grid;
  gap: var(--space-sm);
  margin: clamp(20px, 3vh, 28px) 0 0;
}

.privacy__record {
  padding: clamp(20px, 3vw, 32px);
  background-color: color-mix(in oklch, var(--color-blush) 55%, transparent);
}

.privacy__record-title {
  margin-bottom: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h4);
  line-height: 1.3;
  color: var(--color-charcoal);
}

.privacy__record-fields {
  border-top: 1px solid color-mix(in oklch, var(--color-clay) 30%, transparent);
}

.privacy__record .privacy__fact {
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  padding: 10px 0;
  border-bottom-color: color-mix(in oklch, var(--color-clay) 30%, transparent);
}

.privacy__record .privacy__fact:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.privacy__record .privacy__fact dd {
  font-size: var(--fs-body-sm);
}

/* ---- Principles ---- */

.privacy__principles {
  list-style: none;
  margin: 0 0 clamp(8px, 1.5vh, 16px);
  padding: 0;
  counter-reset: principle;
}

.privacy__principle {
  display: grid;
  grid-template-columns: 2.75em minmax(0, 1fr);
  column-gap: 12px;
  padding: clamp(18px, 2.6vh, 26px) 0 clamp(4px, 1vh, 8px);
  border-bottom: 1px solid color-mix(in oklch, var(--color-clay) 25%, transparent);
  counter-increment: principle;
}

.privacy__principle:first-child {
  padding-top: 0;
}

.privacy__principle::before {
  content: counter(principle, decimal-leading-zero);
  grid-row: 1 / span 2;
  padding-top: 0.35em;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--color-terracotta);
}

.privacy__principle-term {
  margin-bottom: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h4);
  line-height: 1.3;
  color: var(--color-charcoal);
}

/* ---- Sign-off ---- */

.privacy__signed {
  margin-top: clamp(48px, 8vh, 80px);
  padding-top: clamp(24px, 3.5vh, 32px);
  border-top: 1px solid color-mix(in oklch, var(--color-clay) 30%, transparent);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-clay);
}

/* ---- Tablet + mobile: contents fold above the text ---- */

@media (max-width: 1023px) {
  .privacy {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-lg) var(--space-md) var(--space-xl);
  }

  .privacy__toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: clamp(40px, 6vh, 56px);
    border-top: 1px solid color-mix(in oklch, var(--color-clay) 30%, transparent);
    border-bottom: 1px solid color-mix(in oklch, var(--color-clay) 30%, transparent);
  }

  .privacy__toc-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    list-style: none;
    cursor: pointer;
  }

  .privacy__toc-summary::after {
    content: '+';
    font-size: var(--fs-body);
    font-weight: 400;
    letter-spacing: 0;
    transition: transform 0.18s ease-out;
  }

  .privacy__toc[open] .privacy__toc-summary::after {
    transform: rotate(45deg);
  }

  .privacy__toc-label {
    display: none;
  }

  .privacy__toc-list {
    padding-bottom: 12px;
  }

  .privacy__doc {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .privacy {
    padding: var(--space-md) var(--space-sm) var(--space-lg);
  }

  .privacy__fact,
  .privacy__record .privacy__fact {
    grid-template-columns: minmax(0, 1fr);
  }

  .privacy__fact dt {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .privacy__head.animate-pending { opacity: 1; transform: none; }
  .privacy__head.in-view { animation: none; }
}
