/* ============================================================================
 * Chaitanya 2k26 — Privacy Policy Page Styles
 * Matching OG Glassmorphic & Monospace Aesthetics
 * ============================================================================ */

.privacy-page-root {
  /* Shared page background (pattern + sky gradient). The pattern keeps its page-specific 5% tile. The old third layer
     (#96bbff/#edf4ff) sat under the opaque sky gradient and never showed. */
  background-color: var(--sky-top);
  background-image: var(--page-bg);
  background-repeat: repeat;
  background-size: 5%;
  min-height: 100vh;
  padding: 112px 24px 64px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
  z-index: 25;
}

.transition-component,
.transition-component * {
  pointer-events: none !important;
}

body:has(.privacy-page-root) .transition-component {
  display: none !important;
  opacity: 0 !important;
  clip-path: circle(0 at 50% 50%) !important;
  -webkit-clip-path: circle(0 at 50% 50%) !important;
}

/* Separate rule: browsers without :has() drop a whole selector list. */
.has-privacy-policy .transition-component {
  display: none !important;
  opacity: 0 !important;
  clip-path: circle(0 at 50% 50%) !important;
  -webkit-clip-path: circle(0 at 50% 50%) !important;
}

@media (max-width: 767px) {
  .privacy-page-root {
    background-size: 10%;
    /* 16px gutters: text never sits closer than 16px to the phone edge. */
    padding: 88px 16px 40px;
  }
}

.privacy-container {
  max-width: 1060px;
  margin: 0 auto;
}

/* Header & Nav Controls */
.privacy-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 50;
}

.privacy-back-btn,
.privacy-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Opaque: the dot pattern must not bleed through behind the label text. */
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  padding: 12px 24px;
  border-radius: 30px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--motion-150) var(--ease-out), opacity var(--motion-150) var(--ease-out), background-color var(--motion-150) ease, color var(--motion-150) ease, border-color var(--motion-150) ease, box-shadow var(--motion-150) ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.privacy-back-btn:hover,
.privacy-contact-btn:hover {
  background: var(--ink);
  color: var(--ink-on-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Hero Section */
.privacy-hero {
  border-bottom: 2px solid var(--line-strong);
  padding-bottom: 32px;
  margin-bottom: 40px;
  position: relative;
  z-index: 10;
  opacity: 1 !important;
  height: auto !important;
  width: 100% !important;
  display: block !important;
}

.privacy-tag-badge {
  display: inline-block;
  color: var(--ink-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--track-body);
  /* A 36-character phrase, so it reads in its written case, not all-caps. */
  text-transform: none;
  margin-bottom: 16px;
}

.privacy-hero h1 {
  font-family: DrukMedium, sans-serif;
  font-size: 72px;
  line-height: 1.1;
  /* Relative, so it scales with the font (negative tracking made the
     condensed Druk letters collide at phone sizes). */
  letter-spacing: var(--track-display);
  overflow-wrap: break-word;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--ink);
}

@media (max-width: 991px) {
  .privacy-hero h1 {
    font-size: 48px;
  }
}

@media (max-width: 767px) {
  .privacy-hero h1 {
    font-size: 40px;
  }

}

/* Sentence-length lines stay in sentence case; all-caps is kept for short labels. */
.privacy-hero .subtitle {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: var(--track-body);
  color: var(--ink);
  margin-bottom: 12px;
  text-transform: none;
  /* IBM Plex Mono: 1ch is a full glyph, so 65ch is 65 characters. */
  max-width: 65ch;
}

.privacy-meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-label);
  color: var(--ink-muted);
  text-transform: none;
  letter-spacing: var(--track-body);
  /* Keep the row within ~64 characters; it wraps to a second line. */
  max-width: 64ch;
  column-gap: 0;
  row-gap: 4px;
}

/* The literal "•" spans dangled at line ends when the row wrapped. Hide them
   and draw the separator in front of each following item instead, so a
   wrapped line starts with "•" rather than ending with one. */
.privacy-meta-row span:nth-child(even) {
  display: none;
}

.privacy-meta-row span:nth-child(odd) {
  margin-right: 12px;
}

.privacy-meta-row span:nth-child(odd):not(:first-child)::before {
  content: "\2022";
  content: "\2022" / "";
  margin-right: 12px;
}

/* Quick Nav Pills */
.privacy-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 16px;
}

