/* ===================================
   AureliaLife Premium Website
   Responsive Stylesheet
   =================================== */

/* ------------------------------------
   Small Devices (640px and up)
   ------------------------------------ */
@media (min-width: 640px) {
  .hero-title {
    font-size: var(--font-size-6xl);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-xl);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .laws-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------
   Tablets (768px and up)
   ------------------------------------ */
@media (min-width: 768px) {
  .container {
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
  }
  
  .hero-title {
    font-size: var(--font-size-6xl);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-2xl);
  }
  
  .hero-logo {
    width: 220px;
  }
  
  .page-header h1 {
    font-size: var(--font-size-5xl);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
  }
  
  .laws-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section {
    padding: var(--spacing-3xl) 0;
  }
  
  .section-title {
    margin-bottom: var(--spacing-2xl);
  }
}

/* ------------------------------------
   Desktops (1024px and up)
   ------------------------------------ */
@media (min-width: 1024px) {
  .container {
    max-width: 1280px;
    padding-left: var(--spacing-2xl);
    padding-right: var(--spacing-2xl);
  }
  
  .hero-title {
    font-size: var(--font-size-7xl);
  }
  
  .hero-logo {
    width: 260px;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .laws-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .page-header h1 {
    font-size: var(--font-size-6xl);
  }
  
  .section {
    padding: var(--spacing-4xl) 0;
  }
  
  /* Law page layout with sidebar */
  .law-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-3xl);
    align-items: start;
  }
  
  .toc-sidebar {
    position: sticky;
    top: 100px;
  }
}

/* ------------------------------------
   Large Screens (1280px and up)
   ------------------------------------ */
@media (min-width: 1280px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: 5.5rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .laws-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .downloads-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------
   Mobile Navigation (below 1024px)
   ------------------------------------ */
@media (max-width: 1023px) {
  .navbar-toggle {
    display: flex;
  }
  
  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(60px + var(--spacing-2xl)) var(--spacing-2xl) var(--spacing-2xl);
    gap: var(--spacing-md);
    transition: right var(--transition-base);
    box-shadow: var(--shadow-xl);
    border-left: 1px solid var(--primary-border);
    overflow-y: auto;
  }
  
  .navbar-menu.active {
    right: 0;
  }
  
  .navbar-link {
    font-size: var(--font-size-lg);
    width: 100%;
    padding: var(--spacing-md) 0;
  }
  
  .navbar-link::after {
    display: none;
  }
  
  /* Mobile overlay */
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: -1;
  }
  
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    z-index: var(--z-modal-backdrop);
  }
  
  /* Law page - hide sidebar on mobile */
  .law-page-layout {
    grid-template-columns: 1fr;
  }
  
  .toc-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    margin-bottom: var(--spacing-2xl);
  }
}

/* ------------------------------------
   Small Mobile (below 640px)
   ------------------------------------ */
@media (max-width: 639px) {
  :root {
    --font-size-7xl: 3rem;
    --font-size-6xl: 2.5rem;
    --font-size-5xl: 2rem;
    --font-size-4xl: 1.75rem;
  }
  
  .hero {
    min-height: 100vh;
    padding: var(--spacing-3xl) 0;
  }
  
  .hero-title {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--spacing-md);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-2xl);
  }
  
  .hero-logo {
    width: 140px;
    margin-bottom: var(--spacing-xl);
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .features-grid,
  .laws-grid,
  .downloads-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .card {
    padding: var(--spacing-xl);
  }
  
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  .section-title {
    margin-bottom: var(--spacing-xl);
  }
  
  .page-header {
    padding: calc(60px + var(--spacing-2xl)) 0 var(--spacing-2xl);
  }
  
  .page-header h1 {
    font-size: var(--font-size-3xl);
  }
  
  .page-header p {
    font-size: var(--font-size-base);
  }
  
  .btn-xl {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: var(--font-size-base);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .download-card {
    padding: var(--spacing-xl);
  }
  
  .accordion-header {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-base);
  }
  
  .accordion-body {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
  }
}

/* ------------------------------------
   Touch Device Optimizations
   ------------------------------------ */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  .law-card:hover {
    transform: none;
  }
  
  .download-card:hover {
    transform: none;
  }
  
  .navbar-link:hover::after {
    width: 0;
  }
  
  .navbar-link.active::after {
    width: 100%;
  }
}

/* ------------------------------------
   Print Styles
   ------------------------------------ */
@media print {
  .navbar,
  .hero::before,
  .bg-gradient-orbs,
  .mobile-overlay {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card,
  .law-card,
  .download-card,
  .accordion {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }
  
  a {
    color: #0066cc;
  }
}

/* ------------------------------------
   High Contrast Mode
   ------------------------------------ */
@media (prefers-contrast: high) {
  :root {
    --primary-border: rgba(141, 247, 247, 0.6);
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
  }
  
  .card,
  .law-card,
  .download-card,
  .accordion {
    border-width: 2px;
  }
}

/* ------------------------------------
   Dark Mode Preferences (already dark)
   ------------------------------------ */
@media (prefers-color-scheme: light) {
  /* Keep dark theme as default */
  /* This website is designed as dark mode */
}
