/* Apple HIG Design System - TextilManagement Landing Page */

/* ==========================================================================
   1. Design Tokens - Apple System
   ========================================================================== */

:root {
  /* Apple System Colors */
  --apple-system-blue: #007AFF;
  --apple-system-green: #34C759;
  --apple-system-red: #FF3B30;
  --apple-system-orange: #FF9500;
  --apple-system-yellow: #FFCC00;
  
  /* Apple Text Colors */
  --apple-label: #000000;
  --apple-secondary-label: rgba(60, 60, 67, 0.6);
  --apple-tertiary-label: rgba(60, 60, 67, 0.3);
  --apple-placeholder-text: rgba(60, 60, 67, 0.2);
  
  /* Apple Background Colors */
  --apple-system-background: #FFFFFF;
  --apple-secondary-system-background: #F2F2F7;
  --apple-tertiary-system-background: #FFFFFF;
  
  /* Apple Typography Scale */
  --apple-font-large-title: 34px;
  --apple-font-title-1: 28px;
  --apple-font-title-2: 22px;
  --apple-font-title-3: 20px;
  --apple-font-headline: 17px;
  --apple-font-body: 17px;
  --apple-font-callout: 16px;
  --apple-font-subhead: 15px;
  --apple-font-footnote: 13px;
  --apple-font-caption-1: 12px;
  --apple-font-caption-2: 11px;
  
  /* Apple Spacing System (8px base) */
  --apple-space-1: 4px;
  --apple-space-2: 8px;
  --apple-space-3: 12px;
  --apple-space-4: 16px;
  --apple-space-5: 20px;
  --apple-space-6: 24px;
  --apple-space-7: 28px;
  --apple-space-8: 32px;
  --apple-space-9: 36px;
  --apple-space-10: 40px;
  --apple-space-11: 44px;
  --apple-space-12: 48px;
  --apple-space-13: 52px;
  --apple-space-14: 56px;
  
  /* Apple Animation Timing */
  --apple-duration-micro: 0.15s;
  --apple-duration-short: 0.2s;
  --apple-duration-medium: 0.3s;
  --apple-duration-long: 0.4s;
  
  /* Apple Shadows */
  --apple-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --apple-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --apple-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --apple-shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ==========================================================================
   2. Base Styles - Apple System Font
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--apple-label);
  background-color: var(--apple-system-background);
}

/* ==========================================================================
   3. Typography - Apple HIG Scale
   ========================================================================== */

/* Apple Large Title */
.apple-large-title {
  font-size: var(--apple-font-large-title);
  line-height: 1.05882;
  font-weight: 600;
  letter-spacing: -0.003em;
}

/* Apple Title 1 */
.apple-title-1 {
  font-size: var(--apple-font-title-1);
  line-height: 1.14286;
  font-weight: 600;
  letter-spacing: -0.003em;
}

/* Apple Title 2 */
.apple-title-2 {
  font-size: var(--apple-font-title-2);
  line-height: 1.18182;
  font-weight: 600;
  letter-spacing: -0.003em;
}

/* Apple Title 3 */
.apple-title-3 {
  font-size: var(--apple-font-title-3);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.003em;
}

/* Apple Headline */
.apple-headline {
  font-size: var(--apple-font-headline);
  line-height: 1.29412;
  font-weight: 600;
  letter-spacing: -0.003em;
}

/* Apple Body */
.apple-body {
  font-size: var(--apple-font-body);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
}

/* Apple Callout */
.apple-callout {
  font-size: var(--apple-font-callout);
  line-height: 1.3125;
  font-weight: 400;
  letter-spacing: -0.019em;
}

/* Apple Subhead */
.apple-subhead {
  font-size: var(--apple-font-subhead);
  line-height: 1.33333;
  font-weight: 400;
  letter-spacing: -0.016em;
}

/* Apple Footnote */
.apple-footnote {
  font-size: var(--apple-font-footnote);
  line-height: 1.38462;
  font-weight: 400;
  letter-spacing: -0.006em;
}

