/* ============================================================
   FABRIC MEMORY KINGDOM – Privacy Policy Stylesheet
   Color palette extracted from logo:
     Deep purple: #2D1B5E
     Royal purple: #4A2080
     Gold:         #C9922A
     Bright gold:  #F0C040
     Magenta gem:  #B03090
     Teal/cyan:    #1A8EA0
     Dark bg:      #F5F3FA  (page background – light tint of purple)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple-deep:   #2D1B5E;
  --purple-royal:  #4A2080;
  --purple-mid:    #6B3FA0;
  --gold:          #C9922A;
  --gold-light:    #F0C040;
  --magenta:       #B03090;
  --teal:          #1A8EA0;
  --bg-page:       #F7F5FC;
  --bg-card:       #FFFFFF;
  --bg-section-alt:#EEE9F8;
  --text-primary:  #1A1228;
  --text-secondary:#4A3D6A;
  --text-muted:    #7A6E96;
  --divider:       #DDD5F0;
  --radius-lg:     16px;
  --radius-md:     10px;
  --radius-sm:     6px;
  --shadow-sm:     0 2px 8px rgba(45,27,94,0.08);
  --shadow-md:     0 6px 24px rgba(45,27,94,0.12);
  --shadow-lg:     0 16px 48px rgba(45,27,94,0.16);
  --transition:    0.25s ease;
  --max-width:     780px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-royal) 55%, var(--purple-mid) 100%);
  padding: 48px 24px 0;
  position: relative;
  overflow: hidden;
}

/* decorative radial glow */
.site-header::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(201,146,42,0.22) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
  padding-bottom: 40px;
}

.header-logo-wrap {
  flex-shrink: 0;
  width: 90px; height: 90px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(240,192,64,0.45), var(--shadow-lg);
  background: rgba(255,255,255,0.08);
}

.header-logo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.header-text { flex: 1; }

.app-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.header-subtitle {
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.9;
}

/* wave transition */
.header-wave {
  display: block;
  line-height: 0;
  margin-top: -2px;
}
.header-wave svg { width: 100%; display: block; }

/* ── Main / Article ───────────────────────────────────────── */
.page-main {
  padding: 0 16px 80px;
}

.policy-article {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Effective Date Banner ────────────────────────────────── */
.effective-banner {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
}

.badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--purple-royal), var(--purple-mid));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 20px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
}

/* ── Intro Block ──────────────────────────────────────────── */
.policy-intro {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 20px 0 0;
  box-shadow: var(--shadow-sm);
}

.intro-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.intro-meta strong { color: var(--purple-royal); font-weight: 600; }

.intro-body {
  font-size: 0.97rem;
  color: var(--text-primary);
  margin-top: 14px;
  line-height: 1.8;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--divider) 30%, var(--divider) 70%, transparent);
  margin: 36px 0;
}

/* ── Policy Sections ──────────────────────────────────────── */
.policy-section {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.policy-section:hover {
  box-shadow: var(--shadow-md);
}

.policy-section p {
  font-size: 0.97rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin-top: 14px;
}

.policy-section p:first-of-type { margin-top: 16px; }

/* ── Section Heading ──────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1.3;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-royal), var(--purple-mid));
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(74,32,128,0.35);
}

/* ── List Styles ──────────────────────────────────────────── */
.policy-list {
  margin: 16px 0 4px 0;
  padding: 0;
  list-style: none;
}

.policy-list.no-icon li {
  position: relative;
  padding: 8px 14px 8px 40px;
  font-size: 0.93rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.policy-list.no-icon li:hover {
  background: var(--bg-section-alt);
}

.policy-list.no-icon li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--magenta));
}

/* ── Permission Badge ─────────────────────────────────────── */
.permission-badge-wrap { margin: 16px 0; }

.permission-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--teal), #0E7285);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 22px;
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 12px rgba(26,142,160,0.35);
}

/* ── Contact Card ─────────────────────────────────────────── */
.contact-section { border-left: 4px solid var(--gold); }

.contact-card {
  margin-top: 20px;
  background: linear-gradient(135deg, #F3EDF8, #EAE2F5);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--divider);
}

.contact-row:last-child { border-bottom: none; }

.contact-label {
  flex-shrink: 0;
  width: 90px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 1px;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

.contact-link {
  color: var(--purple-royal);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.contact-link:hover { color: var(--magenta); text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-royal) 100%);
  padding: 48px 24px 40px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(240,192,64,0.4), var(--shadow-md);
  margin-bottom: 16px;
}

.footer-company {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.footer-contact a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-contact a:hover { color: #FFFFFF; }

.footer-updated {
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
}

/* ── Back-to-Top Button ───────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 999;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--purple-royal), var(--purple-mid));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(74,32,128,0.4);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.25s ease;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--gold), var(--magenta));
  box-shadow: 0 6px 24px rgba(176,48,144,0.45);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; text-align: center; gap: 16px; padding-bottom: 36px; }
  .app-name { font-size: 1.1rem; }

  .policy-section { padding: 24px 20px; }
  .policy-intro  { padding: 22px 20px; }

  .section-heading { font-size: 1rem; gap: 10px; }
  .section-num { width: 30px; height: 30px; font-size: 0.78rem; }

  .contact-row { flex-direction: column; gap: 4px; }
  .contact-label { width: auto; }

  .back-to-top { bottom: 20px; right: 16px; width: 42px; height: 42px; }
}

@media (max-width: 400px) {
  .policy-section { padding: 20px 14px; }
  .policy-intro  { padding: 18px 14px; }
}
