/* Legal / compliance document pages (Privacy Policy, …) — first-party,
   self-contained styling with no external CDN/font/icon host, so the repo's
   ContentSecurityPolicyMiddleware (default-src 'self') never blocks anything.
   Designed to sit inside the landing page's `.hp` shell (header/footer from
   home.css), so it reuses the same `--hp-*` design tokens declared there.
   Everything below is scoped under `.pp` so it can't leak into the portals. */

.pp {
  padding-block: clamp(32px, 6vw, 72px);
  scroll-margin-top: 96px;
}

/* ---------- Document header ---------- */
.pp-head {
  border-bottom: 1px solid var(--hp-outline);
  padding-bottom: 32px;
  margin-bottom: 48px;
}
.pp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hp-ink-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.pp-kicker .hp__icon { color: var(--hp-green); }
.pp-head h1 { font-size: clamp(30px, 5vw, 40px); color: var(--hp-navy); line-height: 1.15; margin-bottom: 16px; }
.pp-head__lede { font-size: 18px; color: var(--hp-ink-muted); max-width: 48rem; line-height: 1.6; }

/* ---------- Layout: sidebar + article ---------- */
.pp-layout { display: flex; flex-direction: column; gap: 40px; }
.pp-aside { width: 100%; flex: none; }
.pp-toc { display: flex; flex-direction: column; border-left: 1px solid var(--hp-outline); }
[dir="rtl"] .pp-toc { border-left: 0; border-right: 1px solid var(--hp-outline); }
.pp-toc a {
  padding: 8px 16px;
  color: var(--hp-ink-muted);
  border-left: 2px solid transparent;
  font-size: 15px;
  transition: color var(--motion-fast, 150ms), border-color var(--motion-fast, 150ms);
}
[dir="rtl"] .pp-toc a { border-left: 0; border-right: 2px solid transparent; }
.pp-toc a:hover { color: var(--hp-primary); border-left-color: var(--hp-outline); }
[dir="rtl"] .pp-toc a:hover { border-right-color: var(--hp-outline); }
.pp-toc a.is-active { color: var(--hp-primary); font-weight: 700; border-left-color: var(--hp-primary); }
[dir="rtl"] .pp-toc a.is-active { border-right-color: var(--hp-primary); }

.pp-note {
  margin-top: 32px;
  padding: 24px;
  background: var(--hp-surface-low);
  border: 1px solid var(--hp-outline);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 42, 48, 0.08);
}
.pp-note .hp__icon { color: var(--hp-primary); margin-bottom: 8px; }
.pp-note h4 { color: var(--hp-navy); font-size: 16px; margin-bottom: 8px; }
.pp-note p { color: var(--hp-ink-muted); font-size: 14px; }

.pp-article { flex: 1; max-width: 48rem; display: flex; flex-direction: column; gap: 64px; }
.pp-section { scroll-margin-top: 112px; }
.pp-section h2 { font-size: clamp(24px, 4vw, 32px); color: var(--hp-navy); margin-bottom: 24px; }
.pp-prose { color: var(--hp-ink-muted); display: flex; flex-direction: column; gap: 16px; }
.pp-prose p { font-size: 16px; line-height: 1.6; }
.pp-prose a { color: var(--hp-green-deep); text-decoration: underline; }
.pp-updated { font-size: 14px; color: var(--hp-ink-muted); }
.pp-prose .pp-plain-list { display: flex; flex-direction: column; gap: 10px; padding-inline-start: 22px; list-style: disc; }
.pp-prose .pp-plain-list li { font-size: 16px; line-height: 1.6; }
.pp-prose .pp-plain-list li::marker { color: var(--hp-green); }
.pp-prose strong { color: var(--hp-navy); }

/* ---------- Info cards (data collection, compliance) ---------- */
.pp-cards { display: grid; grid-template-columns: 1fr; gap: 24px; }
.pp-card {
  padding: 24px;
  background: var(--hp-white);
  border: 1px solid var(--hp-outline);
  border-radius: 8px;
}
.pp-card h3 {
  display: flex; align-items: center; gap: 8px;
  color: var(--hp-navy); font-size: 20px; margin-bottom: 16px;
}
.pp-card h3 .hp__icon { color: var(--hp-primary); }
.pp-card ul { display: flex; flex-direction: column; gap: 8px; }
.pp-card li { color: var(--hp-ink-muted); font-size: 14px; line-height: 1.5; }
.pp-card li::before { content: "• "; color: var(--hp-green); }
.pp-card > p { color: var(--hp-ink-muted); font-size: 14px; line-height: 1.6; }

/* ---------- Callout ---------- */
.pp-callout {
  background: var(--hp-surface);
  border-left: 4px solid var(--hp-primary);
  border-radius: 8px;
  padding: 24px;
}
[dir="rtl"] .pp-callout { border-left: 0; border-right: 4px solid var(--hp-primary); }
.pp-callout h4 { color: var(--hp-navy); font-size: 16px; margin-bottom: 8px; }
.pp-callout p { color: var(--hp-ink-muted); font-size: 14px; font-style: italic; line-height: 1.6; }

