/*
 * PDPO Compliance Tool - Main Stylesheet
 * Green accent: #00C853
 * Dark: #0d1117
 * Font: Noto Sans TC (Chinese) + Inter (English)
 */

/* =============================================
   1. CSS VARIABLES
   ============================================= */
:root {
  --accent:        #00C853;
  --accent-dark:   #00a844;
  --accent-light:  #e8f5e9;
  --dark-bg:       #0d1117;
  --dark-card:     #161b22;
  --dark-border:   #30363d;
  --text-primary:  #1a1a2e;
  --text-muted:    #6c757d;
  --border-radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.16);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.20);
}

/* =============================================
   2. BASE & TYPOGRAPHY
   ============================================= */
* { box-sizing: border-box; }

body {
  font-family: 'Noto Sans TC', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-page { background: #fff; }

h1, h2, h3, h4, h5 {
  font-family: 'Noto Sans TC', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* =============================================
   3. COLOUR UTILITIES
   ============================================= */
.text-accent        { color: var(--accent) !important; }
.bg-accent          { background-color: var(--accent) !important; }
.bg-accent-subtle   { background-color: var(--accent-light) !important; }
.border-accent      { border-color: var(--accent) !important; }
.text-white-80      { color: rgba(255,255,255,.8); }

/* =============================================
   4. BUTTONS
   ============================================= */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: all .2s ease;
}
.btn-accent:hover, .btn-accent:focus {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,200,83,.35);
}
.btn-accent:active { transform: translateY(0); }

.btn-accent-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-weight: 600;
}
.btn-accent-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* =============================================
   5. NAVBAR
   ============================================= */
.bg-dark-custom {
  background-color: var(--dark-bg) !important;
  border-bottom: 1px solid var(--dark-border);
}

.brand-text { font-size: 1.15rem; color: #fff; }
.brand-icon { font-size: 1.3rem; }

.navbar .nav-link {
  color: rgba(255,255,255,.75) !important;
  font-size: .9rem;
  font-weight: 500;
  padding: .5rem .75rem !important;
  border-radius: 8px;
  transition: all .15s;
}
.navbar .nav-link:hover, .navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.08);
}

.user-avatar {
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
}

.lang-btn {
  font-size: .8rem !important;
  padding: .3rem .7rem !important;
  border-color: rgba(255,255,255,.25) !important;
  color: rgba(255,255,255,.75) !important;
}
.lang-btn:hover {
  border-color: rgba(255,255,255,.5) !important;
  color: #fff !important;
}

/* =============================================
   6. HERO SECTION
   ============================================= */
.hero-section {
  background: linear-gradient(135deg, #0d1117 0%, #1a1a2e 40%, #0d2440 100%);
  min-height: 92vh;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,200,83,.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300c853' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Hero mockup */
.hero-mockup { perspective: 1000px; }
.mockup-card {
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform .3s ease;
  max-width: 360px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
}
.mockup-card:hover { transform: rotateY(-4deg) rotateX(2deg); }
.mockup-header {
  background: #f5f5f5;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e0e0e0;
}
.mockup-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.mockup-dot.red    { background: #ff5f57; }
.mockup-dot.yellow { background: #febc2e; }
.mockup-dot.green  { background: #28c840; }
.mockup-url {
  margin-left: 8px;
  font-size: .75rem;
  color: #999;
  font-family: monospace;
}
.tracker-item {
  font-size: .85rem;
  padding: 4px 0;
  color: #333;
  border-bottom: 1px solid #f5f5f5;
}
.pulse-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.2); }
}

/* =============================================
   7. SECTIONS - LANDING
   ============================================= */

/* Section 2: Requirements */
.requirement-card {
  border-radius: var(--border-radius) !important;
  transition: transform .2s, box-shadow .2s;
}
.requirement-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md) !important;
}
.req-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}

/* Section 3: Steps */
.step-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--border-radius);
  transition: all .2s;
}
.step-card:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-4px);
}
.step-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(0,200,83,.15);
  line-height: 1;
  margin-bottom: .5rem;
  font-variant-numeric: tabular-nums;
}