/* Apple Caption */
.apple-caption {
  font-size: var(--apple-font-caption-1);
  line-height: 1.33333;
  font-weight: 400;
  letter-spacing: 0em;
}

/* ==========================================================================
   4. Layout System - Apple Spacing
   ========================================================================== */

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--apple-space-5);
}

@media (max-width: 1068px) {
  .container {
    max-width: 692px;
    padding: 0 var(--apple-space-4);
  }
}

@media (max-width: 735px) {
  .container {
    max-width: 100%;
    padding: 0 var(--apple-space-4);
  }
}

/* ==========================================================================
   5. Buttons - Apple HIG Standards
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--apple-space-11); /* 44px - Apple touch target */
  padding: 0 var(--apple-space-6);
  border: none;
  border-radius: 12px;
  font-size: var(--apple-font-body);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.022em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--apple-duration-short) ease-out;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active {
  transform: scale(0.95);
  transition-duration: var(--apple-duration-micro);
}

.btn-primary {
  background-color: var(--apple-system-blue);
  color: white;
  box-shadow: var(--apple-shadow-sm);
}

.btn-primary:hover {
  background-color: #0051D5;
  box-shadow: var(--apple-shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: #004BB8;
  transform: scale(0.95);
}

.btn-outline {
  background-color: transparent;
  color: var(--apple-system-blue);
  border: 1px solid var(--apple-system-blue);
}

.btn-outline:hover {
  background-color: rgba(0, 122, 255, 0.1);
  transform: translateY(-1px);
}

.btn-large {
  height: 52px;
  padding: 0 var(--apple-space-8);
  font-size: var(--apple-font-title-3);
  font-weight: 500;
}

/* ==========================================================================
   6. Header - Apple Style
   ========================================================================== */

.landing-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--apple-duration-short) ease-out;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--apple-space-4) var(--apple-space-5);
  max-width: 980px;
  margin: 0 auto;
}

.brand-img {
  height: 32px;
  width: auto;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: var(--apple-space-8);
}

.nav-link {
  font-size: var(--apple-font-body);
  font-weight: 400;
  color: var(--apple-secondary-label);
  text-decoration: none;
  transition: color var(--apple-duration-micro) ease-out;
  padding: var(--apple-space-2) 0;
}

.nav-link:hover {
  color: var(--apple-label);
}

/* ==========================================================================
   7. Hero Section - Apple Style
   ========================================================================== */

.hero-section {
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  color: white;
  padding: calc(var(--apple-space-12) * 2) 0 var(--apple-space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: var(--apple-font-large-title);
  font-weight: 600;
  line-height: 1.05882;
  letter-spacing: -0.003em;
  margin-bottom: var(--apple-space-6);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: var(--apple-font-title-3);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.003em;
  margin-bottom: var(--apple-space-10);
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--apple-space-5);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   8. Section Styles - Apple HIG
   ========================================================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--apple-space-12);
}

.section-title {
  font-size: var(--apple-font-title-1);
  font-weight: 600;
  line-height: 1.14286;
  letter-spacing: -0.003em;
  margin-bottom: var(--apple-space-5);
  color: var(--apple-label);
}

.section-subtitle {
  font-size: var(--apple-font-callout);
  font-weight: 400;
  line-height: 1.3125;
  letter-spacing: -0.019em;
  color: var(--apple-secondary-label);
  max-width: 600px;
  margin: 0 auto;
}

.section-text {
  font-size: var(--apple-font-body);
  font-weight: 400;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  color: var(--apple-secondary-label);
}

/* ==========================================================================
   9. Challenge Section - Apple Style
   ========================================================================== */

.challenge-section {
  padding: var(--apple-space-12) 0;
  background-color: var(--apple-secondary-system-background);
}

.section-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--apple-space-12);
  align-items: center;
}

.challenge-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--apple-space-5);
}

.challenge-card {
  background: var(--apple-system-background);
  padding: var(--apple-space-7);
  border-radius: 16px;
  box-shadow: var(--apple-shadow-md);
  text-align: center;
  transition: all var(--apple-duration-short) ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.challenge-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--apple-shadow-lg);
}

