/* ============================================
   Freedom Ledger Financial, Inc
   Responsive Styles
   ============================================ */

/* Breakpoints:
   Mobile:  320px - 767px
   Tablet:  768px - 1023px
   Desktop: 1024px+
   Large:   1440px+
*/

/* ============================================
   Tablet (768px - 1023px)
   ============================================ */

@media (max-width: 1023px) {
  /* Container */
  .container {
    --container-padding: var(--space-3);
  }

  /* Typography */
  .hero-title {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .section-title {
    font-size: 40px;
  }

  .page-title {
    font-size: 48px;
  }

  .product-detail-title {
    font-size: 48px;
  }

  .cta-title {
    font-size: 40px;
  }

  /* Value Grid */
  .value-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
  }

  /* Projects Grid */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Contact */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ============================================
   Mobile (320px - 767px)
   ============================================ */

@media (max-width: 767px) {
  /* Container */
  .container {
    --container-padding: var(--space-2);
  }

  /* Typography Scale - Mobile */
  :root {
    --font-size-6xl: 40px;
    --font-size-5xl: 36px;
    --font-size-4xl: 32px;
    --font-size-3xl: 28px;
    --font-size-2xl: 24px;
    --font-size-xl: 20px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 24px;
  }

  /* Header & Navigation */
  .nav {
    padding: var(--space-2) 0;
  }

  .logo-img {
    height: 32px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background-color: var(--color-bg-primary);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
  }

  .nav-menu.active {
    max-height: 400px;
  }

  .nav-item {
    border-bottom: 1px solid var(--color-border-light);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: var(--space-2);
  }

  .nav-link.active::after {
    display: none;
  }

  /* Hero Section */
  .hero {
    padding: var(--space-8) 0 var(--space-6);
  }

  .hero-title {
    font-size: 36px;
    margin-bottom: var(--space-3);
  }

  .hero-subtitle {
    font-size: 18px;
    margin-bottom: var(--space-5);
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--space-2);
  }

  .hero-cta .btn {
    width: 100%;
  }

  /* Buttons */
  .btn {
    padding: 12px 24px;
    font-size: 16px;
  }

  /* Spacing Adjustments */
  .value-section,
  .projects-section,
  .mission-section,
  .vision-section,
  .values-section,
  .company-section,
  .product-detail-section,
  .contact-section {
    padding: var(--space-8) 0;
  }

  .cta-section {
    padding: var(--space-8) 0;
  }

  .page-header {
    padding: var(--space-8) 0 var(--space-6);
  }

  /* Section Headers */
  .section-header {
    margin-bottom: var(--space-6);
  }

  .section-title {
    font-size: 32px;
    margin-bottom: var(--space-2);
  }

  .section-subtitle {
    font-size: 18px;
  }

  .page-title {
    font-size: 36px;
  }

  .page-subtitle {
    font-size: 18px;
  }

  /* Value Proposition */
  .value-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .value-card {
    padding: var(--space-4);
  }

  .value-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
  }

  .value-icon svg {
    width: 32px;
    height: 32px;
  }

  .value-title {
    font-size: 20px;
  }

  .value-description {
    font-size: 16px;
  }

  /* Projects Grid */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .product-card {
    padding: var(--space-4);
  }

  .product-title {
    font-size: 24px;
  }

  /* CTA Section */
  .cta-title {
    font-size: 32px;
    margin-bottom: var(--space-3);
  }

  .cta-text {
    font-size: 18px;
    margin-bottom: var(--space-5);
  }

  /* Footer */
  .footer {
    padding: var(--space-8) 0 var(--space-4);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
  }

  /* Mission Section */
  .mission-title {
    font-size: 32px;
    margin-bottom: var(--space-3);
  }

  .mission-statement {
    font-size: 18px;
  }

  /* Vision Section */
  .vision-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-6);
  }

  .vision-card {
    padding: var(--space-4);
  }

  .vision-heading {
    font-size: 20px;
    margin-bottom: var(--space-2);
  }

  .vision-text {
    font-size: 16px;
  }

  /* Values Section */
  .values-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-top: var(--space-6);
  }

  .value-icon-circle {
    width: 64px;
    height: 64px;
  }

  .value-icon-circle svg {
    width: 24px;
    height: 24px;
  }

  .value-name {
    font-size: 18px;
  }

  /* Company Section */
  .company-text {
    font-size: 16px;
  }

  .company-cta {
    flex-direction: column;
    gap: var(--space-2);
  }

  .company-cta .btn {
    width: 100%;
  }

  /* Product Detail */
  .product-detail-header {
    margin-bottom: var(--space-6);
  }

  .product-detail-title {
    font-size: 36px;
  }

  .product-detail-tagline {
    font-size: 18px;
  }

  .detail-heading {
    font-size: 24px;
    margin-bottom: var(--space-3);
    margin-top: var(--space-6);
  }

  .detail-text {
    font-size: 16px;
  }

  .features-list {
    gap: var(--space-4);
  }

  .feature-item {
    padding: var(--space-3);
  }

  .feature-title {
    font-size: 18px;
  }

  .feature-desc {
    font-size: 16px;
  }

  .technical-list li {
    font-size: 16px;
  }

  .product-cta {
    margin-top: var(--space-6);
  }

  /* Contact Section */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .contact-heading {
    font-size: 24px;
    margin-bottom: var(--space-4);
  }

  .contact-form {
    gap: var(--space-3);
  }

  .contact-info-group {
    gap: var(--space-2);
    margin-bottom: var(--space-5);
  }

  .contact-info-icon {
    width: 40px;
    height: 40px;
  }

  .contact-info-icon svg {
    width: 20px;
    height: 20px;
  }

  /* Map Section */
  .map-section {
    padding: var(--space-6) 0;
  }

  .map-placeholder {
    height: 200px;
  }

  .map-text {
    flex-direction: column;
    text-align: center;
    font-size: 16px;
  }
}

