/* 
   QRWork - Legal Pages Style Sheet
   Aesthetic: Premium, High-Tech, Clean White Theme with Neon Cyan and Purple Accents.
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  /* Color Palette */
  --bg-primary: #FAF9F6;       /* Warm soft off-white background */
  --bg-secondary: #FFFFFF;     /* Pure white for cards and headers */
  --bg-accent-soft: #F0F6F6;   /* Light cyan tint for subtle highlights */
  
  --text-main: #0B132B;        /* Very dark navy/charcoal for premium text contrast */
  --text-muted: #4A5568;       /* Steel gray for subtext and descriptions */
  
  --color-primary: #008B8B;    /* Primary brand color - dark cyan */
  --color-primary-hover: #005F5F;
  --color-cyan: #00B4D8;       /* Accent color - vibrant sunlit cyan */
  --color-purple: #8338EC;     /* Accent color - glowing purple */
  
  --border-color: #E2E8F0;     /* Clean border line color */
  --border-accent: #00B4D8;
  
  /* Layout and Spacing */
  --max-width-content: 840px;  /* Optimal reading width for documents */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadow & Transitions */
  --shadow-sm: 0 2px 4px rgba(0, 180, 216, 0.04);
  --shadow-md: 0 10px 30px rgba(0, 180, 216, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 180, 216, 0.1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 76px; /* Height of the fixed header */
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan);
}

/* For modern scrollbar-width (Firefox) */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: #CBD5E1 var(--bg-primary);
    scrollbar-width: thin;
  }
}

/* --- Container & Layouts --- */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header & Navigation --- */
.main-header {
  background-color: #FFFFFF !important;
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  padding: 16px 0 !important;
  transition: var(--transition-smooth);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.brand-wrapper:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 20%;
  border: 2px solid var(--color-cyan);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

/* --- Hero Section --- */
.hero {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 60px 0 40px 0;
  text-align: center;
}

.hero-logo-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px auto;
}

.hero-logo {
  width: 100%;
  height: 100%;
  border-radius: 20%;
  border: 3px solid var(--color-cyan);
  object-fit: cover;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.hero-logo-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px dashed var(--color-purple);
  border-radius: 25%;
  animation: rotateDashed 25s linear infinite;
  z-index: 1;
}

@keyframes rotateDashed {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* --- Dashboard Grid & Cards --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.legal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 32px;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.legal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-accent-soft);
  color: var(--color-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.legal-card:hover .card-icon {
  background-color: var(--color-cyan);
  color: #FFFFFF;
}

.legal-card h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.legal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-primary);
  transition: var(--transition-smooth);
}

.legal-card:hover .card-link {
  color: var(--color-cyan);
}

.card-link svg {
  transition: transform 0.2s ease;
}

.legal-card:hover .card-link svg {
  transform: translateX(4px);
}

/* --- Document Detail Styles --- */
.doc-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 40px;
  margin: 40px 0;
}

.doc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.doc-back-link:hover {
  color: var(--color-cyan);
}

.doc-back-link svg {
  transition: transform 0.2s ease;
}

.doc-back-link:hover svg {
  transform: translateX(-4px);
}

.doc-card h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.doc-content h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.doc-content p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 20px;
}

.doc-content ul {
  margin-bottom: 24px;
  padding-left: 20px;
}

.doc-content li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* --- Footer --- */
footer {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: auto;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 20%;
  border: 1px solid var(--color-cyan);
  object-fit: cover;
}

.copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.powered-by {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.powered-by a {
  color: var(--color-cyan);
  text-decoration: none;
  font-weight: 600;
}

.powered-by a:hover {
  text-decoration: underline;
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
  .doc-card {
    padding: 24px;
    margin: 20px 0;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
}
