/* ==========================================================================
   RaccoonCorp - Modern Responsive Stylesheet
   Compatible with GitHub Pages & Google Play Console Verification Standards
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --secondary: #0ea5e9;
  --accent: #8b5cf6;
  
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.9);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;
  
  --border-color: #e2e8f0;
  --border-focus: #818cf8;
  
  --badge-bg: #e0e7ff;
  --badge-text: #3730a3;
  --badge-success-bg: #dcfce7;
  --badge-success-text: #166534;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --max-width: 1100px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0b0f19;
    --bg-card: #131b2e;
    --bg-card-alt: #1e293b;
    --bg-header: rgba(11, 15, 25, 0.88);
    
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-sub: #94a3b8;
    
    --border-color: #1e293b;
    --border-focus: #6366f1;
    
    --primary-light: rgba(79, 70, 229, 0.15);
    --badge-bg: rgba(99, 102, 241, 0.2);
    --badge-text: #a5b4fc;
    --badge-success-bg: rgba(34, 197, 94, 0.15);
    --badge-success-text: #86efac;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  }
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.brand-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border-radius: var(--radius-full);
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-switch a {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  color: var(--text-sub);
}

.lang-switch a:hover {
  text-decoration: none;
  color: var(--text-main);
}

.lang-switch a.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 350px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(14, 165, 233, 0.05) 50%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.hero h1 span.gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.45);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--bg-card-alt);
  border-color: var(--text-sub);
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-head {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem;
}

.section-head h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Grid & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

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

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* App Showcase Card */
.app-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.app-meta {
  flex-grow: 1;
}

.app-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  margin-top: 0.25rem;
}

.badge-live {
  background-color: var(--badge-success-bg);
  color: var(--badge-success-text);
}

.badge-dev {
  background-color: var(--badge-bg);
  color: var(--badge-text);
}

.app-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Verification Banner */
.verification-box {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 3rem 0;
}

.verification-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

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

/* Contact Box */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.contact-card h4 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.25rem;
}

.contact-card a {
  font-weight: 600;
}

/* Legal Documents Layout (Privacy & Terms) */
.legal-wrapper {
  padding: 3rem 0 5rem;
}

.legal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.legal-meta {
  color: var(--text-sub);
  font-size: 0.9rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legal-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Legal Table of Contents */
.legal-toc {
  position: sticky;
  top: 6rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.legal-toc h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  margin-bottom: 0.75rem;
}

.legal-toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-toc a {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  line-height: 1.4;
}

.legal-toc a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Legal Article Body */
.legal-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.legal-body h2 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.legal-body h2:first-of-type {
  margin-top: 0;
}

.legal-body h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin: 1.5rem 0 0.5rem;
}

.legal-body p {
  margin-bottom: 1.15rem;
}

.legal-body ul, .legal-body ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

.legal-body li {
  margin-bottom: 0.4rem;
}

.legal-box {
  background-color: var(--bg-card-alt);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.legal-box strong {
  color: var(--text-main);
}

/* Footer */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
  padding: 3.5rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: var(--text-sub);
  margin-top: 0.75rem;
  max-width: 320px;
  font-size: 0.9rem;
}

.footer-col h5 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--primary);
  text-decoration: none;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* Responsive */
@media (max-width: 860px) {
  .legal-container {
    grid-template-columns: 1fr;
  }
  
  .legal-toc {
    display: none; /* Hide TOC on mobile for cleaner reading */
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .verification-box {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  nav.main-nav {
    display: none;
  }
  
  nav.main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    gap: 1rem;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero {
    padding: 3.5rem 0 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
}