/* ============================================
   Small Mobile (320px - 479px)
   ============================================ */

@media (max-width: 479px) {
  /* Extra small adjustments */
  .hero-title {
    font-size: 32px;
  }

  .section-title,
  .page-title,
  .product-detail-title {
    font-size: 28px;
  }

  .cta-title {
    font-size: 28px;
  }

  .product-card {
    padding: var(--space-3);
  }

  .product-card-logo {
    min-height: 60px;
  }

  .product-card-logo-img {
    max-width: 160px;
    max-height: 60px;
  }

  .product-logo {
    max-width: 220px;
  }
}

/* ============================================
   Large Desktop (1440px+)
   ============================================ */

@media (min-width: 1440px) {
  /* Slightly larger container for large screens */
  .container {
    --container-max-width: 1400px;
  }

  /* Enhance spacing on large screens */
  .hero {
    padding: 160px 0 128px;
  }

  .hero-title {
    font-size: 72px;
  }

  .section-title {
    font-size: 56px;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  /* Hide navigation and interactive elements */
  .header,
  .nav,
  .hero-cta,
  .cta-section,
  .contact-form,
  .footer {
    display: none;
  }

  /* Adjust colors for print */
  body {
    color: #000;
    background-color: #fff;
  }

  a {
    text-decoration: underline;
  }

  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
  :root {
    --color-primary: #000000;
    --color-text-primary: #000000;
    --color-bg-primary: #FFFFFF;
    --color-border: #000000;
  }

  .btn-primary {
    border: 2px solid #000000;
  }

  .btn-secondary {
    border: 2px solid #000000;
  }
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  :root {
    --color-primary: #1A2332;
    --color-primary-light: #2A3342;
    --color-text-primary: #F8F9FA;
    --color-text-secondary: #ADB5BD;
    --color-bg-primary: #0A0F1E;
    --color-bg-secondary: #1A2332;
    --color-bg-tertiary: #2A3342;
    --color-border: #2A3342;
  }

  .header {
    background-color: rgba(10, 15, 30, 0.95);
  }

  .product-card,
  .vision-card,
  .feature-item {
    background-color: var(--color-bg-secondary);
  }
  */
}