.challenge-card:active {
  transform: scale(0.98);
}

.card-icon {
  font-size: 32px;
  margin-bottom: var(--apple-space-4);
  display: block;
}

.challenge-card h3 {
  font-size: var(--apple-font-headline);
  font-weight: 600;
  line-height: 1.29412;
  margin-bottom: var(--apple-space-2);
  color: var(--apple-label);
}

.challenge-card p {
  font-size: var(--apple-font-footnote);
  font-weight: 400;
  line-height: 1.38462;
  color: var(--apple-secondary-label);
}

/* ==========================================================================
   10. Solution Section - Apple Style
   ========================================================================== */

.solution-section {
  padding: var(--apple-space-12) 0;
  background-color: var(--apple-system-background);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--apple-space-6);
}

.feature-card {
  background: var(--apple-secondary-system-background);
  padding: var(--apple-space-8);
  border-radius: 16px;
  text-align: center;
  transition: all var(--apple-duration-short) ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--apple-shadow-lg);
  border-color: rgba(0, 122, 255, 0.2);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: var(--apple-space-5);
  display: block;
}

.feature-card h3 {
  font-size: var(--apple-font-title-3);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--apple-space-3);
  color: var(--apple-label);
}

.feature-card p {
  font-size: var(--apple-font-callout);
  font-weight: 400;
  line-height: 1.3125;
  color: var(--apple-secondary-label);
}

/* ==========================================================================
   11. Benefits Section - Apple Style
   ========================================================================== */

.benefits-section {
  padding: var(--apple-space-12) 0;
  background-color: var(--apple-secondary-system-background);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--apple-space-6);
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: var(--apple-space-5);
  padding: var(--apple-space-7);
  background: var(--apple-system-background);
  border-radius: 16px;
  box-shadow: var(--apple-shadow-md);
  transition: all var(--apple-duration-short) ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.benefit-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--apple-shadow-lg);
}

.benefit-icon {
  font-size: 32px;
  flex-shrink: 0;
  margin-top: 2px;
}

.benefit-content h3 {
  font-size: var(--apple-font-headline);
  font-weight: 600;
  line-height: 1.29412;
  margin-bottom: var(--apple-space-1);
  color: var(--apple-label);
}

.benefit-content p {
  font-size: var(--apple-font-callout);
  font-weight: 400;
  line-height: 1.3125;
  color: var(--apple-secondary-label);
}

/* ==========================================================================
   12. Testimonials Section - Apple Style
   ========================================================================== */

.testimonials-section {
  padding: var(--apple-space-12) 0;
  background-color: var(--apple-system-background);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--apple-space-6);
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--apple-secondary-system-background);
  padding: var(--apple-space-8);
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--apple-shadow-sm);
}

.testimonial-content {
  margin-bottom: var(--apple-space-6);
}

.testimonial-content p {
  font-size: var(--apple-font-title-3);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.003em;
  color: var(--apple-label);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author-info strong {
  display: block;
  font-size: var(--apple-font-headline);
  font-weight: 600;
  line-height: 1.29412;
  color: var(--apple-label);
}

.author-info span {
  font-size: var(--apple-font-footnote);
  font-weight: 400;
  line-height: 1.38462;
  color: var(--apple-secondary-label);
}

.author-rating {
  color: #FFB800;
  font-size: 20px;
}

/* ==========================================================================
   13. CTA Section - Apple Style
   ========================================================================== */

.cta-section {
  padding: calc(var(--apple-space-12) * 1.5) 0;
  background: linear-gradient(135deg, var(--apple-system-blue) 0%, #5856D6 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: var(--apple-font-title-1);
  font-weight: 600;
  line-height: 1.14286;
  letter-spacing: -0.003em;
  margin-bottom: var(--apple-space-6);
}

.cta-subtitle {
  font-size: var(--apple-font-title-3);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.003em;
  margin-bottom: var(--apple-space-10);
  opacity: 0.9;
}

.cta-actions {
  display: flex;
  gap: var(--apple-space-5);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   14. Footer - Apple Style
   ========================================================================== */

.landing-footer {
  background: #1D1D1F;
  color: white;
  padding: var(--apple-space-10) 0 var(--apple-space-8);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--apple-space-8);
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--apple-space-5);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--apple-space-3);
}

