/* ATS Gen Pro — Policy Pages */

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --text: #e8edf4;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --warning: #f59e0b;
  --border: rgba(148, 163, 184, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 760px;
  --nav-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Background pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(59, 130, 246, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links a.active {
  color: var(--accent-hover);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
}

.menu-toggle:hover {
  background: var(--surface-2);
}

/* ── Main layout ── */
main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Home page ── */
.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-hover), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

.policy-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.policy-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.policy-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.card-icon.terms { background: rgba(59, 130, 246, 0.15); }
.card-icon.privacy { background: rgba(16, 185, 129, 0.15); }
.card-icon.refund { background: rgba(245, 158, 11, 0.15); }
.card-icon.delete { background: rgba(239, 68, 68, 0.15); }

.card-body h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.2rem;
  align-self: center;
  transition: transform 0.2s, color 0.2s;
}

.policy-card:hover .card-arrow {
  transform: translateX(4px);
  color: var(--accent-hover);
}

/* ── Policy page ── */
.policy-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.policy-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-hover);
  margin-bottom: 0.75rem;
}

.policy-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.policy-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.policy-content section {
  margin-bottom: 2rem;
}

.policy-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.policy-content p,
.policy-content li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.policy-content ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.policy-content li {
  margin-bottom: 0.4rem;
}

.policy-content li::marker {
  color: var(--accent);
}

.highlight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.highlight-box p {
  margin: 0;
  font-size: 0.9rem;
}

/* ── Delete account page ── */
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.info-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.delete-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.delete-form .form-group {
  margin-bottom: 1.25rem;
}

.delete-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.delete-form input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.delete-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.delete-form input[type="email"].invalid {
  border-color: #ef4444;
}

.form-check {
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 400 !important;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 0.4rem;
  min-height: 1.2em;
}

.btn-danger {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-danger:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: var(--surface);
}

.form-footer-note {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-footer-note a {
  color: var(--accent-hover);
  text-decoration: none;
}

.form-footer-note a:hover {
  text-decoration: underline;
}

.delete-success {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.75rem;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-success h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.delete-success p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 420px;
  margin: 0 auto 0.5rem;
}

.delete-success .success-note {
  font-size: 0.85rem;
  margin-top: 1rem;
}

.delete-success a {
  color: var(--accent-hover);
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

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

footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(15, 20, 25, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 0.85rem;
  }

  .policy-card {
    padding: 1.25rem;
  }

  main {
    padding: 1.75rem 1.25rem 3rem;
  }
}
