/* ===========================================================
   page-privacy.css  --  Privacy Policy page
   -----------------------------------------------------------
   Wrapper: .page-privacy      Slug: ?page=Privacy-Policy
   Loaded by CMS via:
     Out ('\t<link rel="stylesheet" href="'+getVersionedFile('css/page-privacy.css')+'" />\n');

   FRAME WIDTHS
     Desktop: 1640px frame, content at 1200 (Figma 11193:6099)
     Mobile:  the designer's hand-off carries a 640px phone tier
     (H1 54->40, lead 20->18, block titles 30->26, callout 22->20,
     card padding 30->20); mapped to clamps on the site's 1200/400
     basis and to the 767 tier.

   PAGE FONT-SIZE BASE
     font-size: 18px on .page-privacy (dominant Figma paragraph
     size). Every non-clamp size is em against it; clamp
     endpoints are px.

   CLAMP FORMULA (1200 desktop / 400 mobile basis)
     slope_vw = (desktop_px - mobile_px) / 8
     value    = clamp(mobile_px, slope_vw vw + intercept_px, desktop_px)

   INHERITED FROM CMS-LOADED CSS (not re-declared):
     - font-family: 'Roboto', sans-serif
     - color-scheme: light only
     - html { scroll-padding-top: 100px } (site-menu.css) clears the
       fixed menu for every anchor jump -- no scroll-margin-top here

   ASCII rule: this file MUST stay ASCII-clean.

   SECTION INDEX (search the block prefix)
     hero     1. Hero (gradient, boxes-and-shield render, "Last updated")
     policy   2. Policy (sticky side index + rail marker, bordered
                 content card, mobile tab bar; highlight driven by
                 js/page-privacy.js via data-page-nav-*)
=========================================================== */

/* -- TOKENS ------------------------------------------------ */
.page-privacy {
  font-size: 18px;
  font-family: 'Roboto', sans-serif;

  /* Ink: this design's text colour throughout is #3b3b3b. */
  /* Site palette (the four product colours and their -tint values,
     --color-white, --color-text, --surface-warm / --surface-cool and
     --color-btn-hover) is declared once on :root in site-page-base.css;
     a page re-declares one only to override it (audit C19). */
  color: var(--color-text);

  /* Page accent: site-primary blue (non-product page). */
  --color-accent:      var(--color-water-ozonator);
  --color-accent-dark: #38769a;

  /* Surfaces & hairlines */
  --surface-hover:  #efe7e3; /* tab chip hover */
  --color-border:   #d4d4d4; /* card border, block dividers */
  --color-rule:     #e2e8e3; /* tab-bar hairline */
  --color-track:    #d9d9d9; /* index rail track (same as page-faqs) */
  --tint-cream:       #f9fbf6; /* hero gradient start */
  --tint-warm-light:  #f5faf0; /* hero gradient middle */
  --tint-azure-light: #e6f4f8; /* hero gradient end */

  /* Type scale (clamps: 1200/400 basis, px endpoints) */
  --text-hero:       clamp(40px, 1.75vw + 33px, 54px);   /* hero H1 54 -> 40 */
  --text-heading:    clamp(26px, 0.5vw + 24px, 30px);    /* block titles 30 -> 26 */
  --text-subheading: 1.222em;                            /* 22px, constant (site convention) */
  --text-lead:       clamp(18px, 0.25vw + 17px, 20px);   /* hero lead 20 -> 18 */
  --text-callout:    clamp(20px, 0.25vw + 19px, 22px);   /* callouts 22 -> 20 */
  --text-body:       1em;                                /* 18px */
  --text-index:      1.111em;                            /* 20px index links */
  --text-tab:        0.889em;                            /* 16px tab chips */

  /* Spacing */
  --space-section-y: clamp(50px, 3.75vw + 35px, 80px);   /* 80 -> 50 */
  --space-container: clamp(10px, 2.5vw, 30px);           /* 30 -> 10 gutter */
  --space-block-gap: 0.556em;                            /* 10px inside a policy block */
  --space-block-sep: 1.111em;                            /* 20px block divider margin + padding */

  /* Radii (px: corner-matching) */
  --radius-panel: 20px;  /* index panel, card, callouts (Figma rounded-20) */
  --radius-tab:   12px;  /* tab chips */
  --radius-pill:  999px;

  /* Sticky clearance below the fixed menu: the desktop index sticks at
     the same 100px line the site-wide scroll-padding-top uses, so the
     index and the section it points at land together; the mobile tab
     bar sticks straight under the 70px menu bar (same as page-faqs). */
  --menu-clearance: 100px;
  --menu-bar: 70px;
}

/* Base boilerplate (scoped reset, button/header resets, focus ring,
   .container, .sec-title base) is shared: css/site-page-base.css. */