.quick-nav-pill {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--motion-150) var(--ease-out), opacity var(--motion-150) var(--ease-out), background-color var(--motion-150) ease, color var(--motion-150) ease, border-color var(--motion-150) ease, box-shadow var(--motion-150) ease;
  cursor: pointer;
}

.quick-nav-pill:hover {
  background: var(--ink);
  color: var(--ink-on-dark);
  transform: translateY(-2px);
}

/* Section Cards */
.privacy-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.privacy-card {
  /* Opaque (was 72% white + blur): the pattern showed through and pulled body
     text below 4.5:1. Solid --surface keeps every pixel of text at AA. */
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 20px;
  padding: 32px 40px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 767px) {
  .privacy-card {
    padding: 24px 24px;
    border-radius: 16px;
  }
}

.privacy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.privacy-card-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 12px;
}

.privacy-card-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  padding: 2px 8px;
  border-radius: 8px;
}

.privacy-card-header h2 {
  font-family: DrukMedium, sans-serif;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: var(--track-display);
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
}

@media (max-width: 767px) {
  .privacy-card-header h2 {
    font-size: 20px;
  }
}

/* Cap the reading measure (~68 characters) without narrowing the cards.
   This is proportional system sans, whose "0" (1ch) is wider than an average
   letter, so 70ch ran ~90 characters; 34em is ~68 characters of running text. */
.privacy-card p {
  max-width: 34em;
  letter-spacing: var(--track-body);
  font-size: max(var(--fs-body), 14.5px);
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 16px;
}

.privacy-card p:last-child {
  margin-bottom: 0;
}

.privacy-card ul {
  margin: 12px 0 16px 24px;
  padding: 0;
}

.privacy-card li {
  max-width: 34em;
  letter-spacing: var(--track-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 8px;
}

.privacy-card li strong {
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink);
}

/* Flat rule-led note, not a card inside the card: the left bar alone groups it. */
.privacy-callout {
  /* Monospace: 65ch is 65 characters. */
  max-width: 65ch;
  background: none;
  border-left: 4px solid var(--line-strong);
  padding: 4px 0 4px 16px;
  margin: 16px 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: var(--track-body);
  color: var(--ink);
}

/* Call to Action Footer Card */
.privacy-cta-box {
  margin-top: 48px;
  background: var(--ink);
  color: var(--ink-on-dark);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

@media (max-width: 767px) {
  .privacy-cta-box {
    padding: 32px 24px;
  }
}

.privacy-cta-box h3 {
  font-family: DrukMedium, sans-serif;
  font-size: 38px;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: var(--track-display);
  line-height: 1.1;
  overflow-wrap: break-word;
}

@media (max-width: 767px) {
  .privacy-cta-box h3 {
    font-size: 26px;
  }
}

.privacy-cta-box p {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-body);
  color: #b6b6b6;
  /* 71.4% of the on-dark ink over the --ink fill: #b6b6b6 (10.4:1). */
  color: color-mix(in srgb, var(--ink-on-dark) 71.4%, var(--ink));
  max-width: 65ch;
  margin: 0 auto 24px;
  line-height: 1.6;
  letter-spacing: var(--track-body);
}

.privacy-cta-btn {
  display: inline-block;
  background: var(--surface);
  color: var(--ink);
  padding: 16px 32px;
  border-radius: 40px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.privacy-cta-btn:hover {
  /* Colour audit: one neutral step instead of a second accent hue. */
  background: var(--sky-top);
  color: var(--ink);
  transform: scale(1.05);
}

/* The --focus-ring is drawn in --ink, which matches the CTA box fill; flip it. */
.privacy-cta-box :focus-visible {
  outline-color: var(--ink-on-dark);
}

/* Footer info (a plain div, not a second contentinfo landmark) */
.privacy-footer-credits {
  margin-top: 40px;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-label);
  color: var(--ink-muted);
  letter-spacing: var(--track-body);
  text-transform: none;
}

.privacy-footer-credits p {
  max-width: 65ch;
  margin-inline: auto;
}

@media (max-width: 767px) {
  /* Stack the details and drop the "•" separators that dangled at line ends.
     (Kept at the end of the file so it wins over the base .privacy-meta-row.) */
  .privacy-meta-row {
    flex-direction: column;
    gap: 4px;
  }

  .privacy-meta-row span:nth-child(odd) {
    margin-right: 0;
  }

  .privacy-meta-row span:nth-child(odd):not(:first-child)::before {
    content: none;
  }
}