.footer-brand p {
  font-size: var(--apple-font-footnote);
  font-weight: 400;
  line-height: 1.38462;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links {
  display: flex;
  gap: var(--apple-space-6);
}

.footer-link {
  font-size: var(--apple-font-footnote);
  font-weight: 400;
  line-height: 1.38462;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--apple-duration-micro) ease-out;
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--apple-space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--apple-font-caption-1);
  max-width: 980px;
  margin: 0 auto;
  padding-left: var(--apple-space-5);
  padding-right: var(--apple-space-5);
}

/* ==========================================================================
   15. Animations - Apple Style
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-content,
.section-content,
.features-grid,
.benefits-grid,
.testimonials-grid,
.cta-content {
  animation: fadeInUp var(--apple-duration-medium) ease-out;
}

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
  .challenge-card,
  .feature-card,
  .benefit-item,
  .testimonial-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--apple-duration-medium) ease-out, 
                transform var(--apple-duration-medium) ease-out;
  }
  
  .challenge-card.animate,
  .feature-card.animate,
  .benefit-item.animate,
  .testimonial-card.animate {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   16. Responsive Design - Apple Breakpoints
   ========================================================================== */

@media (max-width: 735px) {
  /* iPhone and small devices */
  .hero-title {
    font-size: var(--apple-font-title-1);
    line-height: 1.14286;
  }
  
  .hero-subtitle {
    font-size: var(--apple-font-body);
    line-height: 1.47059;
  }
  
  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .section-content {
    grid-template-columns: 1fr;
    gap: var(--apple-space-8);
  }
  
  .challenge-cards {
    grid-template-columns: 1fr;
    gap: var(--apple-space-4);
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: var(--apple-space-4);
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--apple-space-6);
    text-align: center;
  }
  
  .landing-nav {
    gap: var(--apple-space-4);
  }
  
  .nav-link {
    display: none;
  }
  
  .header-content {
    padding: var(--apple-space-4);
  }
}

@media (max-width: 320px) {
  /* Very small devices */
  .container {
    padding: 0 var(--apple-space-3);
  }
  
  .hero-section {
    padding: calc(var(--apple-space-10) * 2) 0 var(--apple-space-10);
  }
  
  .section-title {
    font-size: var(--apple-font-title-2);
    line-height: 1.18182;
  }
  
  .btn-large {
    height: 48px;
    padding: 0 var(--apple-space-6);
    font-size: var(--apple-font-headline);
    line-height: 1.29412;
  }
}

/* ==========================================================================
   17. Focus and Accessibility - Apple HIG
   ========================================================================== */

.btn:focus,
.nav-link:focus {
  outline: 2px solid var(--apple-system-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-outline {
    border-width: 2px;
  }
  
  .challenge-card,
  .feature-card,
  .benefit-item,
  .testimonial-card {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   18. Utility Classes - Apple Style
   ========================================================================== */

.apple-spacing-xs { margin: var(--apple-space-1); }
.apple-spacing-sm { margin: var(--apple-space-2); }
.apple-spacing-md { margin: var(--apple-space-4); }
.apple-spacing-lg { margin: var(--apple-space-6); }
.apple-spacing-xl { margin: var(--apple-space-8); }

.apple-text-center { text-align: center; }
.apple-text-left { text-align: left; }
.apple-text-right { text-align: right; }

.apple-font-weight-regular { font-weight: 400; }
.apple-font-weight-medium { font-weight: 500; }
.apple-font-weight-semibold { font-weight: 600; }

/* Print styles */
@media print {
  .landing-header,
  .hero-actions,
  .cta-actions {
    display: none;
  }
  
  body {
    font-family: Georgia, 'Times New Roman', serif;
  }
}