/* ===================================
   Notebody Landing Page - Components
   =================================== */

/* ===================================
   Buttons
   =================================== */
.btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.3);
}

.btn-secondary {
  border: 2px solid #3b82f6;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
}

/* ===================================
   Cards
   =================================== */
.notebook-card {
  background: var(--notebook-bg);
  background-image: linear-gradient(transparent 95%, var(--line-color) 95%);
  background-size: 100% 24px;
  border-left: 3px solid #ef4444;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ===================================
   Feature Icons
   =================================== */
.feature-icon {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  transition: all 0.3s ease;
}

.feature-icon:hover {
  transform: rotate(-5deg) scale(1.1);
}

/* ===================================
   Step Badges
   =================================== */
.step-badge {
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

/* ===================================
   Hero SVG Container
   =================================== */
.hero-svg-container {
  position: relative;
  display: inline-block;
  width: 460px;
  max-width: 100%;
  margin-top: 120px;
}

.hero-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Responsive adjustments for SVG centering */
@media (max-width: 1280px) {
  .hero-svg-container {
    width: 400px;
    margin-top: 100px;
  }
}

@media (max-width: 1024px) {
  .hero-svg-container {
    width: 350px;
    margin-top: 60px;
  }
}

@media (max-width: 768px) {
  .hero-svg-container {
    width: 280px;
    margin-top: 0;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 640px) {
  .hero-svg-container {
    width: 260px;
    margin-top: 0;
    margin-bottom: 1rem;
  }
}

/* ===================================
   Floating Notes
   =================================== */
.floating-note {
  position: absolute;
  width: 280px;
  background: linear-gradient(135deg, #fffef8 0%, #fefce8 100%);
  border-left: 3px solid #ef4444;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.floating-note-1 {
  top: 10%;
  left: -100px;
}

.floating-note-2 {
  top: 35%;
  right: -90px;
}

.floating-note-3 {
  top: 58%;
  right: -85px;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.note-date {
  font-size: 11px;
  color: #6b7280;
}

.note-category {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.note-category-treatment {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.note-category-pain {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.note-category-observation {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.note-body-part {
  font-family: 'Caveat', cursive;
  font-size: 18px;
  color: #1e40af;
  font-weight: 700;
  margin-bottom: 8px;
}

.note-content {
  font-size: 13px;
  color: #374151;
  line-height: 20px;
  background-image: linear-gradient(transparent 95%, #e2e8f0 95%);
  background-size: 100% 20px;
  padding: 4px 0;
}

/* Hide floating notes on tablet and mobile */
@media (max-width: 1024px) {
  .floating-note {
    display: none;
  }
}

/* ===================================
   PROFESSIONAL MOBILE OPTIMIZATION
   Following patterns from Stripe, Linear, Vercel
   =================================== */

/* ===================================
   Fluid Typography System - Mobile First
   =================================== */

/* Hero Section Typography (applies at all sizes, scales fluidly) */
@media (max-width: 768px) {
  /* Hero main heading - Large and bold */
  section:first-of-type h1 {
    font-size: clamp(2.25rem, 8vw, 3.5rem) !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    margin-bottom: var(--space-md) !important;
  }

  /* Hero subheading - Gradient text */
  section:first-of-type h2 {
    font-size: clamp(1.875rem, 6vw, 2.75rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin-bottom: var(--space-lg) !important;
  }

  /* Hero description */
  section:first-of-type p:first-of-type {
    font-size: clamp(1rem, 3vw, 1.125rem) !important;
    line-height: 1.6 !important;
    margin-bottom: var(--space-xl) !important;
  }

  /* Section headings - Professional sizing */
  section:not(:first-of-type) h2 {
    font-size: clamp(1.875rem, 5vw, 2.5rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin-bottom: var(--space-md) !important;
  }

  section h3 {
    font-size: clamp(1.25rem, 4vw, 1.5rem) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
  }

  /* Body text - Comfortable reading */
  p {
    font-size: clamp(1rem, 2.5vw, 1.0625rem) !important;
    line-height: 1.6 !important;
  }

  /* Utility class overrides */
  .text-lg {
    font-size: clamp(1.0625rem, 3vw, 1.125rem) !important;
  }

  .text-xl {
    font-size: clamp(1.125rem, 3.5vw, 1.25rem) !important;
  }

  .text-sm {
    font-size: 0.875rem !important;
  }
}

/* ===================================
   Professional Section Spacing - Mobile
   =================================== */
@media (max-width: 768px) {
  /* Hero section - Full viewport with generous padding */
  section:first-of-type {
    min-height: 100dvh; /* Dynamic viewport height */
    min-height: 100vh; /* Fallback */
    padding: var(--space-2xl) var(--space-md) !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* All other sections - Generous spacing */
  section:not(:first-of-type) {
    padding: var(--space-3xl) var(--space-md) !important;
  }

  /* Features section - Extra space */
  .features-section {
    padding: var(--space-4xl) var(--space-md) !important;
  }

  /* How It Works section */
  .how-it-works-section {
    padding: var(--space-3xl) var(--space-md) !important;
  }

  /* Final CTA section - Impactful spacing */
  .final-cta-section {
    padding: var(--space-4xl) var(--space-md) !important;
  }

  /* Footer - Generous padding */
  footer {
    padding: var(--space-2xl) var(--space-md) !important;
  }
}

/* ===================================
   Professional Mobile Cards
   =================================== */
@media (max-width: 768px) {
  /* Feature cards - Generous padding and modern styling */
  .notebook-card {
    padding: var(--space-lg) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
    text-align: center !important;
    margin-bottom: var(--space-md) !important;
  }

  .notebook-card h3 {
    font-size: clamp(1.25rem, 4vw, 1.375rem) !important;
    font-weight: 600 !important;
    margin-bottom: var(--space-sm) !important;
  }

  .notebook-card p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: #374151 !important;
  }

  /* Feature icons - Larger and centered */
  .feature-icon {
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto var(--space-md) !important;
  }

  .feature-icon svg {
    width: 32px !important;
    height: 32px !important;
  }
}

/* ===================================
   Professional Mobile CTAs
   =================================== */
@media (max-width: 768px) {
  /* Hero CTA container - Full width */
  section:first-of-type .flex.flex-col.sm\:flex-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--space-sm) !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
  }

  /* Primary CTA - Full width, prominent */
  .btn-primary {
    width: 100% !important;
    min-height: 56px !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    padding: var(--space-md) var(--space-lg) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3) !important;
  }

  /* Secondary CTA - Full width, outlined */
  .btn-secondary {
    width: 100% !important;
    min-height: 56px !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    padding: var(--space-md) var(--space-lg) !important;
    border-radius: 12px !important;
    border-width: 2px !important;
  }

  /* Final CTA section button */
  .final-cta-section a {
    width: 100% !important;
    max-width: 400px !important;
    min-height: 56px !important;
    font-size: 1.125rem !important;
    padding: var(--space-md) var(--space-xl) !important;
    border-radius: 12px !important;
  }

  /* Touch feedback */
  .btn-primary:active,
  .btn-secondary:active {
    transform: scale(0.98) !important;
  }
}

/* ===================================
   Professional Mobile Benefits Section
   =================================== */
@media (max-width: 768px) {
  /* Benefit items - Enhanced cards */
  .benefits-item {
    padding: var(--space-md) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    margin-bottom: var(--space-sm) !important;
  }

  .benefits-item p {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  .benefits-item strong {
    font-size: 1.0625rem !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 0.25rem !important;
  }

  /* Larger checkmarks for visibility */
  .benefits-item svg {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }

  /* Better gap between icon and text */
  .benefits-item.flex {
    gap: var(--space-md) !important;
  }
}

/* ===================================
   Professional Grid & Layout
   =================================== */
@media (max-width: 768px) {
  /* All grids - Generous spacing */
  .grid {
    gap: var(--space-md) !important;
  }

  /* Features grid - Single column with spacing */
  .features-section .grid {
    gap: var(--space-lg) !important;
  }

  /* How it works grid - Better vertical rhythm */
  .how-it-works-section .grid {
    gap: var(--space-xl) !important;
  }
}

/* ===================================
   Professional Step Badges
   =================================== */
@media (max-width: 768px) {
  .step-badge {
    width: 64px !important;
    height: 64px !important;
    font-size: 1.75rem !important;
    margin-bottom: var(--space-md) !important;
  }
}

/* ===================================
   Professional Hero Section - Mobile
   =================================== */
@media (max-width: 768px) {
  /* Hero content wrapper - Perfect centering */
  section:first-of-type > div {
    width: 100% !important;
    max-width: var(--container-mobile) !important;
    margin: 0 auto !important;
  }

  /* Hero flex container - Stack vertically */
  section:first-of-type .flex.flex-col.md\:flex-row {
    flex-direction: column !important;
    align-items: center !important;
    gap: var(--space-2xl) !important;
  }

  /* Hero text content - Center aligned */
  section:first-of-type .flex-1:first-child {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Hero small text */
  section:first-of-type .text-sm {
    font-size: 0.875rem !important;
    margin-top: var(--space-md) !important;
  }

  /* Hero SVG container - Optimized size */
  .hero-svg-container {
    width: min(85vw, 340px) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* ===================================
   Professional Footer - Mobile
   =================================== */
@media (max-width: 768px) {
  footer {
    text-align: center !important;
  }

  footer .flex.flex-col.md\:flex-row {
    flex-direction: column !important;
    align-items: center !important;
    gap: var(--space-xl) !important;
  }

  footer .flex.gap-6 {
    flex-direction: column !important;
    gap: var(--space-md) !important;
  }

  footer a {
    min-height: 48px !important;
    padding: var(--space-sm) var(--space-md) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
  }

  footer h3 {
    font-size: 1.5rem !important;
  }
}

/* ===================================
   Perfect Centering System
   =================================== */
@media (max-width: 768px) {
  /* All section containers */
  section > div.max-w-6xl,
  section > div.max-w-5xl,
  section > div.max-w-4xl {
    width: 100% !important;
    max-width: var(--container-mobile) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Center all section headings */
  section .text-center {
    text-align: center !important;
  }

  /* Benefits section spacing */
  .space-y-4 > * + * {
    margin-top: var(--space-md) !important;
  }
}

/* ===================================
   Touch Target Standards - 48px minimum
   =================================== */
@media (max-width: 768px) {
  /* All interactive elements */
  a:not(.btn-primary):not(.btn-secondary),
  button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
  }
}

/* ===================================
   Very Small Screens (< 375px)
   =================================== */
@media (max-width: 374px) {
  .hero-svg-container {
    width: min(90vw, 280px) !important;
  }

  section:first-of-type h1 {
    font-size: clamp(2rem, 7vw, 2.5rem) !important;
  }

  section:first-of-type h2 {
    font-size: clamp(1.625rem, 5.5vw, 2rem) !important;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 1rem !important;
  }
}

/* ===================================
   Performance Optimizations
   =================================== */
@media (max-width: 768px) {
  /* Disable floating animation on mobile for performance */
  .hero-svg {
    animation: none !important;
  }

  /* Slow down background decorations */
  section:first-of-type .absolute.inset-0 > div {
    animation-duration: 10s !important;
  }

  /* Faster fade-ins on mobile */
  .fade-in {
    animation-duration: 0.4s !important;
  }
}

/* ===================================
   Safe Area Support (iPhone notches, etc.)
   =================================== */
@media (max-width: 768px) {
  section:first-of-type {
    padding-bottom: max(var(--space-2xl), env(safe-area-inset-bottom)) !important;
  }

  footer {
    padding-bottom: max(var(--space-2xl), env(safe-area-inset-bottom)) !important;
  }
}

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

  .hero-svg,
  .floating-note-1,
  .floating-note-2,
  .floating-note-3,
  .fade-in,
  .animate-pulse {
    animation: none !important;
  }
}
