/* ==========================================================================
   Amit Lal · App Privacy Hub — shared stylesheet
   Dark theme matching the PyMaster app branding (constants/colors.ts)
   ========================================================================== */

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-light: #1a1a24;
  --card: #16161f;
  --border: #2a2a3a;
  --text: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --cyan: #00d9ff;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --success: #10b981;
  --gold: #ffd700;
  --gradient: linear-gradient(135deg, #00d9ff 0%, #8b5cf6 100%);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 820px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle gradient glow at the top of the page */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  background: radial-gradient(
    1200px 420px at 50% -120px,
    rgba(0, 217, 255, 0.12),
    rgba(139, 92, 246, 0.08) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 22px 72px;
}

/* ---------- Brand / header ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
  font-size: 15px;
}

.brand .dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gradient);
  display: inline-block;
}

.hero {
  text-align: center;
  margin: 28px 0 8px;
}

.hero .icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 217, 255, 0.12);
  border: 1px solid rgba(0, 217, 255, 0.25);
  font-size: 34px;
}

h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 auto;
  max-width: 560px;
}

.updated {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Cards (app hub) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.app-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
  color: var(--text);
}

.app-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: rgba(0, 217, 255, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.app-card .emoji {
  font-size: 30px;
}

.app-card h3 {
  margin: 12px 0 6px;
  font-size: 18px;
}

.app-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.app-card .go {
  margin-top: 14px;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
}

.app-card.soon {
  opacity: 0.55;
  pointer-events: none;
}

.badge-soon {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Policy document ---------- */
.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px clamp(20px, 4vw, 40px);
  margin-top: 28px;
}

.doc section {
  margin-bottom: 26px;
}

.doc h2 {
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--text);
}

.doc h2 .num {
  color: var(--cyan);
  font-weight: 700;
  margin-right: 8px;
}

.doc p {
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.doc ul {
  margin: 8px 0 12px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.doc li {
  margin: 6px 0;
}

.doc strong {
  color: var(--text);
}

.callout {
  background: rgba(0, 217, 255, 0.07);
  border: 1px solid rgba(0, 217, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 16px 0;
  color: var(--text-secondary);
}

.callout strong {
  color: var(--cyan);
}

/* Table of contents */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 26px;
}

.toc h4 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
}

.toc li {
  margin: 4px 0;
}

/* Contact button */
.contact {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient);
  color: #05121a;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

/* ---------- Credits page ---------- */
.credit-feature {
  border-radius: var(--radius);
  padding: 2px;
  background: var(--gradient);
  margin: 28px 0 10px;
  box-shadow: 0 12px 34px rgba(0, 217, 255, 0.12);
}

.credit-feature .inner {
  background: var(--surface);
  border-radius: calc(var(--radius) - 2px);
  padding: 30px clamp(20px, 4vw, 38px);
  text-align: center;
}

.credit-feature .role {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--cyan);
  font-weight: 700;
}

.credit-feature .name {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  margin: 10px 0 6px;
  letter-spacing: -0.5px;
}

.credit-feature .who {
  color: var(--text-secondary);
  margin: 0;
  font-size: 15px;
}

.credit-meta {
  display: grid;
  gap: 10px;
  margin: 6px 0 4px;
}

.credit-meta .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.credit-meta .k {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.credit-meta .v {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

/* Service / data tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 4px;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

.table th {
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ---------- Footer / nav ---------- */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 28px 20px 48px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

footer a {
  color: var(--text-secondary);
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* ---------- Print (App reviewers / PDF export) ---------- */
@media print {
  body {
    background: #fff;
    color: #111;
  }
  body::before {
    display: none;
  }
  .doc,
  .toc,
  .callout {
    border-color: #ddd;
    background: #fff;
  }
  .doc p,
  .doc ul,
  .doc li,
  .table td {
    color: #333;
  }
  a {
    color: #0a58ca;
  }
}
