/* ===== Custom Properties (shared with wt-progress) ===== */
:root {
  --bg-primary: #0D0F1A;
  --bg-secondary: #161929;
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(37,42,58,0.5);
  --card-radius: 12px;
  --red: #C62828;
  --pink: #E53935;
  --gold: #F5A623;
  --green: #22c55e;
  --warning: #f59e0b;
  --text-primary: #f1f5f9;
  --text-secondary: #e2e8f0;
  --text-muted: #6B7194;
  --text-dim: #4A5068;
}

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 40%, #0c0a14 70%, var(--bg-primary) 100%);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  color-scheme: dark;
  overflow-x: hidden;
}

::selection { background: rgba(229,57,53,0.2); color: #fff; }

*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(229,57,53,0.2);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar       { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* Staggered entrance */
.header       { animation: fadeInUp 0.4s ease both; }
.legal-grid   { animation: fadeInUp 0.4s ease 0.1s both; }
.contact-section { animation: fadeInUp 0.4s ease 0.2s both; }

/* ===== Container ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.header {
  padding: 3rem 0 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(229,57,53,0.05) 0%, transparent 70%);
  animation: pulseGlow 6s ease-in-out infinite;
  pointer-events: none;
}

.legal-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 3rem;
  letter-spacing: 3px;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--gold), #FFD054);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.legal-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.update-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}

.update-badge {
  padding: 6px 16px;
  background: var(--card-bg);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--card-border);
}

.legal-badge {
  background: rgba(245,166,35,0.1);
  color: var(--gold);
  border-color: rgba(245,166,35,0.3);
}

.updated-badge {
  background: rgba(34,197,94,0.1);
  color: var(--green);
  border-color: rgba(34,197,94,0.3);
}

/* ===== Main Content ===== */
.main-content {
  padding: 2rem 0;
}

/* ===== Legal Card Grid ===== */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 1.75rem;
  position: relative;
  transition: all 0.2s ease;
}

.legal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(229,57,53,0.10);
  border-color: rgba(229,57,53,0.18);
}

.card-icon {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  opacity: 0.2;
  line-height: 0;
}

.card-header {
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red), var(--pink));
  flex-shrink: 0;
}

.card-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.card-content p + p {
  margin-top: 0.75rem;
}

.card-content a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.15s ease;
}

.card-content a:hover {
  color: #FFD054;
  border-bottom-color: var(--gold);
}

/* ===== Contact Section ===== */
.contact-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
  transition: border-color 0.2s ease;
}

.contact-section:hover {
  border-color: rgba(229,57,53,0.15);
}

.contact-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.contact-header h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.contact-header h2::before {
  content: '';
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red), var(--pink));
  flex-shrink: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.contact-item {
  background: rgba(255,255,255,0.02);
  padding: 1.25rem;
  border-radius: var(--card-radius);
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  gap: 1rem;
  align-items: start;
  transition: all 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  border-color: rgba(229,57,53,0.12);
}

.contact-icon {
  min-width: 36px;
  line-height: 0;
  color: var(--gold);
  opacity: 0.6;
}

.contact-content strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  color: var(--gold);
}

.contact-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-content a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s ease;
}

.contact-content a:hover {
  color: #FFD054;
}

/* ===== Footer (matches wt-progress .page-footer) ===== */
.page-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #888;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  margin-top: 2rem;
}

.page-footer p { margin: 0; }

.page-footer a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.page-footer a:hover {
  color: #FFD054;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-disclaimer {
  color: #666;
  font-size: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.footer-tip {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: #888;
}

.footer-tip a {
  color: #F5A623;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.25s ease;
}

.footer-tip a:hover {
  color: #FFD054;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}

.footer-links a.feedback { color: #F5A623; }
.footer-links a.feedback:hover { color: #FFD054; }

/* ===== Scroll Animations ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hover-only effects (prevent sticky hovers on touch) ===== */
@media (hover: none) {
  .legal-card:hover,
  .contact-item:hover,
  .contact-section:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { padding: 0 14px; }

  .header { padding: 2rem 0 1.5rem; }

  .legal-title { font-size: 2.2rem; letter-spacing: 2px; }

  .legal-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .contact-section { padding: 1.5rem; }

  .page-footer { font-size: 0.8rem; padding: 1.5rem 0.75rem; }
}

@media (max-width: 480px) {
  .legal-title { font-size: 1.8rem; }

  .legal-card { padding: 1.5rem; }

  .update-badges { flex-direction: column; align-items: center; }

  .footer-links { gap: 1rem; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