/* Touch: every control gets a full 44px target; text stays centred so the
   pills and buttons keep their look. */
@media (max-width: 767px), (pointer: coarse) {
  .privacy-back-btn,
  .privacy-contact-btn,
  .quick-nav-pill,
  .privacy-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap);
  }
}

/* ==========================================================================
   Responsive shell (shared by the Privacy and About pages)
   ========================================================================== */

/* Long words, e-mail addresses and URLs wrap instead of widening the page. */
.privacy-container {
  min-width: 0;
  overflow-wrap: break-word;
}

.privacy-card a,
.privacy-callout,
.privacy-footer-credits {
  overflow-wrap: anywhere;
}

.privacy-page-root img,
.privacy-page-root video,
.privacy-page-root svg {
  max-width: 100%;
}

.privacy-page-root img,
.privacy-page-root video {
  height: auto;
}

/* Phones: back / contact buttons and the CTA button go full width. */
@media (max-width: 600px) {
  .privacy-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .privacy-back-btn,
  .privacy-contact-btn,
  .privacy-cta-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .privacy-hero {
    padding-bottom: 24px;
    margin-bottom: 32px;
  }

  .privacy-quick-nav {
    margin-bottom: 32px;
  }

  .privacy-sections {
    gap: 16px;
  }

  .privacy-cta-box {
    margin-top: 40px;
    border-radius: 20px;
  }
}

/* Small phones (320-379px): a little more room for text inside the cards. */
@media (max-width: 379px) {
  .privacy-hero h1 {
    font-size: 32px;
  }

  .privacy-card {
    padding: 24px 16px;
  }

  .privacy-card ul {
    margin-left: 16px;
  }

  .privacy-cta-box {
    padding: 32px 16px;
  }

  .privacy-cta-box h3 {
    font-size: 24px;
  }
}

/* Touch screens: no hover lift on the cards (a tap left them raised). */
@media (hover: none) {
  .privacy-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   Mobile & tablet polish (<= 991px), shared by Privacy, About, Organisation
   and 404. Desktop (>= 992px) is untouched.
   ========================================================================== */
@media (max-width: 991px) {
  /* Safety net: nothing inside the page may widen the viewport. */
  .privacy-page-root {
    overflow-x: clip;
  }

  /* 32px at 320, ~37px at 390, 40px at 430, capped at the old 48px by 768. */
  .privacy-hero h1 {
    font-size: clamp(32px, calc(7vw + 10px), 48px);
  }

  .privacy-card-header h2 {
    font-size: clamp(20px, calc(2.5vw + 12px), 28px);
  }

  /* Readable body copy: 15px / 1.6 on phones and tablets. */
  .privacy-card p,
  .privacy-card li,
  .privacy-callout {
    font-size: 15px;
    line-height: 1.6;
  }

  .privacy-card code {
    overflow-wrap: anywhere;
  }

  .privacy-cta-box h3 {
    font-size: clamp(24px, calc(4vw + 12px), 38px);
  }
}

@media (max-width: 600px) {
  /* Tighter vertical rhythm on phones. */
  .privacy-top-bar {
    margin-bottom: 24px;
  }

  .privacy-hero {
    margin-bottom: 24px;
  }

  .privacy-quick-nav {
    margin-bottom: 24px;
  }

  .privacy-card-header {
    margin-bottom: 12px;
  }

  .privacy-cta-box {
    margin-top: 32px;
  }

  /* Full-width buttons wrap long labels instead of overflowing; 44px tall. */
  .privacy-back-btn,
  .privacy-contact-btn,
  .privacy-cta-btn {
    box-sizing: border-box;
    max-width: 100%;
    min-height: var(--tap, 44px);
    white-space: normal;
    text-align: center;
  }

  /* 16px side padding: "[ OPEN CONTACT US DESK ]" fits one line from 360px and wraps cleanly below. */
  .privacy-cta-btn {
    padding: 14px 16px;
  }

  .privacy-footer-credits {
    margin-top: 32px;
  }
}

/* No lifts or slides for people who asked for less motion. */
@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
  .privacy-card,
  .privacy-back-btn,
  .privacy-contact-btn,
  .privacy-cta-btn,
  .quick-nav-pill {
    transition: none;
  }

  .privacy-card:hover,
  .privacy-back-btn:hover,
  .privacy-contact-btn:hover,
  .privacy-cta-btn:hover,
  .quick-nav-pill:hover {
    transform: none;
  }
}
