/* ============================================================
   TajFin — Privacy Policy
   Design tokens + components, Apple.com–inspired minimalism
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-elevated: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --divider: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --mark-bg: #1d1d1f;
  --mark-fg: #ffffff;

  --content-max: 980px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #1d1d1f;
  --text: #f5f5f7;
  --text-secondary: #86868b;
  --divider: rgba(255, 255, 255, 0.12);
  --accent: #2997ff;
  --nav-bg: rgba(0, 0, 0, 0.72);
  --mark-bg: #f5f5f7;
  --mark-fg: #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--divider);
}

.nav .wrap {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-switch button[aria-current="true"] {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.icon-btn {
  border: 1px solid var(--divider);
  background: var(--bg-elevated);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(40px, 7vw, 72px) clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--divider);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 18px;
  max-width: 16ch;
}

.hero .lead {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 46ch;
  line-height: 1.5;
  margin: 0 0 18px;
}

.updated-badge {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ---------- Hero phone mockup stage ---------- */
.phone-stage {
  position: relative;
  height: clamp(300px, 38vw, 420px);
  justify-self: center;
  align-self: center;
}

.phone-mock {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(108px, 13vw, 148px);
  aspect-ratio: 240 / 521;
  border-radius: 22px;
  background: #0b0b0d;
  padding: 5px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.12);
  opacity: 0;
  animation: phone-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.phone-mock::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 32%;
  height: 8px;
  background: #0b0b0d;
  border-radius: 8px;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-mock .screen {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}

.phone-mock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.phone-mock--left {
  --x: -108%;
  --y: -46%;
  --r: -11deg;
  z-index: 1;
  animation-delay: 0.05s;
}
.phone-mock--right {
  --x: 8%;
  --y: -46%;
  --r: 11deg;
  z-index: 2;
  animation-delay: 0.18s;
}
.phone-mock--center {
  --x: -50%;
  --y: -50%;
  --r: 0deg;
  z-index: 3;
  width: clamp(118px, 14vw, 158px);
  animation-delay: 0.32s;
}

@keyframes phone-in {
  from {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 26px)) rotate(calc(var(--r) + 6deg)) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-mock {
    opacity: 1;
    animation: none;
    transform: translate(var(--x), var(--y)) rotate(var(--r));
  }
}

@media (max-width: 780px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .phone-stage {
    order: -1;
    height: clamp(220px, 62vw, 300px);
    margin-bottom: 8px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(32px, 4.5vw, 56px);
  border-bottom: 1px solid var(--divider);
}

.section:last-of-type { border-bottom: none; }

.section-num {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.section h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
}

.section .lead {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin: 0 0 24px;
  max-width: 60ch;
}

.section p {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  max-width: 68ch;
}

.section p + p { margin-top: 10px; }

/* ---------- "What we don't collect" grid (signature element) ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.mark-card {
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mark-bg);
  color: var(--mark-fg);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.mark-card h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.mark-card p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Badges (need section) ---------- */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.badge {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 8px 16px;
}

/* ---------- Contact card ---------- */
.contact-card {
  margin-top: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: grid;
  gap: 16px;
  max-width: 480px;
}

.contact-row dt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.contact-row dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.footer {
  padding-block: 32px;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ---------- Reveal animation ----------
   Hidden only when html.js is present (set by a synchronous inline
   script in <head>, before first paint). No JS / JS disabled →
   the class is never added → content is visible immediately. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] { transition: none; opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }
  .nav-controls { gap: 10px; }
  .lang-switch button { padding: 5px 8px; font-size: 0.7rem; }
}