/* -- Element resets (utility family) ----------------------- */
.page-privacy img { display: block; max-width: 100%; }
.page-privacy ul { padding: 0; list-style: none; }

/* -- Shared page utilities --------------------------------- */
.page-privacy .section {
  padding-block: var(--space-section-y);
}
.page-privacy .text-ink    { color: var(--color-water-ozonator); }
.page-privacy .text-accent { color: var(--color-accent); }
.page-privacy .text-base   { color: var(--color-text); }

/* === SECTION 1: HERO ====================================== */
/* Figma 11193:6141. Soft top-to-bottom green->blue gradient (same
   treatment as page-repairs); text left, render right, vertically
   centred in a 493px band. */
.page-privacy .hero {
  background: linear-gradient(178deg, var(--tint-cream) 0%, var(--tint-warm-light) 40%, var(--tint-azure-light) 100%);
  overflow: hidden;
}
.page-privacy .hero__inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 5vw, 60px); /* 60 -> 20 */
  min-height: 27.389em; /* 493px */
}
.page-privacy .hero__text {
  flex: 1 1 0;
  /* Shrink floor: below this the IMAGE takes all the squeeze (the hero
     stays side-by-side down to 767; the image shrinks instead --
     page-repairs convention). */
  min-width: 18em; /* ~324px */
  display: flex;
  flex-direction: column;
  gap: 1.222em; /* 22px (Figma container gap) */
  padding-block: 2.222em; /* 40px */
}
.page-privacy .hero__title {
  margin: 0;
  font-size: var(--text-hero);
  font-weight: 400; /* deliberate: the Figma H1 is Regular */
  line-height: 1.08; /* 58.32/54 */
  color: var(--color-text);
}
.page-privacy .hero__title strong {
  font-weight: 900;
  color: var(--color-accent);
}
.page-privacy .hero__lead {
  margin: 0;
  max-width: 35.556em; /* 640px */
  font-size: var(--text-lead);
  line-height: 1.53; /* 30.6/20 */
}
.page-privacy .hero__dashes {
  display: flex;
  gap: 5px;
}
.page-privacy .hero__dash {
  width: 25px;
  height: 3px;
  border-radius: var(--radius-pill);
}
.page-privacy .hero__dash--green  { background: var(--color-silver-pulser); }
.page-privacy .hero__dash--purple { background: var(--color-bio-tuner); }
.page-privacy .hero__dash--teal   { background: var(--color-magnetic-pulser); }
.page-privacy .hero__updated {
  margin: 0;
  font-size: var(--text-subheading);
  font-weight: 700;
  font-style: italic;
  line-height: 1.364; /* 30/22 */
  color: var(--color-accent);
}
.page-privacy .hero__media {
  flex: 0 1 558px;
  min-width: 0;
}
.page-privacy .hero__img {
  width: 100%;
  max-width: 558px;
  height: auto;
  margin-inline: auto;
}

/* === SECTION 2: POLICY ==================================== */
/* Figma 11193:6341. Index 268 + 30 gap + card. */
.page-privacy .policy {
  background: var(--color-white);
}
.page-privacy .policy__grid {
  display: flex;
  align-items: flex-start;
  gap: 1.667em; /* 30px */
}