/* Section 4: Features */
.feature-card {
  border-radius: var(--border-radius) !important;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md) !important;
}
.icon-circle {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* Section 5: Pricing */
.pricing-card {
  border-radius: var(--border-radius) !important;
  transition: transform .2s;
}
.pricing-card:hover { transform: translateY(-4px); }

.pricing-featured {
  background: linear-gradient(135deg, #0d1117, #1a2744) !important;
  transform: scale(1.03);
}
.pricing-featured:hover { transform: scale(1.03) translateY(-4px); }

.popular-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.pricing-tier-label { font-size: 1rem; letter-spacing: .05em; text-transform: uppercase; }
.pricing-price { font-size: 2.8rem; font-weight: 800; line-height: 1; }
.pricing-price .currency { font-size: 1.2rem; vertical-align: super; }
.pricing-price .period { font-size: 1rem; font-weight: 400; color: var(--text-muted); }

/* Section 6: Testimonials */
.testimonial-card {
  border-radius: var(--border-radius) !important;
  transition: transform .2s;
}
.testimonial-card:hover { transform: translateY(-4px); }
.testimonial-quote {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
  font-style: italic;
}
.testimonial-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Section 7: FAQ */
.accordion-button:not(.collapsed) {
  background-color: var(--accent-light);
  color: var(--text-primary);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(0,200,83,.25); }
.accordion-button::after {
  filter: none;
}

/* =============================================
   8. DASHBOARD & APP PAGES
   ============================================= */
.stat-card {
  border-radius: var(--border-radius) !important;
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}

/* =============================================
   9. AUTH PAGES
   ============================================= */
.auth-page { background: linear-gradient(135deg, #f0f4f8 0%, #e8f5e9 100%); }
.auth-wrapper .card { border-radius: 20px !important; }

/* =============================================
   10. FOOTER
   ============================================= */
.footer-custom {
  background-color: var(--dark-bg);
  border-top: 1px solid var(--dark-border);
  margin-top: auto;
}
.footer-custom .text-muted,
.footer-custom a.text-muted {
  color: rgba(255, 255, 255, .55) !important;
}
.footer-custom .text-muted:hover,
.footer-custom a.text-muted:hover {
  color: rgba(255, 255, 255, .85) !important;
}
.hover-accent:hover { color: var(--accent) !important; }

/* =============================================
   11. DOCUMENT CONTENT (markdown rendered)
   ============================================= */
.document-content h1, .document-content h2 {
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: .4rem;
  margin-top: 1.5rem;
}
.document-content h3 { color: #333; margin-top: 1.2rem; }
.document-content p  { color: #444; margin-bottom: 1rem; }
.document-content ul { padding-left: 1.5rem; }
.document-content ul li { margin-bottom: .4rem; color: #444; }
.document-content strong { color: #222; }

/* =============================================
   12. CARDS & SHADOWS
   ============================================= */
.shadow-sm  { box-shadow: var(--shadow-sm) !important; }
.shadow-md  { box-shadow: var(--shadow-md) !important; }
.shadow-lg  { box-shadow: var(--shadow-lg) !important; }
.shadow-xl  { box-shadow: var(--shadow-xl) !important; }

.card { border-radius: var(--border-radius) !important; }

/* =============================================
   13. RESPONSIVE / MOBILE
   ============================================= */
@media (max-width: 768px) {
  .hero-section   { min-height: auto; padding: 4rem 0 3rem; }
  .pricing-featured { transform: none; }
  .mockup-card    { transform: none; }
  .display-4      { font-size: 2.2rem !important; }
  .step-number    { font-size: 2.5rem; }
}

@media (max-width: 576px) {
  .btn-lg { font-size: .95rem; padding: .65rem 1.2rem; }
  .pricing-price { font-size: 2.2rem; }
}

/* =============================================
   14. UTILITIES
   ============================================= */
.bg-dark-subtle     { background-color: rgba(0,0,0,.04) !important; }
.bg-accent-subtle   { background-color: var(--accent-light) !important; }

.rounded-4  { border-radius: 1rem !important; }
.rounded-5  { border-radius: 1.5rem !important; }

/* Progress bars in consent log */
.progress { background-color: #e9ecef; }

/* Font mono for code blocks */
.font-monospace { font-family: 'SFMono-Regular', Consolas, monospace !important; }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Print styles for documents */
@media print {
  .navbar, .footer-custom, .btn { display: none !important; }
  .document-content { font-size: 12pt; line-height: 1.6; }
}