/* ---------- Security banner (dark) ---------- */
.pp-secure {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(135deg, #0F2A30 0%, #001519 100%);
  color: var(--hp-white);
  border-radius: 12px;
}
.pp-secure__body { position: relative; z-index: 1; }
.pp-secure h2 { color: var(--hp-white); }
.pp-secure__badges { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.pp-badge {
  padding: 8px 16px;
  border: 1px solid var(--hp-navy-dim);
  border-radius: 4px;
  color: var(--hp-navy-dim);
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.pp-badge--mint { border-color: var(--hp-mint); color: var(--hp-mint); }
.pp-secure__lede { color: var(--hp-navy-dim); font-size: 16px; line-height: 1.6; margin-bottom: 24px; }
.pp-secure__grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pp-secure__item { display: flex; align-items: flex-start; gap: 12px; }
.pp-secure__item .hp__icon { color: var(--hp-mint); flex: none; }
.pp-secure__item strong { display: block; color: var(--hp-white); font-size: 14px; }
.pp-secure__item span { color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.pp-secure__watermark { position: absolute; inset-inline-end: -6%; top: -10%; opacity: 0.08; }
.pp-secure__watermark .hp__icon { width: 260px; height: 260px; color: var(--hp-white); }

/* ---------- Contact card ---------- */
.pp-contact {
  padding: clamp(24px, 4vw, 40px);
  border: 2px dashed var(--hp-outline);
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
}
.pp-contact .hp__icon { color: var(--hp-primary); width: 40px; height: 40px; }
.pp-contact h3 { color: var(--hp-navy); font-size: 20px; }
.pp-contact p { color: var(--hp-ink-muted); font-size: 16px; max-width: 34rem; line-height: 1.6; }
.pp-contact .hp-btn { background: var(--hp-primary); color: var(--hp-white); padding: 13px 30px; border-radius: 6px; }
.pp-contact .hp-btn:hover { background: var(--hp-navy); }

/* ---------- Cookie-types table ---------- */
.pp-table-wrap { overflow-x: auto; margin-block: 8px 8px; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pp-table th {
  text-align: start;
  padding: 12px 16px;
  border-bottom: 2px solid var(--hp-green);
  color: var(--hp-green-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pp-table td {
  padding: 16px;
  border-bottom: 1px solid var(--hp-outline);
  color: var(--hp-ink-muted);
  line-height: 1.5;
  vertical-align: top;
}
.pp-table tbody tr:last-child td { border-bottom: 0; }
.pp-table td:first-child { color: var(--hp-navy); font-weight: 700; white-space: nowrap; }
.pp-yes { color: var(--hp-green-deep); font-weight: 600; }
.pp-no { color: var(--hp-ink-muted); }
.pp-col-optional { display: none; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .pp-cards { grid-template-columns: 1fr 1fr; }
  .pp-secure__grid { grid-template-columns: 1fr 1fr; }
  .pp-col-optional { display: table-cell; }
}
@media (min-width: 960px) {
  .pp-layout { flex-direction: row; gap: 56px; }
  .pp-aside { width: 256px; }
  .pp-aside__sticky { position: sticky; top: 104px; }
}

/* ============================================================
   Generic marketing content pages (About, Careers, Contact,
   Press, Advertise, Terms, Cookies, Book a Demo). Shares the
   `.pp` document shell + `.hp` chrome, restyling the reusable
   `.marketing-*` content blocks in the same `--hp-*` palette.
   ============================================================ */
.mp-article { max-width: 48rem; }
.pp-prose.mp-article { gap: 0; }

.mp-article h2 {
  font-size: clamp(22px, 3.4vw, 28px);
  color: var(--hp-navy);
  line-height: 1.3;
  margin-block: 40px 16px;
}
.mp-article h2:first-child { margin-top: 0; }
.mp-article h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--hp-navy);
  margin-block: 24px 8px;
}
.mp-article p { font-size: 16px; line-height: 1.7; color: var(--hp-ink-muted); margin-block-end: 16px; }
.mp-article ul, .mp-article ol {
  margin-block-end: 16px;
  padding-inline-start: 24px;
  color: var(--hp-ink-muted);
  line-height: 1.7;
}
.mp-article li { margin-block-end: 8px; }
.mp-article a { color: var(--hp-green-deep); text-decoration: underline; text-underline-offset: 2px; }
.mp-article a:hover { color: var(--hp-primary); }
.mp-article strong { color: var(--hp-navy); }
.marketing-updated { font-size: 14px; color: var(--hp-ink-muted); margin-block-end: 24px; }

/* ---------- Stat / value grid ---------- */
.marketing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-block: 8px 24px;
}
/* Modern stat card: a hairline top accent bar and a subtle hover-lift bring
   the flat value grid in line with the portal's own `.stat-card` treatment,
   without changing the resting geometry. RTL-safe (logical properties only). */
.marketing-stat {
  position: relative;
  padding: 24px;
  background: var(--hp-white);
  border: 1px solid var(--hp-outline);
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--motion-fast, 150ms) ease,
              box-shadow var(--motion-fast, 150ms) ease,
              border-color var(--motion-fast, 150ms) ease;
}
.marketing-stat::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  background: linear-gradient(90deg, var(--hp-green), var(--hp-mint-dim));
  opacity: 0;
  transition: opacity var(--motion-fast, 150ms) ease;
}
.marketing-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 42, 48, 0.10);
  border-color: var(--hp-mint-dim);
}
.marketing-stat:hover::before { opacity: 1; }
.marketing-stat-value { display: block; font-size: 24px; font-weight: 700; color: var(--hp-navy); line-height: 1.2; margin-block-end: 4px; }
.marketing-stat-label { color: var(--hp-ink-muted); font-size: 14px; line-height: 1.5; }