/* --- 2a. Side index (sticky) ------------------------------ */
.page-privacy .policy__index {
  position: sticky;
  top: var(--menu-clearance);
  flex: 0 0 14.889em; /* 268px */
  display: flex;
  gap: 1.111em; /* 20px list-to-rail */
  padding: 1.111em 2px 1.111em 1.111em; /* 20px; 2px right lets the rail's 11px marker overhang */
  background: var(--surface-warm);
  border-radius: var(--radius-panel);
  overflow: hidden;
}
.page-privacy .policy__list {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.111em; /* 20px */
  padding-bottom: 1.111em;
}
.page-privacy .policy__link {
  display: block;
  font-size: var(--text-index);
  font-weight: 700;
  line-height: 1.35; /* 27/20 */
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.page-privacy .policy__link:hover,
.page-privacy .policy__link[aria-current="true"] { color: var(--color-accent); }
/* Scroll-position rail: 7px track running to the panel's bottom edge,
   11px green marker overhanging 2px each side (px: pixel art, same
   construction as the page-faqs topic rail). page-privacy.js moves
   the marker with translateY. */
.page-privacy .policy__rail {
  position: relative;
  flex: 0 0 7px;
  width: 7px;
  margin-bottom: -1.111em; /* through the panel's bottom padding */
  background: var(--color-track);
  border-radius: 10px 10px 0 0;
}
.page-privacy .policy__marker {
  position: absolute;
  left: -2px;
  top: 7px;
  width: 11px;
  height: 64px;
  border-radius: 10px;
  background: var(--color-silver-pulser);
  transition: transform 0.12s linear;
}

/* --- 2b. Content card ------------------------------------- */
.page-privacy .policy__card {
  flex: 1 1 0;
  min-width: 0;
  padding: 1.667em; /* 30px */
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  font-size: var(--text-body);
  line-height: 1.667; /* 30/18 */
}
.page-privacy .policy__card a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.page-privacy .policy__card a:hover { color: var(--color-accent); }
.page-privacy .policy__block {
  display: flex;
  flex-direction: column;
  gap: var(--space-block-gap);
}
.page-privacy .policy__block + .policy__block,
.page-privacy .policy__intro + .policy__block {
  margin-top: var(--space-block-sep);
  padding-top: var(--space-block-sep);
  border-top: 2px solid var(--color-border);
}
/* px, not em: the title's own clamp font-size would be the em anchor
   here (the compounding trap, see page-repairs .costs__title). */
.page-privacy .policy__title {
  margin: 0 0 5px;
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1; /* 30/30 */
  color: var(--color-accent);
}
.page-privacy .policy__block ul {
  padding-left: 1.5em; /* 27px */
  list-style: disc;
}
.page-privacy .policy__callout {
  margin-top: 5px;
  padding: 20px; /* px: the callout's own clamp font-size would compound an em */
  background: var(--surface-cool);
  border-radius: var(--radius-panel);
  font-size: var(--text-callout);
  font-weight: 700;
  line-height: 1.591; /* 35/22 */
}
.page-privacy .policy__callout--contact {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.455em; /* 10px at 22 */
}
.page-privacy .policy__callout--contact .policy__title {
  margin-bottom: 0;
  color: var(--color-text);
}

/* --- 2c. Mobile / tablet tabs (shown at <=1024 only) ------ */
.page-privacy .policy__tabs { display: none; }

/* Page-bottom wave: the wrapper, image rule and the .section--wave
   padding kill are owned by the shared css/site-footer.css; this page
   only adds the air above the wave. */
.page-privacy .page-wave {
  margin-top: var(--space-section-y); /* preserve the section's bottom rhythm above the wave */
}

/* === RESPONSIVE: 1024 (layout / column count) ============= */
@media (max-width: 1024px) {
  /* The side index gives way to a one-line scrollable tab bar stuck
     under the menu bar; the card takes the full column. */
  .page-privacy .policy { padding-top: 0; }
  .page-privacy .policy__grid { display: block; }
  .page-privacy .policy__index { display: none; }
  .page-privacy .policy__tabs {
    position: sticky;
    top: var(--menu-bar);
    z-index: 3; /* above the card it scrolls over */
    display: flex;
    gap: 0.444em; /* 8px */
    margin-bottom: 1.333em; /* 24px */
    padding: 0.667em var(--space-container); /* 12px, page gutter */
    background: var(--color-white);
    border-bottom: 1px solid var(--color-rule);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: var(--space-container);
  }
  .page-privacy .policy__tabs::-webkit-scrollbar { display: none; }
  .page-privacy .policy__tab {
    flex: 0 0 auto;
    padding: 0.5em 0.875em; /* 8px 14px at 16 */
    border-radius: var(--radius-tab);
    background: var(--surface-warm);
    font-size: var(--text-tab);
    font-weight: 500;
    line-height: 1.5; /* 24/16 */
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .page-privacy .policy__tab:hover { background: var(--surface-hover); }
  .page-privacy .policy__tab.is-active {
    background: var(--color-accent);
    color: var(--color-white);
  }
}

/* === RESPONSIVE: 767 (phone spacing / stacking) =========== */
@media (max-width: 767px) {
  /* DOCUMENTED EXCEPTION to the "layout at 1024" rule: the hero stays
     side-by-side down to 767 (page-repairs convention) -- the image
     shrinks in the 768-1024 zone instead of wrapping. The stack
     itself therefore lives here. */
  .page-privacy .hero__inner {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }
  .page-privacy .hero__text {
    min-width: 0;
    padding-block: 2.222em 0; /* 40px top; the image follows */
  }
  .page-privacy .hero__title { line-height: 1.1; } /* 44/40 */
  .page-privacy .hero__lead  { line-height: 1.556; } /* 28/18 */
  .page-privacy .hero__media {
    /* Fill the column so the image's width/height attributes reserve
       its space before it loads; .hero__img still caps and centres it. */
    flex-basis: auto;
    width: 100%;
    padding-block: 0 2.222em; /* 40px bottom */
  }
  .page-privacy .policy__card { padding: 1.111em; } /* 20px */
  .page-privacy .policy__callout { line-height: 1.6; } /* 32/20 */
}

@media (prefers-reduced-motion: reduce) {
  .page-privacy .policy__link,
  .page-privacy .policy__card a,
  .page-privacy .policy__marker,
  .page-privacy .policy__tab { transition: none; }
}
