/* Mobile-First Optimizations for Learning Landing Page */

:root {
  /* Sminy Brand Colors */
  --deep: #121B29;
  --deep-2: #1e293b;
  --ink: #0f172a;
  --brand: #3B76E8;
  --brand-600: #2563eb;
  --brand-700: #1e40af;
  --muted: #f1f5f9;
}

/* Base Font Settings */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Prevent horizontal scroll on mobile */
* {
  max-width: 100vw;
}

/* Container responsive padding */
.container-std {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container-std {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-std {
    padding-inline: 2rem;
  }
}

/* Mobile-optimized typography */
.text-mobile-2xl { font-size: 1.5rem; }
.text-mobile-3xl { font-size: 1.875rem; }
.text-mobile-4xl { font-size: 2.25rem; }

@media (min-width: 640px) {
  .text-mobile-2xl { font-size: 1.875rem; }
  .text-mobile-3xl { font-size: 2.25rem; }
  .text-mobile-4xl { font-size: 3rem; }
}

/* Progress Rings - Mobile Responsive */
.ring {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
}

@media (min-width: 480px) {
  .ring {
    width: 120px;
    height: 120px;
  }
}

@media (min-width: 640px) {
  .ring {
    width: 152px;
    height: 152px;
  }
}

.ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(var(--brand) var(--p,50%), #e5e7eb 0);
}

.ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: white;
  border-radius: inherit;
}

@media (min-width: 480px) {
  .ring::after {
    inset: 10px;
  }
}

@media (min-width: 640px) {
  .ring::after {
    inset: 12px;
  }
}

.ring > span {
  position: relative;
  font-weight: 800;
  font-size: 20px;
}

@media (min-width: 480px) {
  .ring > span {
    font-size: 24px;
  }
}

@media (min-width: 640px) {
  .ring > span {
    font-size: 32px;
  }
}

/* Hexagons - Mobile Responsive */
.hex {
  width: 100px;
  height: 87px;
  background: #e6f1ef;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  display: grid;
  place-items: center;
  font-size: 0.625rem;
}

@media (min-width: 480px) {
  .hex {
    width: 120px;
    height: 105px;
    font-size: 0.75rem;
  }
}

@media (min-width: 640px) {
  .hex {
    width: 160px;
    height: 140px;
    font-size: 0.875rem;
  }
}

.hex .text-4xl {
  font-size: 1.5rem;
}

@media (min-width: 480px) {
  .hex .text-4xl {
    font-size: 1.875rem;
  }
}

@media (min-width: 640px) {
  .hex .text-4xl {
    font-size: 2.25rem;
  }
}

/* Form Styles - Mobile Optimized */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 16px; /* Prevents zoom on iOS */
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  ring: 2px;
  ring-color: var(--brand);
  border-color: transparent;
}

@media (min-width: 640px) {
  .form-input {
    padding: 0.75rem 1rem;
  }
}

/* Button optimizations for touch */
.btn-primary {
  padding: 0.875rem 1.25rem;
  min-height: 48px; /* iOS touch target size */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
  .btn-primary {
    padding: 0.75rem 1.5rem;
  }
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--brand);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Smooth scroll for iOS */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Mobile menu styles */
#mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

#mobile-menu:not(.hidden) {
  transform: translateX(0);
}

/* Hero section mobile adjustments */
.hero-content {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

@media (min-width: 640px) {
  .hero-content {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    padding-top: 6rem;
    padding-bottom: 4rem;
  }
}

/* Card hover effects - disabled on touch devices */
@media (hover: hover) and (pointer: fine) {
  .card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
}

/* Improve readability on small screens */
@media (max-width: 374px) {
  html {
    font-size: 14px;
  }
}

/* Safe area insets for notched devices */
.safe-padding {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.safe-padding-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Video modal responsive */
#video-modal .modal-content {
  width: 95vw;
  max-width: 1000px;
  margin: 1rem;
}

@media (min-width: 640px) {
  #video-modal .modal-content {
    width: 90vw;
    margin: 2rem;
  }
}

/* Accessibility improvements */
.focus-visible:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Touch-friendly spacing */
.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* Prevent text selection on buttons */
button, a {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Performance optimizations */
.will-transform {
  will-change: transform;
}

.gpu-accelerated {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Reduce motion for users who prefer it */
@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;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles if needed */
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