/* ---------- Contact detail card ---------- */
/* A leading accent border marks this out as a highlighted info card and gives
   the contact rows a clear anchor (border-inline-start → RTL-correct). */
.marketing-contact-card {
  display: grid;
  gap: 12px;
  padding: 22px 24px;
  background: var(--hp-surface-low);
  border: 1px solid var(--hp-outline);
  border-inline-start: 3px solid var(--hp-green);
  border-radius: 12px;
  margin-block: 8px 24px;
  color: var(--hp-ink-muted);
  font-size: 16px;
}
.marketing-contact-card strong { color: var(--hp-navy); }

/* ---------- Book a Demo form ---------- */
.mp-article .field { margin-block-end: 20px; }
.mp-article .label {
  display: block;
  font-weight: 600;
  color: var(--hp-navy);
  margin-block-end: 8px;
  font-size: 14px;
}
.mp-article .field-help { color: var(--hp-ink-muted); font-weight: 400; }
.mp-article input,
.mp-article select,
.mp-article textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hp-outline);
  border-radius: 8px;
  background: var(--hp-white);
  color: var(--hp-ink, #121c2c);
  font: inherit;
  font-size: 16px;
}
.mp-article textarea { min-height: 120px; resize: vertical; }
.mp-article input:focus,
.mp-article select:focus,
.mp-article textarea:focus {
  outline: 2px solid var(--hp-green);
  outline-offset: 1px;
  border-color: var(--hp-green);
}
.mp-article .field-error { color: #ba1a1a; font-size: 14px; margin-block-start: 6px; }
.mp-article button[type="submit"],
.mp-article .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--hp-green);
  color: var(--hp-white);
  border: 0;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--motion-fast, 150ms);
}
.mp-article button[type="submit"]:hover,
.mp-article .btn-primary:hover { background: var(--hp-green-deep); }
.mp-article .alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-block-end: 20px;
  font-size: 15px;
}
.mp-article .alert-success { background: #e3f9ee; border: 1px solid var(--hp-mint-dim); color: var(--hp-green-deep); }
.mp-article .alert-error { background: #ffdad6; border: 1px solid #ba1a1a; color: #93000a; }

@media (min-width: 640px) {
  .marketing-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile polish ---------- */
/* On phones, justify the dense document/marketing prose so paragraphs fill the
   column with a clean right edge (looks far more professional than ragged,
   short mobile lines), with automatic hyphenation to avoid large word gaps.
   Headings, list markers and the lede stay left-aligned. */
@media (max-width: 767px) {
  .pp { padding-block: 32px; }
  .pp-head { padding-bottom: 24px; margin-bottom: 32px; }
  .pp-layout { gap: 28px; }
  .pp-article { gap: 44px; }

  .pp-prose p,
  .pp-prose .pp-plain-list li,
  .mp-article p,
  .mp-article li {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
  }

  /* Never justify inside cards/tables/contact blocks — short strings there look
     worse justified. */
  .pp-card p,
  .pp-card li,
  .pp-contact p,
  .pp-callout p,
  .marketing-contact-card,
  .marketing-stat-label { text-align: start; hyphens: manual; }

  .pp-secure__badges { gap: 10px; }
  .pp-badge { font-size: 11px; padding: 7px 12px; }
}

/* Keep justified text natural for RTL scripts (Arabic/Urdu) — inter-word
   justification and auto hyphenation both behave for RTL, so no override
   needed; this comment documents the intentional shared behavior. */

/* CRITICAL a11y: honor prefers-reduced-motion. main.css already neutralizes
   transition durations globally, but a :hover transform still lands instantly
   as a jump — cancel it outright for motion-sensitive users. Kept LAST in this
   file, mirroring the same convention in main.css/home.css. */
@media (prefers-reduced-motion: reduce) {
  .marketing-stat:hover { transform: none !important; }
}
