/* MRS Tech Labs — Warm Professional Design System
   Color: Teal + Amber | Font: Plus Jakarta Sans + Inter
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --color-primary: #0d9488;
    --color-primary-light: #5eead4;
    --color-primary-dark: #0f766e;
    --color-accent: #f59e0b;
    --color-accent-light: #fde68a;
    --color-accent-dark: #d97706;
    --color-surface: #fafaf9;
    --color-surface-warm: #f5f5f4;
    --color-text: #292524;
    --color-text-muted: #78716c;
    --color-border: #e7e5e4;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
}

/* ============================================
   FOUNDATIONS
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.animate-slide-in {
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

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

/* ============================================
   TYPOGRAPHY
   ============================================ */

.font-display {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

.text-hero {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.text-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    line-height: 1.65;
    color: var(--color-text-muted);
}

.text-display-lg {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.text-display-sm {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ============================================
   TEXT UTILITIES
   ============================================ */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.break-words {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ============================================
   WARM CARD SYSTEM
   ============================================ */

.card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: #d6d3d1;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.card-highlight {
    background: #ffffff;
    border: 1px solid #99f6e4;
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-highlight:hover {
    border-color: #5eead4;
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.1), 0 0 0 3px rgba(13, 148, 136, 0.08);
    transform: translateY(-2px);
}

/* ============================================
   BUTTON SYSTEM
   ============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0f766e, #115e59);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
    transform: translateY(-1px);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #292524;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    background: #ffffff;
    border: 1.5px solid #99f6e4;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f0fdfa;
    border-color: #5eead4;
    transform: translateY(-1px);
}

/* ============================================
   BADGE SYSTEM
   ============================================ */

.badge-teal {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 9999px;
}

.badge-amber {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 9999px;
}

.badge-stone {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #57534e;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
    border-radius: 9999px;
}

/* ============================================
   SECTION PATTERNS
   ============================================ */

.section-header {
    max-width: 40rem;
    margin-bottom: 3rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

/* ============================================
   METRIC CARDS
   ============================================ */

.metric-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: #99f6e4;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.08);
}

.metric-card .metric-value {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.metric-card .metric-icon {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.metric-card .metric-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   SCROLLBAR (warm)
   ============================================ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fafaf9; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }

/* ============================================
   ILLUSTRATION CONTAINERS
   ============================================ */

.illustration-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-container svg {
    width: 100%;
    height: auto;
    max-width: 480px;
}

/* Warm decorative blobs */
.blob-teal {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.08), transparent 70%);
    pointer-events: none;
}

.blob-amber {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06), transparent 70%);
    pointer-events: none;
}

/* ============================================
   PROCESS / STEP INDICATORS
   ============================================ */

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #292524;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-weight: 800;
    font-size: 0.875rem;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #99f6e4, #e7e5e4);
}

/* Toast notifications consolidated below in TOAST NOTIFICATION section */

/* ============================================
   SCROLL REVEAL (JS-driven)
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   NAV LINK HOVER UNDERLINE
   ============================================ */

.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    transition: width 0.25s ease;
}

@media (hover: hover) {
    .nav-link:hover::after {
        width: 100%;
    }
}

/* ============================================
   WAVE SEPARATOR
   ============================================ */

.wave-separator {
    position: relative;
    overflow: hidden;
}

.wave-separator::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: clamp(20px, 6vw, 40px);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40'%3E%3Cpath fill='%23ffffff' d='M0,20 C360,40 720,0 1080,20 C1260,30 1380,25 1440,20 L1440,0 L0,0 Z'/%3E%3C/svg%3E") no-repeat center top;
    background-size: 100% 100%;
}

/* ============================================
   PROSE STYLES (Blog content — warm)
   ============================================ */

.prose {
    color: #44403c;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.8;
}

.prose h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1c1917;
    letter-spacing: -0.025em;
}

.prose h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: #1c1917;
    letter-spacing: -0.02em;
}

.prose h3 {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: #292524;
}

.prose p { margin-bottom: 1.5rem; }
.prose ul, .prose ol { margin-left: 1.5rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }

.prose a {
    color: #0d9488;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #99f6e4;
    transition: text-decoration-color 0.2s ease;
}

.prose a:hover {
    color: #0f766e;
    text-decoration-color: #0d9488;
}

.prose strong { font-weight: 600; color: #1c1917; }

.prose blockquote {
    border-left: 3px solid #0d9488;
    padding-left: 1.25rem;
    font-style: italic;
    color: #78716c;
    margin: 2rem 0;
    background: #f0fdfa;
    padding: 1rem 1.25rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose code {
    background: #f5f5f4;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #292524;
    border: 1px solid #e7e5e4;
}

.prose pre {
    background: #1c1917;
    color: #e7e5e4;
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #292524;
}

.prose pre code { background: none; padding: 0; color: inherit; border: none; }
.prose img { border-radius: 0.75rem; margin: 2rem 0; }
.prose hr { border-color: #e7e5e4; margin: 2.5rem 0; }

/* ============================================
   PLATFORM & RATING (products — warm)
   ============================================ */

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.platform-badge.ios {
    background: rgba(13, 148, 136, 0.08);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.15);
}

.platform-badge.android {
    background: rgba(52, 168, 83, 0.08);
    color: #34A853;
    border: 1px solid rgba(52, 168, 83, 0.15);
}

.rating-display { display: flex; align-items: center; gap: 0.5rem; }
.rating-display .stars { display: flex; gap: 0.125rem; }
.rating-display .stars i { font-size: 0.875rem; color: #f59e0b; }
.rating-display .rating-number { font-weight: 700; font-size: 1rem; color: #292524; }

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    right: 1.5rem;
    right: calc(1.5rem + env(safe-area-inset-right, 0px));
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #292524;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
    z-index: 50;
    cursor: pointer;
    border: none;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
    transform: translateY(-2px);
}

/* ============================================
   WARM GRADIENT BACKGROUNDS
   ============================================ */

.bg-warm-gradient {
    background: linear-gradient(135deg, #f0fdfa 0%, #fafaf9 50%, #fffbeb 100%);
}

.bg-warm-surface {
    background: #fafaf9;
}

.bg-warm-dark {
    background: #1c1917;
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}
.rating-display .review-count { color: #6b7280; font-size: 0.875rem; }

/* ============================================
   APP STORE BADGES
   ============================================ */

.app-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.app-store-badge.ios { background: #000; color: #fff; }
.app-store-badge.ios:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.app-store-badge.android { background: #01875f; color: #fff; }
.app-store-badge.android:hover {
    background: #016847;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(1, 135, 95, 0.3);
}

.app-store-badge i { font-size: 1.5rem; }
.app-store-badge small { display: block; font-size: 0.7rem; opacity: 0.9; }
.app-store-badge strong { display: block; font-size: 1rem; font-weight: 600; }

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.toast {
    position: fixed;
    bottom: 2rem;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    max-width: calc(100vw - 2rem);
    background: #111827;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #44403c;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .responsive-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .metric-card {
        padding: 1rem;
    }

    .prose ul, .prose ol {
        margin-left: 1rem;
    }

    .prose blockquote {
        padding: 0.75rem 1rem;
        margin: 1.5rem 0;
    }

    .prose pre {
        padding: 0.875rem;
        margin: 1rem 0;
    }

    .prose img {
        margin: 1.25rem 0;
    }

    .prose hr {
        margin: 1.5rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }
}